VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Jan 2007
    Location
    Italy
    Search Comp PM
    I know how to convert a fisheye image to equirectangular, to view it inside a 3D VR viewer as a "panorama":

    Code:
     ffmpeg -i input.jpg -vf v360:fisheye:equirectangular:ih_fov=180:iv_fov=180:pitch=0 -y output.jpg
    - -i input file
    - -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
    -- Jumpjack --
    Quote Quote  
  2. 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
    Quote Quote  
  3. Member
    Join Date
    Apr 2018
    Location
    Croatia
    Search Comp PM
    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
    Image
    [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
    Image
    [Attachment 59896 - Click to enlarge]


    Feel free to experiment with pitch/yaw/roll, the above will make view of horizon.
    Quote Quote  
  4. 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)
    the result looks nice:


    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Member
    Join Date
    Jan 2007
    Location
    Italy
    Search Comp PM
    Originally Posted by Selur View Post
    Sorry, no clue about the ffmpeg parameters, but DeFish for Avisynth should work fine.
    [...]
    with defish(fov=85) turns into:
    [...]
    defish(fov=114,scaling="fitxy") gives:
    [...]
    Why are you using random values?


    the result looks nice:
    The result is still distorted, but cropping hides distortion.

    Originally Posted by richardpl
    You can not convert such single image into full panorama and expect to have full 360 view.
    Of course.
    Originally Posted by richardpl
    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
    Thanks, this is probably the answer I was looking for,but why do you specify output diagonal FOV = 120?
    -- Jumpjack --
    Quote Quote  
  6. Member
    Join Date
    Apr 2018
    Location
    Croatia
    Search Comp PM
    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.
    Quote Quote  
  7. Why are you using random values?
    I just wanted to show what filters are ther ein Avisynth and Vapoursynth that could be used.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!