Lens AI Profiler Cpp
|
A class for analyzing and storing image statistics. More...
#include <imageprofile.h>
Public Member Functions | |
~ImageProfile () | |
Destructor to clean up resources. | |
ImageProfile (const std::string &conf_path, int save_interval, int channels=1) | |
Constructs an ImageProfile object with the specified image characteristics. More... | |
int | profile (cv::Mat &img, bool save_sample=false) |
Logs image statistics for the provided image data. More... | |
A class for analyzing and storing image statistics.
Class for computing and managing various image statistics.
This class provides functionalities for analyzing image properties like distribution of pixel values, contrast, brightness, etc. It utilizes KLL sketches for memory-efficient storage of these statistics.
ImageProfile::ImageProfile | ( | const std::string & | conf_path, |
int | save_interval, | ||
int | channels = 1 |
||
) |
Constructs an ImageProfile object with the specified image characteristics.
Constructor to initialize ImageProfile object.
channels | The number of channels in the image (e.g., grayscale: 1, RGB: 3). |
img_type | The image type (implementation specific). |
metrics | The set of image metrics to be tracked (e.g., "contrast", "brightness"). |
Constructor to initialize ImageProfile object
conf_path | Path to configuration file |
save_interval | Interval for saving statistics |
channels | Number of image channels (default: 1) |
conf_path | Path to configuration file |
save_interval | Interval for saving statistics |
channels | Number of image channels (default: 1) |
int ImageProfile::profile | ( | cv::Mat & | img, |
bool | save_sample = false |
||
) |
Logs image statistics for the provided image data.
Computes and logs selected image statistics.
This function analyzes the provided image data and updates the internal KLL sketches with relevant statistics.
img | The image data as a vector of bytes. |
image_width | The width of the image in pixels. |
image_height | The height of the image in pixels. |
imgpixels_stat | A map to store per-channel statistics (implementation specific). |
imgprofile_map | A map to store various image profile metrics (e.g., "contrast"). |
Computes and logs selected image statistics
img | OpenCV image matrix |
save_sample | Flag indicating whether to save samples exceeding thresholds |
img | OpenCV image matrix |
save_sample | Flag indicating whether to save samples exceeding thresholds |