Histogram - General Discussion and Assistance - CHDK Forum supplierdeeply

Histogram

  • 109 Replies
  • 26688 Views
Histogram
« on: 10 / January / 2013, 18:08:13 »
Advertisements
I'm using the get_histo_range function and remain a little confused. The function operates over 0 to 1023 according to the info. This is 10 bits.

However, I have a 12 bit canon (S95), which should mean the function needs to operate over 4096.

What should I use? 1023 or 4095?

Cheers

Garry

Re: Histogram
« Reply #1 on: 10 / January / 2013, 18:44:56 »
I'm using the get_histo_range function and remain a little confused. The function operates over 0 to 1023 according to the info. This is 10 bits.
However, I have a 12 bit canon (S95), which should mean the function needs to operate over 4096.
What should I use? 1023 or 4095?
1023.

The function normalizes all sensor data to a 10 bit range (based on the CAM_SENSOR_BITS_PER_PIXEL value in the camera's platform_camera.h file).
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Histogram
« Reply #2 on: 10 / January / 2013, 18:46:29 »
Many thanks (as usual)

Garry

*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #3 on: 11 / January / 2013, 07:22:49 »
http://chdk.setepontos.com/index.php?topic=8997.0
I've been working on improving the shot histogram for awhile. If you're interested, start from the beginning of the above thread.

Did you want to use the histogram for display purposes or for setting exposure?
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


Re: Histogram
« Reply #4 on: 11 / January / 2013, 16:02:59 »
Lapsed

I am using the get_histo_range function as part of an auto bracketing script.

I would prefer to access the true RAW histogram, rather than the 10b scaled one.

Also I would prefer more accuracy than the current function, which 'only, returns integer %.

Cheers

Garry

Re: Histogram
« Reply #5 on: 11 / January / 2013, 16:37:59 »
BTW I forgot to say that what I would really like was a display CHDK RAW histogram where one could specify how many stops of data to display.

Thus the 'Nomal' Canon JPEG histogram would be ugmrnts by one that plowed, for example, the right most stop to be displayed, ie stretched out across the full CHDK histogram base. Thus those of us that believe in ETTR would have a realtime tool to example the highlight area.

Cheers

Garry

*

Offline reyalp

  • ******
  • 14080
Re: Histogram
« Reply #6 on: 11 / January / 2013, 16:50:55 »
BTW I forgot to say that what I would really like was a display CHDK RAW histogram where one could specify how many stops of data to display.
Just to be clear, CHDK RAW (shot) histogram is not displayed, and is only available after you shoot. I guess you could make a lua drawings script to display it.
Quote
Thus the 'Nomal' Canon JPEG histogram would be ugmrnts by one that plowed, for example, the right most stop to be displayed, ie stretched out across the full CHDK histogram base.
I don't understand this at all. "ugmrnts" "plowed"?

The CHDK live histogram does have an auto-magnify feature.
Quote
I would prefer to access the true RAW histogram, rather than the 10b scaled one.
Can you show a case where this actually makes a difference?
Don't forget what the H stands for.

Re: Histogram
« Reply #7 on: 11 / January / 2013, 17:01:48 »
Thus those of us that believe in ETTR would have a realtime tool to example the highlight area.
http://chdk.setepontos.com/index.php?topic=7889.msg90176#msg90176
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline lapser

  • *****
  • 1093
Re: Histogram
« Reply #8 on: 11 / January / 2013, 17:08:07 »
Tell me your camera model and firmware version. I can post a modified test version of CHDK for you to try out.

set_shot_histogram(1)
histo_size=get_histo_range(-1) -- will be 2048 for 12 bit camera
total_samples=get_histo_range(-2)

then call it with

nsamples=get_histo_range(from,to,scale)
  if scale is 0, it returns the actual number of samples in the range
  otherwise, it returns nsamples/scale

It only works with Lua. scale is optional, and without it, you get the old version. That is, if scale is not present, it defaults to scale=100
==
Also, if you want to set exposure for ETTR, I should have a function that returns an exposure compensation value that you just add to the current shot shutter time and use in the next shot. Maybe you could help me figure out the best way to calculate that.

My plan is to start from the top of the histogram work my way down, adding up all the values until I get to a certain percentage of the total pixels, say 1% or whatever you want. Then I return an exposure compensation value to put that 1% level at the top of the histogram, or a level you specify.

I could also return an ETTL value, so you could shoot one shot underexposed but without black level clipping, and one shot overexposed (ETTR), but without white clipping.

I don't understand this at all. "ugmrnts" "plowed"?
Me neither. I prefer them unplowed. :)
Quote
I would prefer to access the true RAW histogram, rather than the 10b scaled one.
Quote
Can you show a case where this actually makes a difference?
I'm not sure it will make much difference for ETTR, but on the low end, the extra precision would make exposure change calculations more accurate. Anyway, I've got it programmed already for 12 and 14 bit full size histograms, so we can try it and see if it's necessary.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Histogram
« Reply #9 on: 11 / January / 2013, 17:12:26 »
Sorry about the typing! Blame the ipad auto correct and me not checking it before I push post!

I naively thought the CHDK histogram was constructed from different data from the canon one. Know I think about it, what I want can not be constructed in real time: I guess?

I'm sure your implication is right, that 10b should be enough.

The auto magnify does not accomplish what I was looking for. What I would like to see is the histogram for he right ost stop to be displayed: not all the histogram from 0 to 255.

Garry

 

Related Topics