简体   繁体   中英

watershed java implementation using opencv

I am trying to implement watershed algorithm with markers in java, found a example here , the code is in c++, i tried hard to convert it in java code but failed. Is there anyone who have already done it before? please help! I stuck at this function ( cv2.connectedComponents() ) because can't find it in java doc .

Add JavaCV to your project, it is an OpenCV wrapper for Java. In JavaCV the watershed algorithm is provided by cvWatershed() :

public static native void cvWatershed(CvArr image, CvArr markers);

You might find this thread interesting: Setting-up javaCV on NetBeans and Eclipse .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM