Errata


Print Print Icon

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page XIII
Line 10

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

Anonymous 
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.

Anonymous 
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 
Printed Page xiv
the last paragraph

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

Shiqi Yu 
Safari Books Online 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

Anonymous 
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 
Printed Page 11
2nd paragraph

"All the program examples in this book are based on OpenCV version 2.0." should be "... version 1.0."

Anonymous 
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_".


Anonymous 
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

Justin L. 
Printed Page 22
Example 2-4

missing curly bracket

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

Christian Schwarte 
Printed Page 22
listing 2-4, line 7

(using Linux)
when using gcc the function cvNamedWindow requires a second parameter;
as printed, it works only with g++

Anonymous 
Printed Page 23
15th line

(using Linux) example 2_4 only worked with g++, not gcc

cvSmooth() complained

Christian Schwarte 
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)

Jitao David Zhang 
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 
Printed Page 25
Example 2-6, Line 11, Example 2-7

Two comments:

Ex 2-6, text "cvSize(" is not needed (and causes a compile time error).

Ex 2-7, Although the canny example specifies single channel only, it is my suggestion to add a function here to convert the image to single channel:

IplImage *doGrayscale(IplImage* in)
{
IplImage* out = cvCreateImage(
cvGetSize(in),
IPL_DEPTH_8U,
1
);
cvCvtColor(in, out, CV_BGR2GRAY);
return out;
}

Jonathan Suppe 
Printed Page 29
3rd paragraph

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

Anonymous 
Printed Page 29
3rd para

I think 5th sentence should start as Cxcore contains ... and not Cvcore contains ...

Andrew M. Neiderer 
Printed Page 33
between 2nd and 3rd paragraphs

cvMat* should be CvMat*

Anonymous 
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.

Ashish 
Printed Page 40
Example 3-9

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

Anonymous 
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 
Printed Page 54
C definition of cvCalcCovarMatrix

Instead of

"void cvAdd("

it should be

"void cvCalcCovarMatrix("

Anonymous 
Printed Page 54
line 5

In the prototype, function cvCalcCovarMatrix() is erroneously called cvAdd()

MP 
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.


Chris Colbert 
Printed Page 62
Table 3-7

Macro aliases for common usage of cvGEMM() should be

cvMatMul(A, B, D) cvGEMM(A, B, 1, NULL, 0, D, 0)
cvMatMulAdd(A, B, C, D) cvGEMM(A, B, 1, C, 1, D, 0)

Anonymous 
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 
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 
Printed Page 65
1 section

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

Anonymous 
Printed Page 69
Line 11

"
void(

const CvArr* src,

CvArr* dst

);
"

should be

"
void cvNot(

const CvArr* src,

CvArr* dst

);
"

Shiqi Yu 
Printed Page 74

"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."

Anonymous 
Printed Page 74
2nd paragraph

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

Shiqi Yu 
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 
Printed Page 79
2nd Line

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

Scott A Thisse 
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.

Tim Craig 
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 
Printed Page 98
draw_box function

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.

John McDonald 
PDF Page 98
line 8

The source code contains "cvScalar(0xff,0x00,0x00) /* red */".

However, channel order in OpenCV is BGR. OpenCV contains the CV_RGB macro for those more familiar with RGB.

The code should become: "CV_RGB(0xff,0x00,0x00) /* red */".

Anonymous 
PDF Page 98
line 2

The method draw_box does not use the "rect" parameter. The box references should probably change into rect references.

Anonymous 
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.

Anonymous 
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 
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.

Scott A Thisse 
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 
Printed Page 131
1/3 and 1/2 down the 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'.

Tim Craig 
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 
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 
Printed Page 138
First Line above Example 5-3

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

Scott A Thisse 
Printed Page 165
C definition of cvWarpAffine()

Where is “int flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS”
should be “int flags = CV_INTER_LINEAR + CV_WARP_FILL_OUTLIERS”. The boolean OR is between the optional flags CV_WARP_FILL_OUTLIERS and CV_WARP_INVERSE_MAP, and not between those and the interpolation flags.

Joao Nuno Carvalho 
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 
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

Anonymous 
Printed Page 207
first paragraph of Earth Mover's Distance chapter

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...".

Anonymous 
PDF Page 208
2nd paragraph under the code

?
[537,7;43,11]->[537,7,43,11]

Anonymous 
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 
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.

Chris Colbert 
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

Anonymous 
PDF Page 218
last paragraph

"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 
Printed Page 225
Line 11

CV_SEQ_ELTYPE_POINT should be CV_SEQ_ELTYPE_PPOINT.

Shiqi Yu 
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 
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 
Printed Page 251
The first line of the 3rd paragraph

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

Shiqi Yu 
Printed Page 252
3rd paragraph

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

eric gradman 
Printed Page 286
the background_diff() function

On page 286 when you discuss the background_diff() function,
you say
'If the pixel is within a learned box, 255 is returned (a positive detection of foreground);'.

Instead, this should read:

'If the pixel is *not* within a learned box, 255 is returned (a positive detection of foreground);'.

Anonymous 
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 ;

Anonymous 
Printed Page 352
2nd equation

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

Dominik Schmidt 
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 
Printed Page 365
Last code paragraph.

In the type definition where is “)typedef struct CvConDensation” should be “typedef struct CvConDensation”, without the first closing parentheses.

Joao Nuno Carvalho 
Printed Page 367
line 9 of code fragment

Should CD->flConfidence[i] = Prob;

read

Should CD->flConfidence[i] = p;

Anonymous 
Printed Page 367

CD->flConfidence[i] = Prob;

should be

CD->flConfidence[i] = p;

Anonymous 
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 
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 
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}

Ramesh Marikhu 
Printed Page 398
program example

matrix 'distortion_coeffs' should be created with 'cvCreateMat(4,1,CV_32F)' not with 'cvCreateMat(5,1,CV_32F)'.

Jochen Radmer 
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.

Anonymous 
Printed Page 425
footnote

The description of the RANSAC algorithm is really LMedS and vice versa. These should be swapped.

Kyle H 
Printed Page 427
Paragraph before "Stereo Calibration"

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

Anonymous 
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.

Anonymous 
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 
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 
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.

Shiqi Yu 
Printed Page 471
The last footnote. The last line of page 471

"cvcore" should be "cxcore".

Shiqi Yu 
Printed Page 472
The last tow rows in Table 13-3

"cvcore" should be "cxcore" in the last two rows in Table 13-3.

Shiqi Yu 
PDF Page 511
line 11 of Example 13-4

"Double" should be "double"

Anonymous 
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]);

Anonymous 
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 
PDF Page 512
line 18

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

Anonymous 
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.

Michael D. Dudley 


"...a vital addition to the library of any computer vision practitioner."
--Trevor Darrell, Professor, EECS, UC Berkeley