Classes | |
struct | imageproc_rect_s |
struct | imageproc_binary_img_s |
struct | imageproc_imginfo_s |
Typedefs | |
typedef struct imageproc_rect_s | imageproc_rect_t |
typedef struct imageproc_binary_img_s | imageproc_binary_img_t |
typedef struct imageproc_imginfo_s | imageproc_imginfo_t |
Enumerations | |
enum | imageproc_imginfo_e { IMAGEPROC_IMGTYPE_SINGLE = 0 , IMAGEPROC_IMGTYPE_1BPP = 1 , IMAGEPROC_IMGTYPE_BINARY = 1 , IMAGEPROC_IMGTYPE_8BPP = 2 , IMAGEPROC_IMGTYPE_16BPP = 3 } |
Functions | |
void | imageproc_initialize (void) |
void | imageproc_finalize (void) |
int | imageproc_convert_yuv2rgb (uint8_t *ibuf, uint32_t hsize, uint32_t vsize) |
int | imageproc_convert_rgb2yuv (uint8_t *ibuf, uint32_t hsize, uint32_t vsize) |
void | imageproc_convert_yuv2gray (uint8_t *ibuf, uint8_t *obuf, size_t hsize, size_t vsize) |
int | imageproc_resize (uint8_t *ibuf, uint16_t ihsize, uint16_t ivsize, uint8_t *obuf, uint16_t ohsize, uint16_t ovsize, int bpp) |
int | imageproc_clip_and_resize (uint8_t *ibuf, uint16_t ihsize, uint16_t ivsize, uint8_t *obuf, uint16_t ohsize, uint16_t ovsize, int bpp, imageproc_rect_t *clip_rect) |
int | imageproc_alpha_blend (imageproc_imginfo_t *dst, int pos_x, int pos_y, imageproc_imginfo_t *src, imageproc_imginfo_t *alpha) |
enum imageproc_imginfo_e |
void imageproc_initialize | ( | void | ) |
Initialize imageproc library
void imageproc_finalize | ( | void | ) |
Finalize imageproc library
int imageproc_convert_yuv2rgb | ( | uint8_t * | ibuf, |
uint32_t | hsize, | ||
uint32_t | vsize | ||
) |
Convert color format (YUV to RGB)
TODO: need more description here
[in,out] | ibuf | image |
[in] | hsize | Horizontal size |
[in] | vsize | Vertical size |
int imageproc_convert_rgb2yuv | ( | uint8_t * | ibuf, |
uint32_t | hsize, | ||
uint32_t | vsize | ||
) |
Convert color format (RGB to YUV)
[in,out] | ibuf | image |
[in] | hsize | Horizontal size |
[in] | vsize | Vertical size |
void imageproc_convert_yuv2gray | ( | uint8_t * | ibuf, |
uint8_t * | obuf, | ||
size_t | hsize, | ||
size_t | vsize | ||
) |
Convert color format (YUV to grayscale)
TODO: need more description here
[in] | ibuf | Input image |
[out] | obuf | Output buffer |
[in] | hsize | Horizontal size |
[in] | vsize | Vertical size |
int imageproc_resize | ( | uint8_t * | ibuf, |
uint16_t | ihsize, | ||
uint16_t | ivsize, | ||
uint8_t * | obuf, | ||
uint16_t | ohsize, | ||
uint16_t | ovsize, | ||
int | bpp | ||
) |
Resize image
Resize image specified by ibuf to ohsize, ovsize. Processed image will be stored to obuf.
For ohsize and ovsize, specify output size calculated by multiply in range from x1/64 to x64 against ihsize and ivsize.
This function can be processing for YUV422 color format. So all of specified horizontal size must be multiple of 2.
And there is limitation about output size below.
[in] | ibuf | Input image |
[in] | ihsize | Input horizontal size |
[in] | ivsize | Input vertical size |
[out] | obuf | Output buffer |
[in] | ohsize | Output horizontal size |
[in] | ovsize | Output vertical size |
[in] | bpp | Bits per pixel (16 or 8) |
CAUTION: In enlarge by higher scaling ratio, it may not be output all of the pixels.
int imageproc_clip_and_resize | ( | uint8_t * | ibuf, |
uint16_t | ihsize, | ||
uint16_t | ivsize, | ||
uint8_t * | obuf, | ||
uint16_t | ohsize, | ||
uint16_t | ovsize, | ||
int | bpp, | ||
imageproc_rect_t * | clip_rect | ||
) |
Clip and Resize image
[in] | ibuf | Input image |
[in] | ihsize | Input horizontal size |
[in] | ivsize | Input vertical size |
[out] | obuf | Output buffer |
[in] | ohsize | Output horizontal size |
[in] | ovsize | Output vertical size |
[in] | bpp | Bits per pixel (16 or 8) |
[in] | clip_rect | Clipping rectangle on input image. |
int imageproc_alpha_blend | ( | imageproc_imginfo_t * | dst, |
int | pos_x, | ||
int | pos_y, | ||
imageproc_imginfo_t * | src, | ||
imageproc_imginfo_t * | alpha | ||
) |
Execute alpha blending
dst image will be overwritten by src image masked with alpha.
[in,out] | dst | Destination image. dst->type = IMAGEPROC_IMGTYPE_16BPP. rect parameter can specify the blending area. |
[in] | pos_x | x-coordinate of blending position from origin. Negative value is allowed, out of bounds src image will be clipped. |
[in] | pos_y | y-coordinate of blending position from origin. Negative value is allowed, out of bounds src image will be clipped. |
[in] | src | Source image can be input as following formats. - IMAGEPROC_IMGTYPE_16BPP - IMAGEPROC_IMGTYPE_SINGLE single image is emulated a fixed monotone color image without image buffer. |
[in] | alpha | Alpha plane can be input as following formats. - IMAGEPROC_IMGTYPE_SINGLE - IMAGEPROC_IMGTYPE_1BPP - IMAGEPROC_IMGTYPE_8BPP SINGLE is specify a fixed alpha value (255 = 100%, 0 = 0%) applying whole image size. 1BPP is 1 bit per pixel map. 0 will be masked and 1 is blending with multiplier (255 = 100%). 1bpp bit order is LSB first. (0,0) (7,0) (x, y) 0x03 = |1|1|0|0|0|0|0|0| |