Assignment Document

Apply the morphological closing operation

Pages:

Preview:


  • "1 (a). Apply the morphological closing operation followed by the opening operation in thefollowing binary image, step by step, with the 3x3 structuring element centered at theorigin as shown. Discuss the results of this sequence of operations. Dilat..

Preview Container:


  • "1 (a). Apply the morphological closing operation followed by the opening operation in thefollowing binary image, step by step, with the 3x3 structuring element centered at theorigin as shown. Discuss the results of this sequence of operations. Dilation and erosion are the two basic operations that can be combined into morecomplex sequences. The most useful of these for morphological filtering are called opening andclosing. Opening consists of an erosion followed by a dilation and can be used to eliminate allpixels in region that are too small to contain the structuring element. The structuring element isoften called a probe because it is probing the image looking for small objects to filter out of theimage. The basic effect of opening is somewhat like erosion in that it tends to remove some ofthe bright pixels from the edges of regions of foreground pixels. However it is less destructivethan erosion in general.Closing consists of a dilation followed by erosion and can be used to fill in holes andsmall gaps. Closing is similar in some ways to dilation in that it tends to enlarge the boundariesof foreground regions in an image, but it is less destructive of the original boundary shape.Dilation can repair the breaks and intrusions. The basic effect of the operator on a binaryimage is to gradually enlarge the boundaries of region of foreground pixels. Erosion can split thejoints apart. Erosions shrinks the objects.Given Binary image1 1 1 1 1 1 1 1 1 11 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11Structuring element 1 1 1 1 1Closing operation: dilation then erosion After dilation:1 1 1 111 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 111 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 11 In the dilation process if the origin of the structuring element coincides with a white pixelin image there is no change. Then move to next pixel. If the origin of the structured elementcoincides with a black in the image make black all pixels from the image covered by thestructuring element. After erosion:1 1 1 11 1 1 1 1 11 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 11 In the erosion process if the origin of structuring element coincides with a white pixel inimage there is no change, move to next pixel. If the origin of the structuring element coincideswith a black pixel in image and at least one of the black pixel in the structuring element fallsover a white pixel in the image then change the black pixel in the image from black to white. Opening: erosion then dilationAfter erosion: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 11 1 11 In the erosion process if the origin of structuring element coincides with a white pixel inimage there is no change, move to next pixel. If the origin of the structuring element coincideswith a black pixel in image and at least one of the black pixel in the structuring element fallsover a white pixel in the image then change the black pixel in the image from black to white. After dilation:1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 11 1 11 In the dilation process if the origin of the structuring element coincides with a white pixelin image there is no change. Then move to next pixel. If the origin of the structured elementcoincides with a black in the image make black all pixels from theimage covered by thestructuring element. 1 (b). After a gray scale image is segmented and an object is converted to its binaryrepresentation as shown below, give a chain code for its boundary B starting from its topleft pixel. Give the chain code that can eliminate the effect of the starting point.Given binary image: 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 11 1 11 1 11 Chain code: 0 0 7 1 7 5 7 5 6 5 6 5 7 5 3 3 3 3 2 3 1 2 1 1Chain codes represent a boundary by a connected sequence of straight-line segments ofspecified length and direction. Typically this representation is based on a 4- or 8-connectivity.The direction of each segment is coded by numbers and the resulting chain code is a sequence ofnumbers 2. Describe the morphological watershed algorithm for image segmentationSegmentation is one of the most important problems in image processing. It consists ofconstructing a symbolic representation of the image: the image is described as homogeneousareas according to one or several a priori attributes. The image segmentation algorithms aregenerally based on the two basic characteristics of the luminance: discontinuity and similarity.Edge detection algorithms are based on the discontinuity. Similarly, the thresholdprocessing, region growing, regional separation and polymerization are based on similarity.Watershed algorithm which is a mathematics morphological method for image segmentationbased on region processing, has many advantages.The watershed transformation is one of the oldest segmentation techniques which wasinitially due to Beucher and Lantu´ejoul. This technique is well known to be a very powerfulsegmentation tool. One of the advantages of the watershed transformation is that it alwaysprovides closed contours, which is very useful in image segmentation. Another advantage is thatthe watershed transformation requires low computation times in comparison with othersegmentation methods.The result of watershed algorithm is global segmentation, border closure and highaccuracy. It can achieve one-pixel wide, connected, closed and exact location of outline. Thebasic concept of watershed is based on visualizing a gray level image into its topographicrepresentation, which includes three basic notions: minima, catchment basins and watershedlines.There are mainly three methods to implement watershed. They are Distance TransformApproach, Gradient method and Marker Controlled Approach. A tool used commonly in conjunction with the watershed transform for segmentation isthe distance transform. It is the distance from every pixel to the nearest nonzero-valued pixel. Abinary image can be converted to a gray level image, which is suitable for watershedsegmentation using different DT. However, different DT functions produce different effects.Euclidean DT has a higher possibility of “salt and pepper” over segmentation. City Block DT hasa higher possibility of over segmentation for the components in the image. The reason is that City Block DT propagates to the neighborhood in the shape of diamond. Chessboard DT has abetter pruning effect due to its square shape propagation. It can effectively remove thejaggedness formed in the Euclidean DT and avoid the components over segmentation caused byCity Block DT.The gradient magnitude is used to pre process a gray-scale image prior to using thewatershed transform for segmentation. The gradient magnitude image has high pixel valuesalong object edges and low pixel values everywhere else. Watershed transform would result inwatershed ridge lines along object edges. There is a problem of over segmentation in thismethod. The topological gradient provides a global analysis of the image then the almostunwanted contours due to the noise added to a given image can be significantly reduced by ourapproach. The experimental results show that the over segmentation problem, which usuallyappears with the watershed technique, can be attenuated, and the segmentation results can beperformed using the topological gradient approach. Another advantage of this method is that itsplits the segmentation process into two separate steps: first we detect the main edges of theimage processed, and then we compute the watershed of the gradient detected.Direct application of watershed transform to a gradient image can result in oversegmentation due to noise. Over segmentation means a large number of segmented regions. Anapproach used to control over segmentation is based on the concept of markers. A marker is aconnected component belonging to an image. Markers are used to modify the gradient image.Markers are of two types internal and external, internal for object and external for boundary. Themarker-controlled watershed segmentation has been shown to be a robust and flexible methodfor segmentation of objects with closed contours, where the boundaries are expressed as ridges.Markers are placed inside an object of interest; internal markers associate with objects ofinterest, and external markers associate with the background. After segmentation, the boundariesof the watershed regions are arranged on the desired ridges, thus separating each object from itsneighbors. 3. An object has been extracted through image segmentation and is represented as f(i, j) inthe binary form as shown below. Describe the process of finding its medial axis in terms ofa thinning algorithm.Given binary image: 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 11Thinning algorithm is a Morphological operation that is used to remove selectedforeground pixels from binary images. It preserves the topology (extent and connectivity) of theoriginal region while throwing away most of the original foreground pixels. Thinning is somewhat like erosion or opening. It can be used for several applications, butis particularly useful for skeletonization and Medial Axis Transform. In this mode it iscommonly used to tidy up the output of edge detectors by reducing all lines to single pixelthickness.Like other morphological operators, thinning operators take two pieces of data as input.One is the input image, which maybe either binary or grey scale. The other is the structuringelement, which determines the precise details of the effect of the operator on the image. Thinning algorithm1. Assume region points have value 1 and background points 0.2. A contour point is any pixel with value 1 and having at least one 8-neighbor valued 0P P P9 2 3 P P P8 1 4 P P P7 6 5 The thinning method consists of successive passes of two steps applied to the contour pointsStep 1: Flag a contour point p for deletion if the following conditions are satisfied:9 (a). 2 = ? (? ) = 6, where N(? ) =?1 1 ? 1=2 (b). S(? ) = 1, where S(? ) is the 0-1 transitions in the ordered sequence of p p … p2, 3 9 1 1(c). P P P = 02. 4. 6 (d). P P P = 04. 6. 8 To keep the structure during this step, points are not deleted until all border points havebeen processed. Step 2’(c ). P P P = 02. 4. 8’(d ). P P P = 02. 6. 8The whole procedure for one iteration‰-> Applying step 1 to flag border points for deletion‰-> Deleting the flagged points ‰ -> Applying step 2 to flag the remaining border points for deletion‰ -> Deleting the flagged pointsStructuring elements:B1 B2 B3 B4 X 1 X1 1 XX 1 X 1 11 11 1 1 1 1 1 1 X 1 XXB5 B6 B7 B81 1 1 X 1 1X 1 XX 1 X1 11 11 1 XX 1 X 1 1Image thinned with structuring element B1.1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 11 Image thinned with structuring element B2.1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 11 1 1 1 1 11Image thinned with structuring element B3.1 1 1 1 1 11 1 1 11 1 1 1 11 1 11 11 1 1 1 1 1 11 1 11 Image thinned with structuring element B4.1 1 1 1 1 11 1 1 1 1 1 1 11 1 11 1 1 1 1 1 1 11 1 11Image thinned with structuring element B5.1 1 1 1 1 11 1 1 1 1 1 1 11 1 11 1 1 1 1 1 1 11 1 1 Image thinned with structuring element B6.1 1 1 1 1 11 1 11 1 1 11 1 11 1 1 1 1 1 1 1Image thinned with structuring element B7.1 1 1 1 1 11 1 11 1 1 11 1 11 1 1 11 1 1 Image thinned with structuring element B8.1 1 1 1 1 11 1 11 1 1 11 1 11 1 1 11 1 1 4 (a). Object shape description should be independent of its scaling, translation androtation. For the object given in problem 3 give a set of shape descriptors that will beeffective, for example either by fourier transform or by the principal component analysisand describe how do you extract them.109 1 181 1 1 1 1 1 7 1 1 11 1 1 6 1 1 1 11 1 151 1 11 1 141 1 1 1 1 1 31 1 121 1 11 1 0y0x 1 2 3 4 5 6 7 8 9 10 11Fourier Descriptor (FD) obtained by applying Fourier transform to a Shape Signature.Normalized Fourier transformed coefficients are called: Fourier Descriptor for the shape. FD’sderived from different signatures has significant different performances on shape retrieval.InGeneral FD from centroid distance r(t) outperforms FD’s derived from other shape descriptors interms of overall performance.1 -? 2? ? ? ? -1 ? = ? (? )exp? n=0,1,2,……N-1? ? =0 ? ?4 (b) Define the gray level co-occurrence matrix G(i, j), for a pair of pixels (x, y) and (x+dx,y+dy) with gray levels of i and j respectively, of an image of K gray levels from which toevaluate statistical texture features. For an illustrative sample image shown below and for(dx, dy) = (1, 1), determine the co-occurrence matrix and then normalize it to obtain theprobability of joint occurrence of p(i, j). Define four texture features; correlation, contrast,energy and entropy5 6 7 5 3 25 7 6 1 2 58 8 6 8 1 24 3 4 5 5 18 7 8 7 4 27 8 6 2 6 2Gray Level Co-occurrence Matrix (GLCM) is a widely used texture descriptor and it isproven that results obtained from the co-occurrence matrices are better than the other texturediscriminations methods. GLCM computes the statistical features based on gray level intensitiesof the image. Such features of the GLCM are useful in texture recognition, image segmentation,image retrieval, color image analysis, image classification, object recognition and textureanalysis methods etc. thesecond order statistical parameters from the Gray level co-occurrencematrix of the texture: contrast, energy, homogeneity and correlation. First order statisticalparameters are calculated from the image intensity values without considering the pixel neighborrelationship.The Gray Level Co-occurrence Matrix (GLCM) is a widely used texture analysis methodespecially for stochastic textures. It enhances the details of image and gives the interpretation. The GLCM is a tabulation of how often different combinations of pixel brightness values (graylevels) occur in an image.The advantage of the co-occurrence matrix calculations is that the co- occurring pairs of pixels can be spatially related in various orientations with reference to distanceand angular spatial relationships, as on considering the relationship between two pixels at a time.As a result the combination of grey levels and their positions are exhibited apparently.Therefore it is defined as “A two dimensional histogram of gray levels for pair of pixels, which are separated by a fixed spatial relationship”. However the matrix is sensitive to rotation. Withthe change of different offsets define pixel relationships by varying directions and displacementvectorsTexture is a property that represents the surface and structure of an image or it can bedefined as a regular repetition of an element or pattern on a surface.Textures of an image arecomplex visual patterns that are composed of entities or regions with sub-patterns with thecharacteristics of brightness, color, shape, size, etc. A constant texture in an image represents aset of its characteristics that are constant, gradually changing or approximately periodic. Textureanalysis characterizes the spatial variation of image pattern based on some mathematicalprocedures and models to extract information from it. Gray-Level Co-occurrence Matrix(GLCM) is one of the earliest methods used for texture feature extraction was proposed byHaralick back in 1973. Contrast: Contrast is a local grey level variation in the grey level co-occurrence matrix. It can bethought of as a linear dependency of grey levels of neighboring pixels. If the neighboring pixelsare very similar in their grey level values then the contrast in the image is very low. In case oftexture, the grey level variations show the variation of texture itself. High contrast values areexpected for heavy textures and low for smooth, soft textures.2? ? ? ? ? ? ? ? =? -? ? (? ,? )? ,? Entropy: Entropy in any system represents disorder, where in the case of texture analysis is ameasure of its spatial disorder. A completely random distribution would have very high entropybecause it represents chaos. Solid tone image would have an entropy value of 0. This feature canbe useful to tell us if entropy is bigger for heavy textures or for the smooth textures giving usinformation about which type of texture can be considered statistically more chaotic.? ? ? ? ? ? ? = - ? (? ,? )log? (? (? ,? ))? ,? Energy: Energy is a measure of local homogeneity and therefore it represents the opposite of theEntropy. Basically this feature will tell us how uniform the texture is. The higher the Energy value, the bigger the homogeneity of the texture. The range of Energy is [0,1], where Energy is 1for a constant image.2 ? ? ? ? ? ? =? (? ,? )? ,? Correlation: Correlation that brings out how correlated a reference pixel to its neighbor over animage, is uncorrelated to energy, contrast and homogeneity. The equation for correlationmeasurement considers the mean and standard deviation for row and column in the matrix.? ?? ×? ×? ? ,? - µ - µ? ? ? ? ? ? ? ? ? ? ? ? ? = ? × ? ? ? ? =1 ? =1 µ µ and ? ? are mean and standard deviation of the probability matrix GLCM alng row wise? ? ? ? x and column wise y.Given image:5 6 7 5 3 25 7 6 1 2 58 8 6 8 1 24 3 4 5 5 18 7 8 7 4 27 8 6 2 6 2 Matrix that obtained based on intensity values isGray1 2 3 4 5 6 7 8values1 0 2 0 0 0 0 0 02 0 0 0 0 1 1 0 03 0 0 0 1 0 0 0 04 0 1 1 0 1 0 0 050 0 1 0 1 1 1 06 1 2 0 0 0 0 1 17 0 0 0 1 1 1 0 28 1 0 0 0 0 2 2 1Co-occurrence matrix:0 2/28 0 0 0 0 0 00 0 0 0 1/28 1/28 0 00 0 0 1/28 0 0 0 00 1/28 1/28 0 1/28 0 0 00 0 1/28 0 1/28 1/28 1/28 01/28 2/28 0 0 0 0 1/28 1/280 0 0 1/28 1/28 1/28 0 2/281/28 0 0 0 0 2/28 2/28 1/28 Probability of joint occurrence of p(i, j)C = 0 C = 0.71 C = 0 C = 0 C = 0 C = 0 C = 0 C = 01,1 1,2 1,3 1,4 1,5 1,6 1,7 1,8 C = 0 C = 0 C = 0 C = 0 C = 0.03 C = 0.03 C = 0 C = 02,1 2,2 2,3 2,4 2,5 2,6 2,7 2,8 C = 0 C = 0 C = 0 C = 0.03 C = 0 C = 0 C = 0 C = 03,1 3,2 3,3 3,4 3,5 3,6 3,7 3,8 C = 0 C = 0.03 C = 0.03 C = 0 C = 0.03 C = 0 C = 0 C = 04,1 4,2 4,3 4,4 4,5 4,6 4,7 4,8 C = 0 C = 0 C = 0.03 C = 0 C = 0.03 C = 0.03 C = 0.03 C = 05,1 5,2 5,3 5,4 5,5 5,6 5,7 5,8 C = 0.03 C = 0.71 C = 0 C = 0 C = 0 C = 0 C = 0.03 C = 0.036,1 6,2 6,3 6,4 6,5 6,6 6,7 6,8 C = 0 C = 0 C = 0 C = 0.03 C = 0.03 C = 0.03 C = 0 C = 0.717,1 7,2 7,3 7,4 7,5 7,6 7,7 7,8 C = 0.03 C = 0 C = 0 C = 0 C = 0 C = 0.71 C = 0.71 C = 0.038,1 8,2 8,3 8,4 8,5 8,6 8,7 8,8"

Related Documents

Start searching more documents, lectures and notes - A complete study guide!
More than 25,19,89,788+ documents are uploaded!

Why US?

Because we aim to spread high-quality education or digital products, thus our services are used worldwide.
Few Reasons to Build Trust with Students.

128+

Countries

24x7

Hours of Working

89.2 %

Customer Retention

9521+

Experts Team

7+

Years of Business

9,67,789 +

Solved Problems

Search Solved Classroom Assignments & Textbook Solutions

A huge collection of quality study resources. More than 18,98,789 solved problems, classroom assignments, textbooks solutions.

Scroll to Top