C++ opencv3 no ideas how to divide these thresholded image

asked 2017-07-10 12:17:41 -0500

gfx gravatar image

After some image transform, I obtain these image.

thresholded image

After trsforming the video image I get this stain, which I would like to separate along the red line hand-drawn. I tried with shi-thoman corner detection without getting anything worthwhile. I do not know what strategy to take .... I'm able to filter the little point on screen with findcontour, for exemple and about area contour.

But I have not ideas about how to separe the 4 object along the red line (the desired result ... red line is draw by hands).

regards gfx

edit retag flag offensive close merge delete


To get this right: The problem that you have is to find the marked corners and the strain we are seeing shows 4 objects (perhaps overlapping each other)? To the line you have drawn: Is it always nearly horizontal and the smallest distance to an other corner?

Franz Kaiser gravatar imageFranz Kaiser ( 2017-07-11 11:10:28 -0500 )edit

may be and not try ... you have understand well my problem ... but not sure is possible obtain some usable angle point ... any how thanks. For first time in my life for solve these I try to use cascade classifier ... after a day spent for nothing obtain I try to use the DataCar illinois database for make my first experiment ...using these tutorial but I obtain only the same error as with my .vec, .info and bg.txt file ... `mode: BASIC

===== TRAINING 0-stage ===== <begin pos="" count="" :="" consumed="" 500="" :="" 500="" train="" dataset="" for="" temp="" stage="" can="" not="" be="" filled.="" branch="" training="" terminated.="" cascade="" classifier="" can't="" be="" trained.="" check="" the="" used="" training="" parameters.="" `="" ubuntu="" 14="" kernel="" 4.0="" opencv="" 3.0="" ...="" but="" for="" these="" open="" a="" new="" <="" p="">

regards gfx

gfx gravatar imagegfx ( 2017-07-11 13:04:05 -0500 )edit

Curvature. Perhaps the getting points where the curvature is over a threshold can help you? I have tried it (see picture) but there seems to be a problem left. Also I don't know if it is repeatable for you specific problem.

Franz Kaiser gravatar imageFranz Kaiser ( 2017-07-12 04:49:07 -0500 )edit

Thanks a lot ... a new ideas (for me is really new, never utilize).... the problem in these case not is more or less point, but the caos ...for find that contour I must use erode and dilate, PID control of light = instability of these way to find out somethings ... So i'm crunching something solider .... that's why i thought of a haar cascade .... although i have not been able to run opencv_traincascade app .... do you have any experience about it? Do you know why I get the error? I created a post on the subject ....

gfx gravatar imagegfx ( 2017-07-12 05:19:06 -0500 )edit

bounding rect

for more precision the targhet not rotate ... so hinspired from Franz Ideas I find out 2 new solution: 1) the targhet is 4 product identical .... so there are a sort of "STEP" one from other ... finding max X pixel in these contour I can add 1/2 step for first time and after the 1/1 step and fin yn and yn+1 coord ... 2)I can draw a bounding rect, divide it on two different image and ... no this is not a good opportunity.

the green line is from bottom, the max x, the x + 1/2Step, the x+1/2Step+Step ... and so on ... the design is not well proportioned

gfx gravatar imagegfx ( 2017-07-12 05:41:28 -0500 )edit