Skip to content

Commit 1f8f3b0

Browse files
authored
Add files via upload
1 parent 8296643 commit 1f8f3b0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

DownSample.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <opencv2/opencv.hpp>
2+
3+
int main(int args, char** argv) {
4+
5+
cv:: Mat input, output;
6+
7+
cv::namedWindow("Input Image", cv::WINDOW_AUTOSIZE);
8+
cv::namedWindow("Output Image", cv::WINDOW_AUTOSIZE);
9+
10+
input = cv::imread(argv[1]);
11+
12+
if(input.empty()) {
13+
printf("No input image given\n");
14+
return 0;
15+
}
16+
17+
cv::imshow("Input Image", input);
18+
19+
cv::pyrDown(input, output);
20+
21+
cv::imshow("Output Image", output);
22+
23+
cv::waitKey(0);
24+
25+
return 0;
26+
}

0 commit comments

Comments
 (0)