Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

OpenCV - Blob detection Java with params

$
0
0
I need a Java code with blob detection using parameters (example filterByCircularity). I found several examples in C ++ and Python, but none in Java with OpenCV. I have the code below and need to implement the parameters of blobs detection, (example filterByCircularity). Someone has already implemented this? Mat orig = Highgui.imread("E:\\PhotoIn.jpg",Highgui.IMREAD_GRAYSCALE); Mat MatOut= new Mat(); FeatureDetector blobDetector; blobDetector = FeatureDetector.create(FeatureDetector.SIFT); MatOfKeyPoint keypoints1 = new MatOfKeyPoint(); blobDetector.detect(orig,keypoints1); org.opencv.core.Scalar cores = new org.opencv.core.Scalar(0,0,255); org.opencv.features2d.Features2d.drawKeypoints(orig,keypoints1,MatOut,cores,2); Highgui.imwrite("e:\\PhotoOut.jpg", MatOut);

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>