Opencv-image transformation

Source: Internet
Author: User

Converts an image into another form. For example, Fourier transform converts the image into a spectrum component.

 

Convolution-Basis of Transformation

Cvfilter2d source image SRC and destination image DST size should be the same

Note: The coefficient of the convolution kernel should be of the floating point type, and the cv_32f must be used to initialize the matrix.

The cvfilter2d function internally processes the boundary-cvcopymakeborder (slightly grows a specific image and then fills the Image Boundary in one way)

 

Gradient and Sobel Derivative

The Sobel operator contains any order of differentiation, and the big checkpoint derivative of the fusion partial derivative has better approximation, and the small checkpoint noise is more sensitive.

If the source image SRC is 8 bits, the depth of the target image must be ipl_depth_16s to avoid overflow.

Scharr Filter

 

Laplace transformation -- quadratic derivative cvlaplace () -- sum of the quadratic derivative along the X axis Y axis (a single point or small block with a higher value will maximize the function value)

The target image must be a 16-bit (Signed) or 32-bit (floating point) image.

Application: Detection of blocks, Edge Detection-the edge of the original image is located at a place with the Laplace value equal to 0

The Canny operator -- first obtains the first derivative in the direction of X and Y, and then combines them into four derivatives. The vertices whose derivatives reach the local maximum are candidate points that form the edge; assemble independent candidate pixels into outlines (apply the lag threshold value)

Cvcanny -- the recommended upper and lower threshold ratio is or.

 

Hof transformation-any point in a binary image may be part of a set of candidate straight lines

Opencv supports two different forms of HOF Transformation: Standard Hof Transformation (SHT) and cumulative probability Hof Transformation (ppht)-reducing the computing time

Hov circle Transformation

#include <cv.h>#include  

 

Remap

Cvremap ()-calibration or stereo image for distortion correction (involving interpolation issues)

Affine transform and perspective Transform

Any parallelogram ABCD in a plane can be affined into another parallelogram, which is a subset of perspective transformation.

Dense affine transformation-image distortion requires some interpolation to smooth the output image cvwarpaffine cvgetquadranglesubpix

Calculation of the affinity ing matrix-cvgetaffinetransform (two arrays containing three vertices and two parallelogram defined)

// Use cvgetaffinetransform to calculate the transformation matrix, and then perform an affine transformation # include <cv. h> # include  

Sparse Affine Transformation

Cvtransform ()

 

Perspective transformation

 

Intensive perspective conversion cvwarpperspective ()

Calculate the pivot ing matrix cvgetperspectivetransform

// Perspective conversion/**/# include <cv. h> # include  
 

Sparse pivoting cvperspectivetransform

Perspective transformation is an actual ing point embedded in a two-dimensional plane of a three-dimensional space mapped back to a different two-dimensional space.

Cvcarttopolar cvpolartocart

Ing between Cartesian space and polar or radial Space

Logarithm Polar Coordinate Transformation-human visual system-is a constant representation of the object's field of view cvlogpolar

# Include <cv. h> # include  

 

Discrete Fourier Transform DFT

Opencv implements fast Fourier transformation. cvdft can calculate the FFT when the input is a one-dimensional or two-dimensional array.

The input array and output array must be of the floating point type and are generally single-channel or dual-channel

Cvmulspectrums spectrum Multiplication

# Include <cv. h> # include  

 

Discrete Cosine Transform DCT

Similar to DFT, but all coefficients are real cvdct

 

Integral image-the value of any point (x, y) in the integral image refers to the sum of the gray-scale values of all vertices in the rectangle formed from the upper left corner of the image to the vertex.

Cvintegral () -- fast summation of sub-regions -- rapid fuzzy search, gradient estimation, and mean and standard deviation calculation

Distance Transformation-defines a new image. Each output pixel in the image is set to the closest to the input pixel 0 pixel to cvdisttransform ()

The output image must be a 32-bit floating point image.

Histogram equalization

Stretch the histogram range ---- The ing function should be a cumulative distribution function.

Cveualizehist (), the original image and the target image must be a single channel, 8-bit images of the same size. For color images, each channel must be separated before processing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.