ailia  1.4.0.0
Classes | Macros | Typedefs | Functions
ailia_classifier.h File Reference

object classification library More...

#include "ailia.h"
#include "ailia_format.h"
Include dependency graph for ailia_classifier.h:

Go to the source code of this file.

Classes

struct  _AILIAClassifierClass
 

Macros

#define AILIA_CLASSIFIER_CLASS_VERSION   (1)
 

Typedefs

typedef struct _AILIAClassifierClass AILIAClassifierClass
 

Functions

int AILIA_API ailiaCreateClassifier (struct AILIAClassifier **classifier, struct AILIANetwork *net, unsigned int format, unsigned int channel, unsigned int range)
 Creates a classifier instance. More...
 
void AILIA_API ailiaDestroyClassifier (struct AILIAClassifier *classifier)
 Destroys the classifier instance. More...
 
int AILIA_API ailiaClassifierCompute (struct AILIAClassifier *classifier, const void *src, unsigned int src_stride, unsigned int src_width, unsigned int src_height, unsigned int src_format, unsigned int max_class_count)
 Performs object classification. More...
 
int AILIA_API ailiaClassifierGetClassCount (struct AILIAClassifier *classifier, unsigned int *cls_count)
 Gets the number of classification results. More...
 
int AILIA_API ailiaClassifierGetClass (struct AILIAClassifier *classifier, AILIAClassifierClass *obj, unsigned int cls_idx, unsigned int version)
 Gets the classification results. More...
 

Detailed Description

object classification library

Date
2021/07/28

Macro Definition Documentation

◆ AILIA_CLASSIFIER_CLASS_VERSION

#define AILIA_CLASSIFIER_CLASS_VERSION   (1)

Typedef Documentation

◆ AILIAClassifierClass

Function Documentation

◆ ailiaClassifierCompute()

int AILIA_API ailiaClassifierCompute ( struct AILIAClassifier *  classifier,
const void *  src,
unsigned int  src_stride,
unsigned int  src_width,
unsigned int  src_height,
unsigned int  src_format,
unsigned int  max_class_count 
)

Performs object classification.

Parameters
classifierA classifier instance pointer
srcImage data (32 bpp)
src_strideThe number of bytes in 1 line
src_widthImage width
src_heightImage height
src_formatImage format (AILIA_IMAGE_FORMAT_*)
max_class_countThe maximum number of classification results
Returns
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.

◆ ailiaClassifierGetClass()

int AILIA_API ailiaClassifierGetClass ( struct AILIAClassifier *  classifier,
AILIAClassifierClass obj,
unsigned int  cls_idx,
unsigned int  version 
)

Gets the classification results.

Parameters
classifierA classifier instance pointer
clsClass information
cls_idxClass index
versionAILIA_CLASSIFIER_CLASS_VERSION
Returns
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.

If ailiaClassifierCompute() is not run at all, the function returns AILIA_STATUS_INVALID_STATE . The classification results are sorted in the order of estimated probability.

◆ ailiaClassifierGetClassCount()

int AILIA_API ailiaClassifierGetClassCount ( struct AILIAClassifier *  classifier,
unsigned int *  cls_count 
)

Gets the number of classification results.

Parameters
classifierA classifier instance pointer
cls_countThe number of classes
Returns
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.

◆ ailiaCreateClassifier()

int AILIA_API ailiaCreateClassifier ( struct AILIAClassifier **  classifier,
struct AILIANetwork *  net,
unsigned int  format,
unsigned int  channel,
unsigned int  range 
)

Creates a classifier instance.

Parameters
classifierA pointer to a classifier instance pointer
netA network instance pointer
formatThe network image format (AILIA_NETWORK_IMAGE_FORMAT_*)
channelThe network image channel (AILIA_NETWORK_IMAGE_CHANNEL_*)
rangeThe network image range (AILIA_NETWORK_IMAGE_RANGE_*)
Returns
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.

◆ ailiaDestroyClassifier()

void AILIA_API ailiaDestroyClassifier ( struct AILIAClassifier *  classifier)

Destroys the classifier instance.

Parameters
classifierA classifier instance pointer