急求!!!在qt creator 為什么用adaptive threshold函式進行自適應二值化會報錯啊!用thresh就沒有問題呢?
單步除錯顯示問題:NewAdaThresImage無法訪問?如果是threshold就完美顯示,所以我覺得那些頭檔案等應該沒問題……部分代碼如下:
void Detection::on_thresh_clicked()
{
Mat NewSmoothImage;
Mat NewAdaThresImage;
medianBlur(image, NewSmoothImage, 5);
int adaptiveMethod = 0;
int thresholdType = 1;
adaptiveThreshold(NewSmoothImage, NewAdaThresImage, 255,adaptiveMethod, thresholdType,9, 5);
//threshold(NewSmoothImage, NewAdaThresImage, 100, 255, THRESH_BINARY);
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/132691.html
標籤:Qt
上一篇:Android基礎教程帶專案
