I'm looking for a way to transform an image in polar coordinates using Python. The result I expect is the same as the following image (done in Matlab): https://i.stack.imgur.com/CKBBd.png
I already tried using cv2.linearPolar but I couldn't achieve this result.
Something like this should work:
import cv2
image = cv2.imread('image.jpg')
h, w, _ = image.shape
image2 = cv2.linearPolar(image, (w / 2, h / 2), min(w, h) / 2,
cv2.WARP_INVERSE_MAP + cv2.WARP_FILL_OUTLIERS)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.