Public Member Functions | Static Public Member Functions

# cv::Scalar_< _Tp > Class Template Reference

`#include <core.hpp>`

Inheritance diagram for cv::Scalar_< _Tp >:

List of all members.

## Public Member Functions
Scalar_< _Tp > | conj () const
bool | isReal () const
Scalar_< _Tp > | mul (const Scalar_< _Tp > &t, double scale=1) const
| per-element product
| operator CvScalar () const
| conversion to the old-style CvScalar
template<typename T2 >
| operator Scalar_< T2 > () const
| conversion to another data type
| Scalar_ (_Tp v0, _Tp v1, _Tp v2=0, _Tp v3=0)
| Scalar_ ()
| various constructors
| Scalar_ (const CvScalar &s)
| Scalar_ (_Tp v0)
## Static Public Member Functions
static Scalar_< _Tp > | all (_Tp v0)
| returns a scalar with all elements set to v0

## Detailed Description

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

The template scalar class.

This is partially specialized cv::Vec class with the number of elements = 4, i.e. a short vector of four elements. Normally, cv::Scalar ~ cv::Scalar_<double> is used.

## Constructor & Destructor Documentation

template<typename _Tp >

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

various constructors

template<typename _Tp>

cv::Scalar_< _Tp >::Scalar_ | ( | _Tp | v0,
|  | _Tp | v1,
|  | _Tp | v2 = `0`,
|  | _Tp | v3 = `0`
| ) |  | `[inline]`

template<typename _Tp>

cv::Scalar_< _Tp >::Scalar_ | ( | const CvScalar & | s ) | `[inline]`

template<typename _Tp>

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

## Member Function Documentation

template<typename _Tp>

Scalar_< _Tp > cv::Scalar_< _Tp >::all | ( | _Tp | v0 ) | `[inline, static]`

returns a scalar with all elements set to v0

Reimplemented from cv::Vec< _Tp, 4 >.

template<typename _Tp >

Scalar_< _Tp > cv::Scalar_< _Tp >::conj | ( | ) | const`[inline]`

template<typename _Tp >

bool cv::Scalar_< _Tp >::isReal | ( | ) | const`[inline]`

template<typename _Tp>

Scalar_< _Tp > cv::Scalar_< _Tp >::mul | ( | const Scalar_< _Tp > & | t,
|  | double | scale = `1`
| ) |  | const`[inline]`

per-element product

template<typename _Tp >

cv::Scalar_< _Tp >::operator CvScalar | ( | ) | const`[inline]`

conversion to the old-style CvScalar

Reimplemented from cv::Vec< _Tp, 4 >.

template<typename _Tp >
template<typename T2 >

cv::Scalar_< _Tp >::operator Scalar_< T2 > | ( | ) | const`[inline]`

conversion to another data type

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