1 / 67

Binary Image Analysis

Binary Image Analysis. Binary Image B(r,c). 0 represents the background 1 represents the foreground. 000 1 00 1 000 1 000 000 1111 000 1 000 000 1 00 1 000 1 000. Binary Image Analysis. is used in a number of practical applications, e.g. P art inspection Shape analysis

Télécharger la présentation

Binary Image Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Binary Image Analysis

  2. Binary Image B(r,c) 0 represents the background 1 represents the foreground 00010010001000 00011110001000 00010010001000

  3. Binary Image Analysis • is used in a number of practical applications, e.g. • Part inspection • Shape analysis • Enhancement • Document processing

  4. What kinds of operations? • Separate objects from background and from one another • Aggregate pixels for each object • Compute features for each object

  5. Example: red blood cell image • Many blood cells are separate objects • Many touch – bad! • Salt and pepper noise from thresholding • How useable is this data?

  6. Results of analysis • 63 separate objects detected • Single cells have area about 50 • Noise spots • Gobs of cells

  7. Binary Image Operations • Thresholding a gray-tone image • Convolution • Morphology • Feature extractions (area, centroid) • Connected components analysis

  8. 1. Thresholding • Convert gray level or color image into binary image • Use histogram • Definition: The Histogram of a gray-level image I is defined as • H(m) = { (r,c) : I(r,c) =m) } • Where m spans the gray values

  9. Histogram-Directed Thresholding How can we use a histogram to separate an image into 2 (or several) different regions? Is there a single clear threshold? 2? 3?

  10. Histogram • Background is black • Healthy cherry is bright • Bruise is medium dark • Histogram shows two cherry regions (black background has been removed) pixel counts 0 256 gray-tone values

  11. Automatic Thresholding: Otsu’s Method Grp 1 Grp 2 Assumption: the histogram is bimodal t Method: find the threshold t that minimizes the weighted sum of within-group variances for the two groups that result from separating the gray tones at value t.

  12. Thresholding Example original gray tone image binary thresholded image

  13. 2. Convolution • Given a gray level image I(r,c) and a mask m(r,c) convolution is I(r,c)*m(r,c)= ΣΣ I(k,l) . m(r-k,m-l) Masks

  14. SMOOTHING MASKS

  15. Convolution of an İmage with a Mask

  16. Image Enhancement WITH AVERAGING AND THRESHOLDING

  17. 3. Mathematical Morphology • Morphology: Study of forms of animals and plants • Mathematical Morphology: Study of shapes • Similar to convolution • Arithmetic operations Set Operations

  18. Need to define Image as a Set • Given a binary image I (r,c), assume 1 correspond to object 0 correspond to backround. • Define a set with elements to the coordinates of the object • X = { (r1,c1), (r2,c2),….}

  19. 111000 111000 000000 000000 • X=

  20. Set Operations

  21. Set Operations on Images AND, OR

  22. TRANSLATION REFLECTION

  23. Set Operations

  24. Morphologic Operations Binary mathematical morphology consists of two basic operations dilation and erosion and several composite relations closing and opening

  25. Dilation: Dilation expands the connected sets of 1s of a binary image. It can be used for 1. growing regions 2. filling holes and gaps

  26. Structuring Elements A structuring element is a shape mask used in the basic morphological operations. They can be any shape and size that is digitally representable, and each has an origin. box disk hexagon something box(length,width) disk(diameter)

  27. Dilation with Structuring Element S: ={ Z: (Sz)∩ B≠ Φ} B  S The arguments to dilation and erosion are • a binary image B • a structuring element S dilate(B,S) takes binary image B, places the origin of structuring element S over each 1-pixel, and ORs the structuring element S into the output image at the corresponding position. 0 0 0 0 0 1 1 0 0 0 0 0 dilate 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1 S B B  S origin

  28. DILATION

  29. DILATION

  30. Erosion BΘS ={ Z: (Sz) B} Erosion shrinks the connected sets of 1s of a binary image. It can be used for 1. shrinking features 2. Removing bridges, branches and small protrusions

  31. Erosion with Structuring Elements erode(B,S) takes a binary image B, places the origin of structuring element S over every pixel position, and ORs a binary 1 into that position of the output image only if every position of S (with a 1) covers a 1 in B. origin 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 erode S B B S

  32. EROSİON:

  33. IMAGE ENHANCEMENT WİTH MORPHOLOGY

  34. Example to Try 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 S B 1 1 1 1 1 1 1 1 1 erode dilate with same structuring element

  35. Opening and Closing • Closing is the compound operation of dilation followed • by erosion (with the same structuring element) • Opening is the compound operation of erosion followed • by dilation (with the same structuring element)

  36. Use of Opening Original Opening Corners • What kind of structuring element was used in the opening? • How did we get the corners?

  37. OPENİNG AND CLOSİNG

  38. FINGERPRİNT RECOGNİTİON

  39. HOW DO YOU REMOVE THE HOLES Hole: A closed backround region surrounded by object pixels

  40. Erode with hole ring and dilate with hole mask

  41. Morphological Analysis for Bone detection

  42. OBJECT DETECTION

  43. BOUNDARY EXTRACTİON Boundary: A set of one-pixel-wide connected pixels which has at least one neighbor outside the object

  44. BOUNDARY EXTRACTİON

  45. Skeleton Finding Skeleton: Set of one-pixel wide connected pixels which are at equal distance from at least two boundary pixels

  46. Morphological Image Processing

  47. Morphological Operations

  48. Morphological Operations

More Related