OpenCV3.41 -Scalar_ Class Template Reference

cv::Scalar_<_Tp > Class Template Reference
Template class for a 4-element vector derived from Vec .

#include "types.hpp"

Detailed Description :
Being derived from Vec<Tp, 4>, Scalar_ and Scalar can be used just as typical 4-element vectors. In addition, they can be converted to/from CvScalar .The type Scalar is widly used in OpenCV to pass pixel values .

Constructor & Destructor Documentation :

Scalar_( ) [1 / 4]
cv;:Scalar_<Tp >::Scalar( )
default constructor .

Scalar_( ) [2 / 4]
cv::Scalar_<Tp >::Scalar(_Tp v0, _Tp v1, _Tp v2 = 0, _Tp v3 = 0 )

Scalar_( ) [3 / 4]
cv::Scalar_<Tp >::Scalar(_Tp v0 )

Scalar_( ) [4 / 4]
cv::Scalar_<Tp >::Scalar( const Vec<_Tp2, cn > & v )

Member Function Documentation :

all( )
static Scalar_<Tp > cv::Scalar<_Tp >::all ( _Tp v0 )
returns a scalar with all elements set to v0 .

conj( )
Scalar_<Tp > cv::Scalar<_Tp >::conj ( )
returns ( v0, -v1, -v2, -v3 ) .

isReal( )
bool cv::Scalar_<_Tp >::isReal ( )
returns true if v1 == v2 == v3 == 0 .

mul( )
Scalar_<Tp > cv::Scalar<Tp >::mul ( const Scalar<_Tp > & a, double scale = 1 )
per-element product .

operator Scalar_( )
cv::Scalar_<Tp >::operator Scalar( )
conversion to another data type .

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章