Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void draw_rectangle(uint8_t *frame, int x, int y,
- int width, int height)
- {
- cv::Mat frame_yuv;
- int size[2];
- Point pt1, pt2;
- cv::Scalar color = Scalar(255, 0, 0);
- size[0] = width + width/2;
- size[1] = height;
- frame_yuv = cv::Mat(2, size, CV_8UC1, frame);
- pt1.x = x;
- pt1.y = y;
- pt2.x = x + width;
- pt2.y = y + height;
- rectangle(frame_yuv, pt1, pt2, Scalar(0, 0, 255));
- }
Add Comment
Please, Sign In to add comment