资源简介
利用直方图得到阈值的取值范围,可以在你需要得到很多边缘时起作用
代码片段和文件信息
//#include
//#include
//#include
//#include
//#include “opencv2/core/core.hpp“
//#include “opencv2/highgui/highgui.hpp“
//#include “opencv2/imgproc/imgproc.hpp“
//
//using namespace cv;
//using namespace std;
//
//void AdaptiveFindThreshold(const CvArr* image double *low double *high int aperture_size = 3);
//void _AdaptiveFindThreshold(CvMat *dx CvMat *dy double *low double *high);
//
//int main(int argc char** argv)
//{
// IplImage* pImg = NULL;
// IplImage* pCannyImg = NULL;
//
// double low_thresh = 0.0;
// double high_thresh = 0.0;
//
// if ( (pImg = cvLoadImage(“lena.jpg“)) != 0)
// {
// pCannyImg = cvCreateImage(cvGetSize(pImg) IPL_DEPTH_8U 1);
//
// CvMat *dx = (CvMat*)pImg;
// CvMat *dy = (CvMat*)pCannyImg;
评论
共有 条评论