CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD - page 46 - Creative Uses of CHDK - CHDK Forum  

CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD

  • 704 Replies
  • 138618 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #450 on: 01 / August / 2013, 03:17:11 »
Advertisements
@srsa_4c

Here is a test image as a guideline of what you might expect to see on your camera if you're able to suppress the vignetting correction.  Using an optical setup that produces a collimated uniform-field beam sourced by a white LED, I got this one by doing a custom white balance on the 101a followed by a photo of the same setup.  I then inverted the image (photonegative) to what is in the figure. 

If you have a uniform field, shoot the field with correction enabled for reference (validating too that the result is homogeneous) so any difference will be more obvious.  Disable vignetting, go to max wide, and should see something like the attached.
« Last Edit: 01 / August / 2013, 18:06:09 by SticK »

*

Offline srsa_4c

  • ******
  • 4450
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #451 on: 02 / August / 2013, 10:06:38 »
Oh, yeah.

0209: default
0210: vignetting correction disabled (they use 'shading' for this kind of correction)

This is on the a3200, lower right corner.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #452 on: 02 / August / 2013, 10:36:55 »
Could you please add more info on your images?  Is your Fig 1 vignetting enabled and and Fig 2 vignetting disabled, I assume ?  Other than the absence of border, I don't see the difference.  The reason I'm asking is that I see a shading gradient even in Fig 1.

Mine is a full frame JPG.  If you notice in mine, there is a circular central bright blob that is almost the full height of the frame and gradually gets darker towards the corners.  In your case because you're using a lens, you don't have to invert (photoneg) your image to get what I'm demonstrating in my figure.  Is that what you're getting in your "disabled vignetting" shot if you follow my shooting suggestion?  Is your A3200 a DIGIC IV ?

edit: In other words, if you shoot a uniform field like a white piece of paper, with "vignetting correction" (or whatever they call it) disabled, you should get something that resembles my figure at zoom wide (instead of a perfectly homogeneous image with the correction enabled), that is, you should actually see your specific lens' vignetting anomaly.
« Last Edit: 02 / August / 2013, 11:32:20 by SticK »

*

Offline srsa_4c

  • ******
  • 4450
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #453 on: 02 / August / 2013, 11:33:43 »
@SticK

That border is the most obvious sign of this correction as only the inner part of the raw is corrected. And yes, I do get a full picture with considerably darker corners when the correction is not there, so I think this is it. The two crops are from DNGs, as is. The a3200 is DIGIC 4, but newer than the s90. Your camera has only one 'shading' related flag: fUseShading, the a3200 has two more: fSelectShadingR, fSelectShadingHiv. Any idea what that 'Hiv' could be? They use it a lot, but never the full word.

I'll prepare a debug build for your 100c camera, so that you can collect some information about the related routine. I found multiple paths for picture taking, and I need to know which paths should be hacked. The paths are selected by evaluation of multiple conditions (CCD temperature, shooting mode, ...).


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #454 on: 02 / August / 2013, 12:34:51 »
Quote
And yes, I do get a full picture with considerably darker corners when the correction is not there, so I think this is it.
This is very very interesting.  For 100c exploration, would you be able to give me a CHDK-menu settable ON/OFF switch?

Quote
The two crops are from DNGs, as is.
I understand, that's what I did to your request earlier: http://chdk.setepontos.com/index.php?topic=8801.msg103291#msg103291

Quote
The paths are selected by evaluation of multiple conditions (CCD temperature, shooting mode, ...).
This is also very interesting.  We now know that "CCD temp" in the S90 is actually related to the PCB board temp.  Because in my installation the CCD will be much colder than the PCB (at present @ +18C but eventually in a few months down to -20C) , we might be able to fix it to the lowest value (later after we can get vignetting out of the way) , if possible.

I can't think of the meaning of Hiv at the moment.  Perhaps someone reading this could chip in.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #455 on: 02 / August / 2013, 13:00:47 »
Quote
And yes, I do get a full picture with considerably darker corners when the correction is not there, so I think this is it.
This is very very interesting.  For 100c exploration, would you be able to give me a CHDK-menu settable ON/OFF switch?

Quote
The two crops are from DNGs, as is.
I understand, that's what I did to your request earlier: http://chdk.setepontos.com/index.php?topic=8801.msg103291#msg103291

Quote
The paths are selected by evaluation of multiple conditions (CCD temperature, shooting mode, ...).
This is also very interesting.  We now know that "CCD temp" in the S90 is actually related to the PCB board temp.  Because in my installation the CCD will be much colder than the PCB (at present +18C while PCB is @ +46C but eventually in a few months down to -20C), we might be able to fix it to the lowest value (later after we can get vignetting out of the way), if possible.

I can't think of the meaning of "Hiv" at present. Perhaps someone reading this could chip in.
« Last Edit: 02 / August / 2013, 13:02:27 by SticK »

*

Offline ahull

  • *****
  • 634
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #456 on: 03 / August / 2013, 08:34:06 »
Looking for context for HIV, I see these strings (Ixus Wireless)....

