#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