For the die hard M8 fans

The deal is that these JPEG corrections are for Leica lenses. I found that the corrections overly darkened images on similar but non-Leica lenses and abandoned the practice. I asked Matt Osborne (Mr. Leica on YT) and he said he does not code any lenses he uses. And he shoots a lot of Leica lenses, but mostly B&W.

M-mount lenses without the indentations can be encoded but the coding will wear off because of abrasion. But, again, you are applying Leica corrections to a non-Leica lens. Remember the words above the entrance to Hell in Dante's Inferno: "Abandon All Hope Ye Who Enter Here." As always, YMMV.

Wait a minute. The corrections enabled by coding are only applied to the JPEGs? So if you shoot in RAW only, the coding makes no difference?
 
Wait a minute. The corrections enabled by coding are only applied to the JPEGs? So if you shoot in RAW only, the coding makes no difference?

My understanding is that the RAW file is a raw file. It is unprocessed. It may contain within it a processed JPEG but it itself is the pristine output of the sensor fee of correction for vignetting or whatever else. This can be applied in conversion to TIFF, JPEG or another format. The RAW/DNG file can be modified in an editor in post, of course. If I am wrong about the RAW/DNG file attributes and the effect on them of 6-bit encoding someone please correct me so that we may all know.
 
My understanding is that the RAW file is a raw file. It is unprocessed. It may contain within it a processed JPEG but it itself is the pristine output of the sensor fee of correction for vignetting or whatever else. This can be applied in conversion to TIFF, JPEG or another format. The RAW/DNG file can be modified in an editor in post, of course. If I am wrong about the RAW/DNG file attributes and the effect on them of 6-bit encoding someone please correct me so that we may all know.

Yes, that is my understanding of RAW/DNG as well. DNG = "digital negative," after all. But for some reason it never occurred to me that a RAW/DNG would be just as immune to correction via the coding, as it is to other in-camera alterations. So, for those of us who routinely shoot DNG in the Leica, we've apparently been wasting our time by inputting lens codes, and by getting our old lenses coded! Wow. :eek:
 
Yes, that is my understanding of RAW/DNG as well. DNG = "digital negative," after all. But for some reason it never occurred to me that a RAW/DNG would be just as immune to correction via the coding, as it is to other in-camera alterations. So, for those of us who routinely shoot DNG in the Leica, we've apparently been wasting our time by inputting lens codes, and by getting our old lenses coded! Wow. :eek:

I understand that the RAW/DNG can be corrected in the same manner in post. Aberrations and so on can be fixed with profiles. OTOH it is done automatically with JPEG's in-camera. However that Leica lens profile may not do the appropriate corrections for the lens you are encoding if it is not the Leica lens the profile is for.

If I am wrong I hope I am corrected and if I am right I hope it is affirmed.
 
The Leica codes definitely are applied to raw files. What I understand the codes do is signal to the camera to correct colour aberrations at the edges of the frame, and also vignetting to a certain extent, tuned for each individual Leica lens model. The coding also adds exif information as to the lens model. it is an adjunct to the microlenses that Leica employs on its M-series sensors. The coding and the microlenses are less necessary for longer lenses, 50mm or longer, so there is usually no difference between using the code or not for normal and longer lenses.

When non-Leica lenses are used on the digital Ms, you can trial-and-error different codes to assess the efficacy of the corrections on the lens. it is not always the case that the Leica lens with the closest focal length and aperture to your non-Leica lens gives the most effective corrections.
 
The RAW files are also adjusted by the profile activated by the six bit code. RAW is not totally unprocessed.

Marty

Man, I hope you are right as I am taking you as gospel. ;o)

I have poured over the manuals and found no solid info. And the "logic" is that the RAW/DNG is pristine. So, OK, it is meddled with. Now the problem is the profile is for a Leica lens. I found that the Leica profiles darkened the images I was getting with non-Leica lenses when compared to no profile and abandoned the use of profiles. In some instances daylight became nighttime. I got some interesting images, too, but I could never be sure of what the result would be.

Thanks for chiming in.
 
The Leica codes definitely are applied to raw files. What I understand the codes do is signal to the camera to correct colour aberrations at the edges of the frame, and also vignetting to a certain extent, tuned for each individual Leica lens model. The coding also adds exif information as to the lens model. it is an adjunct to the microlenses that Leica employs on its M-series sensors. The coding and the microlenses are less necessary for longer lenses, 50mm or longer, so there is usually no difference between using the code or not for normal and longer lenses.

When non-Leica lenses are used on the digital Ms, you can trial-and-error different codes to assess the efficacy of the corrections on the lens. it is not always the case that the Leica lens with the closest focal length and aperture to your non-Leica lens gives the most effective corrections.

Whew, thanks for explaining that! That feels much better.
 
