Tizen Native API
7.0
|
Event types supported by the Surveillance module.
Defines | |
#define | MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED "MV_SURVEILLANCE_EVENT_MOVEMENT_DETECTED" |
Name of the movement detection event type. | |
#define | MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS "NUMBER_OF_MOVEMENT_REGIONS" |
Name of the event result value that contains number of regions where movement was detected. | |
#define | MV_SURVEILLANCE_MOVEMENT_REGIONS "MOVEMENT_REGIONS" |
Name of the event result value that contains rectangular regions where movement was detected. | |
#define | MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED "MV_SURVEILLANCE_EVENT_PERSON_APPEARED_DISAPEARED" |
Name of the person appearance/disappearance event type. | |
#define | MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER "NUMBER_OF_APPEARED_PERSONS" |
Name of the event result value that contains number of persons that have been appeared. | |
#define | MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER "NUMBER_OF_DISAPPEARED_PERSONS" |
Name of the event result value that contains number of persons that have been disappeared. | |
#define | MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER "NUMBER_OF_TRACKED_PERSONS" |
Name of the event result value that contains number of persons that have been tracked. | |
#define | MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS "APPEARED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where appearances of the persons were detected. | |
#define | MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS "DISAPPEARED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where disappearances of the persons were detected. | |
#define | MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS "TRACKED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where persons were tracked. | |
#define | MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED "MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED" |
Name of the person recognition event type. | |
#define | MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER "NUMBER_OF_PERSONS" |
Name of the event result value that contains number of locations where faces were recognized. | |
#define | MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS "PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where person faces were recognized. | |
#define | MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS "PERSONS_LABELS" |
Name of the event result value that contains a set of labels that correspond to the recognized persons. | |
#define | MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES "PERSONS_CONFIDENCES" |
Name of the event result value that contains a set of confidence values that correspond to the recognized persons. |
Define Documentation
#define MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED "MV_SURVEILLANCE_EVENT_MOVEMENT_DETECTED" |
Name of the movement detection event type.
This is common event for a movement detection. When this event occurs mv_surveillance_result_h allowed from callback can be used to get number of regions where movement has been detected and their positions. Out parameters (can be accessed in the mv_surveillance_event_occurred_cb() callback using mv_surveillance_get_result_value() function): * MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS - the number of regions where movement has been detected;
* MV_SURVEILLANCE_MOVEMENT_REGIONS - the set of rectangular regions where movement has been detected.
- Since :
- 3.0
#define MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED "MV_SURVEILLANCE_EVENT_PERSON_APPEARED_DISAPEARED" |
Name of the person appearance/disappearance event type.
This is common event for a person appearing (disappearing). The result will be: * a number of persons, which were appeared and their positions;
* a number of persons, which were tracked and their positions;
* a number of persons, which were disappeared and their last positions.
For the first time when a source is loaded, a result should contain all detected persons (detection will be made using face detection API). Next time when the source should be loaded, the previously detected persons will be tracked and new persons will be detected. For the previously detected persons their locations will be updated. Out parameters (can be accessed in the mv_surveillance_event_occurred_cb() callback using mv_surveillance_get_result_value() function): * MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER - the number of persons which were appeared;
* MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS - the locations of persons which were appeared;
* MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER - the number of persons which were tracked;
* MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS - the locations of persons which were tracked;
* MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER - the number of persons which were disappeared;
* MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS - the locations of persons which were disappeared.
- Since :
- 3.0
#define MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED "MV_SURVEILLANCE_EVENT_PERSON_RECOGNIZED" |
Name of the person recognition event type.
This is common event for a person recognizing. The result will be a number of persons, which were recognized, their positions (face locations), labels and confidences of the recognition models (see documentation for mv_face_recognize() in Media Vision Face). When one subscribes to this event, the engine configuration must be filled by path to the saved face recognition model. These path should be set using mv_engine_config_set_string_attribute() as attribute named MV_SURVEILLANCE_FACE_RECOGNITION_MODEL_FILE_PATH. See documentation for face recognition in Media Vision Face and for engine configuration in Media Vision Common for details. Out parameters (can be accessed in the mv_surveillance_event_occurred_cb() callback using mv_surveillance_get_result_value() function): * MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER - the number of persons which were recognized;
* MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS - the locations of persons which were recognized;
* MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS - the labels of persons which were recognized;
* MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES - the confidences values that persons were recognized correctly.
- Since :
- 3.0
#define MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS "NUMBER_OF_MOVEMENT_REGIONS" |
Name of the event result value that contains number of regions where movement was detected.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED type activation. Result value is of size_t
type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED, 255)) { size_t move_regions_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS, &move_regions_num); if (MEDIA_VISION_ERROR_NONE != err) return; // Do something with number of regions where movement // was detected... } }
- Since :
- 3.0
#define MV_SURVEILLANCE_MOVEMENT_REGIONS "MOVEMENT_REGIONS" |
Name of the event result value that contains rectangular regions where movement was detected.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED type activation. Result value is of mv_rectangle_s array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_MOVEMENT_DETECTED, 255)) { size_t move_regions_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_MOVEMENT_NUMBER_OF_REGIONS, &move_regions_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == move_regions_num) return; mv_rectangle_s *regions = (mv_rectangle_s*) malloc(sizeof(mv_rectangle_s) * move_regions_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_MOVEMENT_REGIONS, regions); // Do something with movement regions... free (regions); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS "APPEARED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where appearances of the persons were detected.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of mv_rectangle_s array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t appear_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER, &appear_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == appear_person_num) return; mv_rectangle_s *appear_locations = (mv_rectangle_s*) malloc(sizeof(mv_rectangle_s) * appear_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_APPEARED_LOCATIONS, appear_locations); // Do something with locations where persons were // appeared... free (appear_locations); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER "NUMBER_OF_APPEARED_PERSONS" |
Name of the event result value that contains number of persons that have been appeared.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of size_t
type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t appear_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_APPEARED_NUMBER, &appear_person_num); if (MEDIA_VISION_ERROR_NONE != err) return; // Do something with number of appeared persons... } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS "DISAPPEARED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where disappearances of the persons were detected.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of mv_rectangle_s array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t disappear_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER, &disappear_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == disappear_person_num) return; mv_rectangle_s *disappear_locations = (mv_rectangle_s*) malloc(sizeof(mv_rectangle_s) * disappear_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_DISAPPEARED_LOCATIONS, disappear_locations); // Do something with locations where persons were // disappeared... free (disappear_locations); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER "NUMBER_OF_DISAPPEARED_PERSONS" |
Name of the event result value that contains number of persons that have been disappeared.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of size_t
type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t disappear_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_DISAPPEARED_NUMBER, &disappear_person_num); if (MEDIA_VISION_ERROR_NONE != err) return; // Do something with number of disappeared persons... } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES "PERSONS_CONFIDENCES" |
Name of the event result value that contains a set of confidence values that correspond to the recognized persons.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED type activation. Result value is of doubles array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED, 255)) { size_t rec_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER, &rec_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == rec_person_num) return; double *confidences = (double*)malloc(sizeof(double) * rec_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_CONFIDENCES, confidences); // Do something with confidences... free (confidences); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS "PERSONS_LABELS" |
Name of the event result value that contains a set of labels that correspond to the recognized persons.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED type activation. Result value is of integers array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED, 255)) { size_t rec_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER, &rec_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == rec_person_num) return; int *labels = (int*)malloc(sizeof(int) * rec_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_LABELS, labels); // Do something with labels... free (labels); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS "PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where person faces were recognized.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED type activation. Result value is of mv_rectangle_s array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED, 255)) { size_t rec_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER, &rec_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == rec_person_num) return; mv_rectangle_s *locations = (mv_rectangle_s*) malloc(sizeof(mv_rectangle_s) * rec_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_LOCATIONS, locations); // Do something with locations... free (locations); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER "NUMBER_OF_PERSONS" |
Name of the event result value that contains number of locations where faces were recognized.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED type activation. Result value is of size_t
type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_RECOGNIZED, 255)) { size_t rec_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_RECOGNIZED_NUMBER, &rec_person_num); if (MEDIA_VISION_ERROR_NONE != err) return; // Do something with number of recognized persons... } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS "TRACKED_PERSONS_LOCATIONS" |
Name of the event result value that contains a set of rectangular locations where persons were tracked.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of mv_rectangle_s array type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t tracked_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER, &tracked_person_num); if (MEDIA_VISION_ERROR_NONE != err || 0 == tracked_person_num) return; mv_rectangle_s *track_locations = (mv_rectangle_s*) malloc(sizeof(mv_rectangle_s) * tracked_person_num); err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_TRACKED_LOCATIONS, track_locations); // Do something with locations where persons were tracked... free (track_locations); } }
- Since :
- 3.0
#define MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER "NUMBER_OF_TRACKED_PERSONS" |
Name of the event result value that contains number of persons that have been tracked.
This event result value can be accessed after event triggers of MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED type activation. Result value is of size_t
type, so has to be casted as in the following example:
{.c} void event_occurred_cb(mv_surveillance_event_trigger_h trigger, mv_source_h source, int video_stream_id, mv_surveillance_result_h event_result, void *user_data) { const char *event_type = NULL; int err = mv_surveillance_get_event_trigger_type(trigger, event_type); if (MEDIA_VISION_ERROR_NONE != err) return; if (0 == strncmp(event_type, MV_SURVEILLANCE_EVENT_TYPE_PERSON_APPEARED_DISAPPEARED, 255)) { size_t tracked_person_num = 0; err = mv_surveillance_get_result_value( event_result, MV_SURVEILLANCE_PERSONS_TRACKED_NUMBER, &tracked_person_num); if (MEDIA_VISION_ERROR_NONE != err) return; // Do something with number of tracked persons... } }
- Since :
- 3.0