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 modelerror: 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 binarybuffer_len: length of the buffer in bytesjson_params: JSON encoded string with model’s parameterserror: output parameter to return an error details
-
void
rf_processor_close(void *processor_handle, rf_error_type *error)¶ Deletes processor.
- Parameters
processor_handle: processor handleerror: 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 handleimage_handle: image handle (use image API to create)params: model specific parameterserror: 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 handleimage_handle: image handle (use image API to create)params: model specific parametersymin: the top y position of the bounding box where the object is locatedxmin: the left x position of the bounding box where the object is locatedymax: the bottom y position of the bounding box where the object is locatedxmax: the right x position of the bounding box where the object is locatederror: output parameter to return an error details