1 / 39

Binary Image Processing

Binary Image Processing. The Computer Vision Lab Prof. Hyung-Il Choi. in the array (computer). Binary image. A binary image Only two gray levels (0 and 1). Note: The number of quantization levels most commonly used: 256 Binary vision system

seth-hughes
Download Presentation

Binary Image Processing

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 Processing The Computer Vision Lab Prof. Hyung-Il Choi

  2. in the array (computer) Binary image • A binary image • Only two gray levels (0 and 1). Note: The number of quantization levels most commonly used: 256 • Binary vision system • Uses a threshold to separate objects from the background. - compute geometric & topological properties (features) of objects for a given task. • Faster execution times : most operations can be implemented by logical operations (AND, OR, XOR) instead of integer arithmetic operations. • Small memory requirement. • Practically employed in many industrial situations. (Illumination can be controlled!) object pixels : 1 background : 0

  3. Thresholding (1) • One of the most important problems in a vision system is to identify subimages that represent objects. • Segmentation : partitioning of an image into region (P1,P2,P3,……,.Pk) according to homogeneity. • Each region Pi satisfies a predicate: all points in Pi have some common property • A binary image is obtained using an appropriate segmentation of a gray scale image. (by thresholding gray scale image - either hardwired in cameras or implemented in S/W)

  4. Thresholding (2) • F[i, j] : original gray image, B[i, j] : a resulting binary image (1) For a darker object on lighter background: (2) If known that the object intensity vales are in [T1, T2] • To be effective: - Object & background should have sufficient contrast. - Should know approximate gray levels of either objects or the background. This is known in industrial (controlled) situations.

  5. Geometric properties • Suppose that a thresholding scheme has given us objects in an image. • Recognize & locate objects. • Many applications in industry have utilized simple features of regions for determining the locations of objects and for recognizing them. e.g. size, position, orientation. • Size • will count # pixels of 1.

  6. Position • In industrial applications: Objects usually appear on a known surface, such as a table. The position of the camera is known with respect to the table. • An object’s position in the image determines its spatial location. • center of area (a centroid, center of mass) : first order moment Consider the intensity at a point as the mass at that point. Geometric properties: position (1) : average (mean) of j coordinates of object (1) pixels : average of icoordinates of object (1) pixels

  7. Geometric properties: position (2) Example

  8. Geometric properties: orientation (1) • Orientation • Define the orientation of an object as the orientation of the axis of elongation. ≡ axis of least second order moment variance(分散) = spread of data ≡ axis of least inertia • The axis of least second moment for an object is the line which gives where rij the perpendicular distance from an object point [i, j] to the line (axis)

  9. Geometric properties: orientation (2) Polar representation of a straight line • Why polar representation instead of y = ax + b ?

  10. The elongation E of the object Geometric properties: orientation (3) Solution: and • The orientation of the axis is given by:

  11. . Compute the coord. mean • Similary for 3D points . Computation of orientation using PCA • PCA (principal component analysis) • Let the coordinate of an object pixel be ① Construct a centered matrix from X. ② Compute the eigenvalue and eigenvector pairs of the covariance matrix. eigenvalue and eigenvector pairs assuming . - : the direction along which the data’s sample variance is the largest. : variance along the direction . - : can be used to define a coordinate system of a particular region.

  12. Projections • Projection of a binary image onto a line: finding the number of 1 pixel that are in lines perpendicular to each bin

  13. 1) Start position & lengths of runs of 1’s for each row (1,3) (7,2) (12,4) (17,2) (20,3) (5,13) (19,4) (1,3) (17,6) 2) Only lengths of runs, starting with the length of the 1 run bits at the maximum are needed to represent/store the length of a run With encoding: 3,3,2,3,4,1,2,1,3 : x 9 = 45bits 0,4,13,1,4 : 5 x 5 = 25bits 3,13,6 : 5 x 3 = 15 bits Note: need 22 bits (22 pixels) for each row without encoding. Run-length encoding • Use the lengths of the runs of 1 pixels to represent an image. • run : a set of adjacent pixels that lie on the same row of an image

  14. Binary algorithm: Definition (1) • Definition • Two pixels are 4 neighbors if they share a common boundary. 8 neighbors if they share at least one corner. • A pixel is said to be 4-connected to its 4-neighbors & 8-connected to its 8- neighbors. • path: a sequence of neighboring pixels.

  15. foreground: the set of all 1 pixels in an image, denoted by S. • connectivity: and are connected if there is a path from p and q consisting entirely of pixels of S. • connected component: a set of connected pixels . • background: The set of all connected components of (the complement of S) that have points on the border of an image. all other components of : holes Definition (2)

  16. Connectedness • Projection of a binary image onto a line: finding the number of 1 pixel that are in lines perpendicular to each bin

  17. Component labeling (1)

  18. Component labeling (2)

  19. Component labeling (3)

  20. Component labeling (4)

  21. Component labeling (5)

  22. Component labeling (6)

  23. Euler number

  24. Boundary following

  25. Area, perimeter and compactness

  26. Distance measure (1)

  27. Distance measure (2)

  28. Distance transforms

  29. Medial axis (1)

  30. Medial axis (2)

  31. Thinning (1)

  32. Thinning (2)

  33. Expanding and shrinking

  34. Morphological operations (1)

  35. Morphological operations (2)

  36. Morphological operations (3)

  37. Morphological operations (4)

  38. Morphological operations (4)

  39. Morphological operations (5)

More Related