DNG has less detail than JPG for A4000 - General Discussion and Assistance - CHDK Forum
supplierdeeply

DNG has less detail than JPG for A4000

  • 52 Replies
  • 25248 Views
DNG has less detail than JPG for A4000
« on: 15 / June / 2013, 01:57:23 »
Advertisements
I'm relatively new to digital photography, and am still feeling my way around.  I've managed to install CHDK on a couple of A4000 cameras, and have taken a few thousand pictures in the last few months.  I've noticed recently that the level of detail in the DNG 1.3 photos is actually less than what I see in the JPG photos.  The DNG images also appear to be a bit noisier, although that may actually be some other problem.  I've included two pairs of cropped pictures to demonstrate the problem.  The first of each pair is from the DNG photos, and the second is from the JPG photos that the camera also produces.






I'm not so worried about differences in colour between the two, since that can be massaged easily enough.  What puzzles me is that the JPG images are smoother in colour, yet have more detail.  For example, the little white marks (which are scratches on the album cover) are clearly seen in the JPG photos, but the smaller ones are not in the DNG photos.  The grey background in the second pair also shows more of the constituent colours in the DNG version.  I can smooth the colours of the DNG photos to make them look like the JPG photos, but then even more detail gets washed out.

I've been saving the DNG images because I believed they would contain more detail than the JPG images, not less.  So, I want to understand what's going on here.  Is this result expected?  If not, where is the problem coming in?  Can the DNG be improperly saved in CHDK?  It looks good enough that there doesn't seem to be any serious problem with it.  Can the image in the camera degrade between saving the JPG and then saving the DNG?  Does the camera have access to something that allows its JPG images to be better than the DNG images?  Or, are the programs I'm using to display and convert the DNG files (display from imagemagick, and ufraw) at fault here?  Has anyone noticed anything like this when comparing the JPG images with DNG images loaded in professional software like Adobe's Light Table (or whatever it is called)?  Could it be that the camera does a better job interpolating the RGB values from the CFA than my software does?

Any help would be greatly appreciated.

*

Offline reyalp

  • ******
  • 14110
Re: DNG has less detail than JPG for A4000
« Reply #1 on: 15 / June / 2013, 03:42:25 »
The DNG images also appear to be a bit noisier, although that may actually be some other problem.
DNG has no noise reduction, unless you applied it yourself on your PC.
Quote
Can the DNG be improperly saved in CHDK?
Highly unlikely this could happen in a way that results in basically correct image with less details. The values in the DNG  are basically straight from the frame buffer.
Quote
Can the image in the camera degrade between saving the JPG and then saving the DNG?
The DNG is saved *before* the jpeg, using basically the same raw data the camera users to create the jpeg. This is proven by the fact that we can modify the raw buffer at that point and see the results in the jpeg. The "raw develop" feature works using this, see http://chdk.wikia.com/wiki/CHDK_User_Manual#RAW_develop

Using "raw develop" and checking how the resulting jpeg compares to the original might be interesting. In the 1.2 trunk, "raw develop" should work with DNG directly. In 1.1, you may need to convert to a CHDK raw and then run raw develop on that.
Quote
Does the camera have access to something that allows its JPG images to be better than the DNG images?
Generally speaking, no. The "i-contrast" feature does appear to get some data before the raw hook and apply it later in jpeg processing. See http://chdk.setepontos.com/index.php?topic=9601.msg98926#msg98926 but this probably comes from the raw buffer originally as well.
Quote
Or, are the programs I'm using to display and convert the DNG files (display from imagemagick, and ufraw) at fault here?
Quite likely. These programs may also give you a choice of debayering algorithms, which may produce better or worse results depending on the camera or scene. I saw a good post about this recently, but I'm having trouble finding it now.
Quote
Could it be that the camera does a better job interpolating the RGB values from the CFA than my software does?
Also quite likely. The Canon jpeg processing is very good, and obviously well tuned to the characteristics of their sensors. In camera processing will generally do noise reduction and sharpening to try to get some apparent detail back.
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: DNG has less detail than JPG for A4000
« Reply #2 on: 15 / June / 2013, 08:34:52 »

