Converts Opaque (OpenCV) data types to Simulink data types
Computer Vision Toolbox OpenCV Interface for Simulink
The FromOpenCV block is used to convert the Simulink Opaque (OpenCV) to Simulink data types.
Port_1
— First input signalInput signal to the FromOpenCV block. The input can be of different data types. Each of the input data types determines the output data type of the block.
Data Types: cv_Mat
| cv_DMatch
| vector_cv_DMatch
| vector_vector_cv_DMatch
| cv_Rect
| vector_cv_Rect
| cv_RotatedRect
| vector_cv_RotatedRect
| cv_TermCriteria
| cv_Scalar
| cv_Size
| cv_Range
| cv_Point
| cv_Point2f
| cv_Point2d
| cv_Point3i
| cv_Point3f
| cv_Point3d
| vector_cv_Point
| vector_cv_Point2f
| vector_cv_Point2d
| vector_cv_Point3i
| vector_cv_Point3f
| vector_cv_Point3d
| vector_vector_cv_Point
| vector_vector_cv_Point2f
| vector_vector_cv_Point2d
| vector_vector_cv_Point3i
| vector_vector_cv_Point3f
| vector_vector_cv_Point3d
Port_1
— Output signalOutput signal from the FromOpenCV block.
Data Types: uint8 array
| uint16 array
| int8 array
| int16 array
| int32 array
| single array
| double array
| CV_DMATCH_BUS
| CV_DMATCH_BUS (1d array)
| CV_DMATCH_BUS (2d array)
| CV_RECT_BUS
| CV_RECT_BUS (1d array)
| CV_ROTATEDRECT_BUS
| CV_ROTATEDRECT_BUS (1d array)
| CV_TERMCRITERIA_BUS
| CV_SIZE_BUS
| CV_RANGE_BUS
| CV_POINT2I_BUS
| CV_POINT2F_BUS
| CV_POINT2D_BUS
| CV_POINT3I_BUS
| CV_POINT3F_BUS
| CV_POINT3D_BUS
| CV_POINT2I_BUS (1d array)
| CV_POINT2F_BUS (1d array)
| CV_POINT2D_BUS (1d array)
| CV_POINT3I_BUS (1d array)
| CV_POINT3F_BUS (1d array)
| CV_POINT3D_BUS (1d array)
| CV_POINT2I_BUS (2d array)
| CV_POINT2F_BUS (2d array)
| CV_POINT2D_BUS (2d array)
| CV_POINT3I_BUS (2d array)
| CV_POINT3F_BUS (2d array)
| CV_POINT3D_BUS (2d array)
DataType
— Data type of the Input signal of FromOpenCV blockPoint2i
(default) | Point2f
| Point2d
| Point3i
| Point3f
| Point3d
| DMatch
| Rect
| RotatedRect
| Range
| TermCriteria
| Size
| vector<DMatch>
| vector<Rect>
| vector<RotatedRect>
| vector<Point2i>
| vector<Point2f>
| vector<Point2d>
| vector<Point3i>
| vector<Point3f>
| vector<Point3d>
| vector<vector<DMatch>>
| vector<vector<Point2i>>
| vector<vector<Point2f>>
| vector<vector<Point2d>>
| vector<vector<Point3i>>
| vector<vector<Point3f>>
| vector<vector<Point3d>>
| Mat
| Mat-Image
Use this parameter to specify the input data type of the FromOpenCV block. The table lists the one-to-one mapping of the input versus output data types of the FromOpenCV block.
OpenCV Data Type | Simulink Opaque Data Type (Input Signal Data Type) | Simulink Data Type (Output Signal Data Type) |
---|---|---|
Mat or Mat-Image | cv_Mat | uint8 array |
uint16 array | ||
int8 array | ||
int16 array | ||
int32 array | ||
single array | ||
double array | ||
DMatch | cv_DMatch | CV_DMATCH_BUS |
vector<DMatch> | vector_cv_DMatch | CV_DMATCH_BUS (1d array) |
vector<vector<DMatch>> | vector_vector_cv_DMatch | CV_DMATCH_BUS (2d array) |
Rect | cv_Rect | CV_RECT_BUS |
vector<Rect> | vector_cv_Rect | CV_RECT_BUS (1d array) |
RotatedRect | cv_RotatedRect | CV_ROTATEDRECT_BUS |
vector<RotatedRect> | vector_cv_RotatedRect | CV_ROTATEDRECT_BUS (1d array) |
TermCriteria | cv_TermCriteria | CV_TERMCRITERIA_BUS |
Scalar | cv_Scalar | double array |
Size | cv_Size | CV_SIZE_BUS |
Range | cv_Range | CV_RANGE_BUS |
Point | cv_Point | CV_POINT2I_BUS |
Point2f | cv_Point2f | CV_POINT2F_BUS |
Point2d | cv_Point2d | CV_POINT2D_BUS |
Point3i | cv_Point3i | CV_POINT3I_BUS |
Point3f | cv_Point3f | CV_POINT3F_BUS |
Point3d | cv_Point3d | CV_POINT3D_BUS |
vector<Point> | vector_cv_Point | CV_POINT2I_BUS (1d array) |
vector<Point2f> | vector_cv_Point2f | CV_POINT2F_BUS (1d array) |
vector<Point2d> | vector_cv_Point2d | CV_POINT2D_BUS (1d array) |
vector<Point3i> | vector_cv_Point3i | CV_POINT3I_BUS (1d array) |
vector<Point3f> | vector_cv_Point3f | CV_POINT3F_BUS (1d array) |
vector<Point3d> | vector_cv_Point3d | CV_POINT3D_BUS (1d array) |
vector<vector<Point>> | vector_vector_cv_Point | CV_POINT2I_BUS (2d array) |
vector<vector<Point2f>> | vector_vector_cv_Point2f | CV_POINT2F_BUS (2d array) |
vector<vector<Point2d>> | vector_vector_cv_Point2d | CV_POINT2D_BUS (2d array) |
vector<vector<Point3i>> | vector_vector_cv_Point3i | CV_POINT3I_BUS (2d array) |
vector<vector<Point3f>> | vector_vector_cv_Point3f | CV_POINT3F_BUS (2d array) |
vector<vector<Point3d>> | vector_vector_cv_Point3d | CV_POINT3D_BUS (2d array) |
Block Parameter:
Data Type |
Type: character vector |
Value: input data type |
Default:
'Point2i'
|
Data Types | |
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Supports C++ code generation.