Tizen Native API
5.0
|
Flat Image recognition and tracking;
Flat image features extraction.
#include <mv_image.h>
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Media Vision Image contains mv_image_recognize() function to recognize images on mv_source_h, and mv_image_recognized_cb callback to process recognition result. Module also contains mv_image_track() which performs tracking of image on sequence of mv_source_h handles (by using method for each mv_source_h) and callback mv_image_tracked_cb to process tracking result. In order to perform general functionality, module contains mv_image_object_h and mv_image_tracking_model_h handles. Image object should be created with mv_image_object_create() and destroyed with mv_image_object_destroy(). mv_image_object_h can be constructed by calling mv_image_object_fill() using image wrapped with mv_source_h. Object can be cloned with mv_image_object_clone(), saved to the file with mv_image_object_save() and loaded from file with mv_image_object_load(). Image object can be evaluated with mv_image_object_get_recognition_rate(). Tracking model should be created with mv_image_tracking_model_create() and destroyed with mv_image_tracking_model_destroy(). Tracking model should be based on image object which will be tracked. Use mv_image_tracking_model_set_target() to assign mv_image_object_h to the corresponding mv_image_tracking_model_h. It can be cloned with mv_image_tracking_model_clone(), saved to the file with mv_image_tracking_model_save() and loaded from file with mv_image_tracking_model_load().
Functions | |
int | mv_image_recognize (mv_source_h source, const mv_image_object_h *image_objects, int number_of_objects, mv_engine_config_h engine_cfg, mv_image_recognized_cb recognized_cb, void *user_data) |
Recognizes the given image objects on the source image. | |
int | mv_image_track (mv_source_h source, mv_image_tracking_model_h image_tracking_model, mv_engine_config_h engine_cfg, mv_image_tracked_cb tracked_cb, void *user_data) |
Tracks the given image tracking model on the current frame. | |
int | mv_image_object_create (mv_image_object_h *image_object) |
Creates an image object. | |
int | mv_image_object_destroy (mv_image_object_h image_object) |
Destroys the image object. | |
int | mv_image_object_fill (mv_image_object_h image_object, mv_engine_config_h engine_cfg, mv_source_h source, mv_rectangle_s *location) |
Fills the image object. | |
int | mv_image_object_get_recognition_rate (mv_image_object_h image_object, double *recognition_rate) |
Gets a value that determines how well an image object can be recognized. | |
int | mv_image_object_set_label (mv_image_object_h image_object, int label) |
Sets a label for the image object. | |
int | mv_image_object_get_label (mv_image_object_h image_object, int *label) |
Gets a label of image object. | |
int | mv_image_object_clone (mv_image_object_h src, mv_image_object_h *dst) |
Clones the image object. | |
int | mv_image_object_save (const char *file_name, mv_image_object_h image_object) |
Saves the image object. | |
int | mv_image_object_load (const char *file_name, mv_image_object_h *image_object) |
Loads an image object from the file. | |
int | mv_image_tracking_model_create (mv_image_tracking_model_h *image_tracking_model) |
Creates an image tracking model. | |
int | mv_image_tracking_model_set_target (mv_image_object_h image_object, mv_image_tracking_model_h image_tracking_model) |
Sets target of image tracking model. | |
int | mv_image_tracking_model_destroy (mv_image_tracking_model_h image_tracking_model) |
Destroys the image tracking model. | |
int | mv_image_tracking_model_refresh (mv_image_tracking_model_h image_tracking_model, mv_engine_config_h engine_cfg) |
Refreshes the state of image tracking model. | |
int | mv_image_tracking_model_clone (mv_image_tracking_model_h src, mv_image_tracking_model_h *dst) |
Clones the image tracking model. | |
int | mv_image_tracking_model_save (const char *file_name, mv_image_tracking_model_h image_tracking_model) |
Saves the image tracking model. | |
int | mv_image_tracking_model_load (const char *file_name, mv_image_tracking_model_h *image_tracking_model) |
Loads an image tracking model from the file. | |
Typedefs | |
typedef void(* | mv_image_recognized_cb )(mv_source_h source, mv_engine_config_h engine_cfg, const mv_image_object_h *image_objects, mv_quadrangle_s **locations, unsigned int number_of_objects, void *user_data) |
Called when image recognition results are received from mv_image_recognize() | |
typedef void(* | mv_image_tracked_cb )(mv_source_h source, mv_image_tracking_model_h image_tracking_model, mv_engine_config_h engine_cfg, mv_quadrangle_s *location, void *user_data) |
Called when image tracking result received from mv_image_track() | |
typedef void * | mv_image_object_h |
The image object's type handle. | |
typedef void * | mv_image_tracking_model_h |
The image tracking model's type handle. | |
Defines | |
#define | MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR" |
Defines MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR to set the image to be recognized scale factor attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM" |
Defines MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM to set the maximum keypoints should be detected on the image attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR "MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR" |
Defines MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR to set the scene scale factor attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM "MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM" |
Defines MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM to set the maximum keypoints should be detected on the scene attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_MIN_MATCH_NUM "MV_IMAGE_RECOGNITION_MIN_MATCH_NUM" |
Defines MV_IMAGE_RECOGNITION_MIN_MATCH_NUM to set the minimum number of keypoints matches required for recognition attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_REQ_MATCH_PART "MV_IMAGE_RECOGNITION_REQ_MATCH_PART" |
Defines MV_IMAGE_RECOGNITION_REQ_MATCH_PART to set the required matching part for the image recognition attribute of the engine configuration. | |
#define | MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR "MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR" |
Defines MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR to set the part matching error for the image recognition attribute of the engine configuration. | |
#define | MV_IMAGE_TRACKING_HISTORY_AMOUNT "MV_IMAGE_TRACKING_HISTORY_AMOUNT" |
Defines MV_IMAGE_TRACKING_HISTORY_AMOUNT to set the number of recognition results in the tracking history attribute of the engine configuration. | |
#define | MV_IMAGE_TRACKING_EXPECTED_OFFSET "MV_IMAGE_TRACKING_EXPECTED_OFFSET" |
Defines MV_IMAGE_TRACKING_EXPECTED_OFFSET to set the expected tracking offset attribute of the engine configuration. | |
#define | MV_IMAGE_TRACKING_USE_STABLIZATION "MV_IMAGE_TRACKING_USE_STABLIZATION" |
Defines MV_IMAGE_TRACKING_USE_STABLIZATION to enable the contour stabilization during tracking process. Default value is true. | |
#define | MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT "MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT" |
Defines MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT to set the relative tolerant shift for the tracking stabilization attribute of the engine configuration. | |
#define | MV_IMAGE_TRACKING_STABLIZATION_SPEED "MV_IMAGE_TRACKING_STABLIZATION_SPEED" |
Defines MV_IMAGE_TRACKING_STABLIZATION_SPEED to set the speed of the tracking stabilization attribute of the engine configuration. | |
#define | MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION "MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION" |
Defines MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION to set the acceleration of the tracking stabilization attribute of the engine configuration. |
#define MV_IMAGE_RECOGNITION_MIN_MATCH_NUM "MV_IMAGE_RECOGNITION_MIN_MATCH_NUM" |
Defines MV_IMAGE_RECOGNITION_MIN_MATCH_NUM to set the minimum number of keypoints matches required for recognition attribute of the engine configuration.
The minimal number of keypoints should be matched between an image and a scene. It will be taken into account for image objects recognition. Value is unsigned integer and the default is 30
#define MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM "MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM" |
Defines MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM to set the maximum keypoints should be detected on the image attribute of the engine configuration.
The maximal number of keypoints can be selected on the image object to calculate descriptors. This keypoints will be used for image (object) recognition and has to be specified as integer number and the default is 1000
#define MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR "MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR" |
Defines MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR to set the image to be recognized scale factor attribute of the engine configuration.
The value of the factor will be used for resizing of the images (objects) for recognition. Scale factor is the double value and the default is 1.2
#define MV_IMAGE_RECOGNITION_REQ_MATCH_PART "MV_IMAGE_RECOGNITION_REQ_MATCH_PART" |
Defines MV_IMAGE_RECOGNITION_REQ_MATCH_PART to set the required matching part for the image recognition attribute of the engine configuration.
To recognize occluded or hidden an image by other images, required relative part of the matches in respect to the total amount of matching keypoints required for image recognition. Too low value will result in unsustainable behavior, but effect of object overlapping will be reduced. Value can be from 0 to 1 and the default is 0.05
#define MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM "MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM" |
Defines MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM to set the maximum keypoints should be detected on the scene attribute of the engine configuration.
The maximal number of keypoints can be selected on the scene including the images (objects) to calculate descriptors. This keypoints will be used for image recognition and has to be specified as unsigned integer and the default is 5000
#define MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR "MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR" |
Defines MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR to set the scene scale factor attribute of the engine configuration.
The value of the factor will be used for resizing of the scene including the images (objects) for recognition. Scale factor is the double value and the default is 1.2
#define MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR "MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR" |
Defines MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR to set the part matching error for the image recognition attribute of the engine configuration.
Allowable error of matches number. Value can be from 0 to 1 and the default is 0.1
#define MV_IMAGE_TRACKING_EXPECTED_OFFSET "MV_IMAGE_TRACKING_EXPECTED_OFFSET" |
Defines MV_IMAGE_TRACKING_EXPECTED_OFFSET to set the expected tracking offset attribute of the engine configuration.
Relative offset value, for which the object offset is expected (relative to the object size in the current frame). Value is a double and the default is 0
#define MV_IMAGE_TRACKING_HISTORY_AMOUNT "MV_IMAGE_TRACKING_HISTORY_AMOUNT" |
Defines MV_IMAGE_TRACKING_HISTORY_AMOUNT to set the number of recognition results in the tracking history attribute of the engine configuration.
Number of previous recognition results, which will influence the stabilization. Value is unsigned integer and the default is 3
#define MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION "MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION" |
Defines MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION to set the acceleration of the tracking stabilization attribute of the engine configuration.
Acceleration will be used for image stabilization (relative to the distance from current location to stabilized location). Value is double from 0 to 1 and the default is 0.1
#define MV_IMAGE_TRACKING_STABLIZATION_SPEED "MV_IMAGE_TRACKING_STABLIZATION_SPEED" |
Defines MV_IMAGE_TRACKING_STABLIZATION_SPEED to set the speed of the tracking stabilization attribute of the engine configuration.
Start speed will be used for image stabilization. Value is a double and the default is 0.3
#define MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT "MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT" |
Defines MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT to set the relative tolerant shift for the tracking stabilization attribute of the engine configuration.
It is component of tolerant shift which will be ignored by stabilization process. (this value is relative to the object size in the current frame). Tolerant shift will be computed like R * S + C, where R - value set to MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT, S - area of object location on frame, C - constant value equal 1.3. Value is a double
#define MV_IMAGE_TRACKING_USE_STABLIZATION "MV_IMAGE_TRACKING_USE_STABLIZATION" |
Defines MV_IMAGE_TRACKING_USE_STABLIZATION to enable the contour stabilization during tracking process. Default value is true.
typedef void* mv_image_object_h |
The image object's type handle.
typedef void(* mv_image_recognized_cb)(mv_source_h source, mv_engine_config_h engine_cfg, const mv_image_object_h *image_objects, mv_quadrangle_s **locations, unsigned int number_of_objects, void *user_data) |
Called when image recognition results are received from mv_image_recognize()
This type of callback will be called after mv_image_recognize() in order to process recognition result.
[in] | source | The handle to the source image on which the recognition was carried out |
[in] | engine_cfg | The handle to the configuration of engine that was used for image recognition, or NULL if default settings were applied |
[in] | image_objects | The set of handles to the image objects which have been processed as targets of recognition |
[in] | locations | The locations of image objects on the source image. This array corresponding to an array of image objects and each element contains a location of corresponding object on the source image or NULL if object is not recognized |
[in] | number_of_objects | The number of image objects and corresponding locations |
[in] | user_data | The user data passed from the mv_image_recognize() function |
typedef void(* mv_image_tracked_cb)(mv_source_h source, mv_image_tracking_model_h image_tracking_model, mv_engine_config_h engine_cfg, mv_quadrangle_s *location, void *user_data) |
Called when image tracking result received from mv_image_track()
Image tracking on a sequence of frames assumes calling mv_image_track() function for each frame in the correct order. This type of callback will be called after each mv_image_track() call for processing result data.
[in] | source | The handle to the source image on which the tracking was carried out |
[in] | image_tracking_model | The handle to the image tracking model which processed as target of tracking |
[in] | engine_cfg | The handle to the configuration of engine that was used to image tracking, or NULL if default settings were applied |
[in] | location | The image object location on the source image or NULL if objects is not tracked |
[in] | user_data | The user data passed from the mv_image_track() function |
typedef void* mv_image_tracking_model_h |
The image tracking model's type handle.
int mv_image_object_clone | ( | mv_image_object_h | src, |
mv_image_object_h * | dst | ||
) |
Clones the image object.
[in] | src | The handle to the source image object |
[out] | dst | The handle to the destination image object |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
MEDIA_VISION_ERROR_OUT_OF_MEMORY | Out of memory |
int mv_image_object_create | ( | mv_image_object_h * | image_object | ) |
Creates an image object.
[out] | image_object | A new handle to the image object |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
MEDIA_VISION_ERROR_OUT_OF_MEMORY | Out of memory |
int mv_image_object_destroy | ( | mv_image_object_h | image_object | ) |
Destroys the image object.
[in] | image_object | The handle to the image object to be destroyed |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_fill | ( | mv_image_object_h | image_object, |
mv_engine_config_h | engine_cfg, | ||
mv_source_h | source, | ||
mv_rectangle_s * | location | ||
) |
Fills the image object.
Extracts data from source image which will be needed for recognition of depicted object in location.
[in,out] | image_object | The handle to the image object which will be filled and can be recognized in future |
[in] | engine_cfg | The handle to the configuration of engine which will be used for extract recognition data from source. If NULL, then default settings will be used. |
[in] | source | The source image where image object is depicted |
[in] | location | The pointer to location of the image object on the source image, or NULL if the object is shown in full |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT | Source colorspace isn't supported |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_get_label | ( | mv_image_object_h | image_object, |
int * | label | ||
) |
Gets a label of image object.
[in] | image_object | The handle to the image object from which a label will be received |
[out] | label | The label of image object |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NO_DATA | Image object hasn't label |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_get_recognition_rate | ( | mv_image_object_h | image_object, |
double * | recognition_rate | ||
) |
Gets a value that determines how well an image object can be recognized.
Recognition rate determines how well an image object can be recognized. This value can be from 0 to 1. If the recognition rate is 0 object can not be recognized and the bigger it is the more likely to recognize the object.
[in] | image_object | The handle to the image object which will be evaluated by this function |
[out] | recognition_rate | A value that determines how well an image object can be recognized, if 0 then object can not be recognized |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_load | ( | const char * | file_name, |
mv_image_object_h * | image_object | ||
) |
Loads an image object from the file.
[in] | file_name | Name of path/file to load the image object |
[out] | image_object | The handle to the image object which will be filled |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_INVALID_PATH | Invalid path |
MEDIA_VISION_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_VISION_ERROR_PERMISSION_DENIED | Not permitted |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_save | ( | const char * | file_name, |
mv_image_object_h | image_object | ||
) |
Saves the image object.
[in] | file_name | Name of the file to path/save the image object |
[in] | image_object | The handle to the image object which will be saved |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_INVALID_PATH | Invalid path |
MEDIA_VISION_ERROR_PERMISSION_DENIED | Not permitted |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_object_set_label | ( | mv_image_object_h | image_object, |
int | label | ||
) |
Sets a label for the image object.
[in] | image_object | The handle to the image object for which the label will be assigned |
[in] | label | The label which will be assigned to the image object |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_recognize | ( | mv_source_h | source, |
const mv_image_object_h * | image_objects, | ||
int | number_of_objects, | ||
mv_engine_config_h | engine_cfg, | ||
mv_image_recognized_cb | recognized_cb, | ||
void * | user_data | ||
) |
Recognizes the given image objects on the source image.
Use this function to launch image recognition algorithm configured by engine_conf configuration.
[in] | source | The handle to the source image on which image objects will be recognized |
[in] | image_objects | The set of handles to the image objects which will be processed as targets of recognition |
[in] | number_of_objects | The number of image objects |
[in] | engine_cfg | The handle to the configuration of engine which will be used for recognition. If NULL, then default settings will be used. |
[in] | recognized_cb | The callback which will be called in order to process recognition result |
[in] | user_data | The user data to be passed to the recognized_cb |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT | Source colorspace isn't supported |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_track | ( | mv_source_h | source, |
mv_image_tracking_model_h | image_tracking_model, | ||
mv_engine_config_h | engine_cfg, | ||
mv_image_tracked_cb | tracked_cb, | ||
void * | user_data | ||
) |
Tracks the given image tracking model on the current frame.
Image tracking on a sequence of frames assumes calling this function for each frame in the correct order. tracked_cb will be called for result processing.
[in] | source | The handle to the current image of sequence where image tracking model will be tracked |
[in,out] | image_tracking_model | The handle to the image tracking model which processed as target of tracking |
[in] | engine_cfg | The handle to the configuration of engine which will be used for tracking. If NULL, then default settings will be used. |
[in] | tracked_cb | The callback which will receive tracking results |
[in] | user_data | The user data to be passed to the tracked_cb |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT | Source colorspace isn't supported |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_clone | ( | mv_image_tracking_model_h | src, |
mv_image_tracking_model_h * | dst | ||
) |
Clones the image tracking model.
[in] | src | The handle to the source image tracking model |
[out] | dst | The handle to the destination image tracking model |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
MEDIA_VISION_ERROR_OUT_OF_MEMORY | Out of memory |
int mv_image_tracking_model_create | ( | mv_image_tracking_model_h * | image_tracking_model | ) |
Creates an image tracking model.
[out] | image_tracking_model | A new handle to the image tracking model |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_destroy | ( | mv_image_tracking_model_h | image_tracking_model | ) |
Destroys the image tracking model.
[in] | image_tracking_model | The handle to the image tracking model to be destroyed |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_load | ( | const char * | file_name, |
mv_image_tracking_model_h * | image_tracking_model | ||
) |
Loads an image tracking model from the file.
[in] | file_name | Name of path/file to load model |
[out] | image_tracking_model | The handle to the image tracking model to be filled |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_INVALID_PATH | Invalid path |
MEDIA_VISION_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_VISION_ERROR_PERMISSION_DENIED | Not permitted |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_refresh | ( | mv_image_tracking_model_h | image_tracking_model, |
mv_engine_config_h | engine_cfg | ||
) |
Refreshes the state of image tracking model.
Clears moving history and change state to undetected. This function is usually called each time before tracking is started for the new sequence of sources which is not the direct continuation of the sequence for which tracking has been performed before. Tracking algorithm will try to find image by itself.
[in] | image_tracking_model | The handle to the image tracking model which will be refreshed |
[in] | engine_cfg | The handle to the configuration of engine which will be used. If NULL, then default settings will be used. |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_save | ( | const char * | file_name, |
mv_image_tracking_model_h | image_tracking_model | ||
) |
Saves the image tracking model.
[in] | file_name | Name of path/file to save the model |
[in] | image_tracking_model | The handle to the image tracking model to be saved |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_INVALID_PATH | Invalid path |
MEDIA_VISION_ERROR_PERMISSION_DENIED | Not permitted |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |
int mv_image_tracking_model_set_target | ( | mv_image_object_h | image_object, |
mv_image_tracking_model_h | image_tracking_model | ||
) |
Sets target of image tracking model.
Sets image object which will be tracked by using tracking functionality with image_tracking_model.
[in] | image_object | Image object which will be set as target for tracking |
[in] | image_tracking_model | Handle to the image tracking model for which will be set a new target |
0
on success, otherwise a negative error value MEDIA_VISION_ERROR_NONE | Successful |
MEDIA_VISION_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_VISION_ERROR_NOT_SUPPORTED | Not supported |