histogram_stuct_t Struct Reference

#include <c313a.h>


Data Fields

unsigned long frame
unsigned long valid
 frame number correspoding to the current histogram
union {
   unsigned long   gtab [4]
   struct {
      unsigned long   gtab_r
      unsigned long   gtab_g
      unsigned long   gtab_gb
      unsigned long   gtab_b
   } 
}; 
 Gamma tables hash values for the frame of the histogram.
union {
   unsigned long   hist [1024]
   struct {
      unsigned long   hist_r [256]
      unsigned long   hist_g [256]
 Histogram for the red component.
      unsigned long   hist_gb [256]
 Histogram for the first green component (in the "red" line).
      unsigned long   hist_b [256]
 Histogram for the second green component (in the "blue" line).
   } 
 All 4 histograms.
}; 
 Direct histograms, loaded from the FPGA.
union {
   unsigned long   cumul_hist [1024]
   struct {
      unsigned long   cumul_hist_r [256]
      unsigned long   cumul_hist_g [256]
 Cumulative histogram for the red component.
      unsigned long   cumul_hist_gb [256]
 Cumulative histogram for the first green component (in the "red" line).
      unsigned long   cumul_hist_b [256]
 Cumulative histogram for the second green component (in the "blue" line).
   } 
 All 4 cumulative histograms.
}; 
 Direct cumulative histograms, calculated from the loaded from the FPGA.
union {
   unsigned char   percentile [1024]
   struct {
      unsigned char   percentile_r [256]
      unsigned char   percentile_g [256]
 percentile for the red component
      unsigned char   percentile_gb [256]
 percentile for the first green component (in the "red" line)
      unsigned char   percentile_b [256]
 percentile for the second green component (in the "blue" line)
   } 
 All 4 percentiles.
}; 


Detailed Description

Definition at line 1511 of file c313a.h.


Field Documentation

unsigned long histogram_stuct_t::frame

Definition at line 1512 of file c313a.h.

Referenced by set_histograms().

unsigned long histogram_stuct_t::valid

frame number correspoding to the current histogram

Definition at line 1513 of file c313a.h.

Referenced by get_histograms(), init_histograms(), and set_histograms().

unsigned long histogram_stuct_t::gtab[4]

Definition at line 1516 of file c313a.h.

Referenced by getPercentile().

unsigned long histogram_stuct_t::gtab_r

Definition at line 1518 of file c313a.h.

unsigned long histogram_stuct_t::gtab_g

Definition at line 1519 of file c313a.h.

unsigned long histogram_stuct_t::gtab_gb

Definition at line 1520 of file c313a.h.

unsigned long histogram_stuct_t::gtab_b

Definition at line 1521 of file c313a.h.

union { ... }

Gamma tables hash values for the frame of the histogram.

bit mask of valid arrays (0 - hist_r, ... ,4-cumul_hist_r, ..., 11 - percentile_b)

unsigned long histogram_stuct_t::hist[1024]

Definition at line 1526 of file c313a.h.

unsigned long histogram_stuct_t::hist_r[256]

Definition at line 1528 of file c313a.h.

unsigned long histogram_stuct_t::hist_g[256]

Histogram for the red component.

Definition at line 1529 of file c313a.h.

unsigned long histogram_stuct_t::hist_gb[256]

Histogram for the first green component (in the "red" line).

Definition at line 1530 of file c313a.h.

unsigned long histogram_stuct_t::hist_b[256]

Histogram for the second green component (in the "blue" line).

Definition at line 1531 of file c313a.h.

union { ... }

Direct histograms, loaded from the FPGA.

unsigned long histogram_stuct_t::cumul_hist[1024]

Definition at line 1536 of file c313a.h.

Referenced by getPercentile(), PHP_FUNCTION(), and whiteBalanceCorr().

unsigned long histogram_stuct_t::cumul_hist_r[256]

Definition at line 1538 of file c313a.h.

unsigned long histogram_stuct_t::cumul_hist_g[256]

Cumulative histogram for the red component.

Definition at line 1539 of file c313a.h.

Referenced by main().

unsigned long histogram_stuct_t::cumul_hist_gb[256]

Cumulative histogram for the first green component (in the "red" line).

Definition at line 1540 of file c313a.h.

unsigned long histogram_stuct_t::cumul_hist_b[256]

Cumulative histogram for the second green component (in the "blue" line).

Definition at line 1541 of file c313a.h.

union { ... }

Direct cumulative histograms, calculated from the loaded from the FPGA.

unsigned char histogram_stuct_t::percentile[1024]

Definition at line 1552 of file c313a.h.

Referenced by getPercentile(), PHP_FUNCTION(), and whiteBalanceCorr().

unsigned char histogram_stuct_t::percentile_r[256]

Definition at line 1554 of file c313a.h.

unsigned char histogram_stuct_t::percentile_g[256]

percentile for the red component

Definition at line 1555 of file c313a.h.

unsigned char histogram_stuct_t::percentile_gb[256]

percentile for the first green component (in the "red" line)

Definition at line 1556 of file c313a.h.

unsigned char histogram_stuct_t::percentile_b[256]

percentile for the second green component (in the "blue" line)

Definition at line 1557 of file c313a.h.

union { ... }

Calculated reverse cumulative histograms (~percentiles) - for the given 1 byte input X (0 - 1/256 of all pixels, ..., 255 - all pixels) returns threshold value P (0..255), so that number of pixels with value less than x is less or equal to (P/256)*total_number_of_pixels, and number of pixels with value less than (x+1) is greater than (P/256)*total_number_of_pixels, P(0)=0, P(256)=256 /not included in the table/ percentiles arrays are calculated without division for each element, interpolation (with division) will be done only for the value of interest on demand, in the user space. NOTE: - argument is _output_ value (after gamma-correction), reverse gamma table is needed to relate percentiles to amount of light (proportional to exposure)


The documentation for this struct was generated from the following file:
Generated on Fri Nov 28 00:08:47 2008 for elphel by  doxygen 1.5.1