|
ailia
1.6.0.0
|
AILIA format definition and conversion. More...

Go to the source code of this file.
Macros | |
| #define | AILIA_API __stdcall |
| #define | AILIA_IMAGE_FORMAT_RGBA (0x00) |
| #define | AILIA_IMAGE_FORMAT_BGRA (0x01) |
| #define | AILIA_IMAGE_FORMAT_RGB (0x02) |
| #define | AILIA_IMAGE_FORMAT_BGR (0x03) |
| #define | AILIA_IMAGE_FORMAT_RGBA_B2T (0x10) |
| #define | AILIA_IMAGE_FORMAT_BGRA_B2T (0x11) |
| #define | AILIA_NETWORK_IMAGE_FORMAT_BGR (0) |
| #define | AILIA_NETWORK_IMAGE_FORMAT_RGB (1) |
| #define | AILIA_NETWORK_IMAGE_FORMAT_GRAY (2) |
| #define | AILIA_NETWORK_IMAGE_FORMAT_GRAY_EQUALIZE (3) |
| #define | AILIA_NETWORK_IMAGE_CHANNEL_FIRST (0) |
| #define | AILIA_NETWORK_IMAGE_CHANNEL_LAST (1) |
| #define | AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_INT8 (0) |
| #define | AILIA_NETWORK_IMAGE_RANGE_SIGNED_INT8 (1) |
| #define | AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_FP32 (2) |
| #define | AILIA_NETWORK_IMAGE_RANGE_SIGNED_FP32 (3) |
| #define | AILIA_NETWORK_IMAGE_RANGE_IMAGENET (4) |
Functions | |
| int AILIA_API | ailiaFormatConvert (void *dst, unsigned int dst_width, unsigned int dst_height, unsigned int dst_format, unsigned int dst_channel, unsigned int dst_range, const void *src, int src_stride, unsigned int src_width, unsigned int src_height, unsigned int src_format) |
| Converts image formats. More... | |
AILIA format definition and conversion.
| #define AILIA_API __stdcall |
| #define AILIA_IMAGE_FORMAT_BGR (0x03) |
BGR order
| #define AILIA_IMAGE_FORMAT_BGRA (0x01) |
BGRA order
| #define AILIA_IMAGE_FORMAT_BGRA_B2T (0x11) |
BGRA order (Bottom to top)
| #define AILIA_IMAGE_FORMAT_RGB (0x02) |
RGB order
| #define AILIA_IMAGE_FORMAT_RGBA (0x00) |
RGBA order
| #define AILIA_IMAGE_FORMAT_RGBA_B2T (0x10) |
RGBA order (Bottom to top)
| #define AILIA_NETWORK_IMAGE_CHANNEL_FIRST (0) |
DCYX order
| #define AILIA_NETWORK_IMAGE_CHANNEL_LAST (1) |
DYXC order
| #define AILIA_NETWORK_IMAGE_FORMAT_BGR (0) |
BGR order
| #define AILIA_NETWORK_IMAGE_FORMAT_GRAY (2) |
Gray Scale (1ch)
| #define AILIA_NETWORK_IMAGE_FORMAT_GRAY_EQUALIZE (3) |
Equalized Gray Scale (1ch)
| #define AILIA_NETWORK_IMAGE_FORMAT_RGB (1) |
RGB order
| #define AILIA_NETWORK_IMAGE_RANGE_IMAGENET (4) |
ImageNet mean&std normalize
| #define AILIA_NETWORK_IMAGE_RANGE_SIGNED_FP32 (3) |
-1.0 to 1.0
| #define AILIA_NETWORK_IMAGE_RANGE_SIGNED_INT8 (1) |
-128 to 127
| #define AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_FP32 (2) |
0.0 to 1.0
| #define AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_INT8 (0) |
0 to 255
| int AILIA_API ailiaFormatConvert | ( | void * | dst, |
| unsigned int | dst_width, | ||
| unsigned int | dst_height, | ||
| unsigned int | dst_format, | ||
| unsigned int | dst_channel, | ||
| unsigned int | dst_range, | ||
| const void * | src, | ||
| int | src_stride, | ||
| unsigned int | src_width, | ||
| unsigned int | src_height, | ||
| unsigned int | src_format | ||
| ) |
Converts image formats.
| dst | The storage location of the image after conversion (numeric type; a size of sizeof(float)
|
| dst_width | The width of the image after conversion |
| dst_height | The height of the image after conversion |
| dst_format | The format of the image after conversion (AILIA_NETWORK_IMAGE_FORMAT_*) |
| dst_channel | The channel order of the image after conversion (AILIA_NETWORK_IMAGE_CHANNEL_*) |
| dst_range | The range of the image after conversion (AILIA_NETWORK_IMAGE_RANGE_*) |
| src | The storage location of the source image (32 bpp) |
| src_stride | The line byte number of the source image |
| src_width | The width of the source image |
| src_height | The height of the source image |
| src_format | The format of the source image (AILIA_IMAGE_FORMAT_*) |
This function converts image formats. If dst_format is set to AILIA_NETWORK_IMAGE_FORMAT_BGR or AILIA_NETWORK_IMAGE_FORMAT_RGB , the number of channels is 3, otherwise if set to AILIA_NETWORK_IMAGE_FORMAT_GRAY , the number of channels is 1.