Thresholding 8-bit to binary. More...
Functions | |
int | rapp_thresh_gt_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, int thresh) |
Single thresholding greater-than. | |
int | rapp_thresh_lt_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, int thresh) |
Single thresholding less-than. | |
int | rapp_thresh_gtlt_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, int low, int high) |
Double thresholding greater-than AND less-than. | |
int | rapp_thresh_ltgt_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, int width, int height, int low, int high) |
Double thresholding less-than OR greater-than. | |
int | rapp_thresh_gt_pixel_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, const uint8_t *restrict thresh, int thresh_dim, int width, int height) |
Pixelwise single thresholding greater-than. | |
int | rapp_thresh_lt_pixel_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, const uint8_t *restrict thresh, int thresh_dim, int width, int height) |
Pixelwise single thresholding less-than. | |
int | rapp_thresh_gtlt_pixel_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, const uint8_t *restrict low, int low_dim, const uint8_t *restrict high, int high_dim, int width, int height) |
Pixelwise double thresholding greater-than AND less-than. | |
int | rapp_thresh_ltgt_pixel_u8 (uint8_t *restrict dst, int dst_dim, const uint8_t *restrict src, int src_dim, const uint8_t *restrict low, int low_dim, const uint8_t *restrict high, int high_dim, int width, int height) |
Pixelwise double thresholding less-than OR greater-than. |
Thresholding 8-bit to binary.
The thresholding functions convert 8-bit images to binary images, using one or two thresholds, which can be constants or per-pixel 8-bit "images". All images must be aligned.
Next section: Type Conversions
int rapp_thresh_gt_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
int | thresh | |||
) |
Single thresholding greater-than.
Computes dst[i] = src[i] > thresh.
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
thresh | The threshold value to use. |
int rapp_thresh_lt_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
int | thresh | |||
) |
Single thresholding less-than.
Computes dst[i] = src[i] < thresh.
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
thresh | The threshold value to use. |
int rapp_thresh_gtlt_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
int | low, | |||
int | high | |||
) |
Double thresholding greater-than AND less-than.
Computes dst[i] = src[i] > low && src[i] < high.
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
low | The low threshold value. | |
high | The high threshold value. |
int rapp_thresh_ltgt_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
int | width, | |||
int | height, | |||
int | low, | |||
int | high | |||
) |
Double thresholding less-than OR greater-than.
Computes dst[i] = src[i] < low || src[i] > high.
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. | |
low | The low threshold value. | |
high | The high threshold value. |
int rapp_thresh_gt_pixel_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
const uint8_t *restrict | thresh, | |||
int | thresh_dim, | |||
int | width, | |||
int | height | |||
) |
Pixelwise single thresholding greater-than.
Computes dst[i] = src[i] > thresh[i].
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
[in] | thresh | Threshold pixel buffer. |
thresh_dim | Row dimension in bytes of the threshold buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
int rapp_thresh_lt_pixel_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
const uint8_t *restrict | thresh, | |||
int | thresh_dim, | |||
int | width, | |||
int | height | |||
) |
Pixelwise single thresholding less-than.
Computes dst[i] = src[i] < thresh[i].
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
[in] | thresh | Threshold pixel buffer. |
thresh_dim | Row dimension in bytes of the threshold buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
int rapp_thresh_gtlt_pixel_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
const uint8_t *restrict | low, | |||
int | low_dim, | |||
const uint8_t *restrict | high, | |||
int | high_dim, | |||
int | width, | |||
int | height | |||
) |
Pixelwise double thresholding greater-than AND less-than.
Computes dst[i] = src[i] > low[i] && src[i] < high[i].
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
[in] | low | Lower threshold pixel buffer. |
low_dim | Row dimension in bytes of the lower threshold buffer. | |
[in] | high | Higher threshold pixel buffer. |
high_dim | Row dimension in bytes of the higher threshold buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |
int rapp_thresh_ltgt_pixel_u8 | ( | uint8_t *restrict | dst, | |
int | dst_dim, | |||
const uint8_t *restrict | src, | |||
int | src_dim, | |||
const uint8_t *restrict | low, | |||
int | low_dim, | |||
const uint8_t *restrict | high, | |||
int | high_dim, | |||
int | width, | |||
int | height | |||
) |
Pixelwise double thresholding less-than OR greater-than.
Computes dst[i] = src[i] < low[i] || src[i] > high[i].
[out] | dst | Destination pixel buffer. |
dst_dim | Row dimension in bytes of the destination buffer. | |
[in] | src | Source pixel buffer. |
src_dim | Row dimension in bytes of the source buffer. | |
[in] | low | Lower threshold pixel buffer. |
low_dim | Row dimension in bytes of the lower threshold buffer. | |
[in] | high | Higher threshold pixel buffer. |
high_dim | Row dimension in bytes of the higher threshold buffer. | |
width | Image width in pixels. | |
height | Image height in pixels. |