資源簡介
Opencv官方示例,成功在Opencv3.1.0與VS2015上跑通,實現直線提取
代碼片段和文件信息
#include???
#include???
#include?“opencv2/core/core.hpp“??
#include?“opencv2/core/utility.hpp“??
#include?“opencv2/imgproc/imgproc.hpp“??
#include?“opencv2/imgcodecs.hpp“??
#include?“opencv2/highgui/highgui.hpp“??
using?namespace?std;
using?namespace?cv;
int?main(int?argc?char**?argv)
{
std::string?in;
if?(argc?!=?2)
{
std::cout?<“Usage:?lsd_lines?[input?image].?Now?loading?../data/building.jpg“?< in?=?“../data/building.jpg“;
}
else
{
in?=?argv[1];
}
Mat?image?=?imread(in?IMREAD_GRAYSCALE);
#if?0
Canny(image?image?50?200?3);?//?Apply?canny?edge
#endif
//?Create?and?LSD?detector?with?st
評論
共有 條評論