Guest User

Untitled

a guest
Mar 22nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. cv::findContours( gray, contours, hierarchy, CV_RETR_EXTERNAL,
  2. CV_CHAIN_APPROX_SIMPLE);
  3. NSLog(@"contour size %lu",contours.size());
  4. for (int i = 0; i< contours.size(); i++)
  5. {
  6. cv::RotatedRect rect = cv::minAreaRect(contours[i]);
  7. cv::Point2f points[4];
  8. rect.points(points);
  9.  
  10. std::vector<std::vector<cv::Point2f>> boxContours;
  11.  
  12. cv::drawContours(image, boxContours, i,cvScalar(0,255,0),2);
  13. }
Add Comment
Please, Sign In to add comment