套路:滤波模糊化——动态阈值分割
halcon中案例:surface_scratch.hdev,划痕与背景相似,背景均匀
read_image (Image, 'surface_scratch') get_image_size (Image, Width, Height) mean_image (Image, ImageMean, 7, 7) //用7×7的窗口对图像进行均值滤波,获得参考图像
//动态阈值分割 dyn_threshold (Image, ImageMean, DarkPixels, 5, '