you say the data is -65 to +65 degrees, so that is 130 degrees, and that is 256 pixels, right?
now calculate how many pixels would be 360 degrees. that’s 256 / 130 * 360
that is the size you need to pad to. the arguments to copyMakeBorder
are derived from those values.
then you would use rotate()
to rotate the picture. the top edge, representing the center of the polar image, needs to go to the left because that’s the orientation required by warpPolar
.
then you just give warpPolar
some sensible arguments.
if you have problems with specific code, I’ll take a look.