Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

De-Fishing and Stabilizing PV Video

Discussion in 'Phantom 2 Vision Discussion' started by Ton4, Nov 28, 2013.

  1. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    Hi,

    planning to buy a Phantom Vision, although I get a bit scared of the things I read about battery problems, range problems and run-aways.... :(

    I know the footage will not be as good / stable as using a gopro/real gimbal, so I looked around to see how to improve on things a bit already...

    I have downloaded some of the movies on youtube and tried various options.

    Since the PV lens has a lot of distortion, any stabilizing will in most cases result in a wobble, or banana effect as someone named it.

    My guess is that if you can transform the image to a perfect linear image, and after doing that, stabilize, the wobble will be much less, or even gone.

    I don't have the PV yet, but I tried to find lens correction parameters of the video output by extracting some stills from rotating PV and stitching them with PTGui, and using paramaters from PTGui in this (free) de-fishing plugin in for Avisynth / VirtualDub:

    http://forum.doom9.org/showthread.php?t=152860

    What this does you can see in this Youtube Movie:

    http://www.youtube.com/watch?v=B5fci53CD1A

    Is used these parameters, but they are not perfect (need to have the PV and determine under controlled conditions):

    ConvertToRGB32(matrix="PC.601").Defish(a=0.014490606, b=-0.075227731, c=-0.063813568, scaling="fitxy").ConvertToYUY2(matrix="PC.601") ## Vision Defished 2

    Original:



    De- Fished:



    As you can se a lot of pixels (and field of view) get lost in the de-fishing process after filling the frame (no black borders), but your horizons will be straight, as other geometrical shapes.

    Maybe this of use to you.

    Ok, now to find a good US dealer willing to ship to Asia...
     

    Attached Files:

  2. Pull_Up

    Joined:
    Nov 5, 2013
    Messages:
    3,684
    Likes Received:
    48
    Location:
    South Oxfordshire, UK
    Wow. I wish I understood most of that, but I like what you did to my video! :D

    FWIW I understand that a company called RageCams (or similar) in the US will take your Vision camera and replace the lens with a high quality 5.4mm non-fisheye one. I think this costs about 3 or 4 hundred dollars...
     
  3. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    Ok :D

    I have your video de-fished and stabilized, and a comparison video with your original and the "edited version".

    I can send them to you, or with your permission, I could put them on youtube.....
     
  4. muppet

    Joined:
    Nov 19, 2013
    Messages:
    3
    Likes Received:
    0
    have you tried the 90 degree field of vision option?
     
  5. Pull_Up

    Joined:
    Nov 5, 2013
    Messages:
    3,684
    Likes Received:
    48
    Location:
    South Oxfordshire, UK
    YouTube away my friend, just link to my original as the "before" example. It will be interesting to see how much of the original image is lost in the process. I must try the narrower fields of view too to compare both how it looks raw and stabilised.
     
  6. muppet

    Joined:
    Nov 19, 2013
    Messages:
    3
    Likes Received:
    0
    ony had a few goes - but so far my favourite setting for video is atti mode with the narrow (90 deg) field of vision :)
     
  7. gpauk

    Joined:
    Nov 16, 2013
    Messages:
    567
    Likes Received:
    1
    Location:
    Aberdeenshire, Scotland
    Ton4 -- looking forward to seeing those before - and - after vids of Pull-up's flight on you tube.. :)
     
  8. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    Ok, here they are.

    Two Videos.

    The first:

    http://www.youtube.com/watch?v=9RX2ImDdNwU ( original here: http://www.youtube.com/watch?v=Yyc4XK_SyVY )

    This one has been de-fished with this:

    http://forum.doom9.org/showthread.php?t=152860

    Like I said, I don't have the PV yet, so I could not determine the lens parameters for de-fishing exactly, I just used some footage from youtube to determine approximate lens parameters. My theory is that with the correct lens parameters the image will be perfectly linear, thus removing the wobble effect in later stabilizing. In the video above, there is still wobble, so lens parameters are not exact, or my theory is wrong.

    The video above has been de-fished and stabilized with Deshaker / Virtualdub, with zoom to remove black borders, it causes a not so nice zooming effect at times.

    The second video:

    http://www.youtube.com/watch?v=q_aZB4BCc08

    is the original and de-fished / stabilized in one video, stabilizing without "zoom effect".

    Ofcourse you loose field of view, because of both de-fishing and stabilizing and there is a quality loss. I did not have the original footage however, just what I scavaged from Youtube.

    So, it is possible to stabilize and de-fish the PV footage, probably even better with the correct lens parameters, but there is a considerable quality loss. It will turn 1080p footage into a 720p resolution, kind of. But it removes the "bend shapes".

    Best solution would be a Canon 5D MK3 with raw video on a precise gimbal :) , second best a (gopro or similar) cam on a real gimbal...

    Still I think the Phantom Vision would suit me. However there seem to be quite some complaints about the quality (battery connection, fly-aways, range). If it would work as advertised, I would not doubt so much to buy it, but I guess I still will.

    Software used, Virtualdub, Avisynth, Deshaker and De-Fish, all "freeware".
     
  9. gpauk

    Joined:
    Nov 16, 2013
    Messages:
    567
    Likes Received:
    1
    Location:
    Aberdeenshire, Scotland
    That's excellent -- worked will, within the limitations you'd expect.

    Not used virtualdub for a while -- I must get the other bits you used and have a play!

    Thanks for all the info!
     
  10. Old Gazer

    Joined:
    Nov 16, 2013
    Messages:
    186
    Likes Received:
    0
    Location:
    Eastern Oklahoma
    Photo Shop can correct the fisheye distortion on videos. It works well and is easy to do.
    viewtopic.php?t=4283


    Sent from my iPad using Tapatalk HD
     
  11. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    Tried it on CS5, but looking at the progress bar it would take about a day or what.

    Very very slow.
     
  12. Old Gazer

    Joined:
    Nov 16, 2013
    Messages:
    186
    Likes Received:
    0
    Location:
    Eastern Oklahoma
    It is slow to render. The default settings to render is 1080 at 60fps. I just rendered a 7 minute clip at 720 at 30 fps. It took about a hour.


    Sent from my iPad using Tapatalk HD
     
  13. gpauk

    Joined:
    Nov 16, 2013
    Messages:
    567
    Likes Received:
    1
    Location:
    Aberdeenshire, Scotland
    Never tried PS on a video -- doesn't do stabilisation though, does it?
     
  14. Old Gazer

    Joined:
    Nov 16, 2013
    Messages:
    186
    Likes Received:
    0
    Location:
    Eastern Oklahoma
    I do not see a way to stabilize.


    Sent from my iPad using Tapatalk HD
     
  15. ToddSmi

    Joined:
    Nov 16, 2013
    Messages:
    112
    Likes Received:
    0
    If you have Adobe Premiere Pro or After Effects (CS6 or CC version), just use the warp stabilizer. It is slow but works really well to take out the vibrations, wobbles and jerkiness. It doesn't address the fisheye lens issue however. So a good, but lengthy workflow would be to run through Photoshop with the lens correction filter applied, then run through APP or AE. There are other options through a company called proDad that do all the corrections at once and are fairly affordable. Check out the ProDrenalin product in particular. It is geared for GoPro. I haven't used it yet, but it seems that it would work well for P2V camera as well as it is very similar to GoPro. Their Mercalli product would also work well but it is more expensive.
     
  16. gpauk

    Joined:
    Nov 16, 2013
    Messages:
    567
    Likes Received:
    1
    Location:
    Aberdeenshire, Scotland
    What sort of time did the process you used take?
     
  17. ToddSmi

    Joined:
    Nov 16, 2013
    Messages:
    112
    Likes Received:
    0
    Good point on the lens distortion filter in PP...that would certainly be faster to do all the corrections at the same time :cool:
     
  18. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    About 4-5 frames per second, on a I7 laptop with 16gb ram and SSD drive.
     
  19. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    Probably the Adobe route would finally be able to produce better results, but I don't have this software. The freeware option would be able to produce similar results if calibrated correctly, is my guess.

    I invite you, who have this software, to try it with the footage I have used, I am sure the author doesn't mind. Curious about the results.

    Anyways, I decided to not buy the Vision, but buy a classic phantom with gimbal. Stable footage with the fish eye distortion is acceptable in my eyes, and thus would not require much quality degrading "repair" aftwards.

    The main reason why I tried to remove distortion before stabilizing is to get rid of of the banana / wobble effect which appears, no matter how good your stabilizing software is.
     
  20. Ton4

    Joined:
    Nov 28, 2013
    Messages:
    348
    Likes Received:
    1
    If you decrease your fov, vibration will be more noticable. And I like a wide fov.

    I don't complain about the distortion, I complain about the wobble / banana effects after stabilizing distorted footage.