[Reprinted] cvGetSize and cvSize, cvgetsizecvsize

Source: Internet
Author: User

[Reprinted] cvGetSize and cvSize, cvgetsizecvsize

CvSize
Rectangle frame size, in pixels

Typedef struct CvSize {int width;/* rectangle width */int height;/* rectangle height */} CvSize;/* constructor */inline CvSize cvSize (int width, int height );

GetSize
Returns the size of a matrix or Image ROI.

CvSize cvGetSize (const CvArr * arr );
Arr
Array header.
The cvGetSize function returns the number of rows and columns of the image or matrix. If the image is used, the ROI is returned.

Note:

IplImage * src1 = cvCreateImage (cvSize (src-> width, src-> height), IPL_DEPTH_8U, 1 );

IplImage * dst = cvCreateImage (cvGetSize (src), 8, 1 );

The returned value of cvGetSize is the ROI. The returned value of CvSize varies depending on the parameters. If the image src sets the ROI, the two values (dst and src1) are the same.

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.