Core module Other common knowledge points [OpenCV Note 14]

Source: Internet
Author: User
Tags scalar

mATX

Lightweight mat, must be before the use of a good size, such as a 2x3 float type of matx, can be declared as matx23f

Vec

VEC is a derived class of mATX, a one-dimensional matx, similar to vectors. The following are defined in the OPENCV source code:

int 1> {...}; typedef VEC2> vec2b;

Range

Make the use of OpenCV more like Matlab, Range::all () is equivalent to Matlab:, Range (A, B) is equivalent to the a:b of Matlab, where a is integer type

Memory overflow

functions to prevent memory overflow are alignptr, alignsize, allocate, deallocate, Fastmalloc, Fastfree

math.h function

floatCv::fastatan2 (floatYfloatx);//Calculate vector AnglefloatCv::cuberoot (floatVal);//Calculate cube RootintCvceil (Doublevalue);intCvceil (floatvalue);intCvceil (intValue);//Rounding upintCvfloor (Doublevalue);intCvfloor (floatvalue);intCvfloor (intValue);//Rounding downintCvround (Doublevalue)intCvround (floatvalue)intCvround (intValue//RoundingintCvisinf (Doublevalue);intCvisinf (floatValue);//whether the independent variable is infinitely largeintCvisnan (Doublevalue);intCvisnan (floatValue);//whether the argument is Nan

Text Display function

Size cv::gettextsize (const String & text,intFontface,DoubleFontscale,intThicknessint*baseLine);//calculates the width and height of a text string.//baseline:y-coordinate of the baseLine relative to the Bottom-most text point.void CV::p uttext (inputoutputarray img, const String&text, point org,intFontface,DoubleFontscale, Scalar color,intthickness=1,intLinetype=line_8,BOOLbottomleftorigin=false)//renders the specified text string in the image.void Cvinitfont (Cvfont* Font,intFont_face,DoubleHscale,DoubleVscale,DoubleShear =0,intThickness =1,intLine_type =8 )       //initializes the font structure that can is passed to text rendering functions.

Graphing function

Refer to Links

void Cv::circle (Inputoutputarray img, point Center,intRADIUS, const Scalar &color,intthickness=1,intLinetype=line_8,int Shift=0);//Draw a circle.BOOLCv::clipline (Size imgsize, point &pt1, Point &pt2)//Clips the line against the image rectangle.void Cv::ellipse (inputoutputarray img, point Center, Size axes,DoubleAngleDoubleStartAngle,DoubleEndangle, const Scalar &color,intthickness=1,intLinetype=line_8,int Shift=0)//draws a simple or thick elliptic arc or fills an ellipse sector.void Cv::ellipse (Inputoutputarray img, const rotatedrect&box, const Scalar &color,intthickness=1,intLinetype=line_8) void Cv::ellipse2poly (Point center, Size axes,intAngleintArcstart,intArcend,intDelta, std::vector< point > &pts)//approximates an elliptic arc with a polyline.void Cv::line (Inputoutputarray img, point pt1, point pt2, const Scalar&color,intthickness=1,intLinetype=line_8,int Shift=0)//draws a line segment connecting and points.void CV::p olylines (Mat&img, Const point *const *pts, constint*npts,intNcontours,BOOLisClosed, const Scalar &color,intthickness=1,intLinetype=line_8,int Shift=0) void CV::p olylines (Inputoutputarray img, inputarrayofarrays pts,BOOLisClosed, const Scalar &color,intthickness=1,intLinetype=line_8,int Shift=0)//draws several polygonal curves.class Cv::lineiterator;

Fill function

void Cv::fillconvexpoly (Mat &img, const point *pts,intnpts, const Scalar &color,intLinetype=line_8,int Shift=0) void Cv::fillconvexpoly (Inputoutputarray img, Inputarray points, const Scalar&color,intLinetype=line_8,int Shift=0)//Fills a convex polygon.void Cv::fillpoly (Mat&img, const point **pts, constint*npts,intncontours, const Scalar &color,intLinetype=line_8,int Shift=0, point offset=Point ()) void Cv::fillpoly (Inputoutputarray img, inputarrayofarrays pts, const Scalar&color,intLinetype=line_8,int Shift=0, point offset=Point ())//Fills the area bounded by one or more polygons.

Random number generator

Class RNG;

Core module Other common knowledge points [OpenCV Note 14]

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.