SX160 IS porting thread - page 10 - DryOS Development - CHDK Forum

SX160 IS porting thread

  • 101 Replies
  • 41459 Views
Re: SX160IS DNG calibration
« Reply #90 on: 06 / February / 2015, 18:48:57 »
Advertisements
The SX160 has a calibration matrix defined for DNG but according to the notes.txt file included with that camera,  the DNG calibration is not done.  Which most likely means the CAM_COLORMATRIX1 values in its platform_camera.h file are cut & pasted from a different camera.

FWIW,  it's usually preferred that people ask camera specific questions about the status of a port in the porting thread for that camera.  In this case,  that would be :  http://chdk.setepontos.com/index.php?topic=9523.0
« Last Edit: 06 / February / 2015, 18:59:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX160IS DNG calibration
« Reply #91 on: 06 / February / 2015, 23:10:14 »
Ok. Thanks for the information.

*

Offline reyalp

  • ******
  • 13399
Re: SX160IS DNG calibration
« Reply #92 on: 07 / February / 2015, 01:01:22 »
FWIW, the current color matrix looks fairly reasonable to me. Below is a camera jpeg, and the corresponding raw converted with raw therapee, "neutral" in the exposure section, camera white balance.

camera jpeg https://app.box.com/s/tevoi4ismhvadfy695irr6dfbqbglpki
converted DNG https://app.box.com/s/6wdy66vgp8evtnkufse1nqc7z9yyogyu

The raw has a little bit of lens distortion, but that's another story ;)

edit:
Merged into development thread.
« Last Edit: 07 / February / 2015, 01:05:05 by reyalp »
Don't forget what the H stands for.

Re: SX160 IS porting thread
« Reply #93 on: 07 / February / 2015, 10:57:57 »
Any idea on where to get the SX160is.lcp file
to correct lens distortion in RawTherapee?

Chdk works fine on the SX160is. It is just a little slow when saving the DNG.
Thanks for the information.


Re: SX160 IS porting thread
« Reply #94 on: 08 / February / 2015, 13:32:31 »
The first DNG shot takes longer to save. The second one is a little faster.

BTW, Canon has the cam refurb on sale for $49:
http://shop.usa.canon.com/shop/en/catalog/cameras/powershot-sx-series-digital-cameras/powershot-sx160-is-black-refurbished

Good deal to try and use all the good things chdk offers.



Re: SX160 IS porting thread
« Reply #95 on: 08 / October / 2016, 18:19:40 »
Good news for those who want to process RAW files of this camera: lensfun now contains support to correct distortion, chromatic aberration and vignetting. This will soon be usable in Darktable, ufraw, ...
Besides, I created color profiles, which can be found at https://github.com/hknaack/colorcalibration
The shaper + matrix should be the best choice.
Can any of the developers embed this matrix for the SX160 IS?
Code: [Select]
0.600549 0.397105 -0.009311
0.154696 1.170231 -0.296680
-0.011100 -0.429561 1.302471

*

Offline reyalp

  • ******
  • 13399
Re: SX160 IS porting thread
« Reply #96 on: 15 / October / 2016, 17:48:31 »
Good news for those who want to process RAW files of this camera: lensfun now contains support to correct distortion, chromatic aberration and vignetting. This will soon be usable in Darktable, ufraw, ...
Besides, I created color profiles, which can be found at https://github.com/hknaack/colorcalibration
The shaper + matrix should be the best choice.
Can any of the developers embed this matrix for the SX160 IS?
Code: [Select]
0.600549 0.397105 -0.009311
0.154696 1.170231 -0.296680
-0.011100 -0.429561 1.302471
@h.knaack
Thanks for doing this. Unfortunately, either I've missed something important, or this is much worse than the existing color matrix.

At https://app.box.com/s/obbpyynuqnqknovrd0lmgdvjia2z6a9x
The files named sx160-* are sample DNGs, camera jpegs, raw therapee neutral jpegs using camera WB, and exiftool output of images taken with the old and new matrix.

These are shots of a calibration image on a monitor, so they shouldn't be expected to be exact, but should be expected to produce results broadly similar to camera jpeg with neutral processing. With the old matrix, colors are pretty close. With the new one, they are wildly incorrect.

I thought there might have been a row /column major mixup, but neither interpretation gives reasonable results (-new2 has them swapped)

Edit:
Note the current sx160 code defines
    #define cam_CalibrationIlluminant1                  1 // Daylight

I did not change this, since no other illuminant was specified.
« Last Edit: 15 / October / 2016, 17:57:48 by reyalp »
Don't forget what the H stands for.

Re: SX160 IS porting thread
« Reply #97 on: 16 / October / 2016, 19:36:43 »
Good news for those who want to process RAW files of this camera: lensfun now contains support to correct distortion, chromatic aberration and vignetting. This will soon be usable in Darktable, ufraw, ...
Besides, I created color profiles, which can be found at https://github.com/hknaack/colorcalibration
The shaper + matrix should be the best choice.
Can any of the developers embed this matrix for the SX160 IS?
Code: [Select]
0.600549 0.397105 -0.009311
0.154696 1.170231 -0.296680
-0.011100 -0.429561 1.302471
@h.knaack
Thanks for doing this. Unfortunately, either I've missed something important, or this is much worse than the existing color matrix.
You're right, these values don't fit. They got output by colprof and I assumed they would be appropriate. Using iccdump -v3 with any of the ICC profiles, it finally displays the following matrix values:
Code: [Select]
tag 11:
  sig      'arts'
  type     'sf32'
  offset   483624
  size     44
S15Fixed16Array:
  No. elements = 9
    0:  0.89509583
    1:  0.26640320
    2:  -0.16140747
    3:  -0.75019836
    4:  1.71350098
    5:  0.03669739
    6:  0.03889465
    7:  -0.06849670
    8:  1.02960205
I inserted those with exiftool into your DNG file, and when switching between using the embedded matrix or the ICC file, results look pretty similar.
Quote from: reyalp
Edit:
Note the current sx160 code defines
    #define cam_CalibrationIlluminant1                  1 // Daylight

I did not change this, since no other illuminant was specified.
Is this something we have to worry about? I couldn't find an explanation on a quick search.
Anyway, I invite everyone to double check on my calibration steps. I am not really experienced doing color calibrations, and I'm not sure if the white balance is correct. So, comments are very welcome.


*

Offline reyalp

  • ******
  • 13399
Re: SX160 IS porting thread
« Reply #98 on: 16 / October / 2016, 21:55:45 »
I inserted those with exiftool into your DNG file, and when switching between using the embedded matrix or the ICC file, results look pretty similar.
Can you give a little more detail about the calibration process you used, or a link if you were following instructions from somewhere else?

Quote
Quote from: reyalp
I did not change this, since no other illuminant was specified.
Is this something we have to worry about? I couldn't find an explanation on a quick search.
As far as I understand it, the color martix is for a specific illumanant. The DNG specification (available from https://helpx.adobe.com/photoshop/digital-negative.html) says
Quote
ColorMatrix1 defines a transformation matrix that converts XYZ values to reference camera native color space values, under the first calibration illuminant.
Note the spec allows for two color matrices under different illumanants, which is supposed to produce better results. In CHDK, this is mostly defined on cameras with native Canon raw where we just pull the values from DNG created with Adobe's DNG converter.

Quote
I am not really experienced doing color calibrations, and I'm not sure if the white balance is correct. So, comments are very welcome.
Me neither, that's why I'm interested in more detail on the process.
Don't forget what the H stands for.

Re: SX160 IS porting thread
« Reply #99 on: 17 / October / 2016, 04:29:25 »
Can you give a little more detail about the calibration process you used, or a link if you were following instructions from somewhere else?
I followed Pascal de Bruijns blog post https://encrypted.pcode.nl/blog/2010/06/28/darktable-camera-color-profiling/ with shots I've taken of a Xrite Color Checker Passport (matte, 24 patches) in direct sunlight (yet a winter day) in an angle that prevented glares. The rest of the process is documented in my git log, image manipulation settings can be checked preferably in darktable (or reading the xmp sidecar files).
« Last Edit: 17 / October / 2016, 20:12:58 by h.knaack »

 

Related Topics