Introduction

This blog is a user's perspective on the Micro Four Thirds camera system. Read more ...

Lens Buyer's Guide. Panasonic GH4 review.

My lens reviews: Olympus 9mm f/8 fisheye, Lumix G 12-32mm f/3.5-5.6, Leica 25mm f/1.4, Lumix X 12-35mm f/2.8, Lumix X 35-100mm f/2.8, Sigma 30mm f/2.8, Sigma 19mm f/2.8, Lumix X PZ 14-42mm f/3.5-5.6, Lumix X PZ 45-175mm f/4-5.6, Olympus M.Zuiko 45mm f/1.8, Panasonic Lumix G 100-300mm f/4-5.6, Panasonic Leica Lumix DG Macro-Elmarit 45mm f/2.8 1:1 Macro, Panasonic Lumix G 45-200mm f/4-5.6, Panasonic Lumix G 20mm f/1.7 pancake, Panasonic Lumix G 14mm f/2.5 pancake, Panasonic Lumix G HD 14-140mm f/4-5.8, Panasonic Lumix G HD 14-140mm f/3.5-5.6, Panasonic Lumix G 8mm f/3.5 fisheye, Lumix G 7-14mm f/4, Samyang 7.5mm f/3.5 fisheye, Tokina 300mm f/6.3 mirror reflex tele, Lensbaby 5.8mm f/3.5 circular fisheye lens
The blog contains affiliate links. As an Amazon Associate I earn from qualifying purchases.
Showing posts with label geometric distortion. Show all posts
Showing posts with label geometric distortion. Show all posts

Tuesday, 1 January 2013

Geometric distortion correction

Micro Four Thirds lenses tend to be smaller than lenses from other systems. There are several reasons for this.

One is of course that the sensor is smaller than most other system cameras, with the exception of the Nikon 1 system, which has an even smaller sensor. Another reason is that the register distance is shorter than for DSLR systems.

But one major reason is that the system relies on software correction of the sensor output. This includes correction of Chromatic Aberration (CA) artefacts and vignetting.

Most of the Micro Four Thirds lenses need geometric distortion correction applied for the output images to become rectilinear. This is done totally seamlessly by the camera and software, both for JPEG and RAW images. So the user never notices that the image, as seen by the camera through the lens, is not rectilinear in the first place.

This is in contrast to older DSLR systems. In these systems, there is an optical viewfinder, in which the users sees exactly what the sensor sees, through the lens. With a DSLR system, the lens must be rectilinear, otherwise, the user will be appalled by the geometric distortion when using the camera.

Here is an illustration of two basic kinds of distortion: Pincushion distortion (left) and barrel distortion (right):


In reality, the geometric distortion might very well be more complicated than what is illustrated by these simple models.

In this article, I look at another type of correction employed in two of the newer lenses, geometric distortion correction. By looking at the RAW file in a third party program, I can extract the uncorrected image, and compare it with the out of camera (OOC) JPEGs. For a good reference, I photographed a wall with square tiles:


After processing the RAW image to find the true geometry of the underlying image, I superimposed the two, using red lines for the uncorrected geometry, see below.

I included the appropriate adjustment needed. The adjustment numbers in percent refer to the "Lens Distortion" filter in The Gimp, an image processing software. Of course, to become rectilinear, some lenses might require more complicated adjustment than the simple model given by the "Lens Distortion" filter. So these figures are just intended to be approximate relative indicators of the degree of distortion. A positive figure indicated barrel distortion, while a negative figure indicates pincushion distortion.

Lumix X 12-35mm f/2.8


This lens features some barrel distortion in the wide end, and no distortion correction in the long end. However, even after the in-camera distortion correction, there is some residual barrel distortion in the wide end. This is the most pronounced at close focus distance, but can also be seen with infinity focus, in my experience. It is not uncommon that the geometric properties change slightly with focus for internal focus lens designs.

See the review of the lens for a real life example illustrating the barrel distortion in the wide end.

Also in the long end, the out of camera JPEG images show some distortion. They tend to have a bit of pincushion distortion.


Lumix X 12-35mm f/2.8 @ 12mm: -14%



Lumix X 12-35mm f/2.8 @ 35mm: 0%



Lumix X PZ 14-42mm f/3.5-5.6


It is perhaps unexpected to see that this lens has less barrel distortion correction in the wide end than the basic version of the lens, the Lumix G 14-42mm f/3.5-5.6 kit zoom lens. Given the smaller size of the power zoom version, one would expect that more optical compromises have been made.

