OpenCV
3.4.20-dev
Open Source Computer Vision
|
Scalar is array type in Javascript. Point, Size, Circle, Rect and RotatedRect are object type in JavaScript.
There are 2 ways to construct a Point and they are the same:
x | x coordinate of the point.(the origin is the top left corner of the image) |
y | y coordinate of the point. |
There are 2 ways to construct a Scalar and they are the same:
R | pixel value of red channel. |
G | pixel value of green channel. |
B | pixel value of blue channel. |
Alpha | pixel value of alpha channel. |
There are 2 ways to construct a Size and they are the same:
width | the width of the size. |
height | the height of the size. |
There are 2 ways to construct a Circle and they are the same:
center | the center of the circle. |
radius | the radius of the circle. |
There are 2 ways to construct a Rect and they are the same:
x | x coordinate of the vertex which is the top left corner of the rectangle. |
y | y coordinate of the vertex which is the top left corner of the rectangle. |
width | the width of the rectangle. |
height | the height of the rectangle. |
There are 2 ways to construct a RotatedRect and they are the same:
center | the rectangle mass center. |
size | width and height of the rectangle. |
angle | the rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle. |
Learn how to get the vertices from rotatedRect:
We use the function: cv.RotatedRect.points(rotatedRect)
rotatedRect | rotated rectangle |
Learn how to get the bounding rectangle from rotatedRect:
We use the function: cv.RotatedRect.boundingRect(rotatedRect)
rotatedRect | rotated rectangle |