摘要 |
PURPOSE:To efficiently extract a hole of a picture with a simple method, in a short processing time by obtaining X-coordinate of black and white picture elements in one line of a raster scan. CONSTITUTION:When X-coordinate of the black picture element at the left end in applying raster scan to a binary image is Bs, the X-coordinate of the black picture element at the right end is Be, the X-coordinate of the white picture element between he coordinates Bs and Be in the transition from the black picture element to the white picture element is Ws, and the X-coordinate of the white picture element in moving from the white picture element to the black picture element is We, when the state is transited from a 1st state where no white picture element exists between the coordinates Bs and Be in one line of the raster scan into a 2nd state where a white picture element exists between the coordinates Bs and Be through the consecutive raster scanning, a flag 1 is set. In a picture shown in figure, the flag 1 is set by a raster 3 and the coordinates Ws, We and the coordinates Bs, Be at one preceding raster 2 are checked. When the conditions of Bs2<Ws3 and We3<Be2 are satisfied, it is considered that there exists a hole.
|