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

Sampling of image pixels. More...

Functions

int mpix_sample_random_rgb (const uint8_t *buf, const struct mpix_format *fmt, uint8_t *dst)
 Collect a pixel at a random location from the input buffer in RGB24 format.
 

Detailed Description

Sampling of image pixels.

SPDX-License-Identifier: Apache-2.0

Function Documentation

◆ mpix_sample_random_rgb()

int mpix_sample_random_rgb ( const uint8_t *  buf,
const struct mpix_format fmt,
uint8_t *  dst 
)

Collect a pixel at a random location from the input buffer in RGB24 format.

Parameters
bufBuffer of pixels from which collect the sample.
fmtResolution of the source and destination, and format of the destination.
dstBuffer for one pixel filled by this function.
Returns
0 on success or negative error code.