Errata

Learning OpenCV

Errata for Learning OpenCV

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page xiii
10th line

Next to the footprint icon, the text reads "Shows test that should be replaced with user-supplied values. his icon signifies a tip, suggestion, or general note." I believe the first sentence is an erroneous copy-paste of the text before and should be erased. Moreover, the first letter of the word "This" has been omitted in the second sentence.

Note from the Author or Editor:

Delete "Shows text that should be replaces with user-supplied values." Add "T" to "his icon" in beginning of next sentence.

Anonymous  Nov 04, 2008  Jul 22, 2011
Printed
Page x
6th paragraph. Who this book is for: teachers

3rd line of Teachers it says:

"with current papers or guest lecturers from experts"

it should say

"with current papers or guest lectures from experts"

Anonymous  Nov 12, 2008  Jul 22, 2011
Printed
Page xiv
the last paragraph

"in Napa's Mt. Vieder area" should be "in Napa's Mt. Veeder area".

Shiqi Yu  Feb 05, 2009  Jul 22, 2011
preface
In section "P.5. Conventions Used in This Book"

http://proquest.safaribooksonline.com/9780596516130/preface

In section "P.5. Conventions Used in This Book":

You have

"Shows text that should be replaced with user-supplied values. his icon signifies a tip, suggestion, or general note."

which probably should be

"Shows text that should be replaced with user-supplied values. This icon signifies a tip, suggestion, or general note."

.

Alex

Note from the Author or Editor:
Submitter is correct, please make the suggested change.

Anonymous  Feb 20, 2009 
Printed
Page xi
First sentence of second paragraph


"All the program examples in this book are based on OpenCV version 2.0." This comment may be false, but I suppose we are making it true. In any case, we should update this to reflect what exactly is going on.

Anonymous  Jul 15, 2011 
PDF
Page 10
Paragraph 'MacOS X'

it should read

'... to build and install OpenCV, update DYLD_LIBRARY_PATH ...'

instead of

'... to build and install OpenCV, update LD_LIBRARY_PATH ...'

(see 'man dyld')

Anonymous  Oct 02, 2008  Jul 22, 2011
Printed
Page 20
Code, 2/3rd way down

The comment in the code :

// While loop (as in Example 2) capture & show video

This causes an error, the "capture" needs to be replaced with "g_capture", as this version of the code creates a global variable, and is prefaced with a "g_".


Note from the Author or Editor:
Submitter is correct. I believe that this was in a previous erratum. In any case, please make the change indicated: replace 'capture' with 'g_capture'.

Anonymous  Oct 16, 2008 
Printed
Page 20
Example 2-3


Example 2-3 (adding a trackbar) does not work for me (Linux 2.6 opencv1 from ubuntu package). CV_CAP_PROP_FRAME_COUNT comes back as zero. I noticed cvGetCaptureProperty() doesn't work in general unless the first frame is read- but even then, the COUNT variable is zero. Perhaps there is some other trick to getting CV_CAP_PROP_FRAME_COUNT to work? From the number of message board posts about having trouble with cvGetCaptureProperty, I think a footnote here would help.

Thank you,
j

Note from the Author or Editor:

In my own experience, GetCaptureProperty essentially never works. How do we want to address this?


Justin L.  Jan 03, 2009 
Printed
Page 22
Example 2-4

missing curly bracket

