OpenCV
4.0.0
Open Source Computer Vision
|
Template class for specifying the size of an image or rectangle. More...
#include "types.hpp"
Public Types | |
typedef _Tp | value_type |
Public Member Functions | |
Size_ () | |
default constructor More... | |
Size_ (_Tp _width, _Tp _height) | |
Size_ (const Size_ &sz) | |
Size_ (Size_ &&sz) CV_NOEXCEPT | |
Size_ (const Point_< _Tp > &pt) | |
_Tp | area () const |
the area (width*height) More... | |
double | aspectRatio () const |
aspect ratio (width/height) More... | |
bool | empty () const |
true if empty More... | |
template<typename _Tp2 > | |
operator Size_< _Tp2 > () const | |
conversion of another data type. More... | |
Size_ & | operator= (const Size_ &sz) |
Size_ & | operator= (Size_ &&sz) CV_NOEXCEPT |
Public Attributes | |
_Tp | height |
the height More... | |
_Tp | width |
the width More... | |
Template class for specifying the size of an image or rectangle.
The class includes two members called width and height. The structure can be converted to and from the old OpenCV structures CvSize and CvSize2D32f . The same set of arithmetic and comparison operations as for Point_ is available.
OpenCV defines the following Size_<> aliases:
typedef _Tp cv::Size_< _Tp >::value_type |
_Tp cv::Size_< _Tp >::area | ( | ) | const |
the area (width*height)
double cv::Size_< _Tp >::aspectRatio | ( | ) | const |
aspect ratio (width/height)
bool cv::Size_< _Tp >::empty | ( | ) | const |
true if empty
conversion of another data type.
_Tp cv::Size_< _Tp >::height |
the height
_Tp cv::Size_< _Tp >::width |
the width