I want to to find the starting point of the lung area then i need to edge detection using freeman code for detection of lung cancer object using matlab 7.0
The error message means that some element of the contour you are feeding in, is not immediately adjacent to another pixel. The test used is whether all the coordinates differ by no more than 1 in x and y from the pixel immediately before. You can apply the same test to the list of rows and columns returned by contour_trace and then work on figuring out why it happens.
I imagine it would happen if the character has parts that are not touching the rest. Freeman code chains are not intended to handle characters that have discontinuous outlines. For example, Freeman code chains are not intended to be able to handle the separated dot on top of the lower-case I
Best Answer