Masked area statistics and interpretation

  • 2 Replies

Offline Lebeau

  • ***
  • 187
Masked area statistics and interpretation
« on: 12 / February / 2011, 21:16:15 »

I don't know if it's the right place and/or if it's interesting but I would share my knowledge about Canon Masked Area.

At the left of the active area, in the raw file (and dng too), you would find a non-exposed sensor area. This area could be assigned in the camera.h file as per my A650IS is:
Code: [Select]
    #define CAM_ACTIVE_AREA_X1 52
    #define CAM_ACTIVE_AREA_Y1 14
    #define CAM_ACTIVE_AREA_X2 4076
    #define CAM_ACTIVE_AREA_Y2 3030
/* Active Area
This rectangle defines the active (non-masked) pixels of the sensor. The order of the rectangle coordinates is: top, left, bottom, right.
/* lebeau :
The Canon raw data contains a masked area and an active are which contains the JPEG area.

The mask area could be usefull for some software, to evaluate black level.
In fact, the masked area reflect a quasi Gaussian distribution of black values,
between 0 to, about, twice the black level, making an average of black level.

Mask Area Values are set in camera.h and could be approximative.
Select an area at the left of the active area, not so near the overall raw area.
All numbers shall be even for CFA pattern

example for my A650, but not tested on other cam !!!
    #define CAM_MASKED_AREA_X1 12
    #define CAM_MASKED_AREA_Y1 14
    #define CAM_MASKED_AREA_X2 48
    #define CAM_MASKED_AREA_Y2 3030

This non-exposed sensor area could be interpret as non-uniform random thermal noise, therefore, non-linearly proportional to sensor temperature.

Based on this area, I made some statistics:
 - I distinctively collect R, G, G and B cell datas
 - I compute min, max, average, std dev, variance and std dev/average ratio for each RGGB column
 - Since, columns stats seam similar from one column to others, I compute the same stats over columns

Here are the resulting values:

I would underline that:
- average non-exposed value is 29,8 +/- 0,2%
- maximum average is 30,6 where my black value is 31
- values go from 0 to 67 and follow a normal distribution with a std. dev (sigma) of about 8,4

The following graph represents cumulative distribution of average column values:

where sigma represents standard deviation.

The following graph contains the cumulative distribution of each column over 1508 rows:

I don't know if it was interesting but ... if someone would like to use masked area to reduce, or interpret, thermal noise, you would refer to some statistical stability :)


Offline Lebeau

  • ***
  • 187
Re: Masked area statistics and interpretation
« Reply #1 on: 13 / February / 2011, 09:51:59 »
By the way, there is a difference between black frame substraction and masked area interpretation.

Masked area would be interpret as non-exposed thermal noise. Black frame substraction is usefull to eliminate Salt & Pepper noise.

The most important CCD noise come from NLF (noise-level-factor) where the noise is relative to the light intensity. Mask area don't received any light and could be considered as the zero of NLF.
« Last Edit: 13 / February / 2011, 09:53:35 by Lebeau »


Offline Lebeau

  • ***
  • 187
Re: Masked area statistics and interpretation
« Reply #2 on: 10 / June / 2011, 15:13:34 »
Some ask for more details about the infamous Canon masked area.
Here are changes in camera.h to display upper left corner of raw data, where masked area starts.
Code: [Select]
    #define CAM_ACTIVE_AREA_X1 0
    #define CAM_ACTIVE_AREA_Y1 0
    #define CAM_ACTIVE_AREA_X2 4024
    #define CAM_ACTIVE_AREA_Y2 3016
//    #define CAM_ACTIVE_AREA_X1 52
//    #define CAM_ACTIVE_AREA_Y1 14
//    #define CAM_ACTIVE_AREA_X2 4076
//    #define CAM_ACTIVE_AREA_Y2 3030

The result is:

You can see colored pixels since black level is set to 31 and these pixels are higher than 32 :)


Related Topics