Skip to content Skip to sidebar Skip to footer

OpenCv Java : How To Find Connected Components Of Image In OpenCv JAVA

i am working in image processing and find the connected components in a image. in MATLAB i am using bwconncomp function but can anyone help me how can i do it in java or is there

Solution 1:

Take a look at FindContours

You can use it in Android with:

Imgproc.findContours(Mat image, 
        java.util.List<MatOfPoint> contours, 
        Mat hierarchy, 
        int mode, 
        int method)

The hierarchy parameter concerns image topology and nested contours, therefore, for simple contours you can just pass new Mat() and Imgproc.RETR_LIST and Imgproc.CHAIN_APPROX_NONE for mode and method respectively.


Post a Comment for "OpenCv Java : How To Find Connected Components Of Image In OpenCv JAVA"