Public Types | Public Member Functions | Public Attributes

# cv::Rect_< _Tp > Class Template Reference

`#include <core.hpp>`

List of all members.

## Public Types
typedef _Tp | value_type
## Public Member Functions
_Tp | area () const
| area (width*height) of the rectangle
Point_< _Tp > | br () const
| the bottom-right corner
bool | contains (const Point_< _Tp > &pt) const
| checks whether the rectangle contains the point
| operator CvRect () const
| conversion to the old-style CvRect
template<typename _Tp2 >
| operator Rect_< _Tp2 > () const
| conversion to another data type
Rect_ & | operator= (const Rect_ &r)
| Rect_ (_Tp _x, _Tp _y, _Tp _width, _Tp _height)
| Rect_ (const CvRect &r)
| Rect_ ()
| various constructors
| Rect_ (const Point_< _Tp > &pt1, const Point_< _Tp > &pt2)
| Rect_ (const Rect_ &r)
| Rect_ (const Point_< _Tp > &org, const Size_< _Tp > &sz)
Size_< _Tp > | size () const
| size (width, height) of the rectangle
Point_< _Tp > | tl () const
| the top-left corner
## Public Attributes
_Tp | height
_Tp | width
_Tp | x
_Tp | y

## Detailed Description

### template<typename _Tp>
class cv::Rect_< _Tp >

The 2D up-right rectangle class

The class represents a 2D rectangle with coordinates of the specified data type. Normally, cv::Rect ~ cv::Rect_<int> is used.

## Member Typedef Documentation

template<typename _Tp>

typedef _Tp cv::Rect_< _Tp >::value_type

## Constructor & Destructor Documentation

template<typename _Tp >

cv::Rect_< _Tp >::Rect_ | ( | ) | `[inline]`

various constructors

template<typename _Tp>

cv::Rect_< _Tp >::Rect_ | ( | _Tp | _x,
|  | _Tp | _y,
|  | _Tp | _width,
|  | _Tp | _height
| ) |  | `[inline]`

template<typename _Tp>

cv::Rect_< _Tp >::Rect_ | ( | const Rect_< _Tp > & | r ) | `[inline]`

template<typename _Tp>

cv::Rect_< _Tp >::Rect_ | ( | const CvRect & | r ) | `[inline]`

template<typename _Tp>

cv::Rect_< _Tp >::Rect_ | ( | const Point_< _Tp > & | org,
|  | const Size_< _Tp > & | sz
| ) |  | `[inline]`

template<typename _Tp>

cv::Rect_< _Tp >::Rect_ | ( | const Point_< _Tp > & | pt1,
|  | const Point_< _Tp > & | pt2
| ) |  | `[inline]`

## Member Function Documentation

template<typename _Tp >

_Tp cv::Rect_< _Tp >::area | ( | ) | const`[inline]`

area (width*height) of the rectangle

template<typename _Tp >

Point_< _Tp > cv::Rect_< _Tp >::br | ( | ) | const`[inline]`

the bottom-right corner

template<typename _Tp>

bool cv::Rect_< _Tp >::contains | ( | const Point_< _Tp > & | pt ) | const`[inline]`

checks whether the rectangle contains the point

template<typename _Tp >

cv::Rect_< _Tp >::operator CvRect | ( | ) | const`[inline]`

conversion to the old-style CvRect

template<typename _Tp >
template<typename _Tp2 >

cv::Rect_< _Tp >::operator Rect_< _Tp2 > | ( | ) | const`[inline]`

conversion to another data type

template<typename _Tp >

Rect_< _Tp > & cv::Rect_< _Tp >::operator= | ( | const Rect_< _Tp > & | r ) | `[inline]`

template<typename _Tp >

Size_< _Tp > cv::Rect_< _Tp >::size | ( | ) | const`[inline]`

size (width, height) of the rectangle

template<typename _Tp >

Point_< _Tp > cv::Rect_< _Tp >::tl | ( | ) | const`[inline]`

the top-left corner

## Member Data Documentation

template<typename _Tp>

_Tp cv::Rect_< _Tp >::height

template<typename _Tp>

_Tp cv::Rect_< _Tp >::width

template<typename _Tp>

_Tp cv::Rect_< _Tp >::x

template<typename _Tp>

_Tp cv::Rect_< _Tp >::y

The documentation for this class was generated from the following files:

- C:/opt/OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
- C:/opt/OpenCV-2.2.0/modules/core/include/opencv2/core/operations.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines