Programming/python-computer vision

이미지 회전 Image Rotation할 때, 이미지 잘리지 않게 하는 법 | imutils.rotate(), rotate_bound()

방황하는 데이터불도저 2022. 12. 26. 20:37

 

이미지를 회전시킬 때, (원형이미지가 아니라면) 이미지 모서리들이 잘리기 마련이다.

  --> imutils.rotate() 함수를 사용하면 그런데, 이를 방지하기 위한 함수가

  --> imutils.rotate_bound()이다. 이 함수를 사용하면 이미지가 회전되면서 이미지가 잘리지 않게 외곽을 빈 값으로 채워준다.

 

출처 : https://pyimagesearch.com/2017/01/02/rotate-images-correctly-with-opencv-and-python/