随机背景中的划痕缺陷检测

Scratch defection detection in a random background

提问人:xtkwfn 提问时间:10/17/2023 最后编辑:toyota Supraxtkwfn 更新时间:10/17/2023 访问量:96

问:

正常情况下,当产品表面存在划痕时,像素的值与其背景不同,但当背景像随机噪声时,很难区分划痕缺陷和背景。

src img 包括 scrach 交叉二进制图像

分离不同灰度值的常用方法是二值化,将SRC图像与二值化IMG,结果难以分离划痕。

Mat img_roi = imread(str_path_read, 0);
/*fix threshold*/
int thresh_b = 170;
Mat img_roi_b;
threshold(img_roi, img_roi_b, thresh_b, 255, THRESH_BINARY_INV);
C++ 镜像 OpenCV 检测 HALCON

评论

1赞 Isotope 10/17/2023
您是否考虑过使用线检测算法(如 Hough 变换)来检测划痕?docs.opencv.org/3.4/d9/db0/tutorial_hough_lines.html
0赞 xtkwfn 10/17/2023
这是一种方法,我会试一试,谢谢!

答: 暂无答案