SimpleBlobDetector and zero moment
Hi,
I use SimpleBlobDetector and I have got an exception when there is a line in Mat img at row 0 or img.rows-1 or column 0 or img.cols-1. An example of such image is here
In one of previous case all moments m00, m10, .... are equal to 0. When SimpleBlobDetector is used at line 270 it is written
center.location = Point2d(moms.m10 / moms.m00, moms.m01 / moms.m00);
There is no check about m00 here. There is check at line 290 but it's too late Is it right?
Thanks for your answer
yes, ofc. the check has to go before that.
(btw, i'm still wondering, why it finds a contour in that place at all. did you find out anything about that yet ?)
Yes I have made this image with Libreoffice draw and I forget to delete boundaries around rectangle and circle (that is the reason that I have deleted one of my post). You can see a small blue line at border image. But this problem (m00=0) occurs too for pixel region.
ah, ok.
(and right, it does not matter, where or how it finds a 0pixel area. if it can happen, the check has to go before the divide)
i have created a bug report 4321