The corrections are most likely applied to the DNG-8 files, but not the .RAW files produced by using the Button-Dance. The .RAW files also do not have bad-pixel corrections, and do not have noise-reduction applied for long exposure. I have never used a Coded lens on my M8.

This is with the 50/1.1 Nokton, wide-open. in-camera JPEG uploaded, I also shoot .RAW and use M8RAW2DNG.

Nikki_1.jpg
 
Raw files and Original Data

Original in-camera sensor assembly data is unavailable from consumer digital cameras.

In consumer cameras digital imaging the data initially written by the ADC in-camera is rarely, if ever, written to the the raw file we use in post-production image rendering. This violates a common-sense principle of data analysis – never modify original data an any way. [1]

All camera makers have a problem. Their raw data will be used by a different third-party image-rendering software venders. Camera makers have no control over how completely a software vendor will model their data.[2] This means camera makers have to modify the original data to minimize variations in image perception that could damage their brand.

There is not much detailed information about changes camera makers apply to the original data.

Some known modifications to the original data include:

. various types of noise filtering – especially at very high camera ISO settings.

. dark frame subtraction to minimize artifacts present in long exposures

. pixel binning in raw file data from CMOS sensors.[3]

. Nikon mathematically replaces all negative digital numbers (DN) in their original data with zeros.

. Canon’s C-RAW option (.CR2 and .CR3 files) uses proprietary lossy compression to reduce file size. Original data is discarded and unrecoverable. This could be the ultimate abuse of the word raw in photography since a reasonable person would assume C-RAW is similar to lossless compression.

. when a Leica DNG is created using coded lens on a M8 or M9 body. the original DN values are irreversibly modified to correct for lens vignetting and hue infidelity.


What about lens correction parameters?

Let’s address three types of lens corrections: corrections for geometric distortions, for reduced brightness (luminance) and hue infidelity at the edges of the frame.

Geometric distortion is corrected using empirical parameters provided by the lens manufacturer or by independent sources. Leica lenses designed for film cameras have very low geometric distortion. Many Leica M, LTM and S series lenses do not require distortion correction. Leica coded lenses never applied geometric distortion corrections to DNG files from the M8 or M9. DNG files from Leica lenses designed specifically for digital cameras (e.g Q series) do contain geometric distortion correction parameters.

Since vignetting affects signal amplitude, straightforward DN corrections based on empirical measurements can be made to the original data amplitudes. It also possible to make these corrections during image demosaicking which means the ordinal data is not changed. Instead the demosaicking model includes amplitude correction parameters. In both cases amplitude correction parameters can be identically applied to R, G and B DN values according to their distance from the center of the frame. Hue rendering inaccuracies are addressed by using different amplitude correction parameters for R, G and B DN values.

Of course it is possible for photographers to create their own parameter correction estimates for any lens. Third-party software exists to simplify this task.

Leica decided to use the open-source DNG raw file format. Before format version 1.3 (2009), DNG files did not support lens x correction parameters. For this reason Leica’s lens coding applies vignetting and hue amplitude corrections to the DNG file. The original DNs are irreversibly modified. DNG format versions 1.3 and later do support storage of lens correction parameters. I so not know if or when Leica abandoned modifying original M camera DNs and switched to storing lens coding correction parameters as DNG file operation codes for the M240 or newer M bodies.


1/ Photography is identical to all empirical measurements in that collected data is used to compte parameter estimates. The parameters of interest are those in the mathematical model(s) used to render an image from the data. In our case these are a spatial array of the absolute energy accumulated by a photo-diode in the individual pixels. When a mathematical model accounts for all the information in the data, there is no need to modify the original data. This is rare for a variety of practical reasons.

2/ For example, a demosaicking model that computes a rendered image may assume there was no DC offset (bias) in the data. If a DC offset is present, a demosaicking model without a DC offset parameter will produce an image that is inferior to a model that includes one. This can be a trivial (DC offset is small) or serious (DC offset is high) issue.

3/ At this time the Leica M11 is the only consumer CMOS camera with this feature. This is different than the most modifications of original data because the signal and noise in individual DNs are averaged together. In other fields digital signal averaging occurs in memory during data acquisition. So, the original signal data is always an average. However pixel binning irreversibly decreases a sensor’s maximum possible resolution information content.
 
Raw files and Original Data

Original in-camera sensor assembly data is unavailable from consumer digital cameras.

In consumer cameras digital imaging the data initially written by the ADC in-camera is rarely, if ever, written to the the raw file we use in post-production image rendering. This violates a common-sense principle of data analysis – never modify original data an any way. [1]

All camera makers have a problem. Their raw data will be used by a different third-party image-rendering software venders. Camera makers have no control over how completely a software vendor will model their data.[2] This means camera makers have to modify the original data to minimize variations in image perception that could damage their brand.