Just like with the Lumix X 12-35mm f/2.8 lens, there is some residual barrel distortion even in the corrected image at 14mm. There is also some residual pincushion distortion in the long end.


Lumix X PZ 14-42mm f/3.5-5.6 @ 14mm: -15%



Lumix X PZ 14-42mm f/3.5-5.6 @ 42mm: +5%




Conclusion


I'm a bit disappointed to see that there is noticeable barrel and pincushion distortion in the images produced by the premium Lumix X 12-35mm f/2.8 zoom lens. For such an expensive lens, one would have expected more perfect images.

On the other hand, this is not really any real problem. If you need to have absolutely rectilinear images, then you can apply a bit of lens distortion post processing. Also, I guess this comes down to a compromise between having a traditional focus mechanism, which is slower, but more resistant to distortion at closer focus distances, and internal focus, which is much faster. The Lumix G 20mm f/1.7 pancake lens has the traditional focus mechanism, and quite some people dislike it for the slow and noisy autofocus.

Summary of other lenses


And here is a summary of the adjustments to all the lenses I have tested. The percentage in the table refers to the Gimp image processing Lens Distortion filter value needed to make a rectilinear image: 0% means no correction, a negative value means barrel distortion, and a positive value means pincushion distortion.

LensFocal lengthRelative distortion correction
Leica DG Summilux 25mm f/1.425mm-8%
Lumix G 20mm f/1.7 Pancake20mm-11%
Lumix G 14mm f/2.5 Pancake14mm-16%
Lumix G 14-42mm f/3.5-5.614mm-18%
Lumix G 14-42mm f/3.5-5.630mm0%
Lumix X PZ 14-42mm f/3.5-5.614mm-15%
Lumix X PZ 14-42mm f/3.5-5.642mm+5%
Lumix X 12-35mm f/2.812mm-14%
Lumix X 12-35mm f/2.835mm0%
Lumix G 7-14mm f/47mm-17%
Lumix G HD 14-140mm f/3.5-5.6 II14mm-16%
Lumix G HD 14-140mm f/3.5-5.6 II50mm0%
Lumix G HD 14-140mm f/4-5.814mm-17%
Lumix G HD 14-140mm f/4-5.830mm-4%
Lumix G HD 14-140mm f/4-5.850mm-1%
Lumix G 45-200mm f/4-5.645mm+1%
Lumix X PZ 45-175mm f/4-5.645mm0%
Lumix X PZ 45-175mm f/4-5.6100mm+5%
Lumix G 100-300mm f/4-5.6100mm0%
Olympus M.ZD 45mm f/1.845mm0%
Panasonic Leica Lumix DG Macro-Elmarit 45mm f/2.8 1:1 Macro45mm0%
Lumix 8mm f/3.5 fisheye8mm0%
Sigma 30mm f/2.830mm0%

Tuesday, 15 May 2012

Geometric distortion correction

Most of the Micro Four Thirds lenses need geometric distortion correction applied for the output images to become rectilinear. This is done totally seamlessly by the camera and software, both for JPEG and RAW images. So the user never notices that the image, as seen by the camera through the lens, is not rectilinear in the first place.

This is in contrast to older DSLR systems. In these systems, there is an optical viewfinder, in which the users sees exactly what the sensor sees, through the lens. With a DSLR system, the lens must be rectilinear, otherwise, the user will be appalled by the geometric distortion when using the camera.

Here is an illustration of two basic kinds of distortion: Pincushion distortion (left) and barrel distortion (right):


In reality, the geometric distortion might very well be more complicated than what is illustrated by these simple models.

I have previously tested the geometric distortion properties of some Micro Four Thirds lenses, and I found that virtually all lenses featured some distortion correction. Especially wide angle lenses, or the wide end of zoom lenses. Since this time, I have acquired some new lenses, and I wanted to test them in the same way.

Again, I have done the tests by taking a pictures of a tiled wall. The images look like this:


Since I am only interested in the geometric distortion, I have increased the contrast so that the images become monochrome. I also superimposed the corrected out of camera JPEG images (black) onto the original RAW uncorrected images (red).

I included the appropriate adjustment needed. The adjustment numbers in percent refer to the "Lens Distortion" filter in The Gimp, an image processing software. Of course, to become rectilinear, some lenses might require more complicated adjustment than the simple model given by the "Lens Distortion" filter. So these figures are just intended to be approximate relative indicators of the degree of distortion. A positive figure indicated barrel distortion, while a negative figure indicates pincushion distortion.

Here is a comparison of the uncorrected and corrected images for some lenses.

Panasonic Lumix 14mm f/2.5 pancake: -16%

