void cv::warpAffine (
InputArray src,
OutputArray dst,
InputArray M,
Size dsize,
int flags = INTER_LINEAR,
int borderMode = BORDER_CONSTANT,
const Scalar & borderValue = Scalar()
)
Python:
cv.warpAffine(
src, # input image
M, # transformation matrix
dsize[, # output image size (width, heigth)
dst[, # output instance???????????
flags[, # interpolation - cv2.INTER_AREA, cv2.INTER_CUBIC, etc
borderMode[, # cv2.BORDER_REPLICATE
borderValue]]]] # BORDER 색깔
) -> dst
한글 블로그보면 출처를 적어놓지 않음..
flags ; 보간법 interpolation algorithm [링크]
Enumerator
INTER_NEAREST
Python: cv.INTER_NEAREST
|
nearest neighbor interpolation |
INTER_LINEAR
Python: cv.INTER_LINEAR
|
bilinear interpolation |
INTER_CUBIC
Python: cv.INTER_CUBIC
|
bicubic interpolation |
INTER_AREA
Python: cv.INTER_AREA
|
resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire'-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method. |
INTER_LANCZOS4
Python: cv.INTER_LANCZOS4
|
Lanczos interpolation over 8x8 neighborhood |
INTER_LINEAR_EXACT
Python: cv.INTER_LINEAR_EXACT
|
Bit exact bilinear interpolation |
INTER_NEAREST_EXACT
Python: cv.INTER_NEAREST_EXACT
|
Bit exact nearest neighbor interpolation. This will produce same results as the nearest neighbor method in PIL, scikit-image or Matlab. |
INTER_MAX
Python: cv.INTER_MAX
|
mask for interpolation codes |
WARP_FILL_OUTLIERS
Python: cv.WARP_FILL_OUTLIERS
|
flag, fills all of the destination image pixels. If some of them correspond to outliers in the source image, they are set to zero |
WARP_INVERSE_MAP
Python: cv.WARP_INVERSE_MAP
|
flag, inverse transformation For example, linearPolar or logPolar transforms:
|
enum cv::InterpolationFlags {
cv::INTER_NEAREST = 0,
cv::INTER_LINEAR = 1,
cv::INTER_CUBIC = 2,
cv::INTER_AREA = 3,
cv::INTER_LANCZOS4 = 4,
cv::INTER_LINEAR_EXACT = 5,
cv::INTER_NEAREST_EXACT = 6,
cv::INTER_MAX = 7,
cv::WARP_FILL_OUTLIERS = 8,
cv::WARP_INVERSE_MAP = 16
}
borderMode ; 경계선 픽셀 확장 방식 [링크]
Enumerator
https://docs.opencv.org/에서 찾아보자!