#ifndef HISTOGRAM_H_
#define HISTOGRAM_H_
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include<iostream>
#include <vector>
using namespace std;
using namespace cv;
class Histogram1D
{
private:
int histSize[1];
float hranges[2];
const float *ranges[1];
int channels[1];
public:
Histogram1D();
cv::MatND getHistogram(const cv::Mat &image);
cv::Mat getHistogramImage(const cv::Mat &image);
cv::Mat applyLookUp(const cv::Mat &image,const cv::Mat &lookup);
cv::Mat stretch(const cv::Mat &image,int minValue=0);
cv::Mat equalize(const cv::Mat &image);
};
#endif /* HISTOGRAM_H_ */
#include"Histogram1D.h"
Histogram1D::Histogram1D()
{
histSize[0]=256;
hranges[0]=0.0;
hranges[1]=255.0;
ranges[0]=hranges;
channels[0]=0;
};
cv::M
opencv2直方图均衡化
最新推荐文章于 2023-11-21 15:56:52 发布