points = bbox2points(rectangle) converts
the input rectangle, specified as [xywidthheight]
into a list of four [xy] corner
points. The rectangle input must be either a
single bounding box or a set of bounding boxes.
List of rectangle corners, returned as a 4-by-2 matrix of [x,y]
coordinates, or a 4-by-2-by-M array of [x,y]
coordinates. The output points for the rectangle are listed counterclockwise
starting from the upper-left corner.
For a single input bounding box, the function returns
the 4-by-2 matrix.
For multiple input bounding boxes, the function returns
the 4-by-2-M array for M bounding
boxes.
Data Types: single | double | int16 | int32 | uint16 | uint32
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.