#include <iostream>
int main(
int argc,
char** argv)
{
string in;
{
return 0;
}
in = samples::findFile(parser.
get<
string>(
"@input"));
Mat image = imread(in, IMREAD_GRAYSCALE);
{
return -1;
}
double canny_th2 = 50.0;
float distance_threshold = 1.41421356f;
bool do_merge = false;
distance_threshold, canny_th1, canny_th2, canny_aperture_size,
bool do_merge = false;
// 由於某些 CPU 的電源策略,似乎演算法的第一次執行需要更長的時間。
// 因此,我們在此處執行該演算法 5 次,以檢視演算法在充分預熱後的處理時間
// CPU 效能。
for (int run_count = 0; run_count < 5; run_count++) {
double freq = getTickFrequency();
double duration_ms = double(
getTickCount() - start) * 1000 / freq;
int64 start = getTickCount();
Mat line_image_fld(image);
double duration_ms = double(getTickCount() - start) * 1000 / freq;
cout << "FLD 的經過時間 " << duration_ms << " 毫秒。" << endl;
}
Mat line_image_fld(image);
專為命令列解析而設計。
imshow("FLD 結果", line_image_fld);
cv::Mat::empty
return 0;
}
如果陣列沒有元素,則返回 true。
int64_t int64
T get(const String &name, bool space_delete=true) const
按名稱訪問引數。
定義 utility.hpp:956
void printMessage() const
列印幫助資訊。
bool has(const String &name) const
檢查命令列中是否提供了欄位。
cv::getTickFrequency
double getTickFrequency()
std::shared_ptr< _Tp > Ptr
Definition cvstd_wrapper.hpp:23
cv::getTickCount
int64 getTickCount()
int main(int argc, char *argv[])
定義 highgui_qt.cpp:3