how to detect "inhomogeneity" areas in the presence of other defects

asked 2018-08-28 16:22:44 -0600

GXY gravatar image

Hi, I want to detect the so-called "inhomogeneity" areas in the four corners(not always, can be anywhere within the image)of the image below. the boundaries can be both straight lines and curves, so I can't use HoughLines(HoughLinesP doesn't work well either). if I use findContours, the long horizontal line with bright pixels will also be detected, as well as some small holes in the image, which I don't want. Another problem with findContours is the parameter tuning for the generation of the binary image, which is needed as input for findContours. I've also tried to use a shifting window(the one I've tried is of size 7*7) and to calculate the mean and STD with the help of "meanStdDev" within the window, and then set some kind of threshold values to filter(because the long horizontal line has a much higher mean and the small holes have higher STDs), but again I don't know how to choose threshold values properly.

Now I am stuck with this problem, Any suggestions will be appreciated, thanks in advance! image description

edit retag flag offensive close merge delete