Re: DNG has less detail than JPG for A4000
« Reply #3 on: 15 / June / 2013, 12:02:15 »
I've been saving the DNG images because I believed they would contain more detail than the JPG images, not less. 
A different way to say this is that the DNG file contains more original information than the JPG.  When your camera creates the JPG,  you lose some of that original information as it creates what it thinks will be the "best" final image.

If you could exactly follow the steps the Canon software takes,  you could create the same image.   As you've noticed,  the camera tweaks the colors and it looks like it also does some edge enhancement.    Many people believe they can create a better image by applying their own post-processing steps and as "beauty is in the eye of the beholder", who are we to argue with them about that. I think you will find that with a little sweat and elbow-grease,  you can get just as sharp details in your JPG as the camera produced - the original information is all there.

The article that darkhole linked (above) is intriguing - I'm going to play with that a bit.

IIRC, microfunguy has had an open challenge here for years asking anyone to post a jpg created from a RAW/DNG image that they feel is better than the JPG their camera created of the same original image.  I don't recall anybody taking him up on that.
Ported :   A1200    SD940   G10    Powershot N    G16


Re: DNG has less detail than JPG for A4000
« Reply #4 on: 15 / June / 2013, 13:22:52 »
Thanks to all of you for the reassuring replies.  Considering how many shots I've already taken, it's good to know that the DNG photos _can_ be massaged to look like the JPG.  I'm going to principally be taking shots of text (in a DIY book scanner), so I was a bit worried that the JPG format would degrade the edges of the characters.  That's why I was keen on using the DNG format in the first place.  I'll try out Raw Therapee (once I get the dependencies worked out), hopefully its batch mode output will be an improvement on what comes out of ufraw.

*

Offline reyalp

  • ******
  • 14110
Re: DNG has less detail than JPG for A4000
« Reply #5 on: 15 / June / 2013, 15:32:29 »
I'm going to principally be taking shots of text (in a DIY book scanner), so I was a bit worried that the JPG format would degrade the edges of the characters.
While I haven't done this, I would expect fine quality jpeg to be plenty for most normal books. Once the quality is good enough to OCR reliably, additional quality won't help. Photographing a page from a random paperback with my 12mp D10 results in the dot of an i being about 9x9 pixels, which seems like it should be plenty even if there is a pixel or too of fuzz at the edges.

Another thought, if it turns out the jpeg isn't good enough:
If you are only interested in OCRing black and white text, you don't actually need to debayer at all. Instead, you would just need to apply some adjustment to normalize the R/G/B levels (curves maybe?) and turn it into a greyscale. That should give you better spatial resolution.
Don't forget what the H stands for.

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: DNG has less detail than JPG for A4000
« Reply #6 on: 15 / June / 2013, 15:44:00 »
Quote
Many people believe they can create a better image by applying their own post-processing steps
With PS cameras it is very difficult, if you're talking about RAW files.
Unrelated for it,seems like camera doing some kind of NR  regardless of the length of exposure.  I'm made two bias frames, and the image with NR turned off is a lot brighter probably due to more noise.

*

Offline reyalp

  • ******
  • 14110
Re: DNG has less detail than JPG for A4000
« Reply #7 on: 15 / June / 2013, 15:55:42 »
Unrelated for it,seems like camera doing some kind of NR  regardless of the length of exposure.  I'm made two bias frames, and the image with NR turned off is a lot brighter probably due to more noise.
NR turned off where?

The only NR you can control in CHDK is dark frame subtraction, and it should be pretty obvious whether that is happening or not. Some higher end cams do have NR settings in the canon firmware.
Don't forget what the H stands for.


*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: DNG has less detail than JPG for A4000
« Reply #8 on: 15 / June / 2013, 16:06:40 »
Quote
NR turned off where?
Right sides with NR turned off, the histogram is compressed in Photoshop.

*

Offline reyalp

  • ******
  • 14110
Re: DNG has less detail than JPG for A4000
« Reply #9 on: 15 / June / 2013, 16:09:35 »
Quote
NR turned off where?
Right sides with NR turned off, the histogram is compressed in Photoshop.
I meant how did you turn off NR? Do you mean the CHDK dark frame setting, or some other camera setting?

FWIW, dark frame should be the only form of NR that affects CHDK raw, although it's always possible there is some other trickery going on...
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal