Mike Chaney's Tech Corner
November 21, 2024, 09:47:25 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Qimage registration expired? New lifetime licenses are only $59.99!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: August 2009: Integrated Software Distortion Correction Reduces Lens Complexity  (Read 54694 times)
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« on: July 31, 2009, 06:54:21 PM »

August 2009: Integrated Software Distortion Correction Reduces Lens Complexity


Background

Most dSLR zoom lenses use physical design (lens elements) to compensate for lens distortions near the ends of the zoom range.  Typically, a lens needs to be designed such that barrel distortion is well controlled at the wide angle end of the zoom range and pincushion distortion is controlled at the telephoto end of the range.  The most challenging aspect of lens design is often being able to control barrel distortion on lenses that have super-wide-angle focal lengths.  This is why many online review sites test lens distortions by taking photos of a grid, particularly at the widest angle of a zoom lens.  If the grid appears bowed out near the edges of the photo at wide angles for example, distortion is said to be noticeable.  Usually the review will go on to indicate whether the distortion disappears after zooming in and at what zoom range the distortion is noticeable to viewers.  Panasonic with their latest 14-140 Micro Four Thirds lens, however, may be starting a new trend in lens design.  Instead of designing the lens to optically control distortions at wide angle, they depend on software to correct barrel distortions at wide angle focal lengths.  While the lens optics actually suffer from severe barrel distortion from about 14-25mm, the camera compensates for the distortion by applying a software barrel distortion filter to the image (note that the Panasonic G1, GH1 and the Olympus E-P1 are currently the only cameras compatible with the Panasonic 14-140 lens).  This allows the lens to be less complex, lighter, and in the long run: cheaper.  Is this a trend that will catch on?  Will other manufacturers start "outsourcing" distortion correction to software, allowing lenses to be less complex and cheaper?  Let's take a look at this concept.

 

Zoom lenses and distortion

Distortion in zoom lenses is typically more noticeable at the wide angle end of the zoom range.  In general, the more expensive lenses tend to have less distortion.  Unfortunately, manufacturing a super zoom to control barrel distortion at wide angles involves making a lens that is more complex.  Adding lens elements to control distortion can result in a reduction in sharpness and can also result in less light reaching the sensor and increasing mechanical complexity can reduce focus accuracy.  So why not just make all lenses less complex and simply remove the distortions with software after image capture?  Let's take a look at the practical applications and the tradeoffs.

 

Optical versus digital distortion correction: the trade-offs

As discussed above, optical control of barrel distortion in lenses involves increasing the complexity of the lens.  Lenses that are more complex are heavier, more expensive to manufacture, and the very methods used to control distortions can cause other unwanted effects such as a reduction in light transfer, reduction in (particularly edge) sharpness, and front/back focus issues as better tolerances are required to achieve good focus.  So why not delegate lens distortion correction to software every time, reducing lens complexity and cost?  Well, not so fast.  There are trade-offs involved with software lens distortion correction as well and the method is not viable for traditional dSLR cameras that utilize a mirror.

