Closed MattijsKneppers closed 5 years ago
Interestingly, you did wrap a Params class that seems to be the equivalent of cv::SimpleBlobDetector::Params in OpenCV. As far as I can see this Params class is currently never used in OpenCVForUnity.
Maybe I am missing something though, in that case it would be great if you could point me in the right direction.
Since this package is a clone of OpenCV Java, you are able to use the same API as OpenCV Java 4.0.0. So, SimpleBlobDetector class is not supported for now. The Params class is currently never used as you pointed out. I plan to fix this bug in a future version. https://docs.opencv.org/4.0.0/javadoc/org/opencv/features2d/Params.html Also, Since OpenCV is open source, it is possible to refer to SimpleBlobDetector's algorithm. https://github.com/opencv/opencv/blob/master/modules/features2d/src/blobdetector.cpp
Thanks for the quick reply and for clarifying, it is especially useful to know that looking at the Java version docs is most useful to understand the Unity port.
Did you manage to port it @MattijsKneppers ? I am in need of that class. Thanks
I did, however I'd need to properly test it for more general use and maybe make an example before I do a pull request. Or I could just do a pull request with the file as is and leave it up to the authors to test and integrate. @EnoxSoftware would you have a preference?
I can definitely help with testing with my use case if you share a PR or temporal pastebin.
Here are the files in a zip, just taken straight out of the project without any testing:
Thanks, I will let you know how it is on my side!
The biggest flaw I found was the findblob is using the input image and not its binary version. After fixing that I got some results. However, the python implementation is quite superior. I didnt have time to pinpoint exactly where the issue comes from.
findblob is using the input image and not its binary version
Hey, nice catch! It worked for me, but now it will likely work better. In fact I don't see why the original image is passed in at all in the original code.
For the archives here is the fixed version. SimpleBlobDetector V2.zip
However, the python implementation is quite superior
I tried to do a literal port of the original code, but if you ever find out what is different that makes the python version work better, I'd love to know!
Hi @MattijsKneppers
Thanks for your work, it works for me.
It looks like SimpleBlobDetector, that is part of the OpenCV 4.0.x package, is not in OpenCVforUnity. Is this intentional or could this be an oversight?