void example2_4(IplImage* image) ---> { <---
// ...

Note from the Author or Editor:
submitter is correct, please add '{' as described.

Christian Schwarte  Mar 26, 2009 
Printed
Page 24
Example 2-5

In Example 2-5, third to the last line
cvPyrDown requires three parameters, in, out and filter (which is passed in the function as parameter). So this line should be
cvPyrDown( in, out, filter)

Note from the Author or Editor:
Submitter is correct. He is referring to the line immediately before the code line "return( out );". Please make the indicated change.

Jitao David Zhang  Jun 30, 2009 
Printed
Page 25
Example 2-6 code section

The code:

IplImage* out = cvCreateImage(
cvSize( cvGetSize( in ),
IPL_DEPTH_8U,
1
);

does not compile. cvGetSize takes two arguments. It can be fixed thusly:

IplImage* out = cvCreateImage(
cvGetSize( in ),
in->depth, //IPL_DEPTH_8U,
1);

This code is correct and compiles.

Anonymous  Oct 16, 2008  Jul 22, 2011
Printed
Page 27, 28
description of Example 2-10 (bottom of 27 and top of 28)

At the end of the sentence after Example 2-10, delete "same video in grayscale" and replace with "log-polar transformed video"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 29
3rd paragraph

4th line
Cvcore contains ...
should read
Cxcore contains ...

Anonymous  Mar 27, 2009  Jul 22, 2011
PDF
Page 33
function expression

in function expression "cvMat* cvCreateMat ( int rows, int cols, int type );"
in my view, "cvMat" should be "CvMat"

Haojun Zhang  Mar 02, 2011  Jul 22, 2011
PDF
Page 37
1st paragraph

It seems that the authors of the book have written the book using LaTex. Kindly replace the following quotation remarks ? and ? by ". This will save the users from having to modify the code in order to compile it.

Note from the Author or Editor:
I do not find the issue the submitter describes on page 37. This is an interesting point however, which relates to the idea of a book being electronically published. Unlike with a print edition, it is possible to "cut and paste" from an electronic edition into a text editor. As a result, the use of the incorrect kind of quotation marks (i.e. typographical double-opening and double-closing quotation marks such as U+201C and U+201D) will cause problems. All quotation marks which appear in code fragments should be changed to double straight quotation marks (i.e. U+0022, which is the ASCII character 0x22).

Ashish  Aug 11, 2009 
Printed
Page 38
first sentence of last paragraph

Change "(see Examples 3-1 and 3-3)" with "(see Examples 3-1 and 3-2)"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 40
Example 3-9

The example seems to be for a single-channel matrix, instead of a three-channel matrix.

Note from the Author or Editor:
Submitter is correct. Please change caption line for example 3-9 from "...in a three-channel matrix" to "...in a single-channel matrix"

Anonymous  Sep 03, 2009 
Printed
Page 40
Example 3-9

"for( col=0;" should be "for( int col=0;"

Note from the Author or Editor:
Confirmed, change as specified by the submitter.

Shiqi Yu  Dec 24, 2009 
Printed
Page 40
6th sentence, first full paragraph on page

Change "Although the CVMat structure" to "Although the CvMat structure"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 40
second sentence, last paragraph

Change "(or, more likely, cvArr*)" to "(or, more likely, CvArr*)"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 40
3rd sentence from bottom of last full paragraph (under Arrays of Points)

Delete "or an array with one row and n columns (3-by-1)" from the end of the sentence.



Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 48
Table 3-3

Function cvAnd and cvAnds are lost from Table 3-3. They are explained in Page 52.

Note from the Author or Editor:
This is correct. On page 48, in table 3-3, immediately before the line containing "cvAbs", please add the table entries (lines)
"cvAdd","Elementwise addition of one array to another"
and next:
"cvAdds", "Elementwise addition of a scalar to an array"

Shiqi Yu  Dec 24, 2009 
Printed
Page 48
Description of cvAvgSdv (8th Function from top of table)

Change "Absolute value" to "Average value"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 49,50

Function definitions for absolute value functions should be

void cvAbs(
const CvArr* src1, CvArr* dst
);

void cvAbsDiff(
const CvArr* src1, const CvArr* src2, CvArr* dst
);

void cvAbsDiffS(
const CvArr* src, CvArr* dst, CvScalar value
);

Anonymous  Oct 13, 2008  Jul 22, 2011
Printed
Page 54
C definition of cvCalcCovarMatrix

Instead of

"void cvAdd("

it should be

"void cvCalcCovarMatrix("

Anonymous  Feb 23, 2009  Jul 22, 2011
Printed
Page 56
4

Paragraph 4 is in direct contradiction with paragraph 5.

Paragraph 4 states:

".. After conversion to the new data type, each pixel will be multiplied by the value scale..."

Paragraph 5 states:

"...multiplication by scale and addition of shift occurs before type conversion takes place."


Paragraph 5 is correct.


Note from the Author or Editor:
In fourth paragraph, second sentence, delete "After conversion to the new data type," and capitalize "each".

Combine the fifth paragraph with the fourth. Delete "Specifically" from second sentence of fifth paragraph and add ie. and () to sentence.

The corrected and combined paragraph will look like this:

"The second function of cvConvertScale() is to perform a linear transformation on the image data. Each pixel value will be multiplied by the value scale and then have added to it the value shift. The result will be converted to the data type of dst. It is critical to remember that, even though ?Convert? precedes ?Scale? in the function name, the actual order in which these operations is performed is the opposite (i.e. multiplication by scale and the addition of shift occurs before the type conversion takes place.)"

Chris Colbert  Jun 04, 2009  Jul 22, 2011
Printed
Page 56
code block under "cvConvert Scale" in middle of page

Delete code block:
"void cvConvertScale(
const CvArr* src,
CvArr* dst,
double scale = 1.0,
double shift = 0.0
);"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 59
First sentence of paragraph after Table 3-6

Change "...and we will not go into the subtleties of Bayer representations OF the CIE color spaces here."
to
"...and we will not go into the subtleties of Bayer representations AND the CIE color spaces here."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 62
Table 3-7

cvGEMM(A,A,1,NULL,0,D,0) should read cvGEMM(A,B,1,NULL,0,D,0)
cvGEMM(A,A,1,C,1,D,0) should read cvGEMM(A,B,1,C,1,D,0)

Anonymous  Oct 18, 2008  Jul 22, 2011
Printed
Page 64
1st paragraph after the function declarations

The line "As with cvGetRow() ... indicates the selected column in arr." appears to have a pair of cut-n-paste typos. The line should read "As with cvGetCol() ... indicates the selected row in arr."

Scott A Thisse  Mar 12, 2009  Jul 22, 2011
Printed
Page 64
first sentence of second paragraph

Move the first sentence "The function cvGetDimSize() returns the size of a single dimension specified by index." to the end of the paragraph.

Then insert "passed to cvGetDims()" after "If the array" in the new first sentence of the paragraph.

The new paragraph will read:
"If the array passed to cvGetDims()is either a matrix or an image, the number of dimensions returned will always be two. For matrices and images, the order of sizes returned by cvGetDims() will always be the number of rows first followed by the number of columns. The function cvGetDimSize() returns the size of a single dimension specified by index."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 65
1st code block

It's stated that cvGetSubRect(...) takes as it's second argument a CvArr* submat, where as it only takes CvMat *

Note from the Author or Editor:
Code should read:

CvMat* cvGetSubRect(
const CvArr* arr,
CvMat* submat,
CvRect rect
);

Anonymous  Oct 26, 2008  Jul 22, 2011
Printed
Page 65
First paragraph after first code block

In first sentence, change "cvGetColumns()" to "cvGetCols()"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 65
third code block (for cvInvert)

Change "Int" to "int"

Code block will look like this:

double cvInvert(
const CvArr* src,
CvArr* dst,
int method = CV_LU
);

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 66
cvMahalonobis section and end note

Change heading "cvMahalonobis" to "cvMahalanobis"and make the same change in the code block.

Also change the three instances of this typo in the paragraph (and sentence after the paragraph) and delete (Mahal) from the first sentence of the paragraph.

Correct the two instances of this typo in the note at the bottom of the page.

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 69
Last word of first paragraph

Change last word of paragraph "cvCvtScale()" to "cvConvertScale()."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 69
first line of cvNot code block (first code block on page)

change first line of code block from "void" to "cvNot":

void(
const CvArr* src,
CvArr* dst
);

to

cvNot(
const CvArr* src,
CvArr* dst
);

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 71
Last sentence on page

Change "The argument op controls..."
to "The argument dim controls..."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 74
Last paragraph

The third sentence in the paragraph:"The closely related function cvSubS() does the same thing except that the constant scalar value is added to every element of src."

should be

"The closely related function cvSubS() does the same thing except that the constant scalar value is subtracted from every element of src."

Also delete the first two sentences of the paragraph, so that the paragraph starts with "The closely related function"

Anonymous  Oct 14, 2008  Jul 22, 2011
Printed
Page 74
2nd paragraph (with heading and code block)

cvSub has been explained twice in subsection "cvSub" and "cvSub, cvSubS and cvSubRS"

Note from the Author or Editor:
Delete the heading cvSub, the code block and the paragraph following it. (the whole section for cvSub)

Shiqi Yu  Jul 13, 2009  Jul 22, 2011
Printed
Page 75
Line 13

"Singular value decomposition (SVD) is the decomposing of an m-by-m ..."
should be
"Singular value decomposition (SVD) is the decomposing of an m-by-n ..."

Shiqi Yu  Jul 13, 2009  Jul 22, 2011
Printed
Page 79
2nd Line

"The function CvSize is ..." should be "The structure CvSize is ...".

Scott A Thisse  Mar 12, 2009  Jul 22, 2011
Printed
Page 79
Bottom

In the section on Polygons the functions cvFillPoly and cvPolyLine take a parameter contours. The meaning and/or use of this parameter isn't discussed in the text.

Note from the Author or Editor:
Submitter is correct, please make the following clarifying insertion. On page 80, after the sentence "Similarly npts is an array of point counts, one for each polygon to be drawn." please insert this sentence: "contours indicates the number of such contours, i.e. the length of the array npts." [In this sentence, the first appearance of 'contours' as well as 'npts' are code references to variable names, they should be in Courier font and uncapitalized. The second appearance of 'contours' is the regular English word and should not be in Courier font.]

Tim Craig  Jun 03, 2009 
Printed
Page 80
second paragraph, first sentence

Change last word of sentence from "structures" to "arrays".

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 83
Example 3-15.

In example 3-15:

CvMat A = cvMat( 5, 5, CV_32F, the_matrix_data );

should be:

CvMat A = cvMat( 5, 5, CV_32F, the_matrix_data->data.ptr );

Note from the Author or Editor:
There is no technical mistake here, but the reader's confusion is noted. We can make the text a little more clear. Please make the following changes:

1) On p83 change "Suppose you had a 5-by-5 identity..." to "Suppose you had a 3-by-3 identity..."

2) In the code fragment following the line "Example 3-15. Saving and loading..." please insert the code line "float the_matrix_data[] = {1,0,0,0,1,0,0,0,1};"

3) In the following line in the code fragment, change "CvMat A = cvMat( 5, 5, CV_32F, the_matrix_data );" to "CvMat A = cvMat( 3, 3, CV_32F, the_matrix_data );"

Guoqing Yan  Jan 28, 2010 
Printed
Page 87
Example 3-20

(original)
char* libraries;
char* modules;
cvGetModuleInfo( 0, &libraries, &modules );
printf("Libraries: %s/nModules: %s/n", libraries, modules );

'/' are backwards and libraries and modules must be typecast as const char **:

(correction)
char* libraries;
char* modules;
cvGetModuleInfo( 0, (const char **) &libraries, (const char **) &modules );
printf("Libraries: %s\nModules: %s\n", libraries, modules );

