Interface Description
The interfaces of the CV image operator are the same as those of OpenCV. Table 1 lists optimized interfaces.
Interface |
Description |
|---|---|
cvtColor |
Converts images, including the BGR2GRAY, BGR2RGB, RGB2BGR, and GRAY2BGR modes. |
dilate |
Dilates the target area in an image by convolving the image based on specified structure elements. |
GaussianBlur |
Uses the Gaussian function to perform convolution on images to smooth images and reduce noise and details. |
merge |
Merges three single-channel images into one three-channel image. |
remap |
Remaps images during image processing for geometric transforms, such as image translation, rotation, scaling, and distortion. |
resize |
Adjusts the image size in INTER_NEAREST_EXACT (nearest neighbor interpolation), INTER_LINEAR (bilinear interpolation, default), and INTER_CUBIC (bicubic interpolation) modes. |
convertTo |
Converts the data type of an image to another with optional scaling. For example, an image can be converted from 8-bit to 16-bit and scaled down at the same time. |
threshold |
Performs image binarization based on a threshold that divides the grayscale value of an image into two parts. Methods such as global thresholding, adaptive thresholding, and OTSU thresholding can be used. |
warpAffine |
Performs affine transformation such as translation, rotation, scaling, and cropping on an image using a 2x3 transformation matrix. |
contourArea |
Calculates the area of a contour, that is, the total number of pixels in the contour. |
countNonZero |
Counts the number of non-zero pixels in an image. |
