Ask Your Question

connectedComponents in openCV4Android?

asked 2014-10-14 01:17:36 -0500

HasanGhaforian gravatar image

updated 2014-10-14 02:34:14 -0500

berak gravatar image

Most of functions in openCV have similar name in openCV4Android.But I can not find relative method for cv2.connectedComponents() in openCV4Android.Do you know how I can find it?


I saw that function in this page: Image Segmentation with Watershed Algorithm.

edit retag flag offensive close merge delete


where did you find cv2.connectedComponents() ?

it seems, it's only available in 3.0

berak gravatar imageberak ( 2014-10-14 01:48:20 -0500 )edit

@berak I update question.please see it again.

HasanGhaforian gravatar imageHasanGhaforian ( 2014-10-14 02:17:05 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-14 02:33:01 -0500

berak gravatar image

cv2.connectedComponents() is from the 3.0 python tutorials. it does not exist in 2.4.x

there are:

public static int Imgproc.connectedComponents(org.opencv.core.Mat,org.opencv.core.Mat)
public static int Imgproc.connectedComponents(org.opencv.core.Mat,org.opencv.core.Mat,int,int)
public static int Imgproc.connectedComponentsWithStats(org.opencv.core.Mat,org.opencv.core.Mat,org.opencv.core.Mat,org.opencv.core.Mat)
public static int Imgproc.connectedComponentsWithStats(org.opencv.core.Mat,org.opencv.core.Mat,org.opencv.core.Mat,org.opencv.core.Mat,int,int)

in 3.0 (desktop) java, but you will have to wait a bit until the android version will get updated to 3.0

edit flag offensive delete link more


@berak Thank you,but how I can know minimum version of each function that is in Docs?

HasanGhaforian gravatar imageHasanGhaforian ( 2014-10-14 02:38:30 -0500 )edit
berak gravatar imageberak ( 2014-10-14 02:46:12 -0500 )edit

Question Tools


Asked: 2014-10-14 01:17:36 -0500

Seen: 1,083 times

Last updated: Oct 14 '14