// 包含4个元素的vector,主要用于表示一个像素。
template<typename _Tp> class 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;
};




相关文章:

  • 2021-07-25
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-11-23
  • 2021-10-22
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-03-03
  • 2021-12-31
  • 2021-12-17
  • 2022-01-03
相关资源
相似解决方案