CVImgProc - matt-s-clark/godot-gdextension-opencv GitHub Wiki
Module responsible for image filtering, color space conversion, histogram analysis, basic mat drawing and other matrix manipulation options. More information here.
Prototype: static CVMat adaptive_threshold(CVMat src, float maxValue, int adaptiveMethod, int thresholdType, int blockSize, float C)
Applies an adaptive threshold to a mat.
Prototype: static CVMat bilateral_filter(CVMat src, int d, double sigmaColor, double sigmaSpace, Dictionary additional_parameters)
Applies the bilateral filter to an image. It's excellent for removal of noise without losing edge sharpness, but may be very computational expensive.
- Additional parameters: border_type: Int
Prototype: static CVMat blur(CVMat src, Vector2 ksize, Dictionary additional_parameters)
Blurs an image using the normalized box filter.
- Additional parameters: border_type: Int, anchor: Vector2
Prototype: static CVMat cvt_color(CVMat src, int code, Dictionary additional_parameters)
Converts an image from one color space to another.
- Additional parameters: dst_cn: Int
Prototype: static CVMat dilate(CVMat src, CVMat kernel, Dictionary additional_parameters)
Dilates an image by using a specific structuring element.
- Additional parameters: border_type: Int, interactions: Int, anchor: Vector2, border_value: Vector2
Prototype: static void ellipse(CVMat img, Vector2 center, Vector2 axes, float angle, float startAngle, float endAngle, Dictionary additional_parameters)
Draws an ellipse in the mat with the specified information.
- Additional parameters: color: Color, thickness: Int, line_type: Int, shift: Int
Prototype: static CVMat equalize_hist(CVMat src)
Equalizes the histogram of a grayscale image.
Prototype: static CVMat erode(CVMat src, CVMat kernel, Dictionary additional_parameters)
Erodes an image by using a specific structuring element.
- Additional parameters: border_type: Int, interactions: Int, anchor: Vector2, border_value: Vector2
Prototype: static CVMat filter2D(CVMat src, int ddepth, CVMat kernel, Dictionary additional_parameters)
Convolves an image with the kernel.
- Additional parameters: anchor: Vector2, delta: Float, border_type: Int
Prototype: static CVMat gaussian_blur(CVMat src, Vector2 ksize, float sigmaX, Dictionary additional_parameters)
Blurs an image using a Gaussian filter.
- Additional parameters: sigma_y: Float, border_type: Int
Prototype: static CVMat get_gabor_kernel(Vector2 ksize, float sigma, float theta, float lambd, float gamma, Dictionary additional_parameters)
Returns Gabor filter coefficients.
- Additional parameters: ktype: Int, psi: Float
Prototype: static CVMat get_gaussian_kernel(int ksize, float sigma, Dictionary additional_parameters)
Returns Gaussian filter coefficients.
- Additional parameters: ktype: Int
Prototype: static CVMat get_structuring_element(int shape, Vector2 ksize, Dictionary additional_parameters)
Returns a structuring element of the specified size and shape for morphological operations.
- Additional parameters: anchor: Vector2
Prototype: static CVMat laplacian(CVMat src, int ddepth, Dictionary additional_parameters)
Calculates the Laplacian of an image.
- Additional parameters: ksize: Int, border_type: Int, scale: Float, delta: Float
Prototype: static void line(CVMat img, Vector2 pt1, Vector2 pt2, Dictionary additional_parameters)
Draws a line in the image with the specified information.
- Additional parameters: color: Color, thickness: Int, line_type: Int, shift: Int
Prototype: static CVMat median_blur(CVMat src, int ksize)
Blurs an image using the median filter.
Prototype: static CVMat morphology_ex(CVMat src, int op, CVMat kernel, Dictionary additional_parameters)
Performs advanced morphological transformations.
- Additional parameters: border_type: Int, interactions: Int, anchor: Vector2, border_value: Vector2
Prototype: static void rectangle(CVMat img, Dictionary additional_parameters)
Draws a simple, thick, or filled up-right rectangle. You should either pass a Rect or two points to call the method correctly.
- Additional parameters: rec: CVRect, pt1: Vector2, pt2: Vector2, color: Color, thickness: Int, line_type: Int, shift: Int
Prototype: static Ref resize(Ref src, Vector2 dsize, Dictionary additional_parameters)
Returns an resized image.
The function resize resizes the image src down to or up to the specified size. Note that the initial dst type or size are not taken into account. Instead, the size and type are derived from the src,dsize,fx, and fy
- Additional parameters: fx: Float, fy: Float, interpolation: Int
Prototype: static CVMat sobel(CVMat src, int ddepth, int dx, int dy, Dictionary additional_parameters)
Calculates the first, second, third, or mixed image derivatives using an extended Sobel operator.
- Additional parameters: ksize: Int, border_type: Int, scale: Float, delta: Float
Prototype: static CVMat threshold(CVMat src, float thresh, float maxval, int type)
Applies a fixed-level threshold to each array element.