Aaron Becker  Jan 14, 2009  Jul 22, 2011
Printed
Page 92
bottom of the page

The function cvSaveImage() has changed in version 2.0.0. The book as well as the online documentation of opencv has not yet been updated.

int cvSaveImage(const char* filename, const CvArr* image);

should be

int cvSaveImage( const char* filename, const CvArr* image,
const int* params);

Note from the Author or Editor:
An errata filed 3/2/2011 observes that as of 2.0, this has a third argument. Should we mention that? It defaults to zero anyhow, and seems to have no legitimate values other than zero. Also, is this now replaced by cv::imwrite?

Christoph Bober  Mar 02, 2011 
Printed
Page 98
draw_box function, first block of code on page

The above function takes two parameters as input, the second one being a CvRect struct which specifies the rectangle to draw. However, in the function itself the call to cvRectangle references box and makes no reference to rect. I think all of the references to box in this function should be references to rect.

Also replace cvScalar with CV_RGB.

Note from the Author or Editor:
The first code block should look like this:
//
void draw_box( IplImage* img, CvRect rect ) {
cvRectangle (
img,
cvPoint( rect.x, rect.y ),
cvPoint( rect.x + rect.width, rect.y + rect.height ),
CV_RGB(0xff,0x00,0x00) /* red */
);
}

John McDonald  Feb 02, 2009  Jul 22, 2011
Printed
Page 102
first line of code on page

change "Switch_callback" to "switch_callback"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 103
2nd paragraph

"...you can pass -1 to cvCreateCameraCapture(), which will cause OpenCV to open a window that allows you to select the desired camera."

This is incorrect. As correctly stated on p26, a value of -1 means to just select the default camera.

Note from the Author or Editor:
Submitter is partially correct. Please insert the words "on some platforms" before the referenced text "...you can pass..." (thus it should read "...on some platforms, you can pass...")

Anonymous  May 13, 2009 
Printed
Page 110
Table 5-1

The brief description of the bilateral filter claims that the filter will:

"Apply bilateral 3-by-3 filtering with color sigma=param1 and a space sigma=param2"

It should read:

"Apply bilateral param1xparam1 filtering with color sigma=param3 and space sigma=param4"

Robbie Shade  May 13, 2009  Jul 22, 2011
Printed
Page 110
1st paragraph

In first paragraph on page no. 110 under chapter 5: Image Processing, the name of function "cvSmooth()" is printed as "cv_Smooth()" in line "The cv_Smooth() function has four parameters ....".

Sagun Baijal  May 27, 2011  Jul 22, 2011
Printed
Page 110
Last sentence of second paragraph

Last sentence should read:

Simple blur supports any number of image channels and works on 8-bit images or 32-bit floating-point images.

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 110
Last sentence of first paragraph

Change "ST" to "smoothtype".

The corrected sentence should read:

(Please notice that for some values of smoothtype, ?in place operation?, in which src and dst indicate the same image, is not allowed.)

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 110
Table 5-1

Change table description to:
Table 5-1. Types of smoothing operations, meaning of their parameters, and the depth and number of channels (Nc) supported by each operation.

Change titles to:
Smooth type Name In place Nc src depth dst depth Brief description

Change Nc category in first and second row to "Any" and from "1,3" in third row to "1,3,4"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 116-117
Figures 5-6 and 5-7

Something is amiss with these two figures. My guess:

Either region A in Figure 5-6 should be smaller (similar to region B in Figure 5-7) or the line styles (solid vs. dotted) is reversed for Region B.

Note from the Author or Editor:
Submitter is correct. This one has been annoying me for a while. The image in figure 5-6 is incorrect. The submitter is correct that the image on the left in 5-6 should be smaller. In fact however, there is no left hand side for the image in 5-6 which would make the right hand side of 5-6 correct either. This entire image needs to be redrawn and replaced. How do I submit a correction for a figure? Someone send me (Adrian) an e-mail and I will send you a replacement figure...

Scott A Thisse  Mar 12, 2009 
Printed
Page 116
Figure 5-6

In Figure 5-6 both Image A and A-morph-B are the same. Image A should be the lightly dotted interior figure in Image A-morph-B.

Chris Colbert  Jun 04, 2009 
Printed
Page 116
Note in middle of page

Change "Image morphology is often done on binary images..." to "Image morphology is often done on Boolean images..."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 116
second paragraph, last sentence

Change "...but these statements are generally true for the filled convex kernels typically used."
to
"...but these statements are generally true so long as the kernel is both convex and filled."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 118
first paragraph, third sentence

Change "binary to Boolean" in third sentence.
Sentence should read:

"Observe that if the image is not Boolean then the min and max operators play a less trivial role."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 121
first sentence on page

Change "binary" to "Boolean." Sentence should read:

"Opening is often used to count regions in a Boolean image."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 124
first sentence on page

Change "lighter then" to "lighter than"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 124
End note

Change "not just a binary mask" to "not just a Boolean mask"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 125, 126
second full sentence and code block on 125, first sentence of 126

Change loDiff and upDiff to lo Diff and up Diff. (add a space)

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 128
Figure 5-19

The caption of Figure 5-19:
"hiDiff" should be "upDiff".

Also add space between up/lo and Diff
Also Diff should be lowercase.

Shiqi Yu  Dec 24, 2009  Jul 22, 2011
Printed
Page 128
first sentence of note

Delete: "If the flood-fill mask is set to be marked, then it is marked with the values set in the middle bits (8-15) of the flags value (see text)."

and replace with

"If the flood-fill mask is passed by the user, then the mask pixels, corresponding to the repainted image pixels, are set to the value encoded in the middle bits (8-15) of the flags value (see text)."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 129
Lines 9 and 11

"lowDiff" should be "lo diff" (2 different instances of this in the sentence)

line 9: upDiff should be up diff, loDiff should be lo diff

Shiqi Yu  Dec 24, 2009  Jul 22, 2011
Printed
Page 131
2 code blocks on page

The function prototypes for cvPyrDown and cvPyrUp list the third parameter, filter, as type IplFilter which as near as I can determine isn't defined. The actual prototypes in the software I have they are type 'int'.

Note from the Author or Editor:
Change "IplFilter" to "int"

Code blocks should be:
void cvPyrDown(
IplImage* src,
IplImage* dst,
int filter = IPL_GAUSSIAN_5x5
);

and

void cvPyrUp(
IplImage* src,
IplImage* dst,
int filter = IPL_GAUSSIAN_5x5
);

Tim Craig  Jun 03, 2009  Jul 22, 2011
Printed
Page 136
Table 5-5

In table 5-5, the Operation for the threshold type CV_THRESH_TRUNC has a mistake (probably typo?), uses M instead of T, it should read:

dst_i = (src_i > T) ? T : src_i

jstahl  Jan 20, 2009 
Printed
Page 136
Figure 5-23

The result line is truncated for some of the charts. It should rise to max_value after the last vertical dotted line in the "Threshold Binary" chart. It should fall to zero after the last vertical dotted line in the "Threshold Binary, Inverted" and "Threshold to Zero, Inverted" charts.

Scott A Thisse  Mar 13, 2009 
Printed
Page 138
First Line above Example 5-3

"cvADD()" should be "cdAdd()".

Scott A Thisse  Mar 13, 2009  Jul 22, 2011
Printed
Page 139
Description of Figure 5-24

Change "binary image" to "Boolean image"

Text should read:

"Binary threshold versus adaptive binary threshold: the input image (top) was turned into a Boolean image using a global threshold (lower left ) and an adaptive threshold (lower right); raw image courtesy of Kurt Konolidge"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 145
Paragraph underneath Figure 6-1

Change paragraph to read:

"We can, of course, express this procedure in the form of an equation. If we define the image to be I(x, y), the kernel to be G(i, j) (where 0 &#8804; i &#8804; Mi ?1 and 0 &#8804; j &#8804; Mj ?1, with Mi, Mj being the extent of the kernel in the x- and y-dimensions respectively), and the anchor point to be located at (ai, aj) in the coordinates of the kernel, then the convolution H(x, y) is defined by the following expression:"

*(In Mi, Mj, ai, aj: i and j are subscripts)

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 147
first paragraph, 4th sentence

Change "examine the upper right image in Figure 6-2" to "examine the upper left image in Figure 6-2"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 149
First paragraph, second sentence

Change "aperture_sizes" to "aperture sizes" and change code style to regular font

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 150
last sentence of page (under Laplace)

Change "analog of" to "approximation to"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 160
third paragraph, third sentence

Change "fall naturally into the same number of categories" to "fall naturally into the same number of bins"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 166
cVWarpAffline performance heading

Change "cVWarpAffline performance" to "cvWarpAffline performance"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 167
Third paragraph, last word

Change "srcTri[]" to "dstTri[]".

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 168
code block above first paragraph


delete the last "}"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 169
2nd paragraph under Sparse affline transformations heading, last sentence

Change Ds to Dd

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 169
third paragraph under Sparse affline transformations heading, second sentence

Change "(which does the transformation)" to "(which does the translation)"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 170
first code block

Delete + from fifth line of code.
It should read:

void cvWarpPerspective(
const CvArr* src,
CvArr* dst,
const CvMat* map_matrix,
int flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS,
CvScalar fillval = cvScalarAll(0)
);

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 171
last paragraph, second sentence

Change "As such, it cannot handle perspective transforms" to
"As such, it does not conveniently handle perspective transforms"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 172
first paragraph

First sentence: delete the comma after "three-channel"
Last sentence: change "four dimensions" to "three dimensions"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 172
third paragraph

Change paragraph to read:

"Output of the code in Example 6-3 and in Example 6-4 are shown in Figure 6-14 for affine and perspective transformations. Compare this with the diagrams of Figure 6-13 to see how this works with real images. In Figure 6-14, we transformed the whole image."

(add "Example 6-4" and delete the last two sentences)

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 173, 174
various locations

p. 173 Last paragraph, last sentence:
Change "That is, you can collect all the angles" to
"That is, you could then collect all the angles"

p. 174:
first line: change "above a certain threshold" to some desired threshold"

third line: change "then you can use the function" to "then you would use the function"

Last line of first paragraph should read: "We would then fill a histogram from img_angle as long as the corresponding ?pixel? in img_mag is above our desired threshold."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 174
second sentence of LogPolar section

Add "Next," to beginning of second sentence.

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 177
First line under Discrete Fourier Transform (DFT) section

Change "is it" to "it is" in the first sentence.

Should read:
"For any set of values that are indexed by a discrete (integer) parameter, it is possible to define..."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 179
second paragraph

Paragraph should read:
"In order to understand the last argument, nonzero_rows, we must digress for a moment to explain that in general, DFT algorithms will strongly prefer vectors of some lengths over other lengths, or arrays of some sizes over other sizes. In most DFT algorithms, the preferred sizes are powers of 2 (i.e., 2n for some integer n). In the case of the algorithm used by OpenCV, the preference is that the vector lengths, or array dimensions, be 2p3q5r, for some integers p, q, and r. Hence the usual procedure is to create a somewhat larger array and then use cvGetSubRect() to copy your array into the somewhat roomier zero-padded array. For convenience, there is a handy utility function, cvGetOptimalDFTSize(), which takes the (integer) length of your vector and returns the first equal or larger size which can be expressed in the form given (i.e. 2p3q5r)..."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 182
fourth line on page

O(N2M2):
the 2's should be superscript font

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 183
3rd formula from the top

This formula states that the tilt_sum() calculation is

tilt_sum(X,Y) = sum_{y <= Y} sum_{abs(x - X) <= y} image(x, y)

but this is incorrect. The proper formula, given at the willowgarage website (http://opencv.willowgarage.com/documentation/cpp/imgproc_miscellaneous_image_transformations.html) is

tilted(X,Y) = sum_{y < Y} sum_{abs(x - X + 1) <= Y - y - 1) image(x, y)

I have confirmed that the OpenCV code is actually performing the latter and can provide a small Python program demonstrating the difference.

Note also that the previous formula refers to sqsum(X, Y) as "sum(X, Y)" and that "tilted" is the correct name of the argument to cvIntegral().

Robert R. Lewis  Mar 10, 2011 
Printed
Page 199
last line of code block

change
"int dim_j_bin_j_upper_bound = histogram->thresh2[ i ][ j+1 ];"
to

"int dim_i_bin_j_upper_bound = histogram->thresh2[ i ][ j+1 ];"

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 199
third paragraph in Basic Manipulations with Histograms

change "CvHistogram()" to "CvHistogram" (delete parentheses)

Anonymous  Jul 15, 2011  Jul 22, 2011
PDF
Page 201
Last line, the mathematical formula

There is an error in the correlation mathematical formula in the denominator:

A summation is missing, it must be sqrt(sum(H1'?)*sum(H2'?)) in the denominator (the second summation is missing in the book, or at least, in the PDF version).

Dexter00  Apr 24, 2009 
PDF
Page 204
code

cvNormalizedHist( hist[i], 1.0); //Normalize it
according to the description of the first paragraph,page 205,
this normalization should be comment out

Note from the Author or Editor:
sybmitter is correct, this line should be commented out in the code (i.e. preceeded by '//')

Anonymous  Dec 17, 2008 
Printed
Page 204
Code

cvNormalizeHist( hist[i], 1.0 ); // Normalize it

The above is incorrect, as hist is a pointer to a CvHistogram, rather than an array of histograms. Further more, there is no variable 'i' to index any array.

Note from the Author or Editor:
The submission is correct. On the line idicated the characters "hist[i]" should be changed to simply read "hist" (i.e. the "[i]" should be removed.)

IanLee1521  Sep 20, 2010 
Printed
Page 206
Figure 7-5 description

Should read as follows:

"Histogram of flesh colors under indoor (upper left), sunlit outdoor (middle left), and shaded outdoor (lower left) lighting conditions; the middle and right-hand columns display the associated BGR and HSV histograms, respectively."

Anonymous  Jul 15, 2011  Jul 22, 2011
Printed
Page 207
second sentence of Earth Mover's Distance section

The sentence beginning with "If instead of a histogram match..." is hard to parse. The sentence also contains a typo (or a cut-and-paste error): "...when the second histogram has shifted its been by...".

Note from the Author or Editor:
Replace "If instead of a histogram match measure we used a histogram distance measure, then we could still match like histograms to like histograms even when the second histogram has shifted its been by looking for small distance measures."

with:

"The difficulty with histogram match measures is that they can return a large difference in the case where two histograms are similarly shaped, but only displaced relative to one another. It is often desirable to have a distance measure which performs like a match, except which is less sensitive to such displacements."

Anonymous  Oct 18, 2008  Jul 22, 2011
Printed
Page 208
Line 6 of the 2nd paragraph

"[537,7;43,11]" should be "[537,7,43,11]".

The semicolon should be a comma.

Shiqi Yu  Feb 06, 2009  Jul 22, 2011
Printed
Page 209
3rd paragraph

Paragraph 3 sentence 3 states:

"The image or array back_project is a single-channel 8-bit or floating point image of the same size as the input images in the array."

In actuality the array back_project must be the same type as images in the input arrays.

Note from the Author or Editor:
The submitter's question implies that this fact is not obvious. That seems like reason enough to me to provide some clarification. Could we add a parenthetical at teh end of the referenced sentence reading: "(the type of back_project must match the type of image)". Please further note that 'back_project' and 'image' in the parenthetical are code references to the specific variable names in the function declaration, and therefore should be in Courier font (as is 'back_project' in the referenced sentence.)

Chris Colbert  Jun 04, 2009 
PDF
Page 215
formula bottom of page

The formular for the Cross Correlation shows, that the product of the template and image must be squared. But that's wrong. See: http://opencv.willowgarage.com/documentation/image_processing.html#matching

Note from the Author or Editor:
I can?t say I understand this person?s remark, but in discussion of Kouichi?s comments, it is clear that the change required is to remove the ?squared? on the right hand side.

Anonymous  Jul 23, 2009 
Printed
Page 215
n the CV_TM_CCOEFF template matching formula

in the CV_TM_CCOEFF template matching formula, the sum should be above the division mark and not under as it is.

Note from the Author or Editor:
I believe that this is correct. i.e. that the transcription from the ?serialized? equation (which can be found on the opencv web page) is not correct: ?1/(w.h).Sum(?)? is not intended to imply that the sum is in the denominator, but rather that the entire sum is multiplied by ?1/(w.h)? (i.e. normalized).
[Vadim verified this assertion]

Also, the first equation in this set has a ?squared? on the right hand side which should be removed (same error as CV_TM_CCORR above).

Anonymous  Mar 31, 2011 
Printed
Page 215
third sentence on page

Change "rimages" to "images" in the beginning of the third sentence.

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 216
4th formula in the page.

Formula for the normalization coefficient contains the summation of I values over x' and y' translated by (x,y). I(x+x', y+y') should be under the summation sign as opposed to I(x+x', y+x') as printed.

Vytautas Vaitukaitis  Mar 22, 2011 
Printed
Page 217
eighth line in first paragraph (after the note)

Change "...or minimum (for square-difference) matching methods."
to "...or minimum (for square-difference matching methods)."

Anonymous  Jul 18, 2011  Jul 22, 2011
PDF
Page 218
end note

"you can immediately see that a good match ......while a poorer score of 0.20 is reduced substantially (0.50^5=0.03)."

should the value 0.20 here be 0.50?

Anonymous  Dec 18, 2008  Jul 22, 2011
Printed
Page 218
second line of paragraph (under code block)

change "(recall that..." to ". Recall that.."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 223
second line of third paragraph

Change "You must be aware of an important feature of this function: it is the only way to release (and thereafter reuse) memory allocated to a memory storage."

to

"You must be aware of an important feature of this function: other than cvReleaseMemStorage(), it is the only way to reuse the memory allocated to a memory storage."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 223
first line of fourth paragraph

Change "You can also allocate your own continuous blocks from a memory store"

to

"You can also allocate your own continuous blocks from a memory storage"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 225
Line 11

CV_SEQ_ELTYPE_POINT should be CV_SEQ_ELTYPE_PPOINT.

Note from the Author or Editor:
Submitter is correct, please make the indicated correction

Shiqi Yu  Dec 09, 2008 
Printed
Page 226
Line 21

"cvClearMemStore" should be "cvClearMemStorage".

deltat  Mar 01, 2010  Jul 22, 2011
Printed
Page 230
"... all of them operate in O(l) time ..."

"... all of them operate in O( _l_ ) time ..."

should read

"... all of them operate in O( _1_ ) time ..."

Anonymous  May 10, 2009  Jul 22, 2011
Printed
Page 230
third line of paragraph

Change "The Push functions return an argument to the element pushed into the sequence"

to:

"The Push functions return a pointer to the element pushed into the sequence"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 234
second line of text on page

After ..."then the entire sequence is copied." at the top of the page, add the following to the end of the paragraph:

"The return value of cvCvtSeqToArray() is a void* pointer which is equal to the elements pointer provided when the function was called."

*(void and elements should be in code font)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 235
first sentence of note

Change "Figure 8-1" to "Figure 8-2"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 240 & 261
Figures 8-4 & Figure 8-13

Figures 8-4 (pg 240) and 8-13 (page 261) have an error on the freeman chain code representation. The code that ends 5-6-6-6-6-7 should be
5-6-6-6-6-6-7; 5-sixes. This can be seen by two methods. In both figures the there are 5 left-horizontal arrows. Also in Fig 8-13 in the 45-degree view there are 5-UL arrows and the chain code ends 6-7-7-7-7-7-8; 5-sevens.

Also in comparing figure 8-3 CV_RETR_LIST to the related text: The text
says "retrieves all the contours". and "eight contours" are found". This happens to agree with the figure.

However the trees for CV_RETR_EXTERNAL, CV_RETR_CCOMP and CV_RETR_TREE ,
which also say "retrieves all the contours", have 9 contours. Also the
figure 8-2 shows 9 contours. The contour h000 is missing from the
CV_RETR_LIST tree.

Anonymous  Jun 24, 2009 
Printed
Page 243
second paragraph, last sentence

Delete the last sentence of the paragraph: "Finally, that image is displayed and the structures we allocated at the beginning of the callback are released."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 243
second sentence of third paragraph

Change "This is a good example to play with yourself and see what effects result from changing either the contour finding mode (CV_RETR_LIST in the code) or the max_depth that is used to draw the contours (0 in the code)."

to this:

"This is a good example to tinker with on your own to explore the effects of changing either the contour finding mode (CV_RETR_LIST in the code) or the max_depth that is used to draw the contours (0 in the code)."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 247, 248
Paragraph beginning at bottom of page 247, continuing at top of p 248

Paragraph should read like this:

"The first argument of cvArcLength() is the contour itself, whose form may be either a sequence of points (CvContour* or CvSeq*) or an n-by-1 two-channel matrix (CvMat*) of points. Next are the slice argument and is_closed, an argument indicating whether the contour should be treated as closed. The possible values of is_closed are: ?true? (any value greater than zero), ?false? (a value of zero), or a negative value. A negative value (which is the default) indicates that the function should check the special CV_SEQ_FLAG_CLOSED bit in the sequence header to determine if the sequence is closed or not. The slice argument allows us to select only some subset of the points in the curve."

Note from the Author or Editor:
true and false should be surrounded by quotes

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 248
third sentence of second paragraph under Bounding boxes

Change "To understand the second argument, update, we must harken back to footnote 8."

to

"To understand the second argument, update, we must harken back to one of the earlier footnotes in this chapter."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 251
The first line of the 3rd paragraph

"The second utility function, cvPointSeqFromMat()" should be "The third ...".

Shiqi Yu  Dec 10, 2008  Jul 22, 2011
Printed
Page 252, 253
various places on both pages

The cvContoursMoments function does not exist. It is properly named "cvContourMoments."

(delete the s from Contours)

eric gradman  Jan 06, 2009  Jul 22, 2011
Printed
Page 258
first sentence under code block

Change "This code references CvTermCriteria()" to "This code references CvTermCriteria"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 259
1st paragraph

The first sentence reads "There are three important OpenCV methods that relate to complex hulls and convexity defects.".

This should read, "There are three important OpenCV methods that relate to convex hulls and convexity defects.".

Idris Soule  Nov 06, 2010  Jul 22, 2011
Printed
Page 261
Figure 8-13

The code that ends 5-6-6-6-6-7 should be 5-6-6-6-6-6-7; 5-sixes. The code that ends 6-7-7-7-7-8 should be 6-7-7-7-7-7-8; 5-sevens.

Anonymous  Jul 18, 2011 
Printed
Page 263
exercise number 5

Change 126.7 to 125.7

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 268, 269
Last paragraph of 268 (and first two lines at top of 269

Move last sentence of paragraph to the beginning of the paragraph. The paragraph should read:

"The cvInitLineIterator() function returns the number of points that will be iterated over for that line. A companion macro, CV_NEXT_LINE_POINT(line_iterator), steps the iterator from one pixel to another. The input image may be of any type or number of channels. Points pt1 and pt2 are the ends of the line segment. The iterator line_iterator just steps through, pointing to the pixels along the line between the points. Regardless of the number of channels in the image, each call to CV_NEXT_LINE_POINT() moves the line_iterator to the next pixel. All the channels are available at once as line_iterator.ptr[0], line_iterator.ptr[1], and so forth. The connectivity can be 4 (the line can step right, left, up, or down) or 8 (the line can additionally step along the diagonals). Finally if left_to_right is set to 0 (false), then line_iterator scans from pt1 to pt2; otherwise, it will go from the leftmost to the rightmost point."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 269
6th line from bottom of code block

Change direction of slashes.

fprintf(fptrb,"/n");fprintf(fptrg,"/n");fprintf(fptrr,"/n");

change to

fprintf(fptrb,"\n");fprintf(fptrg,"\n");fprintf(fptrr,"\n");

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 270
1st paragraph

formula Nchannels X max(|pt2x - pt2x| + 1,|pt2y -pt2y| + 1)
should be Nchannels X max(|pt2x - pt1x| + 1,|pt2y -pt1y| + 1)

Note from the Author or Editor:
Page number of error:
270

Location on the page:
1st paragraph

Version of product where error was found:
Printed

Detailed description of error: formula Nchannels X max(|pt2x - pt2x| + 1,|pt2y -pt2y| + 1)
should be Nchannels X max(|pt2x - pt1x| + 1,|pt2y -pt1y| + 1)

Hugo Jacques  Jan 10, 2010  Jul 22, 2011
Printed
Page 278
first end note

Change "learning-oriented tubes" to "learning oriented cylanders"

delete hyphen and change tubes to cylanders

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 280
last sentence of second paragraph

Change last sentence "A second runtime threshold allows for adjusting the model to specific conditions."

to

"At runtime, the threshold for inclusion in a ?box? can be set to a different value than was used in the construction of the boxes; often this threshold is simply set to zero in all three dimensions."

Note from the Author or Editor:
the word box should be in quotes

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 282
function "int update_codebook"

In the second for loop of the function, variable 'i' is declared in the for loop which means that when you get to the end of the function "return (i)" there is no variable in the scope.

Declare "int i" immediately before the for loop.

Note from the Author or Editor:
The submittor is correct about the error, but submitted correction is in poor style. To fix the problem, the following changes should be made:

1) The line "int found_codeword = -1;" on p282 should be inserted before the line "for(int i=0; i<c.numEntries; i++) {"

2) the line "found_codeword = i;" should be inserted immediately before the line "break;" at the bottom of page 282.

3) The line "if( i == c.numEntries ) //if no existing codeword found, make one" on p283 should be changed to read "if( found_codeword==-1 ) // If no existing codeword was found, make one."

4) The line "return(i)" on p284 should be changed to read: "return( found_codeword >= 0 ? found_codeword : c.numEntries );"

IanLee1521  Sep 13, 2010 
Printed
Page 286
background_diff(...)

In the for loop of the function, variable 'i' is declared in the for loop which means that when you get to the end of the function "if(i >= ...)" there is no variable in the scope.

Declare "int i" immediately before the for loop.

Note from the Author or Editor:
The submittor is correct, this is a mistake. The correction proposed by the submittor would work, but it is poor coding style. The following changes should be made to make the code work correctly:

1) The line which reads: "break; //Found an entry that matched all channels" should be changed to read "return(0); // Found an entry that matched all channels."

2) The line which reads "If( i>= c.numEntries ) return(255);" should be deleted

3) The line which reads "return(0);" (immediately following the above mentioned line) should be changed to read "return 255; // Apparently no match could be found."

IanLee1521  Sep 13, 2010 
Printed
Page 286
last two lines of code block

Switch (255) and (0) so the last two lines of code read:

if(i >= c.numEntries) return(0);
return(255);
}

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 290
Code after first paragraph

const CvScalar CVX_WHITE = CV_RGB(0xff,0xff,0xff)
const CvScalar CVX_BLACK = CV_RGB(0x00,0x00,0x00)

These lines should finish with ;

Note from the Author or Editor:
Submitter is correct, please make the indicated change.

Anonymous  Oct 28, 2008 
Printed
Page 300
third line of last paragraph

Change "faint lines going out to its vertex"

to

"dotted lines going out to its vertex."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 301
Figure 9-12

I believe that this diagram is slightly flawed. In (c) Two of the "edges" are still visualized (the ones headded to the fictitious point in the south), and the "circum-circle" mentioned in the preceeding text (the one that touches that fictitious point and the two points from which the above mentioned lines are emenating) is both not in the right place and shown as a dotted line instead of a dashed line as are all of the other circles. [If the dotted edges are headed for that far away point, the visualized circle's location and included points are not consistant with the location of the far away point.]
[In conversation with Kouichi-san, Vadim suggested just getting rid of this construction in both the image and the (last sentence of the) preceeding text. I am inclined to agree.

Anonymous  Jul 18, 2011 
Printed
Page 301
text for number 1

Delete "and start at one of its vertices (this yields a definitive outer starting point)."

so that number 1 reads: "1. Add the external triangle."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 304
second line of last paragraph

Change "The structure of cvQuadEdge2D contains a det of two..."

to "The structure CvQuadEdge2D contains a set of two..."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 308
First sentence under Points from edges

Change: "We?ll also need to know how to retrieve the actual points from Delaunay or Voronoi vertices."

to

"We?ll also need to know how to retrieve the actual points from Delaunay or Voronoi edges."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 309, 310
last code block on 309, first code block on 310

Change the uppercase I to lower case i in the last line of both code blocks:

They should read on 309:

(CvSubdiv2DPoint*)cvGetSeqElem( (CvSeq*)subdiv, i );
}

and on 310:

CvQuadEdge2D*)cvGetSeqElem( (CvSeq*)(my_subdiv->edges), i );
}

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 310
text of number 1 in middle of page

Change:

1.Until you have circumnavigated the convex hull, go to the next edge on the hull via cvSubdiv2DRotateEdge(CvSubdiv2DEdge edge, 0 ).

to:

1.Until you have circumnavigated the convex hull, go to the next edge on the hull via cvSubdiv2DRotateEdge(CvSubdiv2DEdge edge, 2 ).

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 314
2nd paragraph, Hint iin question 5

Hint is asking to look carefully at Figure 9-8.

Shouldn't this be 9-18 ?

Note from the Author or Editor:
The submittor is correct, the reference should be to the figure on the same page, currently Figure 9-18.

Hugo Jacques  Mar 02, 2010 
Printed
Page 318
third and fourth lines on page

Change "(Here wi,j is a weighting term that can be uniform, but is often used to create a circular window or Gaussian weighting.)"

to:

(Here wi,j is a weighting term that can be uniform but is often used to create an effectively non-square window, by setting some entries to zero, or Gaussian or other weighting.)

*i, j, are subscripts

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 322
Figure 10-3

Correct "v_3" on right side of upper right figure to be v_4. Correct {v_3} in subcaption to the same figure to be {v_i}.

Anonymous  Jul 18, 2011 
Printed
Page 324
Note of Figure 10-4

[Black82]
should be:
[Black92]

Yishi Guo  Jan 29, 2010  Jul 22, 2011
Printed
Page 324
Figure 10-4

"Spacial" should be "Spatial"

Note from the Author or Editor:
Submitter is correct, change misspelling in figure. (Note, the error is in the figure itself, not in the figure caption.)

Matt Montag  Sep 16, 2011 
Printed
Page 344
third sentence in first paragraph

Change

Here, the expected gradient magnitude will be just the average number of time-stamp ticks between each silhouette in successive calls to cvUpdateMotionHistory();

to:

Here, the expected gradient magnitude will be just the average number of milliseconds in the time-stamp between each silhouette in successive calls to cvUpdateMotionHistory();

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 348
Figure 10-17

These images are WAY too dark. This needs to be corrected.

Anonymous  Jul 18, 2011 
Printed
Page 352
2nd equation

There are 2 "^" missing, for x_1 and for the variance in the second fraction's numerator.

Note from the Author or Editor:
This submission is correct. Actually three corrections need to be made:

1) the text "we have only our first measure x_1 = x_1 and its...", the text should be changed to read "we have only our first measurement x^_1 = x_1 and its..." (i.e. change 'measure' to 'measurement' and add a "hat" to the x_1 on the left side of the equal sign.)

2) In the equation immediately below the previous paragraph, change "x_1" to "x^_1" (i.e. add a "hat" to the "x_1" on the right side of the equation), and change "sigma_1^2" to "sigma^_1^2" (i.e. add a "hat" to the sigma-two_squared in the numerator of the second fraction on the right hand side of the equation.

Dominik Schmidt  Oct 23, 2009 
Printed
Page 352
second major equation on page

The numerator on the right side should be sigma-1-hat-squared, not sigma-1-squared.

Anonymous  Jul 18, 2011 
Printed
Page 352
fifth paragraph, second sentence

Left hand side should be x-1-hat, not x-1

Anonymous  Jul 18, 2011 
Printed
Page 357
2nd equation

Matrix H is written as a 4-by-2 matrix, but it should be its transpose instead.

Nils Plath  Aug 19, 2010 
Printed
Page 358
1st equation

It should read ...z_k... instead of ...z^-_k..., i.e. the - (minus) superscript of z_k is to be omitted.

Dominik Schmidt  Oct 23, 2009 
Printed
Page 359
6th line of code on top of page

Change:

CvMat* error_cov_pre; // prior error covariance:
// (P_k'= F P_k-1 Ft) + Q

to:

CvMat* error_cov_pre; // prior error covariance:
// P_k'=(F P_k-1 Ft) + Q

(move the first parenthesis over)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 365
Figure 10-20

The author says:

This image sucks. Redraw with ?real? Gaussians.

Anonymous  Jul 18, 2011 
Printed
Page 365
first line of last code block

Delete ) from beginning of line.
Line should read:

typedef struct CvConDensation

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 367
line 9 of code fragment

Should CD->flConfidence[i] = Prob;

read

Should CD->flConfidence[i] = p;

Anonymous  Oct 11, 2008  Jul 22, 2011
Printed
Page 372
description of Figure 11-2

Change "A point Q = (X, Y, Z) is projected onto the image plane by the ray passing through the center of projection, and the resulting point on the image is q = (z,y,f); the image is really just the projection screen "pushed" in front of the pinhole (the math is equivalent but simpler this way)

to:

A point Q = (X, Y, Z) is projected onto the image plane by the ray passing through the center of projection; the image plane is really just the projection screen ?pushed? in front of the pinhole (the math is equivalent but simpler this way)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 374
third and fourth full paragraphs and note

Change subscript scr to src

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 376

Tangential distortion equations should be

x_{corrected} = x + [2p_1xy + p_2(r^2+2x^2)]
y_{corrected} = y + [p_1(r^2+2y^2) + 2p_2xy]

Anonymous  Oct 20, 2008 
Printed, PDF
Page 386
5th paragraph

The text is:

"The homography matrix H that maps a planar object?s points onto the imager is then described completely by H = sM[r1 r2 t], where: q = sHQ'"

Strictly interpreted, though, the s term is squared that way. It might be worthwhile to reiterate that s is being factored out of H as per convention.

Note from the Author or Editor:
The submittor is correct that this is not as clear as it could be. I propose the following changes to add clarity:

1) on p385, the equation "q~ = s H Q~" should be changed by the addition of a subscript '1' on 's' (i.e. 's' becomes 's_1', where '_' denotes subscripting).

2) The text "Here we have introduced the parameter s" should be changed such that 's' is again subscripted 's_1'.

3) on p386 the equation beginning "q~ = s M W Q~, where M = ..." should be changed such that 's' is subscripted 's_1'., and the same change should be made to 's' as it appears (both times) in the matrix equation "[[x][y][z]] = s M [ r_1 r_2 r_3 t ][[X][Y][0][1]] = s..."

4) the text "...described completely by H = s M [r_1 r_2 t],..." should be changed such that the 's' is subscripted by '2' (i.e. 's' becomes 's_2').

5) in the same sentence described in 4), immediately after the comma in ", where:" (i.e. before the word 'where') the following insertion should be made: "for some other arbitrary constant s_2, ".

6) The equation on the following line should be changed such that 's' is replaced by 's_1'. (i.e. 's' subscripted by '1')

7) In the next line after the equation following the sentence in 4) and 5), after the sentence "Observe that H is now a 3-by-3 matrix. please add a footnote. The footnote should read "The constants s_1 and s_2 are not necessarily equal, but what matters to us here is that they are both equally arbitrary numbers."

togaen  Jul 22, 2010 
Printed
Page 390
third equation on page

The final B column vector in this equation does not need the 'T' (transpose).

Anonymous  Jul 18, 2011 
Printed
Page 391
Last equation on page.

Typing error, the equation should look like this:

x_p = f_x * X_w / Z_w + c_x
y_p = f_y * Y_w / Z_w + c_y

Anonymous  Oct 28, 2008 
Printed
Page 391
last equation

In the formula, it has y_{p} = f_{y} * X^{W}/Z^{W} + c_{y}.
It should have been y_{p} = f_{y} * Y^{W}/Z^{W} + c_{y}

Note from the Author or Editor:
Submitter is correct, please make the suggested change. (Note his use of latex formatting, the point is to change the 'X' to a 'Y')

Ramesh Marikhu  Feb 16, 2009 
Printed
Page 403
Lines 3 and 4

"cvFindExtrinsicCameraParameters2" should be "cvFindExtrinsicCameraParams2"


"the jacobian function" should be changed to "cvRodrigues2() function"

Shiqi Yu  Dec 24, 2009  Jul 22, 2011
Printed
Page 409
first paragraph

First part of paragraph should read:

To get a bird?s-eye view , we?ll need our camera intrinsic and distortion matrices from the calibration routine. Just for the sake of variety, we?ll read the files from disk. We put a chessboard on the floor and use that to obtain a ground plane image for a miniature robot car;

(remove s from intrisics, change robot cart to miniature robot car)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 412
first paragraph

Change "and drive the cart around"

to

"and drive the miniature car around"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 418
Figure 12-6

There is an error in this figure. The right hand plane should have coordinates x_r,y_r (not x_l,y_l) as printed.

Anonymous  Jul 18, 2011 
Printed
Page 419
last line on page

Change (from the points of projection to the corresponding epipolar points)

