ailia
1.5.0.0
|
AILIA feature extraction library. More...
Go to the source code of this file.
Macros | |
#define | AILIA_FEATURE_EXTRACTOR_DISTANCE_L2NORM (0) |
L2 norm. More... | |
Functions | |
int AILIA_API | ailiaCreateFeatureExtractor (struct AILIAFeatureExtractor **fextractor, struct AILIANetwork *net, unsigned int format, unsigned int channel, unsigned int range, const char *layer_name) |
Creates a feature extraction instance. More... | |
void AILIA_API | ailiaDestroyFeatureExtractor (struct AILIAFeatureExtractor *fextractor) |
It destroys the feature extraction instance. More... | |
int AILIA_API | ailiaFeatureExtractorCompute (struct AILIAFeatureExtractor *fextractor, void *dst, unsigned int dst_size, const void *src, unsigned int src_stride, unsigned int src_width, unsigned int src_height, unsigned int src_format) |
Performs feature extraction. More... | |
int AILIA_API | ailiaFeatureExtractorMatch (struct AILIAFeatureExtractor *fextractor, float *distance, unsigned int distance_type, const void *feature1, unsigned int feature1_size, const void *feature2, unsigned int feature2_size) |
Computes distances in feature space. More... | |
AILIA feature extraction library.
#define AILIA_FEATURE_EXTRACTOR_DISTANCE_L2NORM (0) |
L2 norm.
int AILIA_API ailiaCreateFeatureExtractor | ( | struct AILIAFeatureExtractor ** | fextractor, |
struct AILIANetwork * | net, | ||
unsigned int | format, | ||
unsigned int | channel, | ||
unsigned int | range, | ||
const char * | layer_name | ||
) |
Creates a feature extraction instance.
fextractor | A feature extraction instance pointer |
net | A network instance pointer |
format | The network image format (AILIA_NETWORK_IMAGE_FORMAT_*) |
channel | The network image channel (AILIA_NETWORK_IMAGE_CHANNEL_*) |
range | The network image range (AILIA_NETWORK_IMAGE_RANGE_*) |
layer_name | The name of the layer corresponding to the feature (fc1 for VGG16 and NULL for the last layer) |
void AILIA_API ailiaDestroyFeatureExtractor | ( | struct AILIAFeatureExtractor * | fextractor | ) |
It destroys the feature extraction instance.
fextractor | A feature extraction instance pointer |
int AILIA_API ailiaFeatureExtractorCompute | ( | struct AILIAFeatureExtractor * | fextractor, |
void * | dst, | ||
unsigned int | dst_size, | ||
const void * | src, | ||
unsigned int | src_stride, | ||
unsigned int | src_width, | ||
unsigned int | src_height, | ||
unsigned int | src_format | ||
) |
Performs feature extraction.
fextractor | A feature extraction instance pointer |
dst | A pointer to the storage location of the feature (numeric type) |
dst_size | The size of the dst (bytes) |
src | Image data (32 bpp) |
src_stride | The number of bytes in 1 line |
src_width | Image width |
src_height | Image height |
src_format | Image format (AILIA_IMAGE_FORMAT_*) |
int AILIA_API ailiaFeatureExtractorMatch | ( | struct AILIAFeatureExtractor * | fextractor, |
float * | distance, | ||
unsigned int | distance_type, | ||
const void * | feature1, | ||
unsigned int | feature1_size, | ||
const void * | feature2, | ||
unsigned int | feature2_size | ||
) |
Computes distances in feature space.
fextractor | A feature extraction instance pointer |
distance | A distance in feature space |
distance_type | The type of the distance in feature space |
feature1 | A pointer to the storage location of one feature (numeric type) |
feature1_size | The size of the feature1 (bytes) |
feature2 | A pointer to the storage location of the other feature (numeric type) |
feature2_size | The size of the feature2 (bytes) |