/**
* This method is called to overlay rectangles on an image to the video output.
*
* @param image specifies the frame to be rendered to the video output.
* @param detectedObjectRects specifies the detected object rectangles.
* @param color specifies the color of the rectangle outline.
* @param thickness specifies the thickness of the rectangle outline.
*/
public void drawRectangles(Mat image, Rect[] detectedObjectRects, Scalar color, int thickness)
{
//
// Overlay a rectangle on each detected object.
//
synchronized (image)
{
if (detectedObjectRects != null)
{
for (Rect r: detectedObjectRects)
{
//
// Draw a rectangle around the detected object.
//
Imgproc.rectangle(
image, new Point(r.x, r.y), new Point(r.x + r.width, r.y + r.height), color, thickness);
}
}
videoSource.putFrame(image);
}
}
TrcOpenCvDetector.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:Ftc2018RelicRecovery
作者:
评论列表
文章目录