#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);
cv::Mat calcBack(const cv::Mat &image,const cv::MatND hist);
cv::Mat threShold(const cv::Mat &image);
};
#endif /* HISTOGRAM_H_ */
#include"Histogram1D.h"
Histogram1D::Histogram1D()
{
histSize[0]
opencv2反投影直方图以检测特定的图像内容
最新推荐文章于 2023-02-13 19:57:48 发布