Guest User

Untitled

a guest
Jul 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void draw_rectangle(uint8_t *frame, int x, int y,
  2. int width, int height)
  3. {
  4. cv::Mat frame_yuv;
  5. int size[2];
  6. Point pt1, pt2;
  7. cv::Scalar color = Scalar(255, 0, 0);
  8.  
  9. size[0] = width + width/2;
  10. size[1] = height;
  11. frame_yuv = cv::Mat(2, size, CV_8UC1, frame);
  12.  
  13. pt1.x = x;
  14. pt1.y = y;
  15. pt2.x = x + width;
  16. pt2.y = y + height;
  17.  
  18. rectangle(frame_yuv, pt1, pt2, Scalar(0, 0, 255));
  19. }
Add Comment
Please, Sign In to add comment