Black Point - General Help and Assistance on using CHDK stable releases - CHDK Forum

Black Point

  • 14 Replies
  • 1418 Views
Black Point
« on: 04 / June / 2022, 07:43:31 »
Advertisements
@reyalp

When using get_histo_range on my M3, the black point appears to be at 128.

On my G1X it appears to be at 29, ie with the lens cap on.

Do you know if the M3 is the odd one out, and all non-M3 cameras have a get_histo_range black point at 29?
« Last Edit: 04 / June / 2022, 10:32:08 by pigeonhill »

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
All lifetime is a loan from eternity.

Re: Black Point
« Reply #2 on: 04 / June / 2022, 11:15:49 »
@Caefix

Quote
Black point is ~31 for 10 bit sensors and ~127 for 12 bit sensors.

Hence my confusion ;-)

I don't believe the G1X is a 10bit sensor.


UPDATE


Looks like the G1X get_histo_range histogram is different to, say, my G5X, G7X and M3, ie black level is 29 vs 127

« Last Edit: 04 / June / 2022, 12:41:55 by pigeonhill »

*

Offline c_joerg

  • *****
  • 1248
Re: Black Point
« Reply #3 on: 04 / June / 2022, 12:52:14 »
Do you mean black point or black Level?
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


Re: Black Point
« Reply #4 on: 04 / June / 2022, 12:54:04 »
Black level, ie the offset.

*

Offline c_joerg

  • *****
  • 1248
Re: Black Point
« Reply #5 on: 04 / June / 2022, 13:00:49 »
But black level is RAW based and  get_histo_range works with RAW Data?

Note: some cams like G1x changing black level depending on ISO.   
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

Re: Black Point
« Reply #6 on: 04 / June / 2022, 13:29:20 »
Sorry, I don’t know what point you are making.


All I’m saying is that the G1X has a different black level/offset to the G5X, G7X and the M3.


I haven’t explored the offset at different ISOs.

Update: just checked the G1X upto ISO1600, and black level/offset stays the same.
« Last Edit: 04 / June / 2022, 13:36:08 by pigeonhill »

*

Offline c_joerg

  • *****
  • 1248
Re: Black Point
« Reply #7 on: 04 / June / 2022, 14:05:54 »
I don't think you mean the black level
Black Level
M3 is 2047
G1x is 511 at ISO100
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


*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: Black Point
« Reply #8 on: 04 / June / 2022, 14:13:16 »
 ;) ... Seen from here they seem all 10 bit...
Code: [Select]
void build_shot_histogram()
    // read samples from RAW memory and build an histogram of its luminosity
...
    {
        // > 10bpp compatibility: discard the lowest N bits
        int shift = (camera_sensor.bits_per_pixel - 10);
        for (y = y0; y < y1; y += SHOT_HISTOGRAM_STEP )
            for (x = x0; x < x1; x += SHOT_HISTOGRAM_STEP )
            {
                p = get_raw_pixel(x,y) >> shift;
                shot_histogram[p]++;
            }
    }
All lifetime is a loan from eternity.

*

Offline reyalp

  • ******
  • 14079
Re: Black Point
« Reply #9 on: 04 / June / 2022, 15:34:54 »
I don't believe the G1X is a 10bit sensor.
G1 X is  a 14 bit sensor. You can find this from CAM_SENSOR_BITS_PER_PIXEL in a cameras platform_camera.h

get_histo_range values are scaled to 10 bit, shown in the code Caefix quoted.

black level is normally defined as ((1<<(CAM_SENSOR_BITS_PER_PIXEL-5))-1) but again, G1 X is special because it defines CAM_CALC_BLACK_LEVEL (edit: cameras can also override blacklevel using CAM_BLACK_LEVEL, as on M3 which sets it to 2047)

The corresponding comment in camera.h says
Quote
Set this to enable dynamic Black Level calculation from RAW sensor data
E.G. G1X may use black = 2048 for long exposures at high ISO
Further background can be found in https://chdk.setepontos.com/index.php?topic=11081.msg121668#msg121668

I'm not really clear which values you were referring to in the thread (get_histo_range? Raw values? Something from raw/dng images?) so maybe you can clarify what specifically you are trying to do if the above doesn't address your question.
« Last Edit: 04 / June / 2022, 16:23:57 by reyalp »
Don't forget what the H stands for.

 

Related Topics