Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Advanced Lens Corrections

New Here ,
Nov 14, 2018 Nov 14, 2018

Copy link to clipboard

Copied

Dear community,

I am looking for a way to remove the lens distortions of a gorpo hero 7 black. I know that one can use the "optics compensation" effect to remove the fisheye distortion. It does work pretty well. However, when I use a stabilization procedure (Mercalli prodad) afterwards, I can still see that the image has slight distortions in it. This is because the image stabilization shifts the frames all the time and even the slightest position-dependent distortions become visible. It is as if the remaining distortions are moving within the video.

So what I want is actually a more advanced lens distortion correction which can eliminate distortions beyond fisheye. Can somebody help me or give me a hint? I would be very thankful for any advice.

I am using AE CC 2017.

Views

5.4K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2018 Nov 14, 2018

Copy link to clipboard

Copied

Start by using GoPro studio to correct the footage and save it in the Cineform codec.

Anything more advanced than that is going to require you to shoot a test grid and come up with your own correction factors. You can't just eyeball the correction.

As far as workflow you have two options. Remove stabilize the original footage and then correct for distortion or correct for the distortion, render a DI (digital intermediate) and stabilize the DI.

If you are doing composites or adding things to the frame that you want to look like are actually in the shot, it is usually better to do the tracking and compositing with the footage before it is "warp" stabilized, precompose the entire composite and then apply the stabilizer to the entire composite. That way the entire new image gets bent into the new shape to smooth out the action.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2018 Nov 14, 2018

Copy link to clipboard

Copied

Hello Rick, thank you for the reply!

GoPro Studio was discontinued. After a longish search I found an installation file on the internet which I will try out later. However, I'm not so sure whether this software is able to remove the distortions of the hero7 black, since GoPro Studio was discontinued way before the hero7 was released. I will give it a try though.

Regarding the workflow: Image stabilization should always be applied after lens correction. Otherwise one will see moving distortions while the footage is actually stable. These moving distortions cannot be removed by a static lens profile. So lens corrections after image stabilization are useless. At least that's how I understand it.

I'm glad that you mention a test grid. I had exactly that idea. But which effect should I use to straighten a reference grid? There is a tool called "Adobe Lens Profile Creator". Apparently is can compute a lens profile for an arbitrary lens by analyzing some frames with check board patterns. Can I use these profiles in AE?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2018 Nov 14, 2018

Copy link to clipboard

Copied

maxw55276389  wrote

Regarding the workflow: Image stabilization should always be applied after lens correction. Otherwise one will see moving distortions while the footage is actually stable. These moving distortions cannot be removed by a static lens profile. So lens corrections after image stabilization are useless. At least that's how I understand it.

Not necessarily so. Image stabilizers work on predicting the motion of the edges of the detail in a shot. The most efficient approach depends on the shot. Rolling shutter correction is mathematical. It is not based on predicting the movement of pixels, it is based on the scan rate of the camera. With real problematic footage, I would do rolling shutter correction, pre-compose, perform lens correction, then, if tracking and compositing were required I would precompose or render a DI, track, and composite, then pre-compose the entire composite so that it could be stabilized. That way the warping required to stabilize the image would be calculated on the entire image.

On the other hand, if you just wanted to do image stabilization and you no compositing was required, most of the time, you would have more information in the frame to work with so I would fix the rolling shutter, pre-compose, run image stabilization (Warp Stabilizer or equivalent) then pre-compose and perform the lens correction.

The most efficient and most effective workflow depends entirely on the shot and the effects you want to apply to the shot. No one solution works for every shot and not every shot can be stabilized. If this was a crude handheld shot on a windy day it would be nearly impossible to stabilize:

Screenshot_2018-11-14 10.24.43_BZi6mh.png

But this one would probably work just fine because there is at least something in the shot that is not moving:

Screenshot_2018-11-14 10.27.00_JSfXvC.png

One workflow that will not work at all is applying lens correction as an effect and then running Warp Stabilizer (or other stabilization software) because the render order gets fouled up and you can't do anything about it.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2018 Nov 16, 2018

Copy link to clipboard

Copied

Thank you for clarifying the workflow.

So, does a solution exist which can remove distortions of arbitrary lenses? E.g. by analyzing a frame containing a checked pattern? I know there are some professional tools for that but they are quite pricey. Maybe some plugins for VirtualDub?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 16, 2018 Nov 16, 2018

Copy link to clipboard

Copied

There are professional tools to analyze patterns and make lens corrections but I don't know of any free solutions that give you real accuracy. Here's how you do it in SynthEyes. As you can see it is a lot more complicated than you think to get a really accurate correction.

There are presets in Lightroom for many modern lenses, and they work quite well. Unfortunately, they cannot be easily used with video files. I guess if you really wanted to try the Lightroom method you could render your GoPro video to an image sequence and then batch process that.

If you want to stay in After Effects, in most cases, the easiest thing to do is just shoot a grid of some kind or even just a shot of something with several straight lines, add Optics compensation and make adjustments so the lines are straight. You can use the pen tool to draw some straight lines in the frame for reference and get pretty darn close in just a few seconds. The comp setup would look something like this:

Screenshot_2018-11-16 05.23.29_wzUwOn.png

Then you just make a couple of adjustments and save the settings as an animation preset.

The workflow would be to apply the animation preset to your footage, pre-compose, then run Warp Stabilizer. If you are adding things to the scene that are supposed to be part of the scene then you want to add the layers and pre-compose the corrected footage and the layers before you run Warp Stabilizer on the shot so everything gets corrected in the same way.

The easiest way to correct a bunch of shots is to do it in Premiere Pro. Just open up the Effects workspace and search for distortion. You'll find a bunch of presets for common cameras or you can just use the Lens Distortion effect and save your own preset. If you apply it to an adjustment layer you can correct every shot in the sequence in a couple of seconds.

Screenshot_2018-11-16 05.30.08_avfIjz.png

Either solution is pretty easy to do, even easier if you just do a couple of test shots with a grid or something with a bunch of straight lines.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 01, 2019 Jan 01, 2019

Copy link to clipboard

Copied

LATEST

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines