Skip to content

Commit 95bcc01

Browse files
committed
update lsd_opencv_example.cpp
1 parent 1437570 commit 95bcc01

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.DS_Store

2 KB
Binary file not shown.

opencv/lsd_opencv_example.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
#include <highgui.h>
77
#include <cv.h>
88
#include <lsd.h>
9+
#include <iostream>
910

1011
int main(int argc, char **argv)
1112
{
12-
cv::Mat src = cv::imread("./../../images/test.jpg", CV_LOAD_IMAGE_COLOR);
13+
if (argc < 2 || argc > 2)
14+
{
15+
std::cout << "Usage: lsd_opencv_example imageName" << std::endl;
16+
return;
17+
}
18+
cv::Mat src = cv::imread(argv[1], CV_LOAD_IMAGE_COLOR);
1319
cv::Mat tmp, src_gray;
1420
cv::cvtColor(src, tmp, CV_RGB2GRAY);
1521
tmp.convertTo(src_gray, CV_64FC1);

0 commit comments

Comments
 (0)