Struct VideoIntelligence
pub struct VideoIntelligence { /* private fields */ }
Expand description
Contains all Plumerai Video Intelligence functionality.
Implementations§
§impl VideoIntelligence
impl VideoIntelligence
pub fn detection_zones(&self) -> DetectionZones
pub fn detection_zones(&self) -> DetectionZones
Returns the detection zone functionality.
§impl VideoIntelligence
impl VideoIntelligence
pub fn face_enrollment_automatic(
&self,
) -> Result<FaceEnrollmentAutomatic, Error>
pub fn face_enrollment_automatic( &self, ) -> Result<FaceEnrollmentAutomatic, Error>
§impl VideoIntelligence
impl VideoIntelligence
pub fn face_enrollment_manual(&self) -> Result<FaceEnrollmentManual, Error>
pub fn face_enrollment_manual(&self) -> Result<FaceEnrollmentManual, Error>
§impl VideoIntelligence
impl VideoIntelligence
pub fn face_identification(&self) -> Result<FaceIdentification, Error>
pub fn face_identification(&self) -> Result<FaceIdentification, Error>
§impl VideoIntelligence
impl VideoIntelligence
pub fn motion_detection(&self) -> MotionDetection
pub fn motion_detection(&self) -> MotionDetection
Returns the motion detection functionality.
§impl VideoIntelligence
impl VideoIntelligence
pub fn object_detection(&self) -> ObjectDetection
pub fn object_detection(&self) -> ObjectDetection
Returns the object detection functionality.
§impl VideoIntelligence
impl VideoIntelligence
pub fn new(input_resolution: Size) -> Self
pub fn process_frame(
&mut self,
image_pointer: &ImagePointer<'_>,
delta_t: Option<f32>,
) -> Result<(), Error>
pub fn process_frame( &mut self, image_pointer: &ImagePointer<'_>, delta_t: Option<f32>, ) -> Result<(), Error>
Process a single frame from a video sequence.
Make sure the image is right side up. When it is upside down it can still work but accuracy is significantly degraded.
If delta_t is None, the system clock will be used. Otherwise it should be positive.
§Errors
Error::InvalidDeltaT
Error::NoFaceInView
Error::MultipleFacesInView
Error::FaceCloseToEdge
pub fn single_image(
&mut self,
image_pointer: &ImagePointer<'_>,
size: ImageSize,
) -> Result<(), Error>
pub fn single_image( &mut self, image_pointer: &ImagePointer<'_>, size: ImageSize, ) -> Result<(), Error>
Process a single image not part of a video sequence.
This should not be used for video data. It can be used for face
enrollments from a set of images. The object detection box id values
obtained after calling single_image
are not related to those generated
through process_frame
or through other calls to single_image
.
Optionally a different size image can be specified.
§Errors
Error::NoFaceInView
Error::MultipleFacesInView
Error::FaceCloseToEdge
pub fn set_night_mode(&mut self, night_mode: bool)
pub fn set_night_mode(&mut self, night_mode: bool)
Configure the video intelligence algorithm for either day mode color videos (default) or night mode IR videos.
This configures the video intelligence algorithm for optimal performance on day mode color data (default) or on night mode IR data.
After switching from day to night mode or back, the motion detection algorithm will need a couple of video frames to stabilize, so the motion-grid will not be immediately available.
This function does not have to be called before every frame, only when switching from RGB to IR video data or back.
pub fn store_state(&self) -> Result<State, Error>
pub fn store_state(&self) -> Result<State, Error>
Store the current state of the algorithm.
This function can be used when processing a video in chunks, doing
different chunks at different times or on different machines.
The state can be restored by calling restore_state
with the data
returned by store_state
. When the library is built with support for
familiar face identification, the state includes the face library.
Constraints:
- The
delta_t
parameter ofprocess_frame
can not be None after restoring a previous state. - If familiar face identification is enabled, the state can only be stored and restored when not enrolling.
§Errors
Error::StateWhileEnrolling
pub fn restore_state(&mut self, state: State) -> Result<(), Error>
pub fn restore_state(&mut self, state: State) -> Result<(), Error>
Restore the state of the algorithm.
See store_state
for more information.
The user must ensure that the height and width of the current object match
the height and width of the state that is being restored.
§Errors
Error::StateWhileEnrolling
Error::StateSettingsMismatch
Error::StateCorrupt
pub fn debug_mode_start(
&mut self,
image_options: DebugImageOptions,
) -> Result<(), Error>
pub fn debug_mode_start( &mut self, image_options: DebugImageOptions, ) -> Result<(), Error>
Enable debug mode.
When process_frame
is called while debug mode is active, this will store
debug information. This data is meant to be stored to a file to be shared
with Plumerai support for further analysis. These files contain
uncompressed input image data and can become large (several megabytes per
frame). If image_options
is set to Exclude, no image data will be
included.
The resulting debug data can be retrieved using debug_mode_end
.
§Errors
Error::NotAvailable
pub fn debug_mode_end(&mut self) -> Result<DebugBytes, Error>
pub fn debug_mode_end(&mut self) -> Result<DebugBytes, Error>
pub fn code_version() -> String
pub fn code_version() -> String
Returns the version of the video intelligence code as a date and time.
For other version numbers, see also ObjectDetection::detector_version
for the object detector, and FaceIdentification::embedding_version
for the face embedder.
@return The version of the code as YYYY.MM.DD.HH.MM date and time string.