What are the parameters passed to cvFindContours() in JavaCV?

纵然是瞬间 提交于 2019-12-03 03:19:09

As comments mentioned by Mohammad those three parameters are header_size, mode and method. You can use this method as follows

    IplImage src = cvLoadImage(path);//hear path is actual path to image
    IplImage grayImage    = IplImage.create(src.width(), src.height(), IPL_DEPTH_8U, 1);
    cvCvtColor(src, grayImage, CV_RGB2GRAY);
    cvThreshold(grayImage, grayImage, 127, 255, CV_THRESH_BINARY);
    CvSeq cvSeq=new CvSeq();
    CvMemStorage memory=CvMemStorage.create();
    cvFindContours(grayImage, memory, cvSeq, Loader.sizeof(CvContour.class), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);

Hope this might help you to understand this method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!