摘要 |
PROBLEM TO BE SOLVED: To enable speedup of a labeling processing of a connected area of an image by investigating whether pixels adjacent to one of the pixels to constitute the connected area are the areas or not when one of the pixels constituting the connected area is detected. SOLUTION: An index of the initial pixel is pushed to the next investigation candidate, connected area stacks (S401, 402). An investigated flag of the initial pixel of the connected area is raised (S403). The index is popped from the next investigation candidate stack (S404) and coordinates of pixels Pi adjacent to the pixel indicated by the index are set (S405). A variable (i) is initialized as zero (S406). When the pixels are uninvestigated and labeling is performed to them (S407), the index of the pixel Pi is pushed to both stacks (S408) and the investigated flag of the pixels Pi is raised (S409). The variable (i) is increased (S410), investigation whether all the adjacent pixels Pi are the ones of the connected area or not is performed.
|