Definition at line 37 of file image_meta_consumer.h.
Public Types | |
| enum | OutputType {  KITTI = 0, JSON = 1, CSV = 2 }  | 
| enum | ImageSizeType {  FULL_FRAME, CROPPED_TO_OBJECT }  | 
Public Member Functions | |
| ImageMetaConsumer () | |
| Init an object and set that the queue is stopped.  More... | |
| ~ImageMetaConsumer () | |
| End the job of the thread dequeing by calling stop()  More... | |
| void | init (unsigned gpu_id, const std::string &output_folder_path, const std::string &frame_to_skip_rules_path, float min_box_confidence, float max_box_confidence, unsigned min_box_width, unsigned min_box_height, bool save_full_frame_enabled, bool save_cropped_obj_enabled, unsigned seconds_to_skip_interval, unsigned source_nb) | 
| Fill information in the Consumer.  More... | |
| void | add_meta_csv (const std::string &meta) | 
| Add metadata to the stored concurrent queue.  More... | |
| void | add_meta_json (const std::string &meta) | 
| Add metadata to the stored concurrent queue.  More... | |
| void | add_meta_kitti (const std::pair< std::string, std::string > &meta) | 
| Add metadata to the stored concurrent queue.  More... | |
| void | stop () | 
| End the job of the current thread reading from the queue.  More... | |
| float | get_min_confidence () const | 
| Min confidence getter.  More... | |
| float | get_max_confidence () const | 
| Max confidence getter.  More... | |
| unsigned | get_gpu_id () const | 
| GPU ID getter.  More... | |
| unsigned | get_min_box_width () const | 
| Minimum box width getter.  More... | |
| unsigned | get_min_box_height () const | 
| Minimum box height getter.  More... | |
| bool | get_is_stopped () const | 
| Dequeuing thread status getter.  More... | |
| bool | get_save_full_frame_enabled () const | 
| Dequeuing full frame enabled getter.  More... | |
| bool | get_save_cropped_images_enabled () const | 
| Dequeuing cropped image enable getter.  More... | |
| NvDsObjEncCtxHandle | get_obj_ctx_handle () | 
| Image Save Thread Handler.  More... | |
| std::string | make_img_path (ImageMetaConsumer::ImageSizeType ist, unsigned stream_source_id, const std::string &datetime_iso8601) | 
| Metadata writer for a unique file (Json or Csv)  More... | |
| void | init_image_save_library_on_first_time () | 
| Create image saving context if needed.  More... | |
| bool | should_save_data (unsigned source_id) | 
| This function checks if a certain amount of time passed before the last image was saved.  More... | |
| void | lock_source_nb (unsigned source_id) | 
| Lock a stream when an image save is needed in order not to save multiple images from the same stream without waiting a certain amount of time.  More... | |
| void | data_was_saved_for_source (unsigned source_id) | 
| If an image was saved, then the timestamp of the last image saved is stored.  More... | |
| void | unlock_source_nb (unsigned source_id) | 
| Unlock a stream when a stream was locked for image saving.  More... | |
| Enumerator | |
|---|---|
| FULL_FRAME | |
| CROPPED_TO_OBJECT | |
Definition at line 45 of file image_meta_consumer.h.
| Enumerator | |
|---|---|
| KITTI | |
| JSON | |
| CSV | |
Definition at line 39 of file image_meta_consumer.h.
| ImageMetaConsumer::ImageMetaConsumer | ( | ) | 
Init an object and set that the queue is stopped.
| ImageMetaConsumer::~ImageMetaConsumer | ( | ) | 
End the job of the thread dequeing by calling stop()
| void ImageMetaConsumer::add_meta_csv | ( | const std::string & | meta | ) | 
Add metadata to the stored concurrent queue.
| [in] | meta | Metadata as CSV string | 
| void ImageMetaConsumer::add_meta_json | ( | const std::string & | meta | ) | 
Add metadata to the stored concurrent queue.
| [in] | meta | Metadata as JSON string | 
| void ImageMetaConsumer::add_meta_kitti | ( | const std::pair< std::string, std::string > & | meta | ) | 
Add metadata to the stored concurrent queue.
| [in] | meta | Metadata, left is the path needed for multi_metadata_maker() right is the content to write. | 
| void ImageMetaConsumer::data_was_saved_for_source | ( | unsigned | source_id | ) | 
If an image was saved, then the timestamp of the last image saved is stored.
| source_id | Stream number for which the timestamp is saved. | 
| unsigned ImageMetaConsumer::get_gpu_id | ( | ) | const | 
GPU ID getter.
| bool ImageMetaConsumer::get_is_stopped | ( | ) | const | 
Dequeuing thread status getter.
| float ImageMetaConsumer::get_max_confidence | ( | ) | const | 
Max confidence getter.
| unsigned ImageMetaConsumer::get_min_box_height | ( | ) | const | 
Minimum box height getter.
| unsigned ImageMetaConsumer::get_min_box_width | ( | ) | const | 
Minimum box width getter.
| float ImageMetaConsumer::get_min_confidence | ( | ) | const | 
Min confidence getter.
| NvDsObjEncCtxHandle ImageMetaConsumer::get_obj_ctx_handle | ( | ) | 
Image Save Thread Handler.
| bool ImageMetaConsumer::get_save_cropped_images_enabled | ( | ) | const | 
Dequeuing cropped image enable getter.
| bool ImageMetaConsumer::get_save_full_frame_enabled | ( | ) | const | 
Dequeuing full frame enabled getter.
| void ImageMetaConsumer::init | ( | unsigned | gpu_id, | 
| const std::string & | output_folder_path, | ||
| const std::string & | frame_to_skip_rules_path, | ||
| float | min_box_confidence, | ||
| float | max_box_confidence, | ||
| unsigned | min_box_width, | ||
| unsigned | min_box_height, | ||
| bool | save_full_frame_enabled, | ||
| bool | save_cropped_obj_enabled, | ||
| unsigned | seconds_to_skip_interval, | ||
| unsigned | source_nb | ||
| ) | 
Fill information in the Consumer.
This has to be done when these informations available.
| [in] | output_folder_path | Path where all the metadata will be saved. | 
| [in] | frame_to_skip_rules_path | Path where the rules for the amount of time to skip between 2 frames is stored. | 
| [in] | min_box_confidence | Minimum confidence that an object detected on a frame should have, in order to be kept. | 
| [in] | max_box_confidence | Maximum confidence that an object detected on a frame should have, in order to be kept. | 
| [in] | gpu_id | GPU ID of the gpu which is to be used for encoding | 
| [in] | min_box_width | Minimum box width that an object detected on a frame should have, in order to be kept. | 
| [in] | min_box_height | Minimum box height that an object detected on a frame should have, in order to be kept. | 
| [in] | save_full_frame_enabled | Enable/Disable the save of complete images. | 
| [in] | save_cropped_obj_enabled | Enable/Disable the save of cropped images | 
| [in] | seconds_to_skip_interval | Unsigned integer giving the number of seconds to skip. | 
| [in] | source_nb | Unsigned integer giving the number of sources that are currently giving a stream. | 
| void ImageMetaConsumer::init_image_save_library_on_first_time | ( | ) | 
Create image saving context if needed.
| void ImageMetaConsumer::lock_source_nb | ( | unsigned | source_id | ) | 
Lock a stream when an image save is needed in order not to save multiple images from the same stream without waiting a certain amount of time.
| source_id | The stream number to lock | 
| std::string ImageMetaConsumer::make_img_path | ( | ImageMetaConsumer::ImageSizeType | ist, | 
| unsigned | stream_source_id, | ||
| const std::string & | datetime_iso8601 | ||
| ) | 
Metadata writer for a unique file (Json or Csv)
| extension | of file requested (Json or Csv) | 
| stream_source_id | Unique number identifying the stream source | 
| datetime_iso8601 | current datetime formatted to iso 8601 | 
| bool ImageMetaConsumer::should_save_data | ( | unsigned | source_id | ) | 
This function checks if a certain amount of time passed before the last image was saved.
| source_id | video stream number to check | 
| void ImageMetaConsumer::stop | ( | ) | 
End the job of the current thread reading from the queue.
| void ImageMetaConsumer::unlock_source_nb | ( | unsigned | source_id | ) | 
Unlock a stream when a stream was locked for image saving.
| source_id | The stream number to unlock |