remap()
will apply a generic geometrical transformation to an image.
can any body explain cv::INTER_LINEAR and cv::BORDER_CONSTANT for me?
cv::INTER_LINEAR
is the parameter for setting interpolation method, i.e. to use the bilinear interpolation. Besides this, there are other methods you can use:
INTER_NEAREST
- a nearest-neighbor interpolationINTER_CUBIC
- a bicubic interpolation over 4x4 pixel neighborhoodINTER_LANCZOS4
- a Lanczos interpolation over 8x8 pixel neighborhood
cv::BORDER_CONSTANT
is the parameter for setting pixel extrapolation method. When borderMode=BORDER_TRANSPARENT
, it means that the pixels in the destination image that corresponds to the “outliers” in the source image are not modified by the function.
P.S.: for such questions, you can easily find useful info from OpenCV's online documentation.