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

Go to the source code of this file.

Functions

void * rf_processor_init (const char *model_path, rf_error_type *error)
 
void * rf_processor_init_from_buffer (uint8_t *buffer, int buffer_len, const char *json_params, rf_error_type *error)
 
void rf_processor_close (void *processor_handle, rf_error_type *error)
 
rf_object_type rf_processor_process_whole (void *processor_handle, void *image_handle, rf_object_type params, rf_error_type *error)
 
rf_object_type rf_processor_process (void *processor_handle, void *image_handle, rf_object_type params, int ymin, int xmin, int ymax, int xmax, rf_error_type *error)
 

Function Documentation

◆ rf_processor_close()

void rf_processor_close ( void *  processor_handle,
rf_error_type error 
)

Deletes processor.

Parameters
processor_handleprocessor handle
erroroutput parameter to return an error details

◆ rf_processor_init()

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

Initializes processor.

Parameters
model_pathpath to the model
erroroutput parameter to return an error details
Returns
processor handle

◆ rf_processor_init_from_buffer()

void* rf_processor_init_from_buffer ( uint8_t *  buffer,
int  buffer_len,
const char *  json_params,
rf_error_type error 
)

Initializes processor.

Parameters
buffermemory buffer that contains model's binary
buffer_lenlength of the buffer in bytes
json_paramsJSON encoded string with model's parameters
erroroutput parameter to return an error details
Returns
processor handle

◆ rf_processor_process()

rf_object_type rf_processor_process ( void *  processor_handle,
void *  image_handle,
rf_object_type  params,
int  ymin,
int  xmin,
int  ymax,
int  xmax,
rf_error_type error 
)

Classify an bounding box area in the image

Parameters
processor_handleclassifier handle
image_handleimage handle (use image API to create)
paramsmodel specific parameters
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
erroroutput parameter to return an error details
Returns
model's result

◆ rf_processor_process_whole()

rf_object_type rf_processor_process_whole ( void *  processor_handle,
void *  image_handle,
rf_object_type  params,
rf_error_type error 
)

Process whole image

Parameters
processor_handleclassifier handle
image_handleimage handle (use image API to create)
paramsmodel specific parameters
erroroutput parameter to return an error details
Returns
model's result