8 #ifndef IMAGE_PROFILE_H
9 #define IMAGE_PROFILE_H
11 #include "iniparser.h"
12 #include "imghelpers.h"
15 #include <kll_sketch.hpp>
18 #include <unordered_map>
53 ImageProfile(
const std::string& conf_path,
int save_interval,
int channels = 1);
73 int profile(cv::Mat& img,
bool save_sample =
false);
79 std::string statSavepath;
80 std::string dataSavepath;
81 std::map<std::string, std::vector<std::string>> imageConfig;
94 std::vector<distributionBox *> pixelBox;
98 std::vector<distributionBox *> meanBox;
110 void registerStatistics(
const std::string& name);
118 float computeStatistic(
const std::string& name, cv::Mat& img);
127 bool isThresholdExceeded(
const std::string& name,
float stat_score,
const std::vector<std::string>& config);
134 void iterateImage(
const cv::Mat& img,
const std::function<
void(
const std::vector<int>&)>& callback);
140 void updatePixelValues(
const std::vector<int>& pixelValues);
A class for analyzing and storing image statistics.
Definition: imageprofile.h:32
int profile(cv::Mat &img, bool save_sample=false)
Logs image statistics for the provided image data.
Definition: imageprofile.cpp:59
ImageProfile(const std::string &conf_path, int save_interval, int channels=1)
Constructs an ImageProfile object with the specified image characteristics.
Definition: imageprofile.cpp:31
~ImageProfile()
Destructor to clean up resources.
Definition: imageprofile.cpp:11