Skip to content

Commit

Permalink
checked 12 and 13. Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
garybradski committed Jul 2, 2017
1 parent 9f744c5 commit 0b6d8d3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ In progress June 30, 2017
* ~~Chapter 22~~

Checking Chapters
~~2, 3, 4, 5, 6, 7, 8, 9, 10, 11,~~ 12, 13, 14, ~~15 16 17 18 19 20 21 22 23~~
~~2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,~~ 14, 15 16 17 18 19 20 21 22 23

* Submit associated errata for ~~15 16~~ 17 18 19 20 21 22
* Throw in some bonus material
* ~~background subtraction~~
* feature detector/descriptors
* ~~More mac~~ hine learning(?) ... ongoing!
* ~~More mac~~ machine learning(?) ... ongoing!
* Some new stuff in opencv_contrib
* Some DNN examples(?)
* ~~Throw in some exercises~~ ... ongoing!
Expand Down
9 changes: 6 additions & 3 deletions example_12-01.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Using cv::dft() and cv::idft() to accelerate the computation of
// convolutions
// Example 12-1. Using cv::dft() and cv::idft() to accelerate the computation of
// convolutions


#include <opencv2/opencv.hpp>
#include <iostream>
Expand All @@ -9,7 +10,9 @@ using namespace std;
int main(int argc, char** argv) {

if(argc != 2) {
cout << "Fourier Transform\nUsage: " <<argv[0] <<" <imagename>" << endl;
cout << "\nExample 12-1. Using cv::dft() and cv::idft() to accelerate the"
<< "\n computation of convolutions"
<< "\nFourier Transform\nUsage: " <<argv[0] <<" <path/imagename>\n" << endl;
return -1;
}

Expand Down
3 changes: 2 additions & 1 deletion example_12-02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ using namespace std;
int main(int argc, char** argv) {

if(argc != 2) {
cout << "Hough Circle detect\nUsage: " <<argv[0] <<" <imagename>\n" << endl;
cout << "\nExample 12-1. Using cv::dft() and cv::idft() to accelerate the computation of convolutions"
<< "\nHough Circle detect\nUsage: " <<argv[0] <<" <path/imagename>\n" << endl;
return -1;
}

Expand Down
3 changes: 2 additions & 1 deletion example_13-01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ using namespace std;

int main( int argc, char** argv ){
if(argc != 2) {
cout << "Computer Color Histogram\nUsage: " <<argv[0] <<" <imagename>" << endl;
cout << "\n// Example 13-1. Histogram computation and display" << endl;
cout << "\nComputer Color Histogram\nUsage: " <<argv[0] <<" <imagename>\n" << endl;
return -1;
}

Expand Down
9 changes: 6 additions & 3 deletions example_13-02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
using namespace std;

void help( char** argv ){
cout << "//\nExample 13-2. Creating signatures from histograms for EMD; note that this code is the"
<< "\n// source of the data in Table 13-1, in which the hand histogram is compared in different"
<< "\n// lighting conditions\n\n" << endl;
cout << "\nCall is:\n"
<< argv[0] <<" modelImage0 testImage1 testImage2 badImage3\n\n"
<< "for example: " << argv[0]
<< " HandIndoorColor.jpg HandOutdoorColor.jpg "
<< "HandOutdoorSunColor.jpg fruits.jpg\n"
<< "\n";
<< " ../HandIndoorColor.jpg ../HandOutdoorColor.jpg "
<< "../HandOutdoorSunColor.jpg ../fruits.jpg\n"
<< "\n" << endl;
}

// Compare 3 images' histograms
Expand Down
7 changes: 4 additions & 3 deletions example_13-03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ using namespace std;

void help( char** argv ){
cout << "\n"
<<"Example of using matchTemplate(). The call is:\n"
<<"\nExample 13-3: using matchTemplate(). The call is:\n"
<<"\n"
<<argv[0] <<" template image_to_be_searched\n"
<<argv[0] <<" <template> <image_to_be_searched?\n"
<< "\nExample:\n" << argv[0] << "../BlueCup.jpg ../adrian.jpg"
<<"\n"
<<" This routine will search using all methods:\n"
<<" cv::TM_SQDIFF 0\n"
Expand All @@ -18,7 +19,7 @@ void help( char** argv ){
<<" cv::TM_CCORR_NORMED 3\n"
<<" cv::TM_CCOEFF 4\n"
<<" cv::TM_CCOEFF_NORMED 5\n"
<<"\n";
<<"\n" << endl;
}

// Display the results of the matches
Expand Down

0 comments on commit 0b6d8d3

Please sign in to comment.