I know how to convert a fisheye image to equirectangular, to view it inside a 3D VR viewer as a "panorama":
- -i input fileCode:ffmpeg -i input.jpg -vf v360:fisheye:equirectangular:ih_fov=180:iv_fov=180:pitch=0 -y output.jpg
- -vf video filter
- v360: VR360 panorama conversion
- fisheye: source format
- equirectangular: destination format
- ih_fov: input horizontal FOV
- iv_fov: input verticalFOV
- pitch: camera up/down orientation
- -y Overwrite
- Output file
Instead I would like to "rectify" the Ingenuity fisheye image, as if it was shot with a standard camera; I know about lensfun and lenscorrection parameters , but I don't undrestand which parameters I should use.
Cameras official data:
> Navigation (NAV) Camera has a field-of-view (FOV) of 133 deg (horizontal) by 100 deg (vertical) with an average Instantaneous Field-of-view (IFOV) of 3.6 mRad/pixel
> Return-to-Earth (RTE) Camera has a FOV of 47 deg (horizontal) by 47 deg (vertical) with an average IFOV of 0.26 mRad/pixel.
> The NAV camera is pointed directly towards nadir, and the RTE camera is pointed approximately 22 deg below the horizon, resulting in an overlap region between the two camera image footprints of approximately 30 deg × 47 deg.
Source: https://rotorcraft.arc.nasa.gov/Publications/files/Balaram_AIAA2018_0023.pdf
Full FFMPEG documentation
Ingenuity raw images: https://mars.nasa.gov/mars2020/multimedia/raw-images/index.cfm?af=REAR_HAZCAM_RIGHT
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
-- Jumpjack --
-
Sorry, no clue about the ffmpeg parameters, but DeFish for Avisynth should work fine.
source: https://mars.nasa.gov/mars2020/multimedia/raw-images/RRF_0104_0676180997_659ECM_N00405...Z02002_01_295J
with defish(fov=85) turns into:
-> just need to find the right parameters (do not forget to look at the other parameters besides 'fov')
defish(fov=114,scaling="fitxy") gives:
Last edited by Selur; 17th Jul 2021 at 04:02.
users currently on my ignore list: deadrats, Stears555 -
You can not convert such single image into full panorama and expect to have full 360 view.
Here is how to convert to equirectingular format:
Code:-vf v360=input=fisheye:output=e:ih_fov=133:iv_fov=100
[Attachment 59895 - Click to enlarge]
Here is how to convert to flat view, like humans actually see, similar to above input from another forum user:
Code:-vf v360=input=fisheye:output=flat:ih_fov=133:iv_fov=100:d_fov=120:w=1200:h=1000
[Attachment 59896 - Click to enlarge]
Feel free to experiment with pitch/yaw/roll, the above will make view of horizon. -
Since I was interested how this could be handles in Vapoursynth, I asked the dev of DeBarrel for help and using:
Code:ret = core.std.AddBorders(ret,left = 100, right = 100, top = 100, bottom = 740) ret = core.vcm.DeBarrel(ret,abc =[ 0.0, 0.0, 0.5],pin = 0) ret=core.std.Crop(ret,left = 60, right = 60, top = 40, bottom = 740)
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Why are you using random values?
the result looks nice:
Originally Posted by richardpl
Originally Posted by richardpl-- Jumpjack -- -
Please do note that you will need nightly ffmpeg build, otherwise fisheye input will not be fullly taken in for conversion, and thus flat output would be cropped too much.
That is just example. IIRC some gamers sets game FOV up to 120. you can set it to lower value and than use pitch/yaw/roll to look at pixels not covered by initial flat output. -
Why are you using random values?users currently on my ignore list: deadrats, Stears555
Similar Threads
-
NASA uses ffmpeg on the Mars
By emcodem in forum Newbie / General discussionsReplies: 6Last Post: 1st Sep 2022, 02:55 -
FFmpeg: Import DNG images
By mkoch in forum Video ConversionReplies: 2Last Post: 25th Jan 2021, 08:47 -
ffmpeg how to interpret parameters, documentation?
By BabaG in forum Newbie / General discussionsReplies: 2Last Post: 17th Aug 2019, 18:58 -
FFMPEG x264 parameters
By marcorocchini in forum Newbie / General discussionsReplies: 6Last Post: 4th Aug 2018, 12:21 -
Helicopter sound
By TONYFRANCE in forum RestorationReplies: 16Last Post: 2nd Nov 2017, 05:35