Skip to main content
Computer Vision
CSE/ECE 576
Linda Shapiro
Professor of Computer Science & Engineering
Professor of Electrical & Computer Engineering
Course Information
• Time:
– MW: 1:30-2:50
• Location:
– ECE 037
• Contact:
– shapiro@cs.uw.edu
• TAs:
– Kechun Liu
– kechun@cs.washington.edu
– Meredith Wu
– wenjunw@uw.edu
– Mehmet Saygin Seyfioğlu
– msaygin@uw.edu
• Website:
– https://courses.cs.washington.edu/courses/cse576/23sp/
2
Topics
• Introduction
• Color and Texture
• Image Coordinates, Transforms, and Resizing
• Filters and Convolutions
• Edges and Lines
• Interest Operators, Image Matching, Image Stitching
• Face Detection/Recognition
• Machine Learning Overview including Neural Nets
• Object Detection and Recognition with ML
• Convolutional Neural Networks
• CNN Applications
• Motion/Optical Flow
• Stereo and 3D Depth Perception
3
Grading (tentative)
• Six regular assignments (75%)
• One Course Project (25%)
• NO EXAMS (Yay!)
4
Assignments
• Build a vision library from the ground up
• Mostly in C
• Play with advanced tools, neural networks
• Beginning: lots of skeleton code, explanations
• End: less guidance, more experimentation
5
Assignment 1: Fun with Color
6
Assignment 2: Image Resizing and
Filtering
7
Assignment 3: Panorama Stitching
8
Assignment 4: Neural Networks
9
Assignment 5: PyTorch
10
Assignment 6: Optical Flow
11
Final Course Project: Machine
Learning for Some Kind of Application
12
• a • c
• b
• d
Books
13
Older, but designed
for undergrads and
has the basics. Chapters
available from our web
page.
Newest and available
as a pdf online (both
the 2010 and 2020
versions).
14
15
White
1m
Shadow
Car
Horse
Wheel
Person
Sky
Road
The car is in front of the pole
16
Computer Vision
• Low Level Vision
– Measurements
– Enhancements
– Region segmentation
– Features
• Mid Level Vision
– Reconstruction
– Depth
– Motion Estimation
• High Level Vision
– Category detection
– Activity recognition
– Deep understandings
18
Computer Vision
• Low Level Vision
– Measurements
– Enhancements
– Region segmentation
– Features
• Mid Level Vision
– Reconstruction
– Depth
– Motion Estimation
• High Level Vision
– Category detection
– Activity recognition
– Deep understandings
1m
White
Shadow
19
Measurement
Brightness
20
Measurement
Brightness
Slide Credit: Alyosha Efros
21
http://www.newworldencyclopedia.org/entry/Same_color_illusion
Measurement
Length
http://www.michaelbach.de/ot/sze_muelue/index.html
Müller-Lyer Illusion
Slide Credit: Alyosha Efros
22
Image Enhancement
Image Inpainting, M. Bertalmío et al.
http://www.iua.upf.es/~mbertalmio//restoration.html
23
Image Enhancement
Image Inpainting, M. Bertalmío et al.
http://www.iua.upf.es/~mbertalmio//restoration.html
24
Image Enhancement
Image Inpainting, M. Bertalmío et al.
http://www.iua.upf.es/~mbertalmio//restoration.html
25
Seam Carving
[Shai & Avidan, SIGGRAPH 2007] 26
less
important
Content-aware resizing uses important areas.
Extends in horizontal direction and reduces in vertical.
Traditional resizing uses and stretches the
whole image.
[Shai & Avidan, SIGGRAPH 2007] 27
Computer Vision
• Low Level Vision
– Measurements
– Enhancements
– Region segmentation
– Features
• Mid Level Vision
– Reconstruction
– Depth
– Motion Estimation
• High Level Vision
– Category detection
– Activity recognition
– Deep understandings
The car is in front of the pole
28
Applications: 3D Scanning
Scanning Michelangelo’s “The David”
• The Digital Michelangelo Project
- http://graphics.stanford.edu/projects/mich/
• UW Prof. Brian Curless, collaborator
• 2 BILLION polygons, accuracy to .29mm
29
The Digital Michelangelo Project, Levoy et al.
30
31
32
33
34
35
Google’s 3D Maps
Structure estimation from tourist photos
36
Apple’s 3D maps
37
https://www.youtube.com/watch?v=InIVv-LsgZE
Computer Vision
• Low Level Vision
– Measurements
– Enhancements
– Region segmentation
– Features
• Mid Level Vision
– Reconstruction
– Depth
– Motion Estimation
• High Level Vision
– Category detection
– Activity recognition
– Deep understandings
– Pose estimation
Car Horse
Person
Sky
Road
38
Face detection
• Many new digital cameras now detect faces
– Canon, Sony, Fuji, …
Source: S. Seitz
39
Vision-based interaction: Xbox Kinect
40
How hard is computer vision?
41
Marvin Minsky, MIT
Turing award,1969
“In 1966, Minsky hired a first-year
undergraduate student and assigned him
a problem to solve over the summer:
connect a television camera to a
computer and get the machine to
describe what it sees.”
Crevier 1993, pg. 88
43
Marvin Minsky, MIT
Turing award,1969
Gerald Sussman, MIT
(the undergraduate)
“You’ll notice that Sussman never worked
in vision again!” – Berthold Horn
Why vision is so hard?
45
Why is vision so hard?
• Ill-posed problem
[Sinha and Adelson 1993]
46
Challenges 1: view point variation
Michelangelo 1475-1564 slide by Fei Fei, Fergus & Torralba
47
Challenges 2: illumination
slide credit: S. Ullman
48
Challenges 3:
occlusion
Magritte, 1957 slide by Fei Fei, Fergus & Torralba
49
Challenges 4: scale
slide by Fei Fei, Fergus & Torralba
50
Challenges 5: deformation
Xu, Beihong 1943
slide by Fei Fei, Fergus & Torralba
51
Challenges 6: background clutter
Klimt, 1913 slide by Fei Fei, Fergus & Torralba
52
Challenges 7: object intra-class variation
slide by Fei-Fei, Fergus & Torralba
53
Challenges 8: local ambiguity
slide by Fei-Fei, Fergus & Torralba
54
Challenges 9: the world behind the image
Slide Credit: Alyosha Efros
55
What Works Today?
56
• Reading license plates, zip codes, checks
Svetlana Lazebnik
57
Biometrics
Fingerprint scanners on
many new laptops,
other devices
Face recognition systems now beginning
to appear more widely
http://www.sensiblevision.com/
Source: S. Seitz
58
Mobile visual search: Google Goggles
59
Face detection
• Many new digital cameras now detect faces
– Canon, Sony, Fuji, …
Source: S. Seitz
60
Smile detection
Sony Cyber-shot® T70 Digital Still Camera Source: S. Seitz
61
Face recognition: Apple iPhoto,
Facebook, Google, etc
62
Object recognition (in supermarkets)
LaneHawk by EvolutionRobotics
“A smart camera is flush-mounted in the checkout lane, continuously watching
for items. When an item is detected and recognized, the cashier verifies the
quantity of items that were found under the basket, and continues to close the
transaction. The item can remain under the basket, and with LaneHawk,you are
assured to get paid for it… “
63
Safety
64
Security
65
Automotive safety
• Mobileye: Vision systems in high-end BMW, GM, Volvo models
– Pedestrian collision warning
– Forward collision warning
– Lane departure warning
– Headway monitoring and warning
Source: A. Shashua, S. Seitz
66
Google cars
Oct 9, 2010. "Google Cars Drive Themselves, in Traffic". The New York Times. John Markoff
June 24, 2011. "Nevada state law paves the way for driverless cars". Financial Post.
Christine Dobby
Aug 9, 2011, "Human error blamed after Google's driverless car sparks five-vehicle
crash". The Star (Toronto)
67
Vision-based interaction: Xbox Kinect
68
Augmented reality, consumer products
http://nconnex.com/wp/
69
Special effects: shape and motion capture
Source: S. Seitz
70
Vision for robotics, space exploration
Vision systems (JPL) used for several tasks
• Panorama stitching
• 3D terrain modeling
• Obstacle detection, position tracking
NASA'S Mars Exploration Rover Spirit captured this westward view from atop
a low plateau where Spirit spent the closing months of 2007.
Source: S. Seitz
71
Medical imaging
Image guided surgery
Grimson et al., MIT
3D imaging
MRI, CT
72
73
Classification of 22q11.2DS
• Treat 2D azimuth-elevation angle
histogram as feature vector
Computer vision research in
healthcare
assisted living, patient monitoring
[Lan et al, PAMI 2012]
autism screening
http://www.gatech.edu/newsroom/release.h
ml?nid=60509
74
Computer vision in the real-world
• Most examples are less than 7 years old
• Very active research area. Many new applications
to come.
• A website of computer vision industries
maintained by Prof. David Lowe (UBC)
• Note: website is old but interesting
• Note: David Lowe retired and moved to Google
2015 to 2018
http://www.cs.ubc.ca/~lowe/vision.html
75
Assignments
• Assignment 1: Fun with Color
• Assignment 2: Image Resizing and Filtering
• Assignment 3: Panorama Stitching
• Assignment 4: Neural Networks
• Assignment 5: Pytorch
• Assignment 6: Optical Flow
• Course Project: Teams working on Machine
Learning Projects
76
Assignment 1
• It’s about color, which we will cover
Wednesday.
• It’s meant to be very easy, but you want to
start it early.
77
Assignment 1 Parts
• 1. data structure for an image
typedef struct{
int h, w, c;
float *data;
} image;
• So an image is a 3D array with height, width and
channels (like for colors).
• data is floating point numbers between 0 and 1
78
Assignment 1: Parts
Read them
• TODO #1: get_pixel and set_pixel
• TODO #2: copy_image
• TODO #3: rgb_to_grayscale
• TODO #4: shift_image (shifts values)
• TODO #5: clamp_image (get values between 0
and 1)
• TODO #6: rgb_to_hsv
• TODO #7: hsv_to_rgb
79
80
Have Fun