There is a significant barrel distortion, which is corrected in the in-camera JPEG image. However, there is some residual barrel distortion even in the corrected image. I have noticed this previously. In fact, the lens is rectilinear (after correction) at long focus distances, but has some barrel distortion at close focus distances. In this example, we see the barrel distortion at close focus distance. This is not an uncommon behavior for lenses that feature internal focus.


Olympus M.ZD 45mm f/1.8: 0%

No distortion correction at all. It looks like there is a small amount of pincushion distortion, though, so perhaps there should have been some in-camera correction done by the camera.


Panasonic X PZ 45-175mm f/4-5.6 @ 45mm: 0%

No distortion correction at 45mm.


Panasonic X PZ 45-175mm f/4-5.6 @ 100mm: +5%

There is some pincushion distortion correction at 100mm, but not a lot.


Panasonic G 100-300mm f/4-5.6 @ 100mm: 0%

No geometric distortion correction at 100mm.


Summary

Including the results from my previous study, I can present a table with the relative distortion corrections of various lenses:

LensFocal lengthRelative distortion correction
Lumix G 20mm f/1.7 Pancake20mm-11%
Lumix G 14mm f/2.5 Pancake14mm-16%
Lumix G 14-42mm f/3.5-5.614mm-18%
Lumix G 14-42mm f/3.5-5.630mm0%
Lumix G 7-14mm f/47mm-17%
Lumix G HD 14-140mm f/4-5.814mm-17%
Lumix G HD 14-140mm f/4-5.830mm-4%
Lumix G 45-200mm f/4-5.645mm+1%
Lumix X PZ 45-175mm f/4-5.645mm0%
Lumix X PZ 45-175mm f/4-5.6100mm+5%
Lumix G 100-300mm f/4-5.6100mm0%
Olympus M.ZD 45mm f/1.845mm0%
Panasonic Leica Lumix DG Macro-Elmarit 45mm f/2.8 1:1 Macro45mm0%
Lumix 8mm f/3.5 fisheye8mm0%
Sigma 30mm f/2.88mm0%

Conclusion

We see that wide angle lenses and zooms typically feature barrel distortion (negative figure) in the wide end. On the other hand, longer lenses are often not corrected, or are corrected for a small amount of pincushion distortion (positive figure). The in-camera distortion correction is some times insufficient, for example we've seen that the Olympus M.ZD 45mm f/1.8 and Lumix G 14mm f/2.5 pancake lenses feature some geometric distortion in the short focus range, while behaving better at infinity focus.

There are some who have speculated that Leica-branded lenses are not subject to any software corrections. I have looked at the Panasonic Leica 45mm f/2.8 1:1 macro lens, and found no indications of software adjustments to the images. However, I still don't believe that statement. One of the first cameras for which the software corrections were widely discussed online, was the Panasonic Lumix LX3 high end pocked camera from 2008. And it does feature a Leica-branded lens, and quite clearly, there is a significant barrel distortion in the wide end of the zoom, which is corrected by software.

Thursday, 23 February 2012

Fisheye lenses, different projections?

The Samyang 7.5mm f/3.5 fisheye lens is an interesting addition to the Micro Four Thirds lineup. While most third party Micro Four Thirds lenses so far have been existing manual lens designs given a new mount, this lens is designed for the Micro Four Thirds format from ground up.

How can I tell? A full frame fisheye lens has 180° diagonal field of view. Hence, the lens must match the sensor size exactly. If the lens was designed for APS-C, a larger format, then the corners would not correspond to 180° angle of view. A fisheye lens which does not project to 180° in the corners is pretty much useless. Then it is just a wide angle lens with a lot of geometric distortion.


Compared with the existing Lumix G 8mm f/3.5 fisheye lens, the Samyang lens is a much more traditional design, with a manual focus ring and aperture ring.




Some say the Samyang lens features a different projection type, the Stereographic projection. This is supposed to be less distorted than the Spherical projection traditionally associated with fisheye lenses. Let's look into how their projections differ. Here is a picture taken with both lenses, and also using the Olympus Zuiko Digital 9-18mm Four Thirds wide angle zoom at 9mm:



Samyang 7.5mm
Lumix G 8mm
Olympus 9-18mm @ 9mm
By superimposing both the fisheye images in one image, and doing edge detection, we can see how their projections compare:
And let's look at another example:



Samyang 7.5mm
Lumix G 8mm
Olympus 9-18mm @ 9mm
Superimposing the two gives:

(Click for larger images.)

Conclusion

