Top hat transformation
• The top hat transformation is used as a simple tool for segmenting objects in gray-scale images that differ in brightness from background, even when the background is of uneven gray-scale.
• The top hat transform is superseded by the watershed segmentation for more complicated backgrounds.
• Assume a gray-level image X and a structuring element K. The residue of opening as compared to original image X ∖ (X ∘ K) constitutes a new useful operation called a Top hat transformation.
• The top hat transformation is a good tool for extracting light objects on a dark but slowly changing background. Those parts of the image that cannot fit into structuring element K are removed by opening.
• Subtracting the opened image from the original provides an image where removed objects stand out.
• The actual segmentation can be performed by simple thresholding (Fig 18).
• If an image were a hat, the transformation would extract only the top of it, provided that the structuring element is larger than the hole in the hat.
Fig 18:The top hat transform permits the extraction of light objects from an uneven background.
Example from visual industrial inspection
• A factory producing glass capillaries for mercury maximal thermometers had the following problem:
• The thin glass tube should be narrowed in one particular place to prevent mercuryfalling back when the temperature decreases from the maximal value. This is done by using a narrow gas flame and low pressure in the capillary.
• The capillary is illuminated by a collimated light beam—when the capillary wall collapses due to heat and low pressure, an instant specular reflection is observed and serves as a trigger to cover the gas flame.
• Originally the machine was controlled by a human operator who looked at the tube image projected optically on the screen; the gas flame was covered when the specular reflection was observed.
• This task had to be automated and the trigger signal learned from a digitized image. The specular reflection is detected by a morphological procedure (Fig 19).
Fig 19: An industrial example of gray-scale opening and top hat segmentation, i.e., image based control of glass tube narrowing by gas flame. (a)Original image of the glass tube, 512x256 pixels. (b)Erosion by a one-pixel-wide vertical structuring element 20 pixels long. (c)Opening with the same element. (d)Final specular reflection segementation by the top hat transformation.
Morphology segmentation and watersheds
Particles segmentation, marking, watersheds:
• Finding objects of interest in the image is called as segmentation.
• Mathematical morphology helps mainly to segment images of texture or images of particles in which the input image can be either binary or gray- scale.
• In the binary case, the task is to segment overlapping particles; in the gray- scale case, the segmentation is the same as object contour extraction.
• Morphological particle segmentation is performed in two basic steps:
° Location of particle markers
° Watersheds used for particle reconstruction
• The marker of an object or set X is a set M that is included in X. Markers have the same homotopy as the set X, and are typically located in thecentral part of the object.
• Application specific knowledge should be used for marker-finding technique.
• Object marking in many cases left to user, who marks objects manually on the screen.
• When the objects are marked, they can be grown from the markers, e.g., using watershed transformation, which is motivated by the topographic view of images.
• Consider the analogy of a landscape and rain; water will find the swiftest descent path until it reaches some lake or sea.
• The landscape can be entirely partitioned into regions which attract water to a particular sea or lake—these will be called catchment basins.
• These regions are influence zones of the regional minima in the image.
Watersheds, also called watershed lines, separate catchment basins. Watersheds and catchment basins are illustrated in the below figure:
Fig 20: Illustration of catchment basins and watersheds in a 3D landscape view.
Binary morphological segmentation
• The top hat transformation method is used to find the objects that differ in brightness from an uneven background.
• The top hat approach just finds peaks in the image function that differ from the local background.
• The gray-level shape of the peaks does not play any role, but the shape of the structuring element does. Watershed segmentation takes into account both sources of information and supersedes the top hat method.
• Morphological segmentation in binary images aims to find regions corresponding to individual overlapping objects.
• Each particle is marked first—ultimate erosion may be used for this purpose, or markers may be placed manually.
• The next task is to grow objects from the markers provided they are kept within the limits of the original set and parts of objects are not joined when they come close to each other.
• The oldest technique for this purpose is called conditional dilation. Ordinary dilation is used for growing, and the result is constrained by the two conditions.
• Geodesic reconstruction is more sophisticated and performs much faster than conditional dilation. The structuring element adapts according to the neighborhood of the processed pixel.
• Geodesic influence zones are sometimes used for segmenting particles.
Fig 21: Segmentation by geodesic influence zones(SKIZ) need not lead to correct result.
• The original binary image is converted into gray scale using the negative distance transform. If a drop of waterfalls onto a topographic surface of the dist image, it follows the steepest slope towards a regional minimum (Fig 22).
• Application of watershed particle segmentation is shown in Fig 23. We selected an image of a few touching particles as an input Fig 23(a).
• The distance function calculated from the background is visualized using contours in Fig 23(b).
• The regional maxima of the distance function serve as markers of the individual particles (Fig 23(c)).
• In preparation for watershed segmentation, the distance function is negated, and is shown together with the dilated markers (Fig 23(d)).
Gray-scale segmentation, watersheds
• The markers and watersheds method can also be applied to gray-scale segmentation. Watersheds are also used as crest-line extractors in gray- scale images.
• The contour of a region in a gray-level image corresponds to points in the image where gray-levels change most quickly—this is analogous to edge based segmentation.
• The watershed transformation is applied to the gradient magnitude (Fig 24).
• Algebraic difference of unit-size dilation and unit-size erosion of the input image X
• The main problem with segmentation via gradient images without markers is over-segmentation, meaning that the image is partitioned into too many regions.
• The watershed segmentation methods do not suffer from over- segmentation.
• The below Fig will illustrate the application of watershed segmentation.
Comments
Post a Comment