http://inside.mines.edu/~whoff/courses/EENG512/lectures/HoughInOpenCV.pdf霍夫變換OPENCV C++
嗨,我正在閱讀上面的鏈接中的pdf教程。
我在幻燈片的第6頁遇到問題。
當我們看到插入canny邊緣檢測器後的代碼輸出時,它應該找出照片上的所有邊緣。
我不能在6頁
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main(int argc, char* argv[])
{
printf("Hello world\n");
// read an image
Mat imgInput = imread("a.png");
// create image window named "My Image"
namedWindow("My Image");
// Convert to gray if necessary
if (imgInput.channels() == 3)
cv::cvtColor(imgInput, imgInput, CV_BGR2GRAY);
// Apply Canny edge detector
Mat imgContours;
double thresh = 105; // try different values to see effect
Canny(imgInput, imgContours, 0.4*thresh, thresh); // low, high threshold
// show the image on window
imshow("My Image", imgInput);
// wait for xx ms (0 means wait until keypress)
waitKey(5000);
return 0;
}
出什麼,也有一條線double thresh = xxx;//try different values
要我把什麼樣的價值觀?這些值是什麼意思?
謝謝