Loading...
Searching...
No Matches
cv::Size_< _Tp > Class Template Reference
Template class for specifying the size of an image or rectangle. More...
#include <opencv2/core/types.hpp>
Public Types | |
typedef _Tp | value_type |
Public Member Functions | |
Size_ () | |
default constructor | |
Size_ (_Tp _width, _Tp _height) | |
Size_ (const Point_< _Tp > &pt) | |
Size_ (const Size_ &sz)=default | |
Size_ (Size_ &&sz) CV_NOEXCEPT=default | |
_Tp | area () const |
the area (width*height) | |
double | aspectRatio () const |
aspect ratio (width/height) | |
bool | empty () const |
true if empty | |
template<typename _Tp2 > | |
operator Size_< _Tp2 > () const | |
conversion of another data type. | |
Size_ & | operator= (const Size_ &sz)=default |
Size_ & | operator= (Size_ &&sz) CV_NOEXCEPT=default |
Public Attributes | |
_Tp | height |
the height | |
_Tp | width |
the width | |
Detailed Description
template<typename _Tp>
class cv::Size_< _Tp >
class cv::Size_< _Tp >
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:
- Examples
- fld_lines.cpp, modules/shape/samples/shape_example.cpp, samples/cpp/contours2.cpp, samples/cpp/edge.cpp, samples/cpp/facedetect.cpp, samples/cpp/falsecolor.cpp, samples/cpp/fitellipse.cpp, samples/cpp/image_alignment.cpp, samples/cpp/laplace.cpp, samples/cpp/lkdemo.cpp, samples/cpp/peopledetect.cpp, samples/cpp/polar_transforms.cpp, samples/cpp/squares.cpp, samples/cpp/stitching_detailed.cpp, samples/cpp/train_HOG.cpp, samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp, samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp, samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp, samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp, samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp, samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_2.cpp, samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp, samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp, samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp, samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp, samples/cpp/tutorial_code/videoio/video-write/video-write.cpp, samples/cpp/warpPerspective_demo.cpp, samples/dnn/classification.cpp, samples/dnn/colorization.cpp, samples/dnn/object_detection.cpp, samples/dnn/openpose.cpp, samples/dnn/segmentation.cpp, samples/dnn/text_detection.cpp, samples/tapi/hog.cpp, and samples/tapi/squares.cpp.
Member Typedef Documentation
◆ value_type
Constructor & Destructor Documentation
◆ Size_() [1/5]
◆ Size_() [2/5]
◆ Size_() [3/5]
◆ Size_() [4/5]
◆ Size_() [5/5]
Member Function Documentation
◆ area()
the area (width*height)
- Examples
- samples/cpp/stitching_detailed.cpp.
◆ aspectRatio()
◆ empty()
◆ operator Size_< _Tp2 >()
conversion of another data type.
◆ operator=() [1/2]
◆ operator=() [2/2]
Member Data Documentation
◆ height
the height
- Examples
- samples/cpp/fitellipse.cpp, samples/cpp/stitching_detailed.cpp, samples/cpp/train_HOG.cpp, samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_2.cpp, samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp, samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp, samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp, samples/cpp/tutorial_code/videoio/video-write/video-write.cpp, samples/dnn/object_detection.cpp, and samples/dnn/text_detection.cpp.
◆ width
the width
- Examples
- samples/cpp/fitellipse.cpp, samples/cpp/stitching_detailed.cpp, samples/cpp/train_HOG.cpp, samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_2.cpp, samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp, samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp, samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp, samples/cpp/tutorial_code/videoio/video-write/video-write.cpp, samples/dnn/object_detection.cpp, and samples/dnn/text_detection.cpp.
The documentation for this class was generated from the following file:
- opencv2/core/types.hpp