Skip to content

Commit 0b6d8d3

Browse files
committed
checked 12 and 13. Minor fixes
1 parent 9f744c5 commit 0b6d8d3

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ In progress June 30, 2017
2020
* ~~Chapter 22~~
2121

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

2525
* Submit associated errata for ~~15 16~~ 17 18 19 20 21 22
2626
* Throw in some bonus material
2727
* ~~background subtraction~~
2828
* feature detector/descriptors
29-
* ~~More mac~~ hine learning(?) ... ongoing!
29+
* ~~More mac~~ machine learning(?) ... ongoing!
3030
* Some new stuff in opencv_contrib
3131
* Some DNN examples(?)
3232
* ~~Throw in some exercises~~ ... ongoing!

example_12-01.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// Using cv::dft() and cv::idft() to accelerate the computation of
2-
// convolutions
1+
// Example 12-1. Using cv::dft() and cv::idft() to accelerate the computation of
2+
// convolutions
3+
34

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

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

example_12-02.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ using namespace std;
1111
int main(int argc, char** argv) {
1212

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

example_13-01.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ using namespace std;
77

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

example_13-02.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
using namespace std;
99

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

1922
// Compare 3 images' histograms

example_13-03.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ using namespace std;
77

88
void help( char** argv ){
99
cout << "\n"
10-
<<"Example of using matchTemplate(). The call is:\n"
10+
<<"\nExample 13-3: using matchTemplate(). The call is:\n"
1111
<<"\n"
12-
<<argv[0] <<" template image_to_be_searched\n"
12+
<<argv[0] <<" <template> <image_to_be_searched?\n"
13+
<< "\nExample:\n" << argv[0] << "../BlueCup.jpg ../adrian.jpg"
1314
<<"\n"
1415
<<" This routine will search using all methods:\n"
1516
<<" cv::TM_SQDIFF 0\n"
@@ -18,7 +19,7 @@ void help( char** argv ){
1819
<<" cv::TM_CCORR_NORMED 3\n"
1920
<<" cv::TM_CCOEFF 4\n"
2021
<<" cv::TM_CCOEFF_NORMED 5\n"
21-
<<"\n";
22+
<<"\n" << endl;
2223
}
2324

2425
// Display the results of the matches

0 commit comments

Comments
 (0)