The open imaging DSP library
Loading...
Searching...
No Matches
Functions
mpix/stats.h

Compute statistics on images [EXPERIMENTAL]. More...

Functions

void mpix_stats_rgb_avg (const uint8_t *buf, uint16_t width, uint16_t height, uint32_t fourcc, uint8_t avg[3], uint16_t nval)
 Collect red, green, blue channel averages of all pixels in an RGB24 frame.
 
void mpix_stats_rgb_hist (const uint8_t *buf, uint16_t width, uint16_t height, uint32_t fourcc, uint16_t *hist, size_t hist_size, uint16_t nval)
 
void mpix_stats_luma_hist (const uint8_t *buf, uint16_t width, uint16_t height, uint32_t fourcc, uint16_t *hist, size_t hist_size, uint16_t nval)
 
void mpix_rggb8frame_to_rgb24avg (const uint8_t *buf, size_t size, uint16_t width, uint8_t rgb24avg[3], uint16_t nval)
 Collect red, green, blue channel averages of all pixels in an RGGB8 frame.
 
void mpix_bggr8frame_to_rgb24avg (const uint8_t *buf, size_t size, uint16_t width, uint8_t rgb24avg[3], uint16_t nval)
 Collect red, green, blue channel averages of all pixels in an BGGR8 frame.
 
void mpix_gbrg8frame_to_rgb24avg (const uint8_t *buf, size_t size, uint16_t width, uint8_t rgb24avg[3], uint16_t nval)
 Collect red, green, blue channel averages of all pixels in an GBRG8 frame.
 
void mpix_grbg8frame_to_rgb24avg (const uint8_t *buf, size_t size, uint16_t width, uint8_t rgb24avg[3], uint16_t nval)
 Collect red, green, blue channel averages of all pixels in an GRBG8 frame.
 
void mpix_rgb24frame_to_rgb24hist (const uint8_t *buf, size_t buf_size, uint16_t *rgb24hist, size_t hist_size, uint16_t nval)
 Collect an histogram for each of the red, green, blue channels of an RGB24 frame.
 
void mpix_rggb8frame_to_rgb24hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *rgb24hist, size_t hist_size, uint16_t nval)
 Collect an histogram for each of the red, green, blue channels of an RGGB8 frame.
 
void mpix_gbrg8frame_to_rgb24hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *rgb24hist, size_t hist_size, uint16_t nval)
 Collect an histogram for each of the red, green, blue channels of GBRG8 frame.
 
void mpix_bggr8frame_to_rgb24hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *rgb24hist, size_t hist_size, uint16_t nval)
 Collect an histogram for each of the red, green, blue channels of BGGR8 frame.
 
void mpix_grbg8frame_to_rgb24hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *rgb24hist, size_t hist_size, uint16_t nval)
 Collect an histogram for each of the red, green, blue channels of GRBG8 frame.
 
void mpix_rgb24frame_to_y8hist (const uint8_t *buf, size_t buf_size, uint16_t *y8hist, size_t hist_size, uint16_t nval)
 Collect an histogram for the Y channel, obtained from the pixel values of the image.
 
void mpix_rggb8frame_to_y8hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *y8hist, size_t hist_size, uint16_t nval)
 Collect an histogram for the Y channel, obtained from the values of an RGGB8 frame.
 
void mpix_gbrg8frame_to_y8hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *y8hist, size_t hist_size, uint16_t nval)
 Collect an histogram for the Y channel, obtained from the values of an GBRG8 frame.
 
void mpix_bggr8frame_to_y8hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *y8hist, size_t hist_size, uint16_t nval)
 Collect an histogram for the Y channel, obtained from the values of an BGGR8 frame.
 
void mpix_grbg8frame_to_y8hist (const uint8_t *buf, size_t buf_size, uint16_t width, uint16_t *y8hist, size_t hist_size, uint16_t nval)
 Collect an histogram for the Y channel, obtained from the values of an GRBG8 frame.
 

Detailed Description

Compute statistics on images [EXPERIMENTAL].

SPDX-License-Identifier: Apache-2.0

Function Documentation

◆ mpix_bggr8frame_to_rgb24avg()

void mpix_bggr8frame_to_rgb24avg ( const uint8_t *  buf,
size_t  size,
uint16_t  width,
uint8_t  rgb24avg[3],
uint16_t  nval 
)

Collect red, green, blue channel averages of all pixels in an BGGR8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24avgThe channel averages stored as an RGB24 pixel.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_bggr8frame_to_rgb24hist()

void mpix_bggr8frame_to_rgb24hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  rgb24hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for each of the red, green, blue channels of BGGR8 frame.

Parameters
bufBuffer of pixels to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24histBuffer storing 3 histograms one after the other, for the R, G, B channels.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_bggr8frame_to_y8hist()

void mpix_bggr8frame_to_y8hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  y8hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for the Y channel, obtained from the values of an BGGR8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
y8histBuffer storing the histogram for the Y (luma) channel.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_gbrg8frame_to_rgb24avg()

void mpix_gbrg8frame_to_rgb24avg ( const uint8_t *  buf,
size_t  size,
uint16_t  width,
uint8_t  rgb24avg[3],
uint16_t  nval 
)

Collect red, green, blue channel averages of all pixels in an GBRG8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24avgThe channel averages stored as an RGB24 pixel.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_gbrg8frame_to_rgb24hist()

void mpix_gbrg8frame_to_rgb24hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  rgb24hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for each of the red, green, blue channels of GBRG8 frame.

Parameters
bufBuffer of pixels to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24histBuffer storing 3 histograms one after the other, for the R, G, B channels.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_gbrg8frame_to_y8hist()

void mpix_gbrg8frame_to_y8hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  y8hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for the Y channel, obtained from the values of an GBRG8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
y8histBuffer storing the histogram for the Y (luma) channel.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_grbg8frame_to_rgb24avg()

void mpix_grbg8frame_to_rgb24avg ( const uint8_t *  buf,
size_t  size,
uint16_t  width,
uint8_t  rgb24avg[3],
uint16_t  nval 
)

Collect red, green, blue channel averages of all pixels in an GRBG8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24avgThe channel averages stored as an RGB24 pixel.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_grbg8frame_to_rgb24hist()

void mpix_grbg8frame_to_rgb24hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  rgb24hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for each of the red, green, blue channels of GRBG8 frame.

Parameters
bufBuffer of pixels to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24histBuffer storing 3 histograms one after the other, for the R, G, B channels.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_grbg8frame_to_y8hist()

void mpix_grbg8frame_to_y8hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  y8hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for the Y channel, obtained from the values of an GRBG8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
y8histBuffer storing the histogram for the Y (luma) channel.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_rgb24frame_to_rgb24hist()

void mpix_rgb24frame_to_rgb24hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t *  rgb24hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for each of the red, green, blue channels of an RGB24 frame.

Parameters
bufBuffer of pixels in RGB24 format (3 bytes per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
rgb24histBuffer storing 3 histograms one after the other, for the R, G, B channels.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_rgb24frame_to_y8hist()

void mpix_rgb24frame_to_y8hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t *  y8hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for the Y channel, obtained from the pixel values of the image.

Parameters
bufBuffer of pixels in RGB24 format (3 bytes per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
y8histBuffer storing the histogram for the Y (luma) channel.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_rggb8frame_to_rgb24avg()

void mpix_rggb8frame_to_rgb24avg ( const uint8_t *  buf,
size_t  size,
uint16_t  width,
uint8_t  rgb24avg[3],
uint16_t  nval 
)

Collect red, green, blue channel averages of all pixels in an RGGB8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24avgThe channel averages stored as an RGB24 pixel.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_rggb8frame_to_rgb24hist()

void mpix_rggb8frame_to_rgb24hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  rgb24hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for each of the red, green, blue channels of an RGGB8 frame.

Parameters
bufBuffer of pixels to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
rgb24histBuffer storing 3 histograms one after the other, for the R, G, B channels.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_rggb8frame_to_y8hist()

void mpix_rggb8frame_to_y8hist ( const uint8_t *  buf,
size_t  buf_size,
uint16_t  width,
uint16_t *  y8hist,
size_t  hist_size,
uint16_t  nval 
)

Collect an histogram for the Y channel, obtained from the values of an RGGB8 frame.

Parameters
bufBuffer of pixels in bayer format (1 byte per pixel) to collect the statistics from.
buf_sizeSize of this input buffer.
widthWidth of the lines in number of pixels.
y8histBuffer storing the histogram for the Y (luma) channel.
hist_sizeTotal number of buckets in the histogram, all channels included.
nvalThe number of values to collect in order to perform the statistics.

◆ mpix_stats_rgb_avg()

void mpix_stats_rgb_avg ( const uint8_t *  buf,
uint16_t  width,
uint16_t  height,
uint32_t  fourcc,
uint8_t  avg[3],
uint16_t  nval 
)

Collect red, green, blue channel averages of all pixels in an RGB24 frame.

Parameters
bufBuffer of pixels in RGB24 format (3 bytes per pixel) to collect the statistics from.
sizeSize of this input buffer.
rgb24avgThe channel averages stored as an RGB24 pixel.
nvalThe number of values to collect in order to perform the statistics.