The invention discloses an industrial product color feature intelligent automatic extraction method based on
machine learning, and the method comprises the steps: S1, carrying out the
template matching and positioning, creating an effective
Mask image, and filling an interference region; s11, constructing a multi-scale contour extractor by adopting morphology in combination with an
edge detection algorithm, eliminating a pseudo edge caused by uneven illumination through
corrosion expansion operation, and generating a target contour template for
template matching positioning and adapting to positioning of materials with different colors; s12, after the target contour is positioned, calculating a color median of a target area, uniformly filling interference areas with black, and eliminating interference of background colors on color classification; s13, creating a
Mask image, setting an interference area as 0, and setting other areas as effective target areas as 1; s14, interference of the background and the defect on color classification is eliminated, and subsequent
feature extraction is made to aim at the effective target area; and S15, obtaining an original image, a
Mask image and a filled image.