목록영상처리 (1)
Rego의 블로그

forward mapping을 하면 input_image를 rotate하는 과정에서 좌표를 int 처리하는 동안 이미지의 특정 픽셀들이 누락되는 현상이 생긴다. 이를 해결하기 위해 backward mapping을 하는데, 이는 옮기고자 하는 input_image의 좌표를, 역으로(backward) output_image의 좌표에서 얻어와 input_image의 자리에 넣는 형태이다. import cv2 import numpy as np def rotation(img, angle): height, width = img.shape result = np.zeros((height, width), dtype = np.uint8) # 모든 원소가 0인 height * width 행렬 angle = np.radian..
영상처리
2021. 9. 29. 16:22