8
\$\begingroup\$

I'm new to working with RAW images, and I'm capturing simultaneous RAW+JPGs with my new Lumix LX5, and using Bibble to view/process the results.

I'm very surprised that the RAW images taken at 24mm wide 16x9 seem to capture a different (and larger) sensor area compared to the JPGs. The RAW images seem to contain the equivalent of about 100 extra pixels on left and right sides, and a smaller number top and bottom. I say "equivalent", because the actual pixel counts of RAW and JPG are only slightly different, which implies some resizing must be going on...?

JPG: 3968 x 2232 RAW: 3976 x 2238

I guess this small difference is because JPG images must be 16x16 multiples>

The raw image displays noticeable vignetting in the extra pixels, and there's a fair bit of chromatic aberration. I can crop off the 'extra' pixels, but then my RAW image has fewer pixels in it than the JPG, which doesn't feel right.

I'll try and add samples shortly.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Stick with the raw shooting - it will pay off, what you're seeng here is actually an advantage of raw, that you have no idea what the camera is doing to your JPEGs without your knowledge! \$\endgroup\$
    – Matt Grum
    Oct 27, 2010 at 12:59
  • 1
    \$\begingroup\$ I swear we had an earlier question on this, but the closest I could find is photo.stackexchange.com/questions/9738/… \$\endgroup\$
    – mattdm
    May 30, 2011 at 12:39
  • \$\begingroup\$ @mattdm - did you mean this one? photo.stackexchange.com/questions/3419/… \$\endgroup\$
    – ysap
    May 30, 2011 at 14:10

2 Answers 2

11
\$\begingroup\$

Firstly there are a couple of general reasons raw and JPEG images differ in size, and raw differs from the actual number of pixels on the sensor:

Whilst JPEG image dimensions don't have to be multiples of 16 (or 8 if not using chroma subsampling) it is more efficient to do so, as it allows you to rotate the images without re-encoding (lossless rotation). So that can account for a small image size difference, as you say.

Even raw image sizes typically differ from the actual number of pixels as most sensors have strips masked pixels (that receive no light) down each side in order to detect banding issues with uneven amplification. Further, the size you see in your raw viewer will differ from the actual raw data as some image processing operations use a form of averaging which doesn't work at extreme edges (because there's no data beyond the image to use when averaging) so they get cropped off when the image is viewed/converted.

Secondly the Panasonic Lumix LX3 and LX5 have a different sensor design to most cameras, which is partially responsible for the difference in coverage between raw and jpeg you are experiencing:

The maximum 16:9 image size is actually wider than the maximum 4:3 image size. You would expect them to be the same width but different heights.

This is because they've made the sensor a bit wider for 16:9, employing a non rectangular design and it's pushing the very edges of the lens image circle, this explains the vignetting and CA you observe with the raw. This diagram shows the irregular design:

alt text

As Joanne C suggests, the JPEG image pipeline is doing some correction, including barrel distortion correction, given that 24mm equiv. is very wide for a compact, and the sensor is pushing to the very edge of the image circle.

Barrel distortion correction makes straight lines straight again, but will cause the image edges to bend in response. In response to this the correcting transformation enlarges the image slightly and crops to get straight edges again.

Can you see any differences in the appearance of straight lines between the raw and JPEG? It might be quite subtle but get revealed if you overlay them.

\$\endgroup\$
6
  • 3
    \$\begingroup\$ Either that or the camera is doing some lens correction at the wide end for the vignetting or CA and the result discards some data from the sensor. \$\endgroup\$
    – Joanne C
    Oct 27, 2010 at 11:32
  • \$\begingroup\$ That's a bit more likely actually. I was just going to add a bit about how some image processing steps based around convolution produce slightly smaller images as a result (by half the width of the kernel). \$\endgroup\$
    – Matt Grum
    Oct 27, 2010 at 11:48
  • 1
    \$\begingroup\$ Thanks. It's definitely distortion correction. I cropped the raw to match the JPG boundaries, and then A/Bing between the two, the distortion correction was obvious. The perceived difference in 'scale' had blinded me to the distortion. \$\endgroup\$
    – Roddy
    Oct 27, 2010 at 13:05
  • \$\begingroup\$ Can we break this up because it contains multiple answers? Would be nice to be able to vote up the right one. The last 'edit' with he sensor diagram is most likely it. \$\endgroup\$
    – Itai
    Oct 27, 2010 at 13:57
  • 1
    \$\begingroup\$ @itai I've edited the answer to make it more coherent and to correspond better with the original question. There are still multiple answers there and despite the second one being the likely solution to the original problem, I think the first part is still worth including as it is relevant to other cameras. But if people prefer I could break it up... \$\endgroup\$
    – Matt Grum
    Oct 27, 2010 at 14:33
1
\$\begingroup\$

I think this is happening because Bibble (at least the version you're using) isn't applying the metadata in the LX5's RW2 file that tells it how to correct for the lens' deformations. Perhaps this is a setting in Bibble, or a missing feature in their RW2 converter. I'll bet if you convert your RW2's to DNG with Adobe's free DNG converter, Bibble be able to read and apply that data and produce a 'corrected' image.

I've come to this conclusion (and found your question) by noticing the same artifacts you mentioned when using Picasa 3.8 to view images created using Adobe DNG Converter 6.4.0.139 from my LX5's RAW files. This happens when I ask Adobe DNG Converter to create files for "Camera Raw 5.4 and later", the max setting. This theory was backed up by the fact that the JPG preview looks corrected when compared to the image rendered by Picasa when it renders the DNG. Not only that, but the JPG preview rendered by Adobe DNG converter matches the JPG's that came straight from the camera for the same shot (clearly the converter is applying the same transformations that the camera did internally to make the JPG).

After playing around a bit, I discovered that the artifacts go away in Picasa 3.8 when I have the DNG Converter create files for "Camera Raw 4.6 and later". I assume this means Picasa 3.8 doesn't understand Camera Raw 5.4, but it CAN understand Camera Raw 4.6, and will apply the correction automatically to conforming DNG files. No more corner vignette and barrel distortion on the resulting DNG files in Picasa, and in theory all the information from the RW2 is in the DNG!

Also - I wouldn't be put off by the correction - it's a good thing - and supposedly no information is thrown away. The DNG / RW2 files contain the raw sensor data plus additional information on the lens / camera aberrations, and viewing software can elect to apply these transformations or not. The 'true' sensor data can always be accessed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.