dump.bin.strings:ffb5db2c CAP_HIVSHD_IR
dump.bin.strings:ffb5db3c CAP_HIVSHD_H
dump.bin.strings:ffb5db4c CAP_HIVSHD_V
dump.bin.strings:ffb5db5c MOV_HIVSHD_IR
dump.bin.strings:ffb5db6c MOV_HIVSHD_H
dump.bin.strings:ffb5db7c MOV_HIVSHD_V
dump.bin.strings:ffb5db8c EVF_HIVSHD_IR
dump.bin.strings:ffb5db9c EVF_HIVSHD_H
dump.bin.strings:ffb5dbac EVF_HIVSHD_V

Best guesses would be Histogram Integration Value.... probably wildly off target, but that's where I am placing my first salvo.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #457 on: 03 / August / 2013, 09:57:38 »
EYEBALL SHADING ANALYSIS for the S90_101a

The instrument setup for this result was:

  WHITE LED -> TEFLON TAPE DRAPE -> 6 cm (focal length) -> 24 mm diam PCX LENS -> 40 cm -> 24 mm SPOT SIZE -> EXPOSED CCD

The WHITE LED is a pattern-less type (ie, potted scintillator).  The TEFLON TAPE increases homogeneity.  The 40 cm distance from the LENS to the CCD produces a very uniform illumination field.  That is, moving the CCD anywhere within a 15 mm diameter produces the same results.

Custom white balance was acquired.  By the way, using this controlled setup, I can attest that CWB on the S90 is sheer perfection!  The grayscale image was shot at 1/15s ISO 100.  Blemishes in the image are dust particles on the CCD window.

Figure 1 shows annotations of what I could best determine as the major difference zones.  Figure 2 is the original full-size image.  When looking at the image directly, the effects are quite subtle.  However, you can get a good appreciation of brightness behavior if you open it in a viewer to 100%, and quickly pan horizontally or vertically ... it's a very effective way of examining the subtle differences in intensity behavior.

SOME CONCLUSIONS

Because the shading patterns are not symmetric, there may be several parametrized positionally-sensitive within-frame blended equations (system of equations) that do the correction.
« Last Edit: 03 / August / 2013, 10:21:35 by SticK »


*

Offline srsa_4c

  • ******
  • 4450
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #458 on: 03 / August / 2013, 10:23:50 »
Looking for context for HIV, I see these strings (Ixus Wireless)....

dump.bin.strings:ffb5db2c CAP_HIVSHD_IR
dump.bin.strings:ffb5db3c CAP_HIVSHD_H
dump.bin.strings:ffb5db4c CAP_HIVSHD_V
dump.bin.strings:ffb5db5c MOV_HIVSHD_IR
dump.bin.strings:ffb5db6c MOV_HIVSHD_H
dump.bin.strings:ffb5db7c MOV_HIVSHD_V
dump.bin.strings:ffb5db8c EVF_HIVSHD_IR
dump.bin.strings:ffb5db9c EVF_HIVSHD_H
dump.bin.strings:ffb5dbac EVF_HIVSHD_V
Thx for that guess. Did you really find HIVSHD strings in a DIGIC II firmware?

@SticK
A test build is attached. It is only meant to log debug data, I didn't try to change any correction-related function yet (they are 'all over', the a3200 is much nicer). I have also found another function(*), which sets shading correction parameters according to: zoom point, Av value, and two other conditions. This function doesn't require several hundred or thousand bytes of added code, but it may not switch off correction completely.

I have included 2 scripts in the archive: do_conf.lua, do_log.lua
do_conf: enlarges the camera's internal log buffer, redirects debug output to a file named DEBUG.LOG
do_log: takes a shot (simulated keypresses, nothing fancy) and adds the logged data to DEBUG.LOG

To test, execute do_conf.lua once, then switch to shooting mode, make the necessary adjustments and execute do_log.lua to take a shot. Take additional shots (with do_log.lua !) to cover all conditions you're likely to encounter on the other camera. Additionally, make test shots with increasing zoom too, to test that (*) function. You only need jpegs, although enabling native raw could make a difference too. Dark frame subtraction on/off could be also important (I don't know which parts of the code take an actual picture and which parts take a dark frame).
To make the collected data useful, please write down the camera settings for each of the test shots.
I know this is tedious, but it's needed, since this is all unexplored territory.

There is a small chance that I screwed up something in the build, so please start with a small test, and post the log it created. Hopefully it won't crash.

edit:
To be able to use the scripts, please enable 'miscellaneous stuff -> Enable Lua native calls'.
« Last Edit: 03 / August / 2013, 10:27:21 by srsa_4c »

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP: S90 Primary Focal Plane Configuration - hacking out the CCD
« Reply #459 on: 03 / August / 2013, 10:37:56 »
@srsa_4c

I still have BIN V1.2 on the 100c (ie the version-sensitive MODULES).  Is the BIN in your ZIP V 1.2 (to keep the same MODULES) ?

Next question ... to execute the LUA files .. can I execute them from the PC (familiar to me), or do I have execute them from the SD card (unfamiliar) ?

I have some homework to do indeed!

edit:
Quote
I have also found another function(*), which sets shading correction parameters according to: zoom point, Av value, and two other conditions.
Yes I see, Av might have a non-linear effect in the image field.  In the 101a, aperture is always at f/2.

« Last Edit: 03 / August / 2013, 10:55:09 by SticK »

 

Related Topics