2D point with integer coordinates (usually zero-based).
2D point, represented as a tuple (x, y) , where x and y are integers.
2D point with floating-point coordinates
2D point, represented as a tuple (x, y) , where x and y are floats.
3D point with floating-point coordinates
3D point, represented as a tuple (x, y, z) , where x, y and z are floats.
2D point with double precision floating-point coordinates
2D point, represented as a tuple (x, y) , where x and y are floats.
3D point with double precision floating-point coordinates
3D point, represented as a tuple (x, y, z) , where x, y and z are floats.
Pixel-accurate size of a rectangle.
Size of a rectangle, represented as a tuple (width, height) , where width and height are integers.
Sub-pixel accurate size of a rectangle.
Size of a rectangle, represented as a tuple (width, height) , where width and height are floats.
Offset (usually the top-left corner) and size of a rectangle.
Rectangle, represented as a tuple (x, y, width, height) , where all are integers.
A container for 1-,2-,3- or 4-tuples of doubles.
CvScalar is always represented as a 4-tuple.
>>> import cv
>>> cv.Scalar(1, 2, 3, 4)
(1.0, 2.0, 3.0, 4.0)
>>> cv.ScalarAll(7)
(7.0, 7.0, 7.0, 7.0)
>>> cv.RealScalar(7)
(7.0, 0.0, 0.0, 0.0)
>>> cv.RGB(17, 110, 255)
(255.0, 110.0, 17.0, 0.0)
Termination criteria for iterative algorithms.
Represented by a tuple (type, max_iter, epsilon) .
(cv.CV_TERMCRIT_ITER, 10, 0) # terminate after 10 iterations
(cv.CV_TERMCRIT_EPS, 0, 0.01) # terminate when epsilon reaches 0.01
(cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS, 10, 0.01) # terminate as soon as either condition is met
A multi-channel 2D matrix. Created by CreateMat , LoadImageM , CreateMatHeader , fromarray .
Multi-dimensional dense multi-channel array.
- type
A CvMatND signature combining the type of elements and flags, int
- tostring() → str
Returns the contents of the CvMatND as a single string.
The IplImage object was inherited from the Intel Image Processing Library, in which the format is native. OpenCV only supports a subset of possible IplImage formats.
Arbitrary array
CvArr is used only as a function parameter to specify that the parameter can be: