KanduAI SDK API
KanduAI SDK API

Processor

Processor description

Functions

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

Initializes processor.

Return

processor handle

Parameters
  • model_path: path to the model

  • error: output parameter to return an error details

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

Initializes processor.

Return

processor handle

Parameters
  • buffer: memory buffer that contains model’s binary

  • buffer_len: length of the buffer in bytes

  • json_params: JSON encoded string with model’s parameters

  • error: output parameter to return an error details

void rf_processor_close(void *processor_handle, rf_error_type *error)

Deletes processor.

Parameters
  • processor_handle: processor handle

  • error: output parameter to return an error details

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

Process whole image

Return

model’s result

Parameters
  • processor_handle: classifier handle

  • image_handle: image handle (use image API to create)

  • params: model specific parameters

  • error: output parameter to return an error details

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

Return

model’s result

Parameters
  • processor_handle: classifier handle

  • image_handle: image handle (use image API to create)

  • params: model specific parameters

  • ymin: the top y position of the bounding box where the object is located

  • xmin: the left x position of the bounding box where the object is located

  • ymax: the bottom y position of the bounding box where the object is located

  • xmax: the right x position of the bounding box where the object is located

  • error: output parameter to return an error details