What causes circular artifacts when using warpPolar?

asked 2018-08-28 03:01:58 -0500

a4re gravatar image

Hello, I had a code that converted a radial image into linear one. The code was written from scratch, but did his job (rather slowly, to be honest). The code worked by sampling pixels using polar coordinates using cv2.getRectSubPix.

To make it faster, I switched to cv2.warpPolar, which is very fast and nice, but I get some artifacts that mess my gradients up. Here's an image of the artifacts I am talking about (to make it clear, I used red lines)

artifacts

I am not entirely sure about why these artifacts are happening: is it because I am using cv2.WARP_POLAR_LINEAR + cv2.INTER_CUBIC as flags? I tried using a different interpolation, but apparently the problem remains.

Is it possible to get rid of them and reflect more accurately the image gradients?

edit retag flag offensive close merge delete

Comments

Actually, it was the interpolation method: I used lanczos and artifacts are much less evident.

a4re gravatar imagea4re ( 2018-08-28 03:58:54 -0500 )edit