Reading sensor data without closing shutter? - page 2 - Script Writing - CHDK Forum

Reading sensor data without closing shutter?

  • 70 Replies
  • 34704 Views
*

Offline Ant

  • *****
  • 509
Re: Reading sensor data without closing shutter?
« Reply #10 on: 28 / January / 2018, 09:17:59 »
Advertisements
All images include the (on-sensor) phase detect pixels.
Maybe it's bad pixels. They have strange coordinates. Capture.WholeSerial correct them. There is also difference in RAW_TYPE register.

Quote
Unfortunately, the old LiveImageTool.Pause and LiveImageTool.Resume event procedures no longer work (they are empty), so the Canon menu needs to be active when running Capture.WholeParallel...
I also tried various functions but sensor poling is still active. (for AE or AWB).
Entering the Canon menu takes up to 300ms. How to thrace what happend when camera enter to the Canon menu? There is nothing interesting in camera log.

Quote
I did not check other cameras yet.
It's interesting to see how it works on Powershot cameras...

*

Offline srsa_4c

  • ******
  • 4451
Re: Reading sensor data without closing shutter?
« Reply #11 on: 28 / January / 2018, 09:32:11 »
Maybe it's bad pixels.
I'm sure they are the phase detect pixels (they have visible pattern and don't cover the sensor's outer areas*). Additionally, there are also bad pixels.
Quote
There is also difference in RAW_TYPE register.
Did you find a reference to that somewhere in fw?
Quote
How to thrace what happend when camera enter to the Canon menu?
If canon_menu_active is working on the M3 (it does on the M10), that might provide a starting point.

edit:
*AFAIK the M3 uses a later generation of Canon's "Hybrid CMOS AF", so our patterns are likely different.
« Last Edit: 28 / January / 2018, 09:36:49 by srsa_4c »

*

Offline Ant

  • *****
  • 509
Re: Reading sensor data without closing shutter?
« Reply #12 on: 28 / January / 2018, 09:52:36 »
Did you find a reference to that somewhere in fw?
It wasn't easy because address of that is calculated from 0xC0F37000 + offset.
It can not be recognised by disassembler. So manual checking of 300+ references to 0xC0F37000 gives these addresses:

Code: [Select]
RAW_TYPE_REGISTER      FC1BC312
RAW_TYPE_REGISTER_0    FC1CCCD8
RAW_TYPE_REGISTER_1    FC23CFC8
RAW_TYPE_REGISTER_2    FC23D922
RAW_TYPE_REGISTER_3    FC3E068E
RAW_TYPE_REGISTER_4    FC3E06BC
RAW_TYPE_REGISTER_5    FC3E06E2
RAW_TYPE_REGISTER_6    FC543DC6

Maybe there is more easy way to find function calls with certain arguments?

Quote
I'm sure they are the phase detect pixels (they have visible pattern and don't cover the sensor's outer areas*). Additionally, there are also bad pixels.
Please upload your DNG taken with Capture.WholeParallel
« Last Edit: 28 / January / 2018, 10:06:24 by Ant »

*

Offline srsa_4c

  • ******
  • 4451
Re: Reading sensor data without closing shutter?
« Reply #13 on: 28 / January / 2018, 11:43:58 »
So manual checking of 300+ references to 0xC0F37000 gives these addresses
Thx.
Quote
Maybe there is more easy way to find function calls with certain arguments?
Possible (with some limits). Finsig_thumb2 / capdis may have examples of that sort of thing. I'm sure it's possible to do within IDA too.

DNG. Note that this is one line less than the eventproc's output. Plus, for some reason, the first few lines are not actually written and contain random data. DNG header was taken from an earlier DNG.

*

Offline Ant

  • *****
  • 509
Re: Reading sensor data without closing shutter?
« Reply #14 on: 28 / January / 2018, 12:21:00 »
Finaly I found the way to remove bad pixels.
EnableHeadDirectCapturePath function need to be called before EvfCaptureSystem.

I suspect that it was used at 0xFC23D3C6. As you can see the address of register was calculated by substracting 0x94 from 0xC0F370A8.
« Last Edit: 28 / January / 2018, 12:30:13 by Ant »

*

Offline srsa_4c

  • ******
  • 4451
Re: Reading sensor data without closing shutter?
« Reply #15 on: 28 / January / 2018, 15:56:07 »
Finaly I found the way to remove bad pixels.
EnableHeadDirectCapturePath function need to be called before EvfCaptureSystem.
Nice.
Seems like I can call EnableHeadDirectCapturePath before Capture.WholeParallel (timing is not critical, it just sets a fw variable) and the resulting raw data no longer has bad (marked) pixels. The phase detect pixels remain, though.
There's more eventprocs around EnableHeadDirectCapturePath, I wonder what those do.

*

Offline Ant

  • *****
  • 509
Re: Reading sensor data without closing shutter?
« Reply #16 on: 28 / January / 2018, 16:05:51 »
The phase detect pixels remain, though.
On M3 there is no phase detect pixels with or whithout  EnableHeadDirectCapturePath.
Ask ML people. Maybe your sensor is similar to EOS M and EOS M2.

*

Offline srsa_4c

  • ******
  • 4451
Re: Reading sensor data without closing shutter?
« Reply #17 on: 30 / January / 2018, 11:38:05 »
On M3 there is no phase detect pixels with or whithout  EnableHeadDirectCapturePath.
Interesting. I wonder if it's due to different fw code (different raw type used) or the third generation of "Hybrid CMOS AF" has separate readout for those phase detect pixels.

I've been thinking about why EnableHeadDirectCapturePath results in seemingly no bad pixels. My current theory is that, when enabled, real raw data is retrieved (as opposed to raw data that has gone through the bad pixel marker unit).

*

Offline Ant

  • *****
  • 509
Re: Reading sensor data without closing shutter?
« Reply #18 on: 30 / January / 2018, 12:38:23 »
Interesting. I wonder if it's due to different fw code (different raw type used) or the third generation of "Hybrid CMOS AF" has separate readout for those phase detect pixels.

I think this is because of FPGA.
After calling SetSafFPGABypassMode I've got an image with some sort of focus pixels.

Are there focus pixels on images created by CaptureWithParam or Capture.WholeSerial ?

*

Offline c_joerg

  • *****
  • 1251
Re: Reading sensor data without closing shutter?
« Reply #19 on: 30 / January / 2018, 12:58:14 »
After calling SetSafFPGABypassMode I've got an image with some sort of focus pixels.
Interesting…
Do you see the focus lines directly on the sensor?
https://www.dpreview.com/forums/thread/4006320
I can’t reproduce them even with extreme image processing ...
« Last Edit: 30 / January / 2018, 13:27:22 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics


SimplePortal © 2008-2014, SimplePortal