Draw rectangles onto a video frame stored in external memory
YOLO v2 Vehicle Detector with Live Camera Input on Zynq-Based Hardware example
The Draw Rectangle block overlays a rectangle onto a video frame stored in
external memory. For instance, you can use this block to display bounding boxes around
identified objects. Use this block only in a software interface model connected to an FPGA
board that is using the
RGB with DL Processor reference design. The
block uses the processor-FPGA interface and the memory map for this reference design to read
and modify the specified pixels in the frame.
You can only use this block once per model. Your design should provide the points values
and set valid to
true once video frames are available in memory. The YOLO v2 Vehicle Detector with Live Camera Input on Zynq-Based Hardware example shows how to use
this block in the postprocessing model that is targeted to the ARM® processor.
points — Rectangle coordinates and dimensions
Specify the rectangle cooordinates as a N-by-4 matrix of the
height], where N is the number of
rectangles to draw, x
y are coordinates of the top-left corner of each rectangle, and
height are the horizontal and vertical dimensions of each
valid — Enable frame annotation
When this input is
1). the block
modifies all frames found in memory. Your design should provide the
points values and set valid to
true once video frames are available in memory.
Color — Color of rectangle bounding line
Green (default) |
Color of the rectangle bounding line, specified as
Thickness — Thickness of rectangle bounding line
3 (default) | scalar
Thickness of rectangle bounding line, in pixels.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2023a