Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

GoPro Lens Correction? post and replies

Return to the GoPro Lens Correction? thread
Login to post to this thread

Can we correct for a fisheye lens? - Jul 1, 2012 at 8:37PM
Paul Nord
9 Posts

I just bought a GoPro Hero2 camera and am considering using it for physics analysis.  It's got this cool fisheye lens.  That's not the best for use with video analysis.

Is there a way to create a filter to correct for the image distortion this causes?

Paul


Replies to Can we correct for a fisheye lens?

Re: Can we correct for a fisheye lens? - Jul 03 2012 12:32PM
Douglas Brown Avatar
Douglas Brown
96 Posts

Hi Paul,

I've seen those GoPro cameras and they are indeed very cool. Unfortunately, it is unlikely I will be able to create a filter to correct for the fisheye distortion any time soon.

Are there video experiments you are considering that require the use of the fisheye?

Doug



Re: Re: Can we correct for a fisheye lens? - Jul 03 2012 2:21PM
Paul Nord
9 Posts

Doug,

Thanks for your reply.

The primary advantage of the GoPro is it's small size and high resolution.  For physics experiments this makes it possible to do some cool things with relative motion by placing the camera on the moving object or on some other reference frame.

The GoPro also comes with an array of mounting hardware to easily stick it anywhere.

No, the field of view is not important.  And the wide angle will make capturing some experiments more difficult.

Some people have suggested using video editing software to take out the fisheye effect.  Of course, I'd like to do it with some technical accuracy and I'd like to have a simple method to re-process the video to make things square.  Modifying the video has a nice visual advantage.

I saw that you already have a method to correct for an improper video perspective; the plane of the CCD not being in a parallel plane to the motion you are trying to measure.  Squeezing a trapezoid is simple in comparison to adjusting for a fisheye lens.  But it's basically remapping two coordinate systems.  Though drawing lines on the display requires making arcs rather than straight lines.

Paul



Re: Re: Can we correct for a fisheye lens? - Aug 09 2012 1:58AM
Paul Nord
9 Posts

Ok, the Mars rover is sending back fisheye images.

Can you give me a lens correction feature now?

:)



Re: Can we correct for a fisheye lens? - Feb 05 2013 4:36PM
Douglas Brown Avatar
Douglas Brown
96 Posts

Hi Paul,

I now have a video filter that can transform your GoPro fisheye videos to uniform scale for analysis. It's still in development but it's at a point where some beta testers would be very useful--are you interested?

Paul and other Tracker users: if you have images or videos taken with a fisheye lens and you want to try out this new filter please email me at dobrown at cabrillo dot edu. I hope to include this filter in the next release version of Tracker which should be around the beginning of March.

Thanks :-)  Doug



Re: Re: Can we correct for a fisheye lens? - Feb 05 2013 5:07PM
Paul Nord
9 Posts

That would be just awesome.  I'm in.

You should be aware that GoPro changed the optics just a bit for the Hero3.  And the Hero3 has a few choices for it's field of view which basically amount to cropping the image internally.  The more narrow fields of view have less distortion.

I'm happy to do some testing.  I could send you some video also.

Paul



Re: Can we correct for a fisheye lens? - Feb 26 2013 1:06PM
Douglas Brown Avatar
Douglas Brown
96 Posts

The new Tracker version 4.80 can now correct for fisheye lens distortions :-) I hope this will open up lots of interesting video possibilities using the GoPro and other fisheye/wide angle lenses.

To correct a fisheye image apply a radial distortion filter (Video|Filters|New|Radial Distortion). Set the input image type to Fisheye, then adjust the input field of view and the fixed pixel diameter.

Please let me know how this filter works for you. And if you or a student analyzes or models an interesting fisheye video, I'd love to get a copy in a TRZ file!

best regards,
Doug

 



Re: Can we correct for a fisheye lens? - Feb 26 2013 1:35PM
Paul Nord
9 Posts

You rock, Doug!

I'll try to get you some more videos soon.

Paul



Re: Can we correct for a fisheye lens? - May 28 9:30AM
Dwight Souder
1 Posts

Thank you for making this option available in Tracker.  I'm new to Tracker and had my students start using some of the features when I took them to a snow-tubing lab at our local ski resort.  I just got a GoPro 3+ (black edition) for video analysis for my classroom (can do 240fps).  Can anyone recommend how to set the proper settings for the input and output?

Thank you again for making this option available.

Have a great day!
Dwight



Re: Can we correct for a fisheye lens? - May 29 11:12PM
Douglas Brown Avatar
Douglas Brown
96 Posts

Hi Dwight,

I was hoping some other GoPro users might jump in here with some Radial Distortion filter settings that have worked well. I'm afraid I do not have one and can't give you the numbers you need (the most important number is the field-of-view "FOV" of the lens). Here's what I suggest you do:

  1. Check the link http://gopro.com/support/articles/hero3-field-of-view-fov-information and try using the FOV data with a fisheye projection for the input image. Leave the output projection as Rectilinear and play with the fixed pixels diameter.
  2. To really be certain you are getting an accurate correction, take some images of a uniform grid. Find or make the grid with known spacing and good contrast, big enough so the GoPro can focus on it. Take shots of the grid at a known distance from the camera so you can determine the angular FOV. Then mess with the filter settings until the output image grid has straight lines and is uniform across the entire frame.

I hope this helps. If you do get some settings that work well, please consider posting them to this thread so others can use them, too :-)

Doug

 



Re: Re: Can we correct for a fisheye lens? - May 30 2:40PM
Paul Nord
9 Posts

Doug,

I sent you some files at one point with various resolution images from the GoPro camera.  Do you remember what I did with those?  I can't find them now.

Paul



Re: Re: Re: Can we correct for a fisheye lens? - May 30 9:26PM
Douglas Brown Avatar
Douglas Brown
96 Posts

Paul--I have a "GoProOptics" folder in my Dropbox folder with lots of videos in Hero2, Hero3 and Physics Samples subfolders. Must be from you, right?  The Hero3 files are all MP4 and the Hero2 files are MP4 and JPG. They're all shots of a pegboard--perfect for determining the fisheye filter parameters! If you can't find them in your Dropbox folder let me know ;-)

So glad you remembered those! Doug



Re: Re: Re: Can we correct for a fisheye lens? - May 30 9:31PM
Douglas Brown Avatar
Douglas Brown
96 Posts

Here's a link to the shared GoProOptics folder on Dropbox:

https://www.dropbox.com/sh/74iymcyec1m8o0f/AADTW-jHNBD5IT3Fg13T4PxTa

I think anybody can access these files.  Doug



The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics