PURPOSE: To accelerate a labelling processing by arranging numerical values for picture elements inside a window provided with the specific number of the picture elements, referring to processing selection tables prepared beforehand and performing a pertinent processing.
CONSTITUTION: The processing selection table 14 is a table for selecting which processing (the processing for imparting a temporary label to be connected and imparting the new temporary label, etc.) the numerical value is to be performed. Then, the window of 2×(m) {(m) is an integer of ≥2} is divided into plural pieces, the respective processing selection tables 14 are provided, the processing is successively selected and the temporary labeling is performed. Thus, by dividing the picture elements inside the window provided with the picture elements of 2×(m) at need arranging the numerical values, referring to the tables 14 prepared beforehand and performing the pertinent processing (imparting the temporary label to be connected and imparting the new temporary label, etc.) the number of processing step is made small regardless of a window size and the labelling processing can be accelerated.