Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cv::findContours( gray, contours, hierarchy, CV_RETR_EXTERNAL,
- CV_CHAIN_APPROX_SIMPLE);
- NSLog(@"contour size %lu",contours.size());
- for (int i = 0; i< contours.size(); i++)
- {
- cv::RotatedRect rect = cv::minAreaRect(contours[i]);
- cv::Point2f points[4];
- rect.points(points);
- std::vector<std::vector<cv::Point2f>> boxContours;
- cv::drawContours(image, boxContours, i,cvScalar(0,255,0),2);
- }
Add Comment
Please, Sign In to add comment