-
Notifications
You must be signed in to change notification settings - Fork 0
/
histograms.h
44 lines (24 loc) · 1.44 KB
/
histograms.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef HISTOGRAMS_H
#define HISTOGRAMS_H
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
void saveHistogramImage(const std::string& filename, const cv::Mat& histogramImage);
cv::Mat normalzeHistogram_n(cv::Mat image);
cv::Mat calculateCDF(const cv::Mat& hist);
cv::Mat plotCDF(const cv::Mat& cdf, const cv::Scalar& color); // cv::Mat calculateCDF(const cv::Mat& hist);
cv::Mat convertToGrayScale(const cv::Mat& image);
cv::Mat calculateGrayscaleCDF(const cv::Mat& grayscaleImage);
void plotGrayscaleCDF(const std::string& title, const cv::Mat& cdf, const cv::Scalar& lineColor, const cv::Scalar& fillColor);
cv::Mat displayNormalizedEqualizedImages(const cv::Mat& image);
cv::Mat normalizeHistogram_n(cv::Mat& histogram);
cv::Mat calculateHistogram(const cv::Mat& input, int channel);
cv::Mat plotHistogram(const cv::Mat& histogram, const cv::Scalar color, int histWidth, int histHeight);
void calculateHistograms(Mat& image, Mat& histR, Mat& histG, Mat& histB);
void drawHistograms(Mat& histR, Mat& histG, Mat& histB, Mat& histImageR, Mat& histImageG, Mat& histImageB, int histSize, double& maxIntensity);
void addLabels(Mat& histImageR, Mat& histImageG, Mat& histImageB, int histSize, double maxIntensity, int histHeight, int histWidth);
cv::Mat addAxesToHistogram(const cv::Mat& histogramImage);
#endif // HISTOGRAMS_H