There is not much detailed information about changes camera makers apply to the original data.

Some known modifications to the original data include:

. various types of noise filtering – especially at very high camera ISO settings.

. dark frame subtraction to minimize artifacts present in long exposures

. pixel binning in raw file data from CMOS sensors.[3]

. Nikon mathematically replaces all negative digital numbers (DN) in their original data with zeros.

. Canon’s C-RAW option (.CR2 and .CR3 files) uses proprietary lossy compression to reduce file size. Original data is discarded and unrecoverable. This could be the ultimate abuse of the word raw in photography since a reasonable person would assume C-RAW is similar to lossless compression.

. when a Leica DNG is created using coded lens on a M8 or M9 body. the original DN values are irreversibly modified to correct for lens vignetting and hue infidelity.


What about lens correction parameters?

Let’s address three types of lens corrections: corrections for geometric distortions, for reduced brightness (luminance) and hue infidelity at the edges of the frame.

Geometric distortion is corrected using empirical parameters provided by the lens manufacturer or by independent sources. Leica lenses designed for film cameras have very low geometric distortion. Many Leica M, LTM and S series lenses do not require distortion correction. Leica coded lenses never applied geometric distortion corrections to DNG files from the M8 or M9. DNG files from Leica lenses designed specifically for digital cameras (e.g Q series) do contain geometric distortion correction parameters.

Since vignetting affects signal amplitude, straightforward DN corrections based on empirical measurements can be made to the original data amplitudes. It also possible to make these corrections during image demosaicking which means the ordinal data is not changed. Instead the demosaicking model includes amplitude correction parameters. In both cases amplitude correction parameters can be identically applied to R, G and B DN values according to their distance from the center of the frame. Hue rendering inaccuracies are addressed by using different amplitude correction parameters for R, G and B DN values.

Of course it is possible for photographers to create their own parameter correction estimates for any lens. Third-party software exists to simplify this task.

Leica decided to use the open-source DNG raw file format. Before format version 1.3 (2009), DNG files did not support lens x correction parameters. For this reason Leica’s lens coding applies vignetting and hue amplitude corrections to the DNG file. The original DNs are irreversibly modified. DNG format versions 1.3 and later do support storage of lens correction parameters. I so not know if or when Leica abandoned modifying original M camera DNs and switched to storing lens coding correction parameters as DNG file operation codes for the M240 or newer M bodies.


1/ Photography is identical to all empirical measurements in that collected data is used to compte parameter estimates. The parameters of interest are those in the mathematical model(s) used to render an image from the data. In our case these are a spatial array of the absolute energy accumulated by a photo-diode in the individual pixels. When a mathematical model accounts for all the information in the data, there is no need to modify the original data. This is rare for a variety of practical reasons.

2/ For example, a demosaicking model that computes a rendered image may assume there was no DC offset (bias) in the data. If a DC offset is present, a demosaicking model without a DC offset parameter will produce an image that is inferior to a model that includes one. This can be a trivial (DC offset is small) or serious (DC offset is high) issue.

3/ At this time the Leica M11 is the only consumer CMOS camera with this feature. This is different than the most modifications of original data because the signal and noise in individual DNs are averaged together. In other fields digital signal averaging occurs in memory during data acquisition. So, the original signal data is always an average. However pixel binning irreversibly decreases a sensor’s maximum possible resolution information content.

Wow! That kind of covers it. ;o) Thanks for stepping in with that information. I am surprised that RAW/DNG's are modified at all but glad to know they are, why and how.
 
The Button Dance on the M8 (and M9, M Monochrom) releases a diagnostic mode for capturing data. On the M8- the file is basically raw digital values stored in columns and rows. This has a ".RAW" file extension on the SD card. Extra columns and rows are stored, ones that are discarded when storing as a DNG file. On the M9 and M monochrom the data is stored in DNG format, but bypasses processing applied in camera. If you take a long exposure, you get two files per image- the image captured and a second image taken with the shutter closed. In normal mode, the camera combines these in the DNG file. In diagnostic mode- both frames are stored. I've written my own software to look at the .RAW file coming off the M8, but almost always use M8RAW2DNG to get the DNG file. My M8 has no bad pixels, so never had to restore a column. My M Monochrom, picked up a bad column at High ISO, I wrote my own software to restore it.
 
Thanks willie_901 for chipping in. I was hoping you would. You always give the technical answers that help so much.

Thanks to Sonnar Brian as well, always so useful and thought provoking.
 
Helen, I always love seeing your work. Best wishes.

Lovely of You Joe, Thank You !

I was looking at your 'Blog' , Great Fun
Very much enjoyed your creative spin &undertakings with Photography and You & Ethan's collaborations...
 
Back
Top