I\'m trying to implement the example code of the following question by using opencv java api. To implement findContours(gray, contours, CV_RETR_LIST, CV_CHAIN_APPROX_
findContours(gray, contours, CV_RETR_LIST, CV_CHAIN_APPROX_
I realise this question has already been well answered, but to add an alternative for anyone who finds it in the future -
Imgproc.findContours(gray, contours, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE); for(int i=0;i