Image and Video Compression

39
Image Segmentation Made by: Rahul Mishra 2012ecs01

description

Slides for image processing.

Transcript of Image and Video Compression

1

Image SegmentationMade by:Rahul Mishra2012ecs011Outline & ContentIntroductionThresholdingEdge-based segmentationRegion-based segmentationconclusion2IntroductionWhat is segmentation?

Three major ways to do.ThresholdingEdge-based segmentationRegion-based segmentation

33ThresholdingFinding histogram of gray level intensity.

Basic Global ThresholdingOtsus MethodMultiple ThresholdVariable Thresholding

4Edge-based segmentationUsing mask to detect edge in image by convolution.

Basic Edge DetectionThe Marr-Hildreth edge detector(LoG)Short response Hilbert transform(SRHLT)Watersheds

5Region-based segmentationFinding region, but not finding edge.

Region GrowingData Clustering (Hierarchical clustering)Partitional clusteringCheng-Jin Kuo`s method

6 ThresholdingBasic Global ThresholdingSelect an initial ToSegment image use:

Compute the average intensity and for the pixels in and .

Compute a new threshold:

Until the difference between values of T is smaller than a predefined parameter.

7Otsus Method{0,1,2,,L-1} , L means gray level intensity M*N is the total number of pixel. denote the number of pixels with intensitywe select a threshold , and use it to classify : intensity in the range and : , , , it is global variance.

8Optimum Global Thresholding, viewed as a statistical-decision8 it is between-class variance , it is a measure of separability between class. For x = 0,1,2,,M-1 and y = 0,1,2,N-1.Using image Smoothing/Edge to improve Global Threshold

SmoothingEdge detectionWhat situation is more suitable for the methodLarge object we are interested.Small object we are interested9Smoothing can make intensity more smooth , on the other way the edge detection can make intensity more clear 9Multiple Threshold As Otsus method, it takes more area and k*

Disadvantage: it becomes too complicate when number of area more than three.

1010Variable ThresholdingImage partitioning.

It is work when the objects of interest and the background occupy regions of reasonably comparable size. If not , it will fail.

11It is to subdivide an image into nonoverlapping rectangles11Variable thresholding based on local image properties Let and denote the standard deviation and mean value of the set of pixels contained in a neighborhood, .

123)special case12Using moving averageIt discussed is based on computing a moving average along scan lines of an image. denote the intensity of the point at step k+1. n denote the number of point used in the average. is the initial value. ,where b is constant and is the moving average at point (x,y)

13Edge-based segmentationBasic Edge DetectionWhy we can find edge by difference? image intensity first-order deviation second-order deviation

First-order deviationproduce thicker edgesSecond-order deviation stronger response to fine detaildouble-edge responseDetermine edge is from light to dark or dark to light1414GradientThe image gradient is to find edge strength and direction at location (x,y) of image.

The magnitude (length) of vector , denoted as M(x,y):

The direction of the gradient vector is given by the angle:

15Roberts cross-gradient operators:

Prewitt operator:

Sobel operator:

16

The Marr-Hildreth edge detector(LoG)This is second-order deviation, we call Laplacian.

Filter the input image with an n*n Gaussian lowpass filter. 99.7% of the volume under a 2-D Gaussian surface lies between about the mean. So .

17For linear processing17Short response Hilbert Transform(SRHLT)Hilbert transform ,

18The longer impulse response will reduce the sensitivity of the edge detector and at the same time reduce the influence of noise.

18SRHLT

Lower bHigher bImpulse responseLongerShorterNoise robustnessGoodBadType of edgeRampStepOutputThickSharp19Type of edge is more suitable for ramp or stepOutput is width of edge

19Simulation result20

WatershedsAlgorithm: , g(s,t) is intensity. n= min+1 to n = max +1. And let T[n]=0, others 1. , is minimum point beneath n.

21It is visualizing an image in three dimensions: two spatial coordinates and intensity.21MarkersExternal markers:Points along the watershed line along highest points.

Internal markers: (1) That is surrounded higher points . (2) Points in region form a connected component (3) All points in connected component have the same intensity.

22Right-up : gradient , Left-down : smoothing22Region-based segmentationRegion GrowingAlgorithm:Choose a random pixelsUse 8-connected and threshold to determineRepeat a and b until almost points are classified.

23Talk about advantage and disavantage23Simulation of region growing (90% pixels )Threshold/second: 20/4.7 seconds.

24Talk about advantage and disavantage

24Data Clustering

Using centroid to represent the huge numbers of clusters

Hierarchical clustering, we can change the number of cluster anytime during process if we want.

Partitional clustering , we have to decide the number of clustering we need first before we begin the process.

2525Hierarchical clusteringAlgorithm of hierarchical agglomeration(built)See every single data as a cluster .

Find out , for the distance is the shortest.

Repeat the steps until satisfies our demand.

as the distance between data a and b

2626Algorithm of hierarchical division (break up ) Diameter of cluster

27

cluster 27See the whole database as one cluster.Find out the cluster having the biggest diameter , .Split out x as a new cluster , and see the rest data points as .If > , then split y out of and classify it to Back to step2 and continue the algorithm until and is not change anymore.

28

Partitional clusteringDecide the numbers of the cluster(k-means)

Problem:Initial problem

29Number of regions are more than clusters you set.

Determine the number of clusters.

30 intra minimize the sum of squared distances from all points to their cluster centers. inter separate the differences between clusters . bigger the better. 30Simulation of k-meansClustering/time: 9 clustering/ 0.1

31Advantage and disadvantage of data clustering

Hierarchical algorithmPartitional algorithmsadvantage1.Concept is simple

2. Result is reliable.1.Computing speed is fast.2.Numbers of cluster is fixed, so the concept is also simple.

disadvantageIt is consuming, so is not suitable for a large database.

Determine the number of clusters.Initial problem .

32Cheng-Jin Kuo`s methodAlgorithm

33Adaptive threshold decision with local variance

Variance of Lena: 1943

Small variance cause small threshold.

34Adaptive threshold decision with local variance and frequency

Variance of baboon: 1503

35high frequency 35High frequency, high variance. Set highest threshold.

(4,1)High frequency, low variance. Set second high threshold.

(4,2)Low frequency, high variance. Set third high threshold. (1,4)Low frequency, low variance. Set the lowest threshold. (1,1)

36threshold36Comparison of all algorithm by data compressionRegion growingK-meansWatershedCheng-Jin Kuo`s methodSpeedbadGood(worse than C.J.Ks method)badGoodShape connectivityintactfragmentaryoversegmentationIntactShape matchGood(better than C.J.Ks method)Good(equal C.J.Ks method)badGood37Shape match = system reliability , watershed has oversegmentation , k-means need waste a lot of memory to record the boundaries.37ConclusionSpeed

Connectivity

System reliability

38compression38ReferenceR. C. Gonzalez, R. E. Woods, Digital Image Processing third edition, Prentice Hall, 2010.C. J. Kuo, J. J. Ding, Anew Compression-Oriented Fast image Segmentation Technique, NTU,2009.39HLT

differentiation

Choose a suitable value