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

Public Member Functions

static int ailiaCreateFeatureExtractor (ref IntPtr fextractor, IntPtr net, UInt32 format, UInt32 channel, UInt32 range, string layer_name)
 Create a feature extraction object. More...
 
static void ailiaDestroyFeatureExtractor (IntPtr fextractor)
 Destroy feature extractor object. More...
 
static int ailiaFeatureExtractorCompute (IntPtr fextractor, IntPtr dst, UInt32 dst_size, IntPtr src, UInt32 src_stride, UInt32 src_width, UInt32 src_height, UInt32 src_format)
 Extract features. More...
 
static int ailiaFeatureExtractorMatch (IntPtr fextractor, ref float distance, UInt32 distace_type, IntPtr feature1, UInt32 feature1_size, IntPtr feature2, UInt32 feature2_size)
 Calculate the distance between features. More...
 

Public Attributes

const Int32 AILIA_FEATURE_EXTRACTOR_DISTANCE_L2NORM =(0)
 

Member Function Documentation

◆ ailiaCreateFeatureExtractor()

static int AiliaFeatureExtractor.ailiaCreateFeatureExtractor ( ref IntPtr  fextractor,
IntPtr  net,
UInt32  format,
UInt32  channel,
UInt32  range,
string  layer_name 
)

Create a feature extraction object.

Parameters
fextractorFeature extraction object pointer
netNetwork object pointer
formatImage format of the network (AILIA_NETWORK_IMAGE_FORMAT_*)
channelImage channel of the network (AILIA_NETWORK_IMAGE_CHANNEL_*)
rangeImage range of the network (AILIA_NETWORK_IMAGE_RANGE_*)
layer_nameName name of layer corresponding to feature (fc1 for VGG16, null for final layer)
Returns
Returns AILIA_STATUS_SUCCESS if successful, otherwise returns error code.

◆ ailiaDestroyFeatureExtractor()

static void AiliaFeatureExtractor.ailiaDestroyFeatureExtractor ( IntPtr  fextractor)

Destroy feature extractor object.

Parameters
fextractorFfeature extractor object pointer

◆ ailiaFeatureExtractorCompute()

static int AiliaFeatureExtractor.ailiaFeatureExtractorCompute ( IntPtr  fextractor,
IntPtr  dst,
UInt32  dst_size,
IntPtr  src,
UInt32  src_stride,
UInt32  src_width,
UInt32  src_height,
UInt32  src_format 
)

Extract features.

Parameters
fextractorFeature extraction object pointer
dstPointer to feature storage (type numeric)
dst_sizeSize of dst (byte)
srcimage Data (32bpp)
src_strideNumber of bytes per line
src_widthImage width
src_heightImage height
src_formatImage format (AILIA_IMAGE_FORMAT_*)
Returns
Returns AILIA_STATUS_SUCCESS if successful, otherwise returns an error code.

◆ ailiaFeatureExtractorMatch()

static int AiliaFeatureExtractor.ailiaFeatureExtractorMatch ( IntPtr  fextractor,
ref float  distance,
UInt32  distace_type,
IntPtr  feature1,
UInt32  feature1_size,
IntPtr  feature2,
UInt32  feature2_size 
)

Calculate the distance between features.

Parameters
fextractorFeature extraction object pointer
distanceDistance between features
distance_typeType of distance between features
feature1Pointer to feature storage (type numeric)
feature1_sizeSize of dst (in bytes)
feature2Pointer to store features (type numeric)
feature2_sizeSize of dst (byte)
Returns
If successful, return AILIA_STATUS_SUCCESS, otherwise return error code.

Member Data Documentation

◆ AILIA_FEATURE_EXTRACTOR_DISTANCE_L2NORM

const Int32 AiliaFeatureExtractor.AILIA_FEATURE_EXTRACTOR_DISTANCE_L2NORM =(0)

L2-norm


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