Stanford CS223B Computer Vision, Winter 2007 Lecture 2b Software for Computer Vision
CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a...
-
date post
20-Dec-2015 -
Category
Documents
-
view
212 -
download
0
Transcript of CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a...
![Page 1: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/1.jpg)
CS223BAssignment 1 Recap
![Page 2: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/2.jpg)
Lots of Solutions!
• 37 Groups
• Many different approaches
• Let’s take a peek at all 37 results on one image from the test set
![Page 3: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/3.jpg)
![Page 4: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/4.jpg)
![Page 5: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/5.jpg)
![Page 6: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/6.jpg)
![Page 7: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/7.jpg)
![Page 8: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/8.jpg)
![Page 9: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/9.jpg)
![Page 10: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/10.jpg)
![Page 11: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/11.jpg)
![Page 12: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/12.jpg)
![Page 13: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/13.jpg)
![Page 14: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/14.jpg)
![Page 15: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/15.jpg)
![Page 16: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/16.jpg)
![Page 17: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/17.jpg)
![Page 18: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/18.jpg)
![Page 19: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/19.jpg)
![Page 20: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/20.jpg)
![Page 21: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/21.jpg)
![Page 22: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/22.jpg)
![Page 23: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/23.jpg)
![Page 24: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/24.jpg)
![Page 25: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/25.jpg)
![Page 26: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/26.jpg)
![Page 27: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/27.jpg)
![Page 28: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/28.jpg)
![Page 29: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/29.jpg)
![Page 30: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/30.jpg)
![Page 31: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/31.jpg)
![Page 32: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/32.jpg)
![Page 33: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/33.jpg)
![Page 34: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/34.jpg)
![Page 35: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/35.jpg)
![Page 36: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/36.jpg)
![Page 37: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/37.jpg)
![Page 38: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/38.jpg)
![Page 39: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/39.jpg)
Possible Things to Look For
• Symmetry
• Color
• Shadow
• Corners
• Edges
• Texture
• Taillights
![Page 40: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/40.jpg)
Road Finding Tactic 1
• Run adaptive flood fill on the image starting at the pixels near the bottom
• Everything that gets filled in is considered road
• Holes inside the road are likely car candidates
![Page 41: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/41.jpg)
Road Finding Tactic 2
• Run an edge detector (such as Prewitt or Canny) and a Hough transform, and then look for lines with the right approximate angle and position.
![Page 42: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/42.jpg)
Road Finding Tactic 3
• Sample the color from some pixels directly in front of car (bottom of image)
• Generate a difference map using this color
• Run an edge detector on this difference map, followed by a Hough transform
![Page 43: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/43.jpg)
Road Finding Tactic 4
• Assume the road is in pretty much the same place in every image and hard code it in
![Page 44: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/44.jpg)
Edge Approach 1
• Detect edges with Canny detector
• Dilate image to join nearby edges
• Fill in closed regions
![Page 45: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/45.jpg)
Edge Approach 2
• Custom edge mask that considers vertical and horizontal edges in likely configurations
![Page 46: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/46.jpg)
Shadow Finding
• Use a mask that enhances horizontal edges
• Look for several adjacent rows of dark pixels in the road region
![Page 47: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/47.jpg)
Corner Approach
• Compute strong corners
• Cluster them with kmeans
• Find the densest clusters and compute their convex hulls
![Page 48: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/48.jpg)
Texture Approach
• Look for regions of high frequency– Find density of edges in rectangular regions– Mask or sum the derivative across rectangular
regions– Take FFT of image and set magnitudes to 1,
leaving only phase info; inverse FFT then enhances portions with many frequencies
![Page 49: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/49.jpg)
Taillight Detection
• Transforming the color space can help spot the reddest pixels
• Groups of these pixels are good candidates for taillights
• If there’s a horizontal pair of taillights, even better
• Or, use a mask with the pair built in
![Page 50: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/50.jpg)
Going from Pixels to Regions
• Count the number of “car pixels” in square regions; if above a threshold, consider it a car region
![Page 51: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/51.jpg)
Statistical Classifier
More stages mean many fewer false positives (and only slightly fewer missed cars)
![Page 52: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/52.jpg)
Multiple Classifiers
![Page 53: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/53.jpg)
Filtering Classifier Output Tactics
• Check number of corners in the rectangle.If too low, reject.
• Check position and size of rectangle. If it doesn’t make sense given perspective, then reject.
• Run an edge detector on the rectangular region and then sum the pixels inside. If below threshold, reject.
• Look at the average derivative of image intensity. If below threshold, reject.
![Page 54: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/54.jpg)
Consider Geometry of Scene
![Page 55: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/55.jpg)
Combining Results from Different Detectors
• Many of the best solutions used some weighted combination of several heuristics to verify the strength of hypotheses
…
![Page 56: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/56.jpg)
Building a Better Bounding Box
• Get the strong corners in the box, and then trace the convex hull of these corners to eliminate some of the road.
• Alternatively, make a 2D or 3D model of car shape based on image position and replace rectangle with appropriate polygon.
• Or, segment the rectangle by colors and keep only the inner segments.
![Page 57: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/57.jpg)
Common Mistakes
• Strange ways of drawing car regions
• Don’t use anti-aliased lines or flood fill, just draw filled polygons with cvPolyLine
![Page 58: CS223B Assignment 1 Recap. Lots of Solutions! 37 Groups Many different approaches Let’s take a peek at all 37 results on one image from the test set.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d4c5503460f94a2a0c8/html5/thumbnails/58.jpg)
Common Mistakes
• Stray Pixels
• Could be fixed with image close operation