Image sum, sum-of-squares, cross-sum, min and max statistics. More...
Functions | |
| int32_t | rapp_stat_sum_bin (const uint8_t *buf, int dim, int width, int height) |
| Binary image sum. | |
| int32_t | rapp_stat_sum_u8 (const uint8_t *buf, int dim, int width, int height) |
| 8-bit pixel sum. | |
| int | rapp_stat_sum2_u8 (const uint8_t *buf, int dim, int width, int height, uintmax_t sum[2]) |
| 8-bit pixel squared sum. | |
| int | rapp_stat_xsum_u8 (const uint8_t *restrict src1, int src1_dim, const uint8_t *restrict src2, int src2_dim, int width, int height, uintmax_t sum[5]) |
| 8-bit pixel cross sum. | |
| int | rapp_stat_min_bin (const uint8_t *buf, int dim, int width, int height) |
| Binary pixel min. | |
| int | rapp_stat_max_bin (const uint8_t *buf, int dim, int width, int height) |
| Binary pixel max. | |
| int | rapp_stat_min_u8 (const uint8_t *buf, int dim, int width, int height) |
| 8-bit pixel min. | |
| int | rapp_stat_max_u8 (const uint8_t *buf, int dim, int width, int height) |
| 8-bit pixel max. | |
Image sum, sum-of-squares, cross-sum, min and max statistics.
All measures are image-global. The functions may read data up to the nearest alignment boundary, so if those pixels are not properly cleared the output may be invalid.
All images must be aligned.
| int32_t rapp_stat_sum_bin | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
Binary image sum.
Compute the sum of all pixels in a binary image. Image buffer and dimension must be aligned.
| [in] | buf | Pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
| int32_t rapp_stat_sum_u8 | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
8-bit pixel sum.
Compute the sum of all pixels in an 8-bit image. The result may be invalid if the image is larger than 28*(sizeof(int) - 1) pixels. Image buffer and dimension must be aligned.
| [in] | buf | Image pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
| int rapp_stat_sum2_u8 | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height, | |||
| uintmax_t | sum[2] | |||
| ) |
8-bit pixel squared sum.
Compute the sum and the sum-of-squares of all pixels in an 8-bit image. The result may be invalid if the image is larger than 28*(sizeof(int) - 1) pixels. Image buffer and dimension must be aligned.
| [in] | buf | The image pixel buffer. |
| dim | The row dimension in bytes of the pixel buffer. | |
| width | The image width in pixels. | |
| height | The image height in pixels. | |
| [out] | sum | The location where to store the sum and the sum-of-squares of the image. |
| int rapp_stat_xsum_u8 | ( | const uint8_t *restrict | src1, | |
| int | src1_dim, | |||
| const uint8_t *restrict | src2, | |||
| int | src2_dim, | |||
| int | width, | |||
| int | height, | |||
| uintmax_t | sum[5] | |||
| ) |
8-bit pixel cross sum.
Compute the cross sums of two 8-bit images. The result may be invalid if the image is larger than 28*(sizeof(int) - 1) pixels. Image buffers and dimensions must be aligned.
| [in] | src1 | First image pixel buffer. |
| src1_dim | Row dimension in bytes of the first buffer. | |
| [in] | src2 | Second image pixel buffer. |
| src2_dim | Row dimension in bytes of the second buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. | |
| [out] | sum | Output sum storage array with at least five elements. It is filled in as follows:
|
| int rapp_stat_min_bin | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
Binary pixel min.
Finds the minimum pixel value in a binary image. Image buffer and dimension must be aligned.
| [in] | buf | Image pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
| int rapp_stat_max_bin | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
Binary pixel max.
Finds the maximum pixel value in a binary image. Image buffer and dimension must be aligned.
| [in] | buf | Image pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
| int rapp_stat_min_u8 | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
8-bit pixel min.
Finds the minimum pixel value in an 8-bit image. Image buffer and dimension must be aligned.
| [in] | buf | Image pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
| int rapp_stat_max_u8 | ( | const uint8_t * | buf, | |
| int | dim, | |||
| int | width, | |||
| int | height | |||
| ) |
8-bit pixel max.
Finds the maximum pixel value in an 8-bit image. Image buffer and dimension must be aligned.
| [in] | buf | Image pixel buffer. |
| dim | Row dimension in bytes of the pixel buffer. | |
| width | Image width in pixels. | |
| height | Image height in pixels. |
1.6.1