Hello,

I have a projector with a 180° fisheye lens in a dome. Things are easy if the lens is at the center of the dome. Any input format can be transformed to fisheye output with the v360 filter. But things are getting complicated when the lens isn't at the dome's center. Let's assume the dome has 1m radius and the lens is shifted 0.5m to the side. In this case the +60° point from the input image must be mapped to the center of the output image (because acos(0.5) = 60°) ). The center of the input image must be mapped to 63.4° in the output image (because 90° - atan(0.5) = 63.4°).

The v360 filter has h_offset and v_offset options. There isn't much documentation for these options, so let's just try out what they do. I'm using the test pattern from Paul Bourke: http://www.paulbourke.net/dome/testpattern/1200.png

ffmpeg -i 1200.png -vf v360=fisheye:fisheye:h_offset=0.5 -y out.png

The +60° point from the input image is not mapped to the center of the output image, that's wrong.
The center of the input image is mapped to +60°, that's also wrong.


Next I did try 0.577 (=tan(30°)) as offset:

ffmpeg -i 1200.png -vf v360=fisheye:fisheye:h_offset=0.577 -y out.png

Now the +60° point from the input image is mapped to the center of the output image, that's good.
The center of the input image is mapped to about 54.5°, that's wrong.


These results leave me with two questions:
-- Obviously the offset options aren't doing what I was hoping for. What else are they supposed to do?
-- How can a fisheye image be transformed to an off-center fisheye image?

Michael

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to