So, what is the conclusion of all this? First of all, from the second example, we observe that both lenses have pretty much the same diagonal field of view. This experiment does not verify that the diagonal field of view is exactly 180°, as it should be, but at least both lenses have around the same maximum diagonal angle. To be more precise, the Samyang lens appears to render a slightly wider diagonal field of view. This might be due to the shorter focal length, 7.5mm versus 8mm.

Regarding the distortion, we can see that the Samyang lens renders objects which are inside the border of the image a little bit smaller. This means that it distorts the images somewhat less. So the rumor is true: The Samyang lens does give less "fisheye distortion".

But surely, the differences are pretty marginal. You're not likely to notice much difference, unless comparing head to head, as I do in this article. So if you're looking at the Samyang 7.5mm lens to avoid the fisheye distortion, you are going to be disappointed.

One thing to note is that if you plan to convert to rectilinear images in post processing, the Samyang lens has the potential for giving you the widest possible rectilinear images of the two fisheye lenses. This process is called defishing, and you can read about the topic here. It is probably not true that the Samyang lens features stereographic projection. It still has fisheye projection, but with slightly less distortion than the Lumix G 8mm f/3.5 fisheye lens.

Sunday, 3 July 2011

Software correction to the PL45?

One important aspect of the Micro Four Thirds system is the software correction to the images. Traditionally, lenses need to correct the images optically, so that the medium capturing the images sees the correct image. With the advent of digital imaging, though, the camera can do software based corrections to the image, adjusting for aspects that the lens does not correct.

This has the potential of making the lenses smaller and cheaper. Also, by allowing some aspects of the lens output to be adjusted with image processing, other aspects not possible to correct with software can be given more weight in the design process. This has the potential to give a better image quality. I think that software correction of lens output is a good thing, however, it remains a controversial issue.

One aspect which is corrected with a number of Micro Four Thirds lenses is geometrical distortion. I have explored this in a number of articles, here is one summarizing the effect for a number of lenses.

The other aspect corrected with some lenses, is some chromatic abberations. In my study, some chromatic abberations are corrected for lenses like the Lumix 8mm fisheye, the Lumix 20mm pancake and so on. Currently, this correction is only done when using Panasonic Micro Four Thirds cameras. At the time of writing, Olympus cameras do not perform the CA corrections.

Panasonic Leica 45mm f/2.8 macro

There is some rumor on the internet that Leica branded lenses are not corrected using software. This is clearly not true, since a number of Panasonic compact cameras feature Leica branded lenses that are corrected for geometric distortion. Examples include the Lumix LX3, and Lumix LX5, as well as the Leica branded counterparts.


But what about Leica branded interchangeable lenses? The Panasonic Leica 45mm f/2.8 macro lens (PL45) is the first Leica branded Micro Four Thirds lens. Are there any software based adjustments to the image output? Let's try to find out.

Geometric distortion correction

Here is an example image taken with the Panasonic Leica 45mm f/2.8 at f/2.8:


By looking at the uncorrected RAW, and comparing with the out of camera JPEG, we can easily see if there was any geometric distortion correction. Here are 100% crops from the lower left corner:


As we can see, they are identical in terms of geometric distortion. The RAW image contains about eight more pixels along the borders, which is why a bit more detail is visible from the wall and the leaves. I have previously written about this: Using RAW gives you approximately 1% more megapixels.

Corrections of Chromatic Abberations

So we conclude that there is no geometric distortions correction when using the PL45 lens. What about CA corrections? Usually, we see the CA artifacts most easily in the corners of the image frame, and where there is a huge contrast between light and dark elements. A typical place where this is visible, is where foliage meets the sky. So let's try to see in the upper right corner:


The exposure and white balance is not entirely the same in both crops, so it's not straight forward to compare them. But I think it is safe to conclude that there is no more or less CA artifacts in either image, thus indicating that there is no in camera CA correction performed for this lens.

In my previous study of some Panasonic lenses, it was easy to see that there was a correction of some CA artifacts.

Conclusion

Based on my study, I conclude that there is no software correction of the image when using the Panasonic Leica 45mm f/2.8 lens on Panasonic cameras.

This does not necessarily mean that no Leica branded Micro Four Thirds lenses will feature in camera adjustments to the output image. There is a newer Leica branded Panasonic Lumix 25mm f/1.4 lens. I have not tried it, and so I cannot say if it features this kind of image processing or not.

Note that this is in no way a criticism of using RAW images. There are many RAW image converters which will do the distortion correction automatically and seamlessly, and you will never notice that there was any geometric adjustment done at all. I am using the RAW images to visualize the initial image captured by the sensor, as it is the only way to access it.