Histogram - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

Histogram

  • 109 Replies
  • 29422 Views
Re: Histogram
« Reply #20 on: 15 / January / 2013, 18:59:59 »
Advertisements
lapser

I thought I was there, but I realise I am still confused.

You said in a previous post the following:

"histo_size=get_histo_range(-1) -- will be 2048 for 12 bit camera."

However, I would have thought for a 12b camera like the S95, I would expect the above to return 4096 and that the over exposed highlights would be found after sampling the 4095 bin.

In other words if I call get_histo_range(4095,4095,0) I will be accessing the overexposed RAW count .

Am I wrong?

Cheers

Garry

*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #21 on: 15 / January / 2013, 20:14:21 »
In other words if I call get_histo_range(4095,4095,0) I will be accessing the overexposed RAW count .
Am I wrong?
You're right. 2048 would be an 11 bit camera, so I was just a bit off (as usual).

You only get the count of sampled pixels. The number of sampled pixels is about 8,000 to 12,000, out of 12 million total pixels. So if there are blown pixels in between the sampled pixels, they won't be detected. You might find it's better to have a larger range, like (4000,4095,0) or something.

EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Histogram
« Reply #22 on: 15 / January / 2013, 23:08:25 »
Good idea. I have adjusted my script and I believe it is now fairly stable. I have put in four user variables to accoun or the scene dynamics. A bright bin width of 1-90 and a threshold count of 10 to 300; and a similar arrangement at the dark end, from the black point.

I will be trying it out on various scenes over the coming weeks.

Once agin, thanks for all your advice and support.

Cheers

Garry

*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #23 on: 16 / January / 2013, 00:34:52 »
and a similar arrangement at the dark end, from the black point.
Keep in mind that the black level for a 12 bit sensor is 127. Any pixels that are below 128 should be considered totally black.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


Re: Histogram
« Reply #24 on: 16 / January / 2013, 10:53:58 »
Lapser

After extensive testing I think something is going wrong with your function.

All is ok when I first call histo range, I get reasonable counts.

If I turn off the camera and redo the script I get a near repeat set of counts in my brackets.

If, however, I don't switch off the camera and either come out of Alt mode and then go back or stay in Alt mode and repeat the script the count goes all over the place or sometimes remains fixed.

Very strange.

Any ideas?

Cheers

Garry


*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #25 on: 16 / January / 2013, 12:12:19 »
After extensive testing I think something is going wrong with your function.
If, however, I don't switch off the camera and either come out of Alt mode and then go back or stay in Alt mode and repeat the script the count goes all over the place or sometimes remains fixed.
I found a re-initialization bug that I think explains your problem. Try installing the attached CHDK build and let me know if it works. Thanks for the testing!
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Histogram
« Reply #26 on: 16 / January / 2013, 12:45:13 »
Lapser

That did it! Many thanks and always happy to test 'stuff'.

Cheers

Garry

Re: Histogram
« Reply #27 on: 17 / January / 2013, 10:24:16 »
Lapser

Just a quick update and favour.

Your histo functions working well in my script, which samples under and over exposure and brackets accordingly.

Do you think you could provide the same for my G11(j).

Cheers

Garry


*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #28 on: 17 / January / 2013, 14:07:05 »
Your histo functions working well in my script, which samples under and over exposure and brackets accordingly.
Do you think you could provide the same for my G11(j).
That's good news! I'm sure that get_histo_range(from,to,0) helps a lot.

I'm not so sure that 4096 samples vs 1024 samples helps that much in your application. But it will help when I use the histogram to calculate an EV change in exposure to get to ETTR on the next shot. I think it should also be left in because someone might use the full precision in the future for research, or a new application we haven't thought of.

I'll attach a build for your other camera.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Histogram
« Reply #29 on: 17 / January / 2013, 15:36:35 »
Lapser

Thanks for the quick turn around, however, something strange is happening. My G11 is a 12b, like the S95, however, when I run the same script, using your call, clearly it is not returning the actual (sampled) count, ie I only get 0 or 1 returned.

Sorry to check: but you did put your call in the G11 file you sent me?

Cheers

Garry

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal