Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void approximation(int counter) {
- MatOfPoint2f approx = new MatOfPoint2f();
- MatOfPoint2f approxCurve = new MatOfPoint2f();
- approxContours = hullmop;
- for (int i = 0; i < counter; i++) {
- hullmop.get(i).convertTo(approx, CvType.CV_32FC2);
- double approxDistance = Imgproc.arcLength(approx, true) * 0.0001;
- Imgproc.approxPolyDP(approx, approxCurve, approxDistance, true);
- approxCurve.convertTo(approxContours.get(i), CvType.CV_32S);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement