資源簡介
利用直方圖得到閾值的取值范圍,可以在你需要得到很多邊緣時起作用
代碼片段和文件信息
//#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;
評論
共有 條評論