Recommended book-high-quality C ++/C Programming Guide

Source: Internet
Author: User

Computer Vision (pattern recognition, image processing) industry, in essence, still belongs to the IT field. I personally think that a qualified Computer VisionAlgorithmEngineers should not only be familiar with common visual analysis, pattern recognition, and machine learning algorithms, but also better understand how to program these algorithms. In other words,Computer vision algorithm engineer = algorithm engineer +ProgramEmployeeA qualified computer vision algorithm engineer should be easy if he doesn't want to do algorithm research but only programming. But in fact, many computer vision algorithm engineers writeCodeIt is often a lot of loopholes, with insufficient robustness and poor stability. Let alone the long-term stable and efficient operation. Those codes often run for 3 to 5 hours, either crash or memory leakage, or you can simply get rid of it. In fact, in many cases, it is not your program or the logic is wrong. The problem is probably that your programming is not standard, your code is not robust. Here, I will try to illustrate several examples:

(1) do not judge whether the divisor is 0;

Int IA, IB, IC;

....

Ic = IA/IB ;(When IB = 0, it may crash!)


(2) The floating point number is equal to 0;

Float fval;

...

If (fval = 0 )(Floating point numbers are not necessarily saved as 0 in the computer.)

{

...

}


(3) invalid variable names

Int temp, T, S, ou ;(Which fairy can understand the meaning of these variables?)


(4) the return value of the function is not judged.

Iplimage * psrcimg = cvloadimage ("test.jpg ");(Is psrcimg loaded successfully?)

Cvcvtcolor (psrcimg, pgrayimg );


Well, the above several mistakes have been made by the author, and I often see people around me making them. You may feel dismissive about these mistakes, but they are often at some critical moments, the program is inexplicably suspended. If you are scratching your ears, you cannot solve it! When you encounter these situations for the first time, you are excited. When you encounter the second time, you are not careful. What about the third time? N times? Do you have to think about why your code is always problematic? Do you want to change your bad programming habits?

The author recently read a book "high quality c ++/C Programming Guide", which exactly introduces programming specifications. It is recommended that you take the time to study carefully; you can download it here:

Http://download.csdn.net/detail/carson2005/5236010

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.