Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一版勘误整理 #62

Closed
vinjn opened this issue Aug 29, 2013 · 4 comments
Closed

第一版勘误整理 #62

vinjn opened this issue Aug 29, 2013 · 4 comments

Comments

@vinjn
Copy link
Owner

vinjn commented Aug 29, 2013

p5

带阴影的第3行代码 *data++= *data/div*div + div2; div2应该是div/2。
对应的示例代码为colorReduce.cpp的colorReduce1,示例代码没有错。
原书在这里也是少了个/

p9,第 4 代码块注释处

现:

    //整理表示水平反转

正:

    //1表示水平反转

p35
第三个代码块:

    *data++= *data/div*div + div2;

其中 `div2` 应该是 `div/2` 。

p38
第二个代码块第12行:

    uchar*data= image.ptr<uchar>(j);

`uchar*data` 中间少了个空格,应该是 `uchar *data` 或者 `uchar* data` 。

p40-p42
有多处的 cv::Mat Iterator_cv::Mat ConstIterator_,应该把中间的空格去掉。

p41
顶部的代码块第10行:

    (*it)[1]= (*it)[11/div*div+div/2;

其中的 `[11` 应该是 `[1]` 。

p45

uchar* data =image.ptr<uchar>(j); 
//第j行的地址 

p163
cv_retr_list 应该是获取所有轮廓

@ShuaiHuang
Copy link

p90 文字倒数第四行术语应为属于

@vinjn
Copy link
Owner Author

vinjn commented Aug 25, 2015

@ShuaiHuang thx

@HuskyRye
Copy link

p46

*data++ = *data&mask + div/2;

应修改为

*data++ = (*data&mask) + div/2;

C++中 + 优先于 &,所以要加上括号表示优先级(见书中 p36 的第四个代码块)

@vinjn
Copy link
Owner Author

vinjn commented Jan 27, 2018 via email

@vinjn vinjn closed this as completed Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants