DNG 1.3 bad pixel handling - testers required please. - page 2 - RAW Shooting and Processing - CHDK Forum

DNG 1.3 bad pixel handling - testers required please.

  • 34 Replies
  • 18531 Views
*

Offline funnel

  • ****
  • 349
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #10 on: 11 / April / 2012, 08:10:45 »
Advertisements
Didn't work for me on sx220. Tried in camera raw, irfan, ufraw and raw therapee.
I'm not sure about camera raw, looks like it does something but I can still see only green badpixels, the red and blue ones are not there like in ufraw.

The dng validate output:

Code: [Select]
Validating "CRW_4865.DNG"...

Uses little-endian byte order
Magic number = 42

IFD 0: Offset = 8, Entries = 33

NewSubFileType: Preview Image
ImageWidth: 128
ImageLength: 96
BitsPerSample: 8 8 8
Compression: Uncompressed
PhotometricInterpretation: RGB
ImageDescription: ""
Make: "Canon"
Model: "Canon PowerShot SX220 HS"
StripOffsets: Offset = 2048
Orientation: 1 - 0th row is top, 0th column is left
SamplesPerPixel: 3
RowsPerStrip: 96
StripByteCounts: Count = 36864
PlanarConfiguration: 1
Software: "CHDK ver. 1.1.0-1797"
DateTime: 0000:00:00 00:00:00
SubIFDs: IFD = 410
Copyright: ""
ExifIFD: 680
GPSInfo: 854
TIFF/EPStandardID: 1.0.0.0
DNGVersion: 1.3.0.0
UniqueCameraModel: "Canon PowerShot SX220 HS"
ColorMatrix1:
      0.5448  -0.1740  -0.0804
     -0.0751   0.4404   0.0114
     -0.0058   0.0716   0.1189
AnalogBalance: 1.0000 1.0000 1.0000
AsShotNeutral: 0.8489 1.0111 0.4437
BaselineExposure: -0.50
BaselineNoise: 1.00
BaselineSharpness: 1.33
LinearResponseLimit: 1.00
LensInfo: 5.0-70.0 mm f/3.1-5.9
CalibrationIlluminant1: Standard light A
NextIFD = 0

SubIFD 1: Offset = 410, Entries = 22

NewSubFileType: Main Image
ImageWidth: 4168
ImageLength: 3060
BitsPerSample: 12
Compression: Uncompressed
PhotometricInterpretation: CFA
StripOffsets: Offset = 38912
SamplesPerPixel: 1
RowsPerStrip: 3060
StripByteCounts: Count = 19131120
XResolution: 180.00
YResolution: 180.00
PlanarConfiguration: 1
ResolutionUnit: Inch
CFARepeatPatternDim: Rows = 2, Cols = 2
CFAPattern:
    Red      Green
    Green    Blue
BlackLevel: 127.00
WhiteLevel: 4095
DefaultCropOrigin: H = 36.00 V = 18.00
DefaultCropSize: H = 4000.00 V = 3000.00
ActiveArea: T = 24 L = 96 B = 3060 R = 4168
OpcodeList1: count = 100, offset = 1330
NextIFD = 0

Exif IFD: Offset = 680, Entries = 14

ExposureTime: 1/32.0 sec
FNumber: f/3.1
ExposureProgram: Unidentified
ISOSpeedRatings: 992
ExifVersion: 2.21
DateTimeOriginal: 2012:04:11 12:48:17
ShutterSpeedValue: 1/32.0 sec
ApertureValue: f/3.2
ExposureBiasValue: 0.00
MaxApertureValue: f/3.2
MeteringMode: Pattern
Flash: 16
    Flash did not fire
    Compulsory flash suppression
FocalLength: 5.0 mm
FocalLengthIn35mmFilm: 28 mm
NextIFD = 0

GPS IFD: Offset = 854, Entries = 11

GPSVersionID: 2.3.0.0
GPSLatitudeRef: "[C][1C]"
GPSLatitude: - - -
GPSLongitudeRef: "([1C]"
GPSLongitude: - - -
GPSAltitudeRef: 68
GPSAltitude: -
GPSTimeStamp: - - -
GPSStatus: "h[1C]"
GPSMapDatum: ""
GPSDateStamp: ""
NextIFD = 0


Parsing OpcodeList1: 4 opcodes

Opcode: FixBadPixelsConstant, minVersion = 1.3.0.0, flags = 1
Constant: 0
Bayer Phase: 0

Opcode: FixBadPixelsConstant, minVersion = 1.3.0.0, flags = 1
Constant: 1
Bayer Phase: 0

Opcode: FixBadPixelsConstant, minVersion = 1.3.0.0, flags = 1
Constant: 2
Bayer Phase: 0

Opcode: FixBadPixelsConstant, minVersion = 1.3.0.0, flags = 1
Constant: 3
Bayer Phase: 0
Validation complete

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #11 on: 11 / April / 2012, 08:47:06 »
Didn't work for me on sx220. Tried in camera raw, irfan, ufraw and raw therapee.
I'm not sure about camera raw, looks like it does something but I can still see only green badpixels, the red and blue ones are not there like in ufraw.


Can you post a link to a sample DNG file please.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline funnel

  • ****
  • 349
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #12 on: 11 / April / 2012, 09:32:29 »

*

Offline blackhole

  • *****
  • 942
  • A590IS 101b
    • Planetary astrophotography
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #13 on: 11 / April / 2012, 10:54:38 »

The header shows DNG version 1.1, not the updated 1.3 (and the bad pixel opcodes are missing from the DNG file).

Formatted the card and the new compilation, badpixels  still exists.Irfanview and  Rawtherapee open the file but Camera Raw 4.6 does not recognize the file.Perhaps to try someone with PS CS5 and newer Camera Raw.

http://www63.zippyshare.com/v/20533695/file.html



*

Offline Pier

  • ***
  • 128
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #14 on: 11 / April / 2012, 12:32:32 »
I'v loaded 1797 build.I made two DNG files, on new formated SD card.No badpixels.bin was requested  to allow me to made and store DNG.
-First picture in lowlight conditions - Tv 1 sec.Second picture on daylight.Workflow was in LR 3.6-not very thoroughly...
No bad pixels present on two pictures.My Cam SX130IS reported 1800 bad pixels when checked in the past.BTW I never seen bad pixels on my pictures.
« Last Edit: 11 / April / 2012, 15:13:26 by Pier »

Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #15 on: 11 / April / 2012, 14:42:37 »
With the A590 shows only partial success in PS Camera Raw 4.6
This is very old version of Adobe CameraRaw, it does not support opcodes and DNG Spec 1.3.0.0 at all.
Current version of ACR is 6.6, and 6.7 will be released during next month...

philmoz, I did small research some time ago, and it looks like that only Adobe applications (Lightroom & ACR) supports DNG specification 1.3.0.0 at the moment.
By the way, your opcodes says to patch pixels with values in a range 0-3.
Take a look at the platform_camera.h for lets say ixus220 and look for DNG_BADPIXEL_VALUE_LIMIT.
Current implementation patches all pixels with values, lower than 16, so this will definitely raise problems with current opcodes.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #16 on: 11 / April / 2012, 17:54:20 »
Can you post a link to a sample DNG file please.

http://www.box.com/s/fc73ac09d34d9d83c5b4

Very strange - there is something different going on here.

A couple of questions.

Do you get the same behaviour with the previous code, where CHDK maps out the bad pixels?
Do you know what the bad pixel count found by CHDK was?

Lastly can you post a sample at the lowest ISO and zoomed to telephoto (to get rid of the vignetted corners).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #17 on: 11 / April / 2012, 17:58:01 »

The header shows DNG version 1.1, not the updated 1.3 (and the bad pixel opcodes are missing from the DNG file).

Formatted the card and the new compilation, badpixels  still exists.Irfanview and  Rawtherapee open the file but Camera Raw 4.6 does not recognize the file.Perhaps to try someone with PS CS5 and newer Camera Raw.

http://www63.zippyshare.com/v/20533695/file.html


That's better. ACR 6 and Lightroom 4 get rid of all the bad pixels now.

As cppasm posted it looks like ACR 4 does not handle DNG 1.3.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #18 on: 11 / April / 2012, 18:02:31 »
philmoz, I did small research some time ago, and it looks like that only Adobe applications (Lightroom & ACR) supports DNG specification 1.3.0.0 at the moment.

It's looking that way, which is disappointing given how old the 1.3 spec is.
Really starting to wonder if this is worth the effort - at least I'm learning a lot more about DNG files :)

Quote
By the way, your opcodes says to patch pixels with values in a range 0-3.
Take a look at the platform_camera.h for lets say ixus220 and look for DNG_BADPIXEL_VALUE_LIMIT.
Current implementation patches all pixels with values, lower than 16, so this will definitely raise problems with current opcodes.

Yes, I did the IXUS220 analysis and came up with the patch.

When I revisited it for this patch, I discovered I had interpreted the sample DNG file for the IXUS220 incorrectly and the actual bad pixel values go from 0-3 (assuming I got it right this time).

Hopefully someone with an IXUS220 will give this a try.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #19 on: 11 / April / 2012, 19:24:32 »
In revision 1799 I've put the original badpixel.bin system back and added a new menu option to enable it (default is off).

So the trunk version now works like this:
- DNG version is 1.3 and includes the bad pixel opcodes
- by default CHDK does no bad pixel mapping for DNG
- Enabling the 'DNG 1.0 bad pixel removal' option will check for badpixel.bin as was previously done when enabling DNG.
- If badpixel.bin is present and the removal option is set then CHDK does bad pixel mapping as it did in earlier versions.

So anyone using a DNG 1.3 aware editor can take advantage of the new feature, and anyone with an editor that doesn't handle the opcodes can have CHDK do the mapping as before.

Is this too complicated and are we better off just sticking with the old system?

Phil.

Edit: forgot to mention this version should also fix the date & gps validation errors on the DNG file.

« Last Edit: 12 / April / 2012, 00:01:14 by philmoz »
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal