Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new Chain(mat?: Mat): Chain

Properties

Protected _mode

_mode: "map" | "array"

Protected mat

mat: Mat

Methods

adaptiveThreshold

asFile

  • asFile(name?: undefined | string): File

bilateralFilter

  • The function applies bilateral filtering to the input image, as described in bilateralFilter can reduce unwanted noise very well while keeping edges fairly sharp. However, it is very slow compared to most filters.

    Sigma values*: For simplicity, you can set the 2 sigma values to be the same. If they are small (< 10), the filter will not have much effect, whereas if they are large (> 150), they will have a very strong effect, making the image look "cartoonish".

    Filter size*: Large filters (d > 5) are very slow, so it is recommended to use d=5 for real-time applications, and perhaps d=9 for offline applications that need heavy noise filtering.

    Parameters

    Returns this

bitwise

boxFilter

  • smooths an image. Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on).

    Parameters

    Returns this

canny

  • finds edges in the input image and marks them in the output map edges using the Canny algorithm. The smallest value between threshold1 and threshold2 is used for edge linking. The largest value is used to find initial segments of strong edges

    Parameters

    Returns this

cartoonize

circle

convertTo

cvtColor

  • converts an input image from one color space to another. In case of a transformation to-from RGB color space, the order of the channels should be specified explicitly (RGB or BGR). Note that the default color format in OpenCV is often referred to as RGB but it is actually BGR (the bytes are reversed). So the first byte in a standard (24-bit) color image will be an 8-bit Blue component, the second byte will be Green, and the third byte will be Red. The fourth, fifth, and sixth bytes would then be the second pixel (Blue, then Green, then Red), and so on.

    Parameters

    Returns this

edge

ellipse

filter2D

  • Convolves an image with the kernel. The function applies an arbitrary linear filter to an image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode

    Parameters

    Returns this

floodFill

  • This is a high level API for flood fill given color or image starting from given [seed] coords and involves several opencv operations.

    Parameters

    Returns this

gaussianBlur

Protected handle

  • handle(args: any, Class: any): this

histEqualization

  • Applies histogram equalization using cv.equalizeHist or cv.CLAHE. In case src image has multiple channels, equalization is applied on each of them independently and then the result is merged

    Parameters

    Returns this

houghLinesP

  • Finds line segments in a binary image using the probabilistic Hough transform. The function implements the probabilistic Hough transform algorithm for line detection. It returns parsed set of line segments in [line] option. If color is given it will draw lines in [dst]

    Parameters

    Returns this

inRange

  • [dst] is set to 255 (all 1 -bits) if [src] is within the specified 1D, 2D, 3D, ... box and 0 otherwise.

    Parameters

    Returns this

line

math

  • performs math operations per pixel on images, like add, subtract, divide, addWeighted and multiply

    Parameters

    Returns this

medianBlur

mode

  • mode(mode: "map" | "array"): this

morphologyEx

  • perform advanced morphological transformations using an erosion and dilation as basic operations. In case of multi-channel images, each channel is processed independently.

    Parameters

    Returns this

pyr

  • Performs pyramid up or down on an image. PyrUp up samples an image and then blurs it. PyrDown blurs an image and down samples it. By default, size of the output image is computed as 'Size((src.cols+1)/2, (src.rows+1)/2)', but in any case, the following conditions should be satisfied: '|𝚍𝚜𝚝𝚜𝚒𝚣𝚎.𝚠𝚒𝚍𝚝𝚑∗2−src.cols|≤2|𝚍𝚜𝚝𝚜𝚒𝚣𝚎.𝚑𝚎𝚒𝚐𝚑𝚝∗2−src.rows|≤2'.

    Parameters

    Returns this

rectangle

replaceColor

roi

  • Return an image which has a src sub region defined by in given rectangle expression

    Parameters

    Returns this

threshold

  • Applies fixed-level thresholding to a multiple-channel array. The function is typically used to get a bi-level (binary) image out of a grayscale image or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.

    Parameters

    Returns this

toRgba

warpAffine

  • Will use [estimateAffine2D] to calculate affine matrix from given [inputs] and [outputs] and then [warpAffine] to transform.

    Parameters

    Returns this

warpPerspective

wave

Static fromFile

  • fromFile(f: File): Chain

Generated using TypeDoc