Opencv learning notes ()-practical functions, system functions, macro Core

Source: Internet
Author: User

If you want to develop some algorithms on the basis of opencv, I think the core content has to be refined. The Skillful Use of opencv data structure is the basis of development and the top priority. Recently, I 've been mixing it here, so I'll try again. This article analyzes the utility and system functions and macros, which are practical functions, system functions, and macros.

Opencv contains something similar to the Standard C ++ and C.

There are many system functions. Some operations are memory operations, such as new Delete. Many functions are designed to prevent memory overflow, such as alignptr, alignsize, allocate, deallocate, fastmalloc, and fastfree. Format output function Format (not familiar ). There are also some system-related things such as checkhardwaresupport, getnumthreads, getthreadnum, gettickcount, gettickfrequency, getcputickcount, and setnumthreads. There are also some interesting things, such as functions similar to # ifdef
# The ENDF switch also has the setuseoptimized function and the useoptimized function. There is also a function saturate_cast that you don't understand.

The practical functions are very close to <math. h> some functions are very interesting and can be easily developed, fastatan2 is a function with a vector angle. cuberoot is used to calculate the cube root, cvceil is used to obtain the whole function up, cvfloor is used to obtain the whole function down, And cvround is used to rounding up the whole function. Note that cvceil, cvfloor, and cvround are slightly different from common Ceil, floor, and round functions. The return values of standard library functions are not int-type variables and must be forcibly converted if necessary, the return value of the entire function in opencv is int type. There are also some functions similar to MATLAB, such as cvisinf to determine whether the independent variable is infinite, and cvisnan to determine whether the independent variable is not
A number.

There are also many macros. These macros also appear in the Standard C ++ and C. cv_assert is an asserted. I don't know what the difference is with assert. Error is also an exception and exception class.

Is it easier to develop these things ~~ As the application goes deeper, I will add some more experiences on appeal.

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.