Plumerai Error Codes¶
This document describes the list of error codes returned by various Plumerai functions.
The function plumerai_error_code_string
can be used to convert an error code to a printable string.
Error codes¶
PlumeraiErrorCode¶
typedef enum {
PLUMERAI_SUCCESS = 0,
// Should not occur, contact Plumerai if this happens
PLUMERAI_INTERNAL_ERROR = -1,
// Returned when a function is not available on the current platform.
PLUMERAI_NOT_AVAILABLE = -2,
// The `delta_t` parameter should be >= 0
PLUMERAI_INVALID_DELTA_T = -3,
// The `STATE_` error codes are only returned by
// `plumerai_video_intelligence_store_state` and
// `plumerai_video_intelligence_restore_state`. See those functions for more
// details.
// The state can not be (re)stored while enrolling
PLUMERAI_STATE_WHILE_ENROLLING = -4,
// The state could not be restored
PLUMERAI_STATE_CORRUPT = -5,
// The state was serialized with a different height/width than the current
// object, or uses different familiar face identification settings.
PLUMERAI_STATE_SETTINGS_MISMATCH = -6,
// This error code is only returned by `plumerai_motion_detection_get_grid`.
// See that function for more details.
PLUMERAI_MOTION_GRID_NOT_YET_READY = -7,
// This is returned by `plumerai_object_detection_box_has_moved`,
// `plumerai_object_detection_get_person_box_from_face_box` or
// `plumerai_object_detection_get_face_box_from_person_box` if the argument is
// not a valid box.
PLUMERAI_INVALID_BOX = -8,
// Returned by `plumerai_detection_zones_add_zone` or
// `plumerai_detection_zones_is_box_in_zone` when the provided zone
// coordinates or zone ID have an invalid geometry, such as too few or too
// many points.
PLUMERAI_INVALID_ZONE_GEOMETRY = -9,
// Returned by `plumerai_detection_zones_is_box_in_zone` if the given zone ID
// is not a valid zone ID as created by `add_zone`.
PLUMERAI_INVALID_ZONE_ID = -10,
// Returned by `plumerai_detection_zones_is_box_in_zone` if the given box does
// not belong to one of the configured classes for the given detection zone,
// or returned by `plumerai_detection_zones_add_zone` if none or invalid
// classes are specified.
PLUMERAI_INVALID_ZONE_CLASS = -11,
// Returned by `plumerai_detection_zones_add_zone` if the maximum number of
// detection zones is reached.
PLUMERAI_MAXIMUM_DETECTION_ZONES_REACHED = -12,
// Returned when the neural network shape information is not correct.
PLUMERAI_INVALID_NEURAL_NETWORK_PARAMETER = -13,
// This is returned by
// `plumerai_face_identification_get_person_box_from_face_box` or
// `plumerai_face_identification_get_face_box_from_person_box` if the argument
// is not a valid box.
PLUMERAI_NO_BOX_MATCH = -14,
// This is returned by `plumerai_motion_detection_set_grid_size` when the
// provided grid size is invalid.
PLUMERAI_INVALID_GRID_SIZE = -15,
//
// Starting below are all error codes related to Familiar Face Identification.
// They have values -1000 and below.
//
// Everything OK, enrollment is in progress.
PLUMERAI_ENROLLMENT_IN_PROGRESS = -1000,
// Called `plumerai_face_enrollment_manual_start_enrollment` but enrollment is
// already started.
PLUMERAI_ALREADY_ENROLLING = -1002,
// Last frame was ignored because multiple faces were detected within the
// specified region of interest. Try again with one face visible.
PLUMERAI_MULTIPLE_FACES_IN_VIEW = -1003,
// Last frame was ignored because no face was detected, or it was not clearly
// visible, or the lighting was not good enough for enrollment. Try again with
// one face clearly visible.
PLUMERAI_NO_FACE_IN_VIEW = -1004,
// Last frame was ignored because the face detection was too close to the
// edge. Too close to the edge means that the border of the face bounding-box
// is within 2% of the edge of the image. In theory, it is OK if a face is
// close to edge, however, it can also mean that a face is only partially
// visible. Thus, this check is added to prevent partial faces from being
// enrolled.
PLUMERAI_FACE_CLOSE_TO_EDGE = -1005,
// Called `plumerai_face_enrollment_manual_finish_enrollment` but enrollment
// was not started.
PLUMERAI_NOT_ENROLLING = -1006,
// This is returned by `plumerai_face_enrollment_manual_finish_enrollment`
// when the enrollment failed because no faces could be detected in any of the
// images.
PLUMERAI_ENROLLMENT_FAILED = -1007,
// This is returned by `plumerai_face_enrollment_manual_finish_enrollment`
// when a face embedding is returned but the quality of the enrollment is very
// low. In this case re-enrolllment is recommended.
PLUMERAI_LOW_QUALITY_ENROLLMENT = -1008,
// Returned by `plumerai_face_enrollment_manual_add_embedding` or
// `plumerai_face_enrollment_manual_remove_embedding` when the provided face
// ID is invalid.
PLUMERAI_INVALID_FACE_ID = -1009,
// Returned by `plumerai_face_enrollment_manual_add_embedding` when the
// provided face embedding is invalid.
PLUMERAI_INVALID_EMBEDDING = -1010,
// Returned by `plumerai_face_enrollment_manual_add_embedding` or
// `plumerai_face_enrollment_automatic_restore_embedding_data` when the face
// library is full.
PLUMERAI_FACE_LIBRARY_FULL = -1011,
//
// Starting below are all error codes related to Automatic Enrollment.
// They have values -2000 and below.
//
// Returned by `plumerai_face_enrollment_automatic_remove_embedding` when the
// provided face ID is invalid.
PLUMERAI_UNKNOWN_FACE_ID = -2001,
// Returned by `plumerai_face_enrollment_automatic_get_face_snapshot` when the
// face snapshots are disabled.
PLUMERAI_FACE_SNAPSHOTS_DISABLED = -2002,
// Returned by `plumerai_face_enrollment_automatic_configure_face_snapshots`
// when the provided settings are invalid
PLUMERAI_INVALID_ARGUMENT = -2003,
} PlumeraiErrorCode;
plumerai_error_code_string¶
Returns a string representation of an error code.
Arguments:
- error_code: An error code.
Returns:
- A string representation of the error code.