[][src]Function opencv::core::transform

pub fn transform(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    m: &dyn ToInputArray
) -> Result<()>

Performs the matrix transformation of every array element.

The function cv::transform performs the matrix transformation of every element of the array src and stores the results in dst : block formula (when m.cols=src.channels() ), or block formula (when m.cols=src.channels()+1 )

Every element of the N -channel array src is interpreted as N -element vector that is transformed using the M x N or M x (N+1) matrix m to M-element vector - the corresponding element of the output array dst .

The function may be used for geometrical transformation of N -dimensional points, arbitrary linear color space transformation (such as various kinds of RGB to YUV transforms), shuffling the image channels, and so forth.

Parameters

  • src: input array that must have as many channels (1 to 4) as m.cols or m.cols-1.
  • dst: output array of the same size and depth as src; it has as many channels as m.rows.
  • m: transformation 2x2 or 2x3 floating-point matrix.

See also

perspectiveTransform, getAffineTransform, estimateAffine2D, warpAffine, warpPerspective