Any time you apply a software correction that moves pixels around and resizes, expands, or contracts parts of the image, you are going to lose resolving power and hence lose detail.  Everything comes at a price.  Fortunately, software lens distortion corrections are quite good at what they do and when you compare any sharpness/detail lost in software correction to the sharpness/detail loss that you will get with optical correction (and there will be some), software correction seems like a viable solution.  Think about it this way.  The optical complexity that you must add to a lens to control barrel distortion will result in some loss of detail, usually more at the edges of the photo.  If your (let's say) 12 MP image sensor has enough resolution to be able to pick up that edge softness, will letting the lens distort and correcting the distortion in software result in just as much softening?  Less?  More?  As the resolution of image sensors increases, delegating some of the lens distortion correction to software starts to make more sense.  A good balance is being able to develop lenses at a more reasonable cost (and weight) while putting some of those pixels on that high resolution sensor to good use, allowing them to do some of the work that has traditionally been forced upon the optics.

 

Implementation

The new Micro Four Thirds lenses are interesting because they depend on software for some of their optical characteristics.  Panasonic doesn't want users to have to deal with (or see) how badly the 14-140 lens distorts optically so they've built the software correction into the digital pipeline.  This means that the electronic viewfinder and LCD on compatible Micro Four Thirds cameras (right now, the Panasonic G1, GH1, and Olympus E-P1) must correct the distortions in real time using software inside the camera!  Yes, if you set the lens to 14mm and look through the viewfinder or LCD, you see a nice image with very little barrel distortion.  That's because the camera is correcting the distortion in real time taking what is hitting the sensor, correcting it, and then passing the distortion-corrected version along to the EVF or LCD.  The Micro Four Thirds cameras can do this because you are seeing a rendition of the image that is hitting the sensor: it can be "modified" or "fixed" before it is displayed in the EVF or on the LCD.  On a typical dSLR, this cannot be done: the lens optics must control barrel distortion at wide angles because you are looking through the lens... there is no opportunity to "intercept" what you see and fix it.

What this means is that this type of software auto-correction is probably only viable for mirrorless dSLR-like cameras such as those in the Micro Four Thirds family.  It does give the mirrorless cameras an advantage, however.  By being able to offload some of the optical responsibilities of the lens to software, ultimately you end up with better lens quality for a given price.  In practical terms, the 14-140 lens is incredible.  Due to its reduced complexity, it produces incredibly sharp photos and the software lens corrections take over where needed at the wide angle end of the zoom range.  The bottom line is that for about $800, you get a lens that can deliver optical quality comparable to a lens costing double (if not more) that amount.  But... as mentioned, the lens is part of a system.  Without the software lens distortion correction, most people would find performance of the lens at wide angles quite disappointing due to the rather extreme amount of optical distortion.  Part of the "system" that I refer to must also be able to handle raw photos!  Yes, the raw files are really raw and if you decode them in their raw form, they'll show the severe distortion of the lens at wide angles.  I took a photo of some window shades just to prove this point and here are the results:

JPEG straight from the Panasonic GH1 Raw photo decoded with Qimage
Raw photo decoded with dcraw

The above shot was taken in raw+JPEG mode with the GH1 and 14-140 lens set to 14mm.  Notice how the JPEG, when downloaded straight from the camera, already has the software lens distortion applied.  When shooting in JPEG mode, the photographer would not even be aware that the lens actually has some pretty significant optical barrel distortion.  The Qimage developed raw photo also has the proper lens distortion correction applied.  Remember, the lens distortion is part of the image acquisition process now, so for the raw file to be properly decoded, the optical data that is stored in the raw photo for that lens must be applied.  Take a look at the bottom example that shows how dcraw renders the same photo.  Since dcraw doesn't use the lens distortion correction data and displays the raw file as truly raw, you can see how much distortion the lens itself really has.  Most "high end" raw tools such as PhotoShop, SilkyPix, and Qimage will render the proper image but raw utilities like dcraw that are designed to decode the "truly raw" data will show exactly what the sensor sees.  As you can see from the above, significant optical distortions are mitigated effectively by software.  In addition, the software fix is so good that very little detail is lost in the final/fixed photo!

 

Summary

Integrated software lens distortion correction is an interesting technology.  While lens distortion correction is not new (many software programs allow you to do manual lens distortion corrections), the new Micro Four Thirds format from Panasonic and Olympus opens yet another door to handling an age-old problem in a new and innovative way.  If the mirrorless "dSLR" design catches on like I think it will, look for lens optical complexity to decrease at the expense of a little processing time.  For you and I, this is a good thing!  We'll end up with sharper, higher quality photos, from more reasonably priced lenses!

 

Mike Chaney

Logged
Terry-M
The Honourable Metric Mann
Forum Superhero
*****
Posts: 3251



WWW
« Reply #1 on: July 31, 2009, 07:47:00 PM »

Quote
On a typical dSLR, this cannot be done: the lens optics must control barrel distortion at wide angles because you are looking through the lens... there is no opportunity to "intercept" what you see and fix it.
Mike,
I don't see this as necessarily as a barrier to software correction of conventional dSLR lenses. Ok. the view via the mirror may not look good but if the final result gives an overall advantage than I would go with it.
A couple of weeks ago I attached some images from my Canon 17-85 IS lens at 18mm which shows its poor LBD performance - I can easily see it in the viewfinder. Perhaps Canon thought this was a better compromise wrt cost/performance, knowing the distortion can be corrected by software at a later stage.
http://ddisoftware.com/tech/qimage/v2009-267-issuescomments/msg926/#msg926

If this were to become a trend with conventional dSLR's, I would see there being a problem with selling the idea  :-\

A pie-in-the-sky question: do you think it will be possible to develop software that would make LBD corrections on any lens without a database; somehow examine the image for straight lines that are curved and then correct. I said it was pie-in-the-sky  Roll Eyes
Terry.
Logged
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #2 on: July 31, 2009, 08:26:00 PM »

Mike,
I don't see this as necessarily as a barrier to software correction of conventional dSLR lenses. Ok. the view via the mirror may not look good but if the final result gives an overall advantage than I would go with it.

Not only will the view "not look good" but the framing will be incorrect as well.  The more barrel distortion you have, the more the image (edges) must be cropped.  So the view through the viewfinder will show a distorted image and after the correction, some of the edges will get cropped off as well.  Not sure it's practical on a standard dSLR.

Quote
If this were to become a trend with conventional dSLR's, I would see there being a problem with selling the idea  :-\

That's just it.  If you can't see through the viewfinder what you'll be shooting, that may be too much of a trade-off for many.

Quote
A pie-in-the-sky question: do you think it will be possible to develop software that would make LBD corrections on any lens without a database; somehow examine the image for straight lines that are curved and then correct. I said it was pie-in-the-sky  Roll Eyes
Terry.

I think that would be impractical.  You could make a target (something like a grid) and shoot it and figure out how to correct a lens, but it'll only be accurate for that focal length.  Then you'd have to shoot numerous other focal lengths in the range (4-6 might work) to get an overall curve.  Once you've done it, you'd have it though, but then there's the complication that each manufacturer stores which lens is on the camera in a different place and many don't use EXIF tags.  So if you use multiple lenses, it might not always be obvious which "curve" to apply just by looking at the image header so full automation will be problematic.

Mike
Logged
tgutgu
Newbie
*
Posts: 18


« Reply #3 on: August 01, 2009, 10:12:17 AM »

The main problem I see with in camera lens correction is that this currently leads to a late or non existing support of the G1 and GH1 by raw image processors.

The G Series is supported (sometimes late) by

Adobe Lightroom
LightZone
RawTherapee
Silkypix
Qimage Studio
Raw Developer

Not supported by

Capture One
DxO
Aperture
Bibble

Do you think that softare distortion correction makes the support by raw image processors more difficult?

Kind regards

Thomas
Logged

Thomas

Equipment: Panasonic Lumix GH2 with lenses from 7 to 300 mm

Others: Windows 7-64 bit, Lightroom 3.5 RC, Qimage Ultimate, LightZone 3.8, Bibble 5.2.2
           DxO 6.6, Photoshop CS4, Wings Platinum 4.22
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #4 on: August 01, 2009, 03:16:41 PM »

The main problem I see with in camera lens correction is that this currently leads to a late or non existing support of the G1 and GH1 by raw image processors.

The G Series is supported (sometimes late) by

Adobe Lightroom
LightZone
RawTherapee
Silkypix
Qimage Studio
Raw Developer

Not supported by

Capture One
DxO
Aperture
Bibble

Do you think that softare distortion correction makes the support by raw image processors more difficult?

Kind regards

Thomas


Good question.  My answer is "not particularly".  The raw processors you mention that don't support the G1 and GH1 don't support them because their raw support is very limited anyway.  They weren't likely to support those cameras whether they had software lens correction or not.  Bibble, for example, currently only supports 127 cameras while Qimage supports 337 cameras.  Software lens correction is a relatively easy fix.  Most converters already have a manual fix for that, so picking up the lens distortion coefficient out of the raw file and using it is a no brainer.  I don't think it'll stop any raw software from supporting the camera(s).  It's not like the Foveon/Sigma full color capture sensor where everything has to be done differently: that's why many raw converters don't support the Sigma SD14, DP1, or DP2.

Mike
Logged
Seth
Sr. Member
****
Posts: 322



« Reply #5 on: August 04, 2009, 02:55:09 AM »

In any case one should be able to allow or disallow the correction.  Distortion has it's place/use in photography.
Logged

Seth
<CWO4 (FMF) USN, Ret.>
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #6 on: August 04, 2009, 01:00:20 PM »

In any case one should be able to allow or disallow the correction.  Distortion has it's place/use in photography.

Not in this case!  You should not be allowed to turn off the correction because it is part of the lens.  When you buy an expensive lens that controls barrel distortion, should you be allowed to take the lens apart and remove the optical elements that correct the wide angle distortion?  It's no different here: the distortion correction is part of the lens operating characteristics and should never be disabled.

Mike
Logged
Seth
Sr. Member
****
Posts: 322



« Reply #7 on: August 04, 2009, 04:47:00 PM »

Mike-
That would assume one would NEVER want the optical distortion.  It is a usable tool just as flare is--at times.
Logged

Seth
<CWO4 (FMF) USN, Ret.>
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #8 on: August 04, 2009, 05:04:22 PM »

Mike-
That would assume one would NEVER want the optical distortion.  It is a usable tool just as flare is--at times.

Then you can add it later!  You're not getting my point: digital distortion correction is included as proper operation of the lens.  You wouldn't disable it just as you wouldn't take apart a $2000 lens and remove the lens elements that fix barrel distortion.

Mike
Logged
Seth
Sr. Member
****
Posts: 322



« Reply #9 on: August 05, 2009, 01:06:14 PM »

...Then you can add it later!....

Not in the world of photojournalism.  You'd get fired.  It's no longer a photograph--it's a rendering.

I'll leave it alone, though.  It's not a pro camera, so not an issue.
Logged

Seth
<CWO4 (FMF) USN, Ret.>
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #10 on: August 05, 2009, 01:11:48 PM »

...Then you can add it later!....

Not in the world of photojournalism.  You'd get fired.  It's no longer a photograph--it's a rendering.

I'll leave it alone, though.  It's not a pro camera, so not an issue.

Then by your logic, you'd better leave in the code that was designed to render proper images from the lens.  If you take that out, it's a "rendering" and you'd get fired!

Mike
Logged
deejjjaaaa
Newbie
*
Posts: 1


« Reply #11 on: August 07, 2009, 07:24:25 AM »

The main problem I see with in camera lens correction is that this currently leads to a late or non existing support of the G1 and GH1 by raw image processors.

The G Series is supported (sometimes late) by

Adobe Lightroom
LightZone
RawTherapee
Silkypix
Qimage Studio
Raw Developer

Not supported by

Capture One
DxO
Aperture
Bibble

Do you think that softare distortion correction makes the support by raw image processors more difficult?

Kind regards

Thomas


C1 does not support Panasonic raw files just because P1 has a contract w/ Leica... Patch Panasonic raw files to look like the camera manufacturer is Leica and you can open .RW2 in C1 w/o issues be it LX3 or G-series... very simple.
Logged
Misirlou
Newbie
*
Posts: 4


« Reply #12 on: August 12, 2009, 03:06:11 PM »

I just got a small waterproof Panasonic point-and-shoot, the DMC-TS1, to take snorkeling. Looking at my first few test images, I noticed absolutely no chromatic aberration fringing. That seemed puzzling to me, since it has one of those folded light path lenses, and certainly wasn't very expensive. Then I read a review on an obscure European web site that suggested Panasonic is correcting CA with s/w in-camera. I don't know if that's true or not, but whatever they've done is pretty impressive. Even my best Canon SLR lenses will sometimes generate annoying fringing under certain conditions. I typically use DxO to take care of such things automatically, but that obviously isn't an option with the Panasonic...
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Security updates 2022 by ddisoftware, Inc.