ailia  1.3.0.0
Public Member Functions | Public Attributes | List of all members
AiliaFormat Class Reference

Public Member Functions

static int ailiaFormatConvert (IntPtr dst, UInt32 dst_width, UInt32 dst_height, UInt32 dst_format, UInt32 dst_channel, UInt32 dst_range, IntPtr src, Int32 src_stride, UInt32 src_width, UInt32 src_height, UInt32 src_format)
 Convert image format. More...
 

Public Attributes

const Int32 AILIA_IMAGE_FORMAT_RGBA = (0x00)
 
const Int32 AILIA_IMAGE_FORMAT_BGRA = (0x01)
 
const Int32 AILIA_IMAGE_FORMAT_RGBA_B2T = (0x10)
 
const Int32 AILIA_IMAGE_FORMAT_BGRA_B2T = (0x11)
 
const Int32 AILIA_NETWORK_IMAGE_FORMAT_BGR = (0)
 
const Int32 AILIA_NETWORK_IMAGE_FORMAT_RGB = (1)
 
const Int32 AILIA_NETWORK_IMAGE_FORMAT_GRAY = (2)
 
const Int32 AILIA_NETWORK_IMAGE_FORMAT_GRAY_EQUALIZE = (3)
 
const Int32 AILIA_NETWORK_IMAGE_CHANNEL_FIRST = (0)
 
const Int32 AILIA_NETWORK_IMAGE_CHANNEL_LAST = (1)
 
const Int32 AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_INT8 = (0)
 
const Int32 AILIA_NETWORK_IMAGE_RANGE_SIGNED_INT8 = (1)
 
const Int32 AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_FP32 = (2)
 
const Int32 AILIA_NETWORK_IMAGE_RANGE_SIGNED_FP32 = (3)
 
const Int32 AILIA_NETWORK_IMAGE_RANGE_IMAGENET = (4)
 

Member Function Documentation

◆ ailiaFormatConvert()

static int AiliaFormat.ailiaFormatConvert ( IntPtr  dst,
UInt32  dst_width,
UInt32  dst_height,
UInt32  dst_format,
UInt32  dst_channel,
UInt32  dst_range,
IntPtr  src,
Int32  src_stride,
UInt32  src_width,
UInt32  src_height,
UInt32  src_format 
)

Convert image format.

Parameters
dstWhere to store the converted image (type-numeric-stride * height * must be larger than the number of channels (see explanation))
dst_widthWidth of the converted image
dst_heightHeight of converted image
dst_formaFormat of converted image (AILIA_NETWORK_IMAGE_FORMAT_*)
dst_channelChannel order of the converted image (AILIA_NETWORK_IMAGE_CHANNEL_*)
dst_rangeRange of the converted image (AILIA_NETWORK_IMAGE_RANGE_*)
srcDestination of converted source image (32bpp)
src_strideNumber of line bytes in the source image
src_widthWidth of the source image
src_heightHeight of the source image
src_formatFormat of the source image (AILIA_IMAGE_FORMAT_*)
Returns
Returns AILIA_STATUS_SUCCESS if successful, otherwise returns an error code.

Change the image format, if dst_format is AILIA_NETWORK_IMAGE_FORMAT_BGR or AILIA_NETWORK_IMAGE_FORMAT_RGB if dst_format is AILIA_NETWORK_IMAGE_FORMAT_BGR or AILIA_NETWORK_IMAGE_FORMAT_RGB, the number of channels is 3, if dst_format is AILIA_NETWORK_IMAGE_FORMAT_GRAY the number of channels is 1.

Member Data Documentation

◆ AILIA_IMAGE_FORMAT_BGRA

const Int32 AiliaFormat.AILIA_IMAGE_FORMAT_BGRA = (0x01)

BGRA order

◆ AILIA_IMAGE_FORMAT_BGRA_B2T

const Int32 AiliaFormat.AILIA_IMAGE_FORMAT_BGRA_B2T = (0x11)

BGRA order (Bottom to Top)

◆ AILIA_IMAGE_FORMAT_RGBA

const Int32 AiliaFormat.AILIA_IMAGE_FORMAT_RGBA = (0x00)

RGBA order

◆ AILIA_IMAGE_FORMAT_RGBA_B2T

const Int32 AiliaFormat.AILIA_IMAGE_FORMAT_RGBA_B2T = (0x10)

RGBA order (Bottom to Top)

◆ AILIA_NETWORK_IMAGE_CHANNEL_FIRST

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_CHANNEL_FIRST = (0)

DYXC order

◆ AILIA_NETWORK_IMAGE_CHANNEL_LAST

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_CHANNEL_LAST = (1)

DYXC order

◆ AILIA_NETWORK_IMAGE_FORMAT_BGR

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_FORMAT_BGR = (0)

BGR order

◆ AILIA_NETWORK_IMAGE_FORMAT_GRAY

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_FORMAT_GRAY = (2)

Gray Scale (1ch)

◆ AILIA_NETWORK_IMAGE_FORMAT_GRAY_EQUALIZE

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_FORMAT_GRAY_EQUALIZE = (3)

Histogram Flattening Gray Scale (1ch)

◆ AILIA_NETWORK_IMAGE_FORMAT_RGB

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_FORMAT_RGB = (1)

RGB oreder

◆ AILIA_NETWORK_IMAGE_RANGE_IMAGENET

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_RANGE_IMAGENET = (4)

ImageNet mean&std normalizatio

◆ AILIA_NETWORK_IMAGE_RANGE_SIGNED_FP32

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_RANGE_SIGNED_FP32 = (3)

-1.0 - 1.0

◆ AILIA_NETWORK_IMAGE_RANGE_SIGNED_INT8

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_RANGE_SIGNED_INT8 = (1)

-128 - 127

◆ AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_FP32

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_FP32 = (2)

0.0 - 1.0

◆ AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_INT8

const Int32 AiliaFormat.AILIA_NETWORK_IMAGE_RANGE_UNSIGNED_INT8 = (0)

0 - 255


The documentation for this class was generated from the following file: