Skip to content

Commit

Permalink
added headers
Browse files Browse the repository at this point in the history
  • Loading branch information
garybradski committed Jun 29, 2017
1 parent b30e44e commit 58b9a39
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
19 changes: 18 additions & 1 deletion example_02-01.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
//Include file for every supported OpenCV function
//Example 2-1. A simple OpenCV program that loads an image from disk and displays it
//on the screen
#include <opencv2/opencv.hpp>

void help(char** argv ) {
std::cout << "\n"
<< "A simple OpenCV program that loads and displays an image from disk\n"
<< argv[0] <<" <path/filename>\n"
<< "For example:\n"
<< argv[0] << " ../fruits.jpg\n"
<< std::endl;
}


int main( int argc, char** argv ) {

if (argc != 2) {
help(argv);
return 0;
}


cv::Mat img = cv::imread( argv[1], -1 );

Expand Down
22 changes: 21 additions & 1 deletion example_02-11.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
// Example 2-11. A complete program to read in a color video and write out the log-polar-
// transformed video

#include <opencv2/opencv.hpp>
#include <iostream>

int main( int argc, char* argv[] ) {

void help(char** argv ) {
std::cout << "\n"
<< "Read in a video, write out a log polar of it\n"
<< argv[0] <<" <path/video> <paht/video_output>\n"
<< "For example:\n"
<< argv[0] << " ../tree.avi ../vout.avi\n"
<< std::endl;
}


int main( int argc, char** argv ) {

if (argc != 3) {
help(argv);
return 0;
}


cv::namedWindow( "Example 2-11", cv::WINDOW_AUTOSIZE );
cv::namedWindow( "Log_Polar", cv::WINDOW_AUTOSIZE );
Expand Down

0 comments on commit 58b9a39

Please sign in to comment.