KanduAI SDK  1.1
Functions
classification_c_api.h File Reference
#include "api_types.h"

Go to the source code of this file.

Functions

void * rf_classifier_init (const char *model_path, rf_error_type *error)
 
void rf_classifier_close (void *classifier_handle, rf_error_type *error)
 
void rf_classifier_classify_whole (void *classifier_handle, void *image_handle, int *out_class_id, float *out_confidence, int *top_k, rf_error_type *error)
 
void rf_classifier_classify (void *classifier_handle, void *image_handle, int ymin, int xmin, int ymax, int xmax, int *out_class_id, float *out_confidence, int *top_k, rf_error_type *error)
 

Function Documentation

◆ rf_classifier_classify()

void rf_classifier_classify ( void *  classifier_handle,
void *  image_handle,
int  ymin,
int  xmin,
int  ymax,
int  xmax,
int *  out_class_id,
float *  out_confidence,
int *  top_k,
rf_error_type error 
)

Classify an bounding box area in the image

Parameters
classifier_handleclassifier handle
image_handleimage handle (use image API to create)
yminthe top y position of the bounding box where the object is located
xminthe left x position of the bounding box where the object is located
ymaxthe bottom y position of the bounding box where the object is located
xmaxthe right x position of the bounding box where the object is located
out_class_idoutput parameter that returns a list of class ids (should be preallocated to at least *top_k size)
out_confidenceoutput parameter that returns a corresponding list of confidences (should be preallocated to at least *top_k size)
top_kinput/output parameter which indicates the k top classes and confidences to return, on the output holds the value of the actual len of out_class_id and out_confidence
erroroutput parameter to return an error details

◆ rf_classifier_classify_whole()

void rf_classifier_classify_whole ( void *  classifier_handle,
void *  image_handle,
int *  out_class_id,
float *  out_confidence,
int *  top_k,
rf_error_type error 
)

Classify whole image

Parameters
classifier_handleclassifier handle
image_handleimage handle (use image API to create)
out_class_idoutput parameter that returns a list of class ids (should be preallocated to at least *top_k size)
out_confidenceoutput parameter that returns a corresponding list of confidences (should be preallocated to at least *top_k size)
top_kinput/output parameter which indicates the k top classes and confidences to return, on the output holds the value of the actual len of out_class_id and out_confidence
erroroutput parameter to return an error details

◆ rf_classifier_close()

void rf_classifier_close ( void *  classifier_handle,
rf_error_type error 
)

Deletes classifier.

Parameters
classifier_handleclassifier handle
erroroutput parameter to return an error details

◆ rf_classifier_init()

void* rf_classifier_init ( const char *  model_path,
rf_error_type error 
)

Initializes classifier.

Parameters
model_pathpath to the "classification" model
erroroutput parameter to return an error details
Returns
classifier handle