亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

openCV2中的SCalar的詳細用法和用處能介紹下么?

openCV2中的SCalar的詳細用法和用處能介紹下么?

12345678_0001 2019-02-07 11:07:22
openCV2中的SCalar的詳細用法和用處能介紹下么? 
查看完整描述

3 回答

?
繁花如伊

TA貢獻2012條經驗 獲得超12個贊

cvZero(CvArr* arr)該函數作用主要主要變量arr清零做處避免系統自配值確定性程序影響現預料結與功能相同函數cvSetZero(CvArr* arr)希望能幫助

查看完整回答
反對 回復 2019-03-15
?
哆啦的時光機

TA貢獻1779條經驗 獲得超6個贊

class Scalar_

Template class for a 4-element vector derived from Vec.
template<typename _Tp> class CV_EXPORTS Scalar_ : public Vec<_Tp, 4>
{
public:
//! various constructors
Scalar_();
Scalar_(_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0);
Scalar_(const CvScalar& s);
Scalar_(_Tp v0);

//! returns a scalar with all elements set to v0
static Scalar_<_Tp> all(_Tp v0);
//! conversion to the old-style CvScalar
operator CvScalar() const;

//! conversion to another data type
template<typename T2> operator Scalar_<T2>() const;

//! per-element product
Scalar_<_Tp> mul(const Scalar_<_Tp>& t, double scale=1 ) const;

// returns (v0, -v1, -v2, -v3)
Scalar_<_Tp> conj() const;

// returns true iff v1 == v2 == v3 == 0
bool isReal() const;
};

typedef Scalar_<double> Scalar;

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 widely used in OpenCV to pass pixel values.



查看完整回答
反對 回復 2019-03-15
  • 3 回答
  • 0 關注
  • 1706 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號