to:

(from the points of projection to the corresponding epipoles)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 420
last line of first paragraph, first bullet point

In last line of first paragraph: change "epipolar point" to "epipole"

First bullet point should read:
?Every 3D point in view of the cameras is contained in an epipolar plane that intersects each image. The resulting line of intersection is an epipolar line.

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 421
third end note

Change "E was described in almost the exact same words"

to

"E was described in almost the exact same way"

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 422
First footnote

...with p_l and p_r, which are the location of the point P in the coordinate frames of the two cameras.

->

...with P_l and P_r, which are the location of the point P in the coordinate frames of the two cameras.

(l, r are subscripts)

Anonymous  Oct 26, 2008  Jul 22, 2011
Printed
Page 425
footnote

In the second and third lines, the description of the RANSAC algorithm is really LMedS and vice versa.

Should read:
"but the basic idea of LMedS is to solve the problem many times using a random subset of the points and then take the particular solution closest to the average or the median solution. RANSAC takes a subset of points..."

Kyle H  Mar 26, 2009  Jul 22, 2011
Printed
Page 427
Paragraph before "Stereo Calibration"

The equation ax + by = c = 0 should be replaced by ax + by + c = 0.

Anonymous  Oct 21, 2009  Jul 22, 2011
Printed
Page 440
Second Paragraph

In the second paragraph that begins with "Correspondence is computed..." there is mention of the parameter subPixelDisparities near the end of the paragraph however this parameter can not be found in the OpenCV source. Thus there are only 16 subdisparities per pixel and it is currently not configurable.

Note from the Author or Editor:
Delete last five lines of paragraph, from "Disparities have discrete, subpixel rsolution..." to "Remember that large disparities represent closer distances."

Add the following lines to the end of the paragraph:

"Disparities have a discrete subpixel resolution which is equal to four bits of resolution below the individual pixel level. When the output image is a 32-bit floating point image, non-integer disparities will be returned. When the output image is a 16-bit integer, the disparity will be returned in 4-bit fixed-point form (i.e. multiplied by 16 and rounded to an integer)."

Anonymous  Jul 08, 2009  Jul 22, 2011
Printed
Page 445
First two lines of last paragraph

Change "Finally, if we rectified the images then we initialize the block-matching state (internal allocations and parameters) using cvCreateBMState(). We can then compute the disparity maps by using cvFindStereoCorrespondenceBM()."

to:

"Finally, if we have rectified the images, we can then compute the disparity maps by using cvFindStereoCorrespondenceBM(). (The block-matching state CvStereoBMState, which is passed to cvFindStereoCorrespondenceBM(), should be created in advance using cvCreateStereoBMState().)

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 446
line 14, 15 of code

Change "(0 for Hartley // or 1 for Bouguet stereo methods)."

to:

(0 for Bouguet
// or 1 or 2 for Hartley stereo methods).

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 448
2/3 down in code

I believe the following line is wrong:

cvPoint3D32f(i*squareSize, j*squareSize, 0);

shouldn't the x coordinate (j) be first?

cvPoint3D32f(j*squareSize, i*squareSize, 0);

Joe Stam  Jan 05, 2009  Jul 22, 2011
Printed
Page 461
first sentence of last paragraph

Change "Many algorithms have been devised to perform learning and clustering."

to:

"Many algorithms have been devised to perform classification and clustering."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 462
Second sentence under OpenCV ML Algorithms

Change: "...which are in CVCORE, and face detection, which is in CV."

to:

"...which are in CXCORE, and face detection, which is in CV."

Anonymous  Jul 18, 2011  Jul 22, 2011
Printed
Page 464
2nd paragraph

The URL for Flickr is wrong, "http://www.flicker.com" should be "http://www.flickr.com". Flickr is without "e".

Hristo Hristov  Apr 16, 2009  Jul 22, 2011
Printed
Page 471
Line 4 of the 3rd paragraph

OpenCV Wiki documentation has been changed from http://opencvlibrary.sourceforge.net to http://opencv.willowgarage.com/. The wiki URLs in the book should be all updated.

Note from the Author or Editor:
change (http://opencvlibrary.sourceforge.net/)

to

(http://opencvlibrary.willowgarage.com/).

Shiqi Yu  Dec 19, 2008  Jul 22, 2011
Printed
Page 471
The last footnote. The last line of page 471

"cvcore" should be "cxcore".

Shiqi Yu  Dec 19, 2008  Jul 22, 2011
Printed
Page 472
The last two rows in Table 13-3

"cvcore" should be "cxcore" in the last two rows (on the right) in Table 13-3.

Shiqi Yu  Dec 19, 2008  Jul 22, 2011
Printed
Page 475
1st paragraph

A code snippet for predict method has:

float CvStatMode::predict(const CvMat* sample [,<prediction_params>])const;

There is no class CvStatMode replace with CvStatModel.

Note from the Author or Editor:
This submission is correct, "CvStatMode" should be changed to "CvStatModel" in the declaration at the top of the page, and anywhere else it should appear.

Idris Soule  Jan 08, 2011 
Printed
Page 477
text under CV_COVAR_NORMAL

Text should read:

CV_COVAR_NORMAL
Do the regular type of covariance calculation as in the previously displayed equation. If the flag is not set, the following matrix is computed instead:
&#931; &#771;=E[(X-&#956;_x )^T (X-&#956;_x )]


When each vector size is significantly larger than the number of vectors, &#931; &#771; will be much smaller than &#931; (and thus much faster to process). On the other hand, it is easy to prove that the non-zero eigenvalues of &#931; and &#931; &#771; are the same. It also follows that for any eigenvector v of &#931;, corresponding to some eigenvalue &#955;, can be easily computed from its counterpart v &#771; of &#931; &#771; with the same eigenvalue by the relation: v=(X-&#956;_x ) ( v) &#771;.

Anonymous  Jul 18, 2011 
Printed
Page 499
first line on page

Change "...that may be missing then we can set use_surrogates to CvDTreeParams::use_surrogates..."

to:

"...that may be missing then we can set use_surrogates to true..."
(true is in code font)

Anonymous  Jul 18, 2011  Jul 22, 2011
PDF
Page 511
line 11 of Example 13-4

"Double" should be "double"

Anonymous  Sep 26, 2009  Jul 22, 2011
Printed
Page 512
Example 13-4

Code in Example 13-4.
cvRectangle(img,cvPoint(r.x,r.y),cvPoint(r.x+r.width,r.y+r.height),colors[i%8])
should be corrected as
cvRectangle(small_img,cvPoint(r->x, r->y), cvPoint(r->x+r->width,r->y+r->height), colors[i%8]);

Note from the Author or Editor:
Submitter is correct, please make the change indicated.

Anonymous  Jul 07, 2009 
PDF
Page 512
line 12 / 13

In addition to the already mentioned mistake on this page ("." should be "->"), the scale factor is not taken into account.
The correct lines are:
cvPoint(r->x * scale, r->y * scale),
cvPoint((r->x + r->width) * scale, (r->y + r->height) * scale)

Anonymous  Sep 26, 2009  Jul 22, 2011
PDF
Page 512
line 18

cvReleaseImage( &graygray ); should be cvReleaseImage( &gray );

Note from the Author or Editor:
Submitter is correct, please change as indicated.

Anonymous  Sep 26, 2009 
Printed
Page 548
Left column

An index entry for the cvSmooth() function is missing. There should probably be a reference to pages 109-110 for this function.

Note from the Author or Editor:
Submitter is correct, please add index entry on p548 for cvSmooth and reference page 109.

Michael D. Dudley  May 30, 2009