S95 Porting Thread - page 92 - DryOS Development - CHDK Forum

S95 Porting Thread

  • 1015 Replies
  • 354597 Views
*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: S95 Porting Thread
« Reply #910 on: 10 / July / 2011, 18:13:35 »
Advertisements

CHDK DNG format images from my S95 are not readable by Adobe Photoshop CS5. Are there plans to update the S95 CHDK code so that the .DNG files are standard DNG files that can be read by Adobe Photoshop CS5? The S95 will record raw (.CR2) files, however, it only supports RAW files in P (Programmable) mode (not Auto, Manual, etc.). So standard DNG is desirable from CHDK for these other camera modes such as Auto, Portrait, Night, etc.


The DNG files produced by CHDK should work in CS5 - I don't have an S95; but my G12 and SX30 DNG files work correctly.

Can you upload a sample DNG file somewhere and post a link - it may just be a minor problem with the dng header.

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 whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: S95 Porting Thread
« Reply #911 on: 10 / July / 2011, 20:00:00 »
@philmoz
@maverick

I checked the CAM_ACTIVE_AREA set of params for S95, and they differ significantly from
the two 2 other cams that use this same sensor (1/1.7" 10 MP) -> G11 and S90.
Same for CAM_JPEG settings: the JPEG sizes conflict both with G11 / S90, and
with the size reported by viewers like Irfan.

G11 and S90 settings are equal:
Quote
   #define CAM_JPEG_WIDTH              3648
    #define CAM_JPEG_HEIGHT             2736
    #define CAM_ACTIVE_AREA_X1          16
    #define CAM_ACTIVE_AREA_Y1          8
    #define CAM_ACTIVE_AREA_X2          3692
    #define CAM_ACTIVE_AREA_Y2          2776
while s95 uses:
Quote
#define CAM_JPEG_WIDTH  3600   // <<<<<<<<<<<<
#define CAM_JPEG_HEIGHT 2700  // <<<<<<<<<
#define CAM_ACTIVE_AREA_X1 52
#define CAM_ACTIVE_AREA_Y1 14
#define CAM_ACTIVE_AREA_X2 3648
#define CAM_ACTIVE_AREA_Y2 2736

In case maverick wants to test with the s90 settings applied to s95, I'm attaching
a zipped DISKBOOT.BIN for 100K. The equivalent for 100H works OK on my cam, but
I could not test DNG (except a short view with Irfan)

cheers,

wim

PS Note that (apart from above change) this is a vanilla 1233 build, which means it's
fairly big (and has only ~ 350 kB memory free) so YMMV... I was, however able to shoot a DNG
with it, so you should be able to check if the modded DNG size pleases Photoshop.
« Last Edit: 10 / July / 2011, 20:52:30 by whim »

Re: S95 Porting Thread
« Reply #912 on: 10 / July / 2011, 21:09:08 »
Phil and Wim:

I'm not sure where to upload the DNG file so that you can see that PS won't open it.  However, Wim's mod works! I copied the .bin file over the one I have on the SD card, relocked the card, loaded it into the cam and took a single shot that is now readable by Photoshop CS5.

I'm not sure what this means for updating the code that is posted on the download page, but I'll leave that up to you.

I also wanted to point out that I was getting quite a bit of barrel distortion even when viewed with UFraw (or GIMP).  Now in CS5, the picture distorts much less.

Thanks,


Maverick
« Last Edit: 10 / July / 2011, 21:19:10 by maverick »

Re: S95 Porting Thread
« Reply #913 on: 10 / July / 2011, 21:45:06 »
The SX10 produces the least amount of the barrel distortion with CHDK generated DNG, but there is some.

The SD940 (IXUS 120) produces quite a bit of barrel distortion.  I have two of these cameras, so I am certain it is not the hardware.

The modded S95 .bin produces some barrel distortion on the left side of the picture with a vertical black line on the left edge.  The line looks like a small framing error. This is for a 4:3 photo at 3648 x 2736 resolution.

~Mav
« Last Edit: 10 / July / 2011, 22:16:22 by maverick »


*

Offline reyalp

  • ******
  • 14119
Re: S95 Porting Thread
« Reply #914 on: 10 / July / 2011, 22:42:05 »
The SX10 produces the least amount of the barrel distortion with CHDK generated DNG, but there is some.

The SD940 (IXUS 120) produces quite a bit of barrel distortion.  I have two of these cameras, so I am certain it is not the hardware.
This is nothing to do with CHDK. The newer canon cameras generally have significant distortion in the optics, and "fix" it to varying degrees in software for the jpeg.

This is entirely dependent on the hardware, CHDK just dumps the raw, uncorrected data. If CS5 somehow magically corrects this, that magic is unrelated to CHDK.

DNG 1.3 does have opcodes for correcting distortion. This might offer a solution for CHDK generated DNG in the future, but we currently output DNG 1.1

Don't forget what the H stands for.

Re: S95 Porting Thread
« Reply #915 on: 11 / July / 2011, 00:30:20 »
The SD940 (IXUS 120) produces quite a bit of barrel distortion.  I have two of these cameras, so I am certain it is not the hardware.
The SD940 was the smallest P&S Canon made at the time so some compromises were inevitable.  Barrel distortion is worst when zoomed out to full wide angle and decreases as you zoom in.  Comparing the RAW and JPG files you find that one of the ways Canon corrects the RAW is to just cut off the worst of the barrel distortion on the edges (letterboxing).

 
Ported :   A1200    SD940   G10    Powershot N    G16

Re: S95 Porting Thread
« Reply #916 on: 11 / July / 2011, 00:49:42 »
Thanks for your feedback regarding the SD940 barrel distortion.  The distortion is consistent in both SD940's.  I can correct it with Photoshop. 

I'm seeing that version 1235 of CHDK has been released.  When I load 1235, I'm back to DNG files that cannot be read by Photoshop.  So I'm wondering if some changes are going to be made to the S95 1.00K firmware release of CHDK.  Wim's mod works great, but it is for a different CHDK release (1233).  I don't have a compiler so I'm trying to keep up with all the updates!

Thanks,

Mav

Re: S95 Porting Thread
« Reply #917 on: 11 / July / 2011, 00:55:32 »
I'm seeing that version 1235 of CHDK has been released.  When I load 1235, I'm back to DNG files that cannot be read by Photoshop.  So I'm wondering if some changes are going to be made to the S95 1.00K firmware release of CHDK.  Wim's mod works great, but it is for a different CHDK release (1233).  I don't have a compiler so I'm trying to keep up with all the updates!
The official process is that somebody needs to submit a patch file with the change.  This particular fix is not firmware dependent - it will work / fix all versions of the S95.  I'm away from my development machine for a few more days or I would take the five minutes it takes to submit the change.  I expect whim will have it done before I can help.

Ported :   A1200    SD940   G10    Powershot N    G16


Re: S95 Porting Thread
« Reply #918 on: 11 / July / 2011, 01:01:14 »
Thanks for letting me know how the update process works. Currently I can use the mod Whim gave me until a a patch file is submitted.

Mav

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: S95 Porting Thread
« Reply #919 on: 11 / July / 2011, 03:34:59 »
@maverick
@waterwingz

Patch submitted here

cheers,

wim

[edit: please check my edit @link above for a DNG comparison]
« Last Edit: 11 / July / 2011, 05:52:14 by whim »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal