Lens AI Profiler Cpp
imghelpers.h
1 #ifndef IMGHELPERS_H
2 #define IMGHELPERS_H
3 
4 #include <opencv2/opencv.hpp>
5 #include <vector>
6 #include <string>
7 
15 int convertGrayScale(cv::Mat &img, cv::Mat &grayscale);
16 
23 double calculateSharpnessSobel(cv::Mat &image);
24 
31 double calculateSharpnessLaplacian(cv::Mat &img);
32 
39 double calculateSNR(cv::Mat &img);
40 
47 std::vector<double> calculateChannelMeans(const cv::Mat &image);
48 
55 double calculateContrast(cv::Mat &img);
56 
63 double calculateBrightness(cv::Mat &img);
64 
73 std::string saveImageWithIncrementalName(const cv::Mat &img, const std::string &path, const std::string &baseName);
74 
83 std::string saveImageWithTimestamp(const cv::Mat &img, const std::string &path, const std::string &baseName);
84 
85 #endif // IMGHELPERS_H