lecture 8:image segmentation -...
TRANSCRIPT
![Page 1: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/1.jpg)
Prof. YingLi TianNov. 7, 2018
Department of Electrical EngineeringThe City College of New York
The City University of New York (CUNY)
Lecture 8: Image Segmentation
1
I2200: Digital Image processing
Thanks to G&W website, Dr. Shahram Ebadollahi for slide materials
![Page 2: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/2.jpg)
Outline Introduction Thresholding Edge Segmentation and Linking
Hough Transform Region-based Approach Using Morphology for Segmentation
Watershed Algorithm
![Page 3: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/3.jpg)
Image Analysis and Segmentation Low-level image processing: inputs and
outputs are all images Mid-/High-level image processing: inputs
are images; outputs are information or attributes of the images
Image analysis: extract useful information from the result of low-level image processing
Image segmentation: divides an image into meaningful parts or objects 3
![Page 4: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/4.jpg)
Image Segmentation Image segmentation -- decompose image into
“meaningful” regions or objects Discontinuity: the abrupt change in graylevels -- point,
line, edge detection… Similarity: predefined criteria of similarity --
thresholding, region growing, region splitting and merging…
Approaches: Thresholding edge-based vs. region-based global vs. local Feature-based – texture, motion, color
4
![Page 5: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/5.jpg)
Image Segmentation
5
![Page 6: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/6.jpg)
Detection of discontinuities Points, Lines, Edges
6
![Page 7: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/7.jpg)
Point Detection
7
MATLAB:w = [-1 -1 -1; -1 8 -1; -1 -1 -1];
g = abs(imfilter(double(f), w) >= T;
![Page 8: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/8.jpg)
Point Detection Example
8
![Page 9: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/9.jpg)
Line Detection
9
![Page 10: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/10.jpg)
Line Detection Example
10
![Page 11: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/11.jpg)
Edge Detection Common method to detect discontinuities
because isolated points or one-pixel wide lines are rare
Edge: the borders of regions with different graylevels
Digital edge model:
11
![Page 12: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/12.jpg)
Ramp Edge More clear edge: width of the ramp is narrow;
fuzzy edge: width of the ramp is wider All pixels in the ramp are edge points First derivatives:
12
![Page 13: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/13.jpg)
Ramp Edge
13
Second derivatives:
![Page 14: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/14.jpg)
Ramp Edge
14
Second derivatives:
Sign of second derivative determines if an edge point is on the bright or dark side There are positive and negative values on a ramp
edge Zero-crossing: intersection of the 0-value line and
the line connecting the positive and negative points position of edge
![Page 15: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/15.jpg)
15
Image Derivatives
![Page 16: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/16.jpg)
Image Derivatives 1st order derivative produces “thick” edges 2nd order derivative has stronger response
to fine edges 2nd order derivative produces double edge
response at ramp and step transitions in intensity
2nd order derivative’s sign can be used to find out if going from dark to light or vice versa
16
![Page 17: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/17.jpg)
Edge Detection Edge point: 2nd order derivative is greater
than a threshold Edge: set of connected edge points (need to
predefine “connection”) Edge segment: short edges
17
![Page 18: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/18.jpg)
Edge Detection Implementation
18
![Page 19: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/19.jpg)
Edge Detection Implementation
19
2nd order derivative: Laplacian or LoG operator
![Page 20: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/20.jpg)
Edge Detection
20
After thresholding
Averaged prior to edge detection
![Page 21: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/21.jpg)
Edge detection: Marr-Hildreth method
21
Edge detection operator should be “tunable” to detect edges at different “scales”
![Page 22: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/22.jpg)
Edge detection: Marr-Hildreth method
22
In practice- sample Gaussian function [nxn samples]- convolve with image f(x,y): image smoothing- convolve result with Laplacian mask- find zero-crossings of g(x,y) How?
Low zero-crossingthreshold
High zero-crossingthreshold
g(x, y)
![Page 23: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/23.jpg)
Edge detection: Canny method Goal: Satisfy the following 3 criteria:
Detection: should not miss important edges Localization: distance between the actual and located
position of the edge should be minimal One response: only one response (edge) to a single
actual edge Algorithm
Step 1: Smooth input image with a Gaussian filter Step 2: Compute the gradient magnitude and angle
images
23
![Page 24: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/24.jpg)
Canny Edge detection – Step 3: nonmaxima suppression
24
![Page 25: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/25.jpg)
Canny Edge detection – Step 3: nonmaxima suppression
25
![Page 26: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/26.jpg)
Canny Edge detection – Step 4: Reducing false edge points (hysteresis thresholding)
26
![Page 27: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/27.jpg)
Canny Edge detection
27
![Page 28: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/28.jpg)
Thresholding Goal: setting threshold T in histogram to
segment the image Global Thresholding: T is constant
everywhere in the image Variable Thresholding: T varies
Local Thresholding: T changes based on the neighborhood properties
Adaptive Thresholding: T changes based on the coordinates
28
![Page 29: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/29.jpg)
Thresholding
29
![Page 30: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/30.jpg)
Thresholding Multimodal
T related to f(x, y) only: global thresholding
T related to f(x, y) and p(x, y) only: local thresholding
T related to f(x, y), p(x, y), and (x, y): dynamic (adaptive) thresholding
30
![Page 31: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/31.jpg)
Thresholding - pitfalls
31
Effect of Illumination
Effect of Noise
![Page 32: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/32.jpg)
Global Thresholding
32
1. T=T02. Segment using T3. Get average gray-level for region G1 (f > T) and region G2 (f <= T)4. T_new = average of average of gray-levels5. Repeat until convergence
![Page 33: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/33.jpg)
Global Thresholding
33
![Page 34: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/34.jpg)
Global Thresholding
34
![Page 35: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/35.jpg)
Optimal Threshold
35
Pose problem as: minimizing error of assigning pixels in image to two or more groups
![Page 36: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/36.jpg)
Optimal Threshold
36
![Page 37: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/37.jpg)
Optimal Threshold – Otsu’s method Otsu defines the measure of “goodness” of
a threshold based on how well it can separate two (or more) classes (regions)
Goal: Measure of goodness
37
![Page 38: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/38.jpg)
Optimal Threshold – Otsu’s method
38
Thresholding in MATLAB using Otsu’s method fordetermining the threshold:
![Page 39: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/39.jpg)
Adaptive Thresholding – Image Partitioning
39
![Page 40: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/40.jpg)
Adaptive Thresholding – Moving Average
40http://en.wikipedia.org/wiki/Thresholding_(image_processing)
![Page 41: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/41.jpg)
Hough Method for Line Detection
41
![Page 42: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/42.jpg)
Hough Method: Normal line representation
42
![Page 43: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/43.jpg)
Hough Method: Matlab
43
![Page 44: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/44.jpg)
44
![Page 45: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/45.jpg)
Edge-based segmentation: Problems Spurious edges due to noise and low
quality image. Difficult to identify spurious edges.
Dependent on local neighborhood information
No notion of higher order organization of the image
Gaps and discontinuities in the linked edges
45
![Page 46: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/46.jpg)
Region-based segmentation
46
![Page 47: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/47.jpg)
Region Growing Goal: group pixels or subregions into larger
regions based on predefined criteria for growth
Method:1. Start with a set of “seed” points2. Grow regions by appending to each seed
those neighboring pixels that have predefined properties similar to the seed (e.g., graylevel, texture…)
47
![Page 48: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/48.jpg)
Region Growing
48
Use points (3, 2) and (3, 4) are seeds; property: grayleveldifference < 3:
![Page 49: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/49.jpg)
Region splitting and merging Goal: Partition image into disjoint
subregions and then perform splitting and merging
Method: subdivide R until subregion P(Ri) = TRUE
1. Splitting: if P(R) = FALSE, divide R into quadrants (Ri, i = 1, 2, …, 4); if P(Ri) = FALSE, divide Ri into subquadrants, and so on Quadtree of quadregions
49MATLAB quadtree decomposition: qtdecomp( )
![Page 50: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/50.jpg)
Region splitting and merging
50
![Page 51: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/51.jpg)
Morphological Watersheds “Topographic” points:
Points belong to regional minimum Points at which drop of water, if placed at the
location of any of those points, would fall with certainty to a single minimum (catchment basin or watershed)
Points at which water would be equally likely to fall to more than one such minimum (divide lines or watershed lines)
51
![Page 52: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/52.jpg)
Morphological Watersheds
52
Goal: Find watershed lines
Build dams to prevent water flow from one catchment basin to other
![Page 53: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/53.jpg)
Boundaries between flooded catchment basins
53
![Page 54: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/54.jpg)
Segmentation using Watershed
54
![Page 55: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/55.jpg)
55
Moving Object Detection Main goal: detecting moving objects from a
video sequence of a fixed camera Background – static scene Foreground – moving objects Approach: detect the moving objects as the
difference between the current frame and the image of the scene background.
Current imagefrom C. Stauffer and W. Grimson
Background image Foreground pixels
![Page 56: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/56.jpg)
56
Challenges How to automatically obtain the background
image? Foreground processing The background image must adapt to:
Illumination changes (gradual and sudden) Distracting motions (camera shake, swaying
tree, moving elevators, ocean waves…) Scene changes (parked car)
Others: Shadows Black/blue screen Bad weathers Foreground fragment
![Page 57: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/57.jpg)
57
Basic BGS – basic idea (1) Pixels belongs to foreground if | Current
Frame – BG Image| > Threshold BG image can be just the previous frame or
the average image of a number of frames Works only in particular conditions of
objects’ speed and frame rate Very sensitive to the threshold
![Page 58: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/58.jpg)
58
Basic BGS – example (2)
Current Frame
Difference
High threshold
Lowthreshold
![Page 59: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/59.jpg)
59
Basic BGS -- average (3) Median/average: use the average or the
median of the previous n frames Quick but memory consuming
Running average Alpha is adapt rate (0.05).
)()1(1 iii FBB
![Page 60: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/60.jpg)
60
Basic BGS – selectivity (4)
![Page 61: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/61.jpg)
BGS Examples
61
![Page 62: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/62.jpg)
62
Background Subtraction and Foreground Analysis
![Page 63: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/63.jpg)
Moving Object Detection with Lighting Changes
63
![Page 64: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/64.jpg)
Improved BGS Results
64
![Page 65: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/65.jpg)
Recent Deep Learning-based Image Segmentation
65
Image Segmentation (PSPnet):https://www.youtube.com/watch?v=HYghTzmbv6Q&t=27s
https://www.youtube.com/watch?v=rB1BmBOkKTw&t=23s
![Page 66: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/66.jpg)
Announcement Reading
G&W 8.1-8.2 (exclude 8.2.2) McKay book chapter 1, 5
http://www.inference.phy.cam.ac.uk/mackay/itila/
Final project is finalized. The projects and report template can be found from course website.
Peter presents HW3 today.
66
![Page 67: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/67.jpg)
Final Project -- Due: 12/11/2018 Each Project,
final report (doc file)
presentation (ppt file) 12/11/2018 source code
Final Report Introduction (Problem statement, Motivation) Approach Work Performed (Experiments, software programming, etc.) Results Discussion Reference (cited papers or website) A table listing tasks performed in the project and the percentage
contributions by each team member of individual tasks, as well as overall project. All team members must sign this table.
67
![Page 68: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/68.jpg)
Final Project -- Due: 12/11/2018 Steps to do final project,
Understand the problem to be solved Literature review to understand state-of-the-art Decide which methods you want to try Method implementation Method testing and evaluation Analyze results Write final report Prepare presentation slides
Total 15 minutes (12 mins talk + 3 mins questions)
68
![Page 69: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/69.jpg)
Final Project -- Due: 12/11/2018 Project Presentation on 12/12/2018,
Project 1: Peter Vertenten Project 2: Jinglun Feng Project 3: Rezwon Bhuiyan Project 4: Dingdong Li Project 5: Md Rashiduzzaman and SM Asraful
Alam Project 6: Subash Shrestha Project 7: Sandeep kumar and Azita darvishi Project 8: Tahiya Tazreen and Md. Minhaz Zaman
Lasker
69
![Page 70: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/70.jpg)
Final Project -- Due: 12/11/2018 Project Presentation on 12/19/2018,
Project 9: Muhammad Bhatti Project 10: Ching Chan and Tamanna Tanjil Project 11: Munib Ahsan Project 12: Mollie Murray Project 13: Keshav Teeluck Project 14: Michael Ousseinov Project 15: Ashfaq A Khan
70
![Page 71: Lecture 8:Image Segmentation - media-lab.ccny.cuny.edumedia-lab.ccny.cuny.edu/wordpress/YLTCCNYHomepage/... · Image Analysis and Segmentation Low-level image processing: inputs and](https://reader030.vdocuments.site/reader030/viewer/2022040622/5d349fe488c993b2278c8d1d/html5/thumbnails/71.jpg)
HW3 Presentation
71