# cv::DataType< _Tp > Class Template Reference

`#include <core.hpp>`

List of all members.

## Public Types

enum | { generic_type = 1, depth = DataDepth<channel_type>::value, channels = 1, fmt = DataDepth<channel_type>::fmt, type = CV_MAKETYPE(depth, channels) }
typedef value_type | channel_type
typedef _Tp | value_type
typedef value_type | vec_type
typedef value_type | work_type

## Detailed Description

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

Informative template class for OpenCV "scalars".

The class is specialized for each primitive numerical type supported by OpenCV (such as unsigned char or float), as well as for more complex types, like cv::Complex<>, std::complex<>, cv::Vec<> etc. The common property of all such types (called "scalars", do not confuse it with cv::Scalar_) is that each of them is basically a tuple of numbers of the same type. Each "scalar" can be represented by the depth id (CV_8U ... CV_64F) and the number of channels. OpenCV matrices, 2D or nD, dense or sparse, can store "scalars", as long as the number of channels does not exceed CV_CN_MAX.

## Member Typedef Documentation

template<typename _Tp>

typedef value_type cv::DataType< _Tp >::channel_type

template<typename _Tp>

typedef _Tp cv::DataType< _Tp >::value_type

template<typename _Tp>

typedef value_type cv::DataType< _Tp >::vec_type

template<typename _Tp>

typedef value_type cv::DataType< _Tp >::work_type

## Member Enumeration Documentation

template<typename _Tp>

anonymous enum

Enumerator:

  generic_type |
  depth |
  channels |
  fmt |
  type |

The documentation for this class was generated from the following file:

- /usr/obj/OpenCV-2.2.0/OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines