Since these parameters including the threshold, weight and the characteristic quantity vary with such conditions as the input type, the camera model, the color space (processing region), the image processing in preliminary steps, the image format and the scan condition, they are altered in the present invention in accordance with such conditions as the input type, the camera model, the processing