![]() |
OpenCV 4.13.0
Open Source Computer Vision
|
2次元矩形のためのテンプレートクラス。 続き...
#include <opencv2/core/types.hpp>
公開型 | |
| typedef _Tp | value_type |
公開メンバ関数 | |
| Rect_ () | |
| デフォルトコンストラクタ | |
| Rect_ (_Tp _x, _Tp _y, _Tp _width, _Tp _height) | |
| Rect_ (const Point_< _Tp > &org, const Size_< _Tp > &sz) | |
| Rect_ (const Point_< _Tp > &pt1, const Point_< _Tp > &pt2) | |
| Rect_ (const Rect_ &r)=default | |
| Rect_ (Rect_ &&r) CV_NOEXCEPT=default | |
| _Tp | area () const |
| 矩形の面積(width*height) | |
| Point_< _Tp > | br () const |
| 右下のコーナー | |
| template<typename _Tp2 > | |
| bool | contains (const Point_< _Tp2 > &pt) const |
| 矩形が点を含むかどうかを調べる | |
| bool | empty () const |
| 空であれば true | |
| template<typename _Tp2 > | |
| operator Rect_< _Tp2 > () const | |
| 別のデータ型への変換。 | |
| Rect_ & | operator= (const Rect_ &r)=default |
| Rect_ & | operator= (Rect_ &&r) CV_NOEXCEPT=default |
| Size_< _Tp > | size () const |
| 矩形のサイズ(width, height) | |
| Point_< _Tp > | tl () const |
| 左上のコーナー | |
公開変数類 | |
| _Tp | height |
| 矩形の高さ | |
| _Tp | width |
| 矩形の幅 | |
| _Tp | x |
| 左上のコーナーのx座標 | |
| _Tp | y |
| 左上のコーナーのy座標 | |
2次元矩形のためのテンプレートクラス。
以下のパラメータで記述される:
OpenCVでは通常、矩形の上端と左端の境界は含まれるが、右端と下端の境界は含まれないと仮定する。例えば、メソッド Rect_::contains は次の場合に true を返す
\[x \leq pt.x < x+width, y \leq pt.y < y+height\]
OpenCVでは画像ROI上のほぼすべてのループ(ROIは Rect_<int> で指定される)は次のように実装される:
クラスメンバに加えて、矩形に対する以下の演算が実装されている:
これは矩形に対する半順序を確立する方法の一例である(rect1 \(\subseteq\) rect2):
| cv::Rect_< _Tp >::Rect_ | ( | const Point_< _Tp > & | org, |
| const Size_< _Tp > & | sz ) |
| cv::Rect_< _Tp >::Rect_ | ( | const Point_< _Tp > & | pt1, |
| const Point_< _Tp > & | pt2 ) |
矩形の面積(width*height)
右下のコーナー
|
inline |
矩形が点を含むかどうかを調べる
別のデータ型への変換。
矩形のサイズ(width, height)
左上のコーナー