An apparatus for detecting one or more contours of an image formed on a screen. The apparatus comprises a scanner for raster scanning pixels located on scan lines extending in paralllel with each other in the X direction of a two-dimensional coordinate system to successively produce binary pixel data regarding the scanned pixels. The binary pixel data have a first value representing a background forming pixel or a second value representing an object forming pixel. The binary pixel data are transferred to a pixel data matrix stored therein. The pixel data matrix includes pixel data regarding two adjacent pixels located on the next scan line. The latter two adjacent pixels are respectively adjacent to the former two adjacent pixels in the Y direction of the two-dimentional coordinate system. The apparatus also comprises a processing circuit which receives the pixel data matrix transferred thereto from the pixel data matrix forming circuit for producing data indicating the image contour(s).
This invention provides an image processing method and apparatus. According to this invention, contour line data when viewed from a the main scan direction are generated on the basis of the connection relationship between a target line element and adjacent line elements before and after the target line element in one direction of continuous line elements, and a direction of an area to be painted out. It is then set that a pixel position of an odd-numbered contour encountered in a scan operation in the main scan direction indicates a forward rotation position of the area, and that an adjacent pixel position in the main scan direction of an even-numbered contour encountered in the scan operation indicates a reverse rotation position of the area. Thereafter, it is discriminated that a portion between an odd-numbered contour position, when viewed from a scan direction on each scan line, to a pixel position immediately before an even-numbered contour position is a portion inside the area of a closed figure, and remaining portions are outside the area of the closed figure.