operator const File &() const
Idiom to treat the template like a File.
-
function definition:
inline operator const File &() const
-
parameters: NONE
- output: (File Returns file.
const Mat &m() const
Idiom to treat the template like a Mat.
-
function definition:
inline const Mat &m() const
-
parameters: NONE
- output: (Mat) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- example:
Template t; t.m(); // returns empty mat Mat m1; t.append(m1); t.m(); // returns m1; Mat m2; t.append(m2); t.m(); // returns m2;
Mat &m()
Idiom to treat the template like a Mat.
-
function definition:
inline Mat &m()
-
parameters: NONE
- output: (Mat) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- example:
Template t; t.m(); // returns empty mat Mat m1; t.append(m1); t.m(); // returns m1; Mat m2; t.append(m2); t.m(); // returns m2;
operator const Mat &()
Idiom to treat the template like a Mat. Makes a call to m().
-
function definition:
inline operator const Mat&() const
-
parameters: NONE
- output: (Mat) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- see: m
operator Mat &()
Idiom to treat the template like a Mat. Makes a call to m().
-
function definition:
inline operator Mat&()
-
parameters: NONE
- output: (Mat) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- see: m
operator _InputArray &()
Idiom to treat the template like an _InputArray. Makes a call to m().
- function definition:
inline operator _InputArray() const
- parameters: NONE
- output: (_InputArray) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- see: m
operator _OutputArray &()
Idiom to treat the template like an _OutputArray. Makes a call to m().
-
function definition:
inline operator _OutputArray()
-
parameters: NONE
- output: (_OutputArray) Returns the last Mat in the list. If the list is empty an empty Mat is returned.
- see: m
Mat &operator =(const Mat &other)
Idiom to treat the template like a Mat. Set the result of m() equal to other.
-
function definition:
inline Mat &operator=(const Mat &other)
-
parameters:
Parameter Type Description other const Mat & Mat to overwrite value of m
bool isNull() const
Check if the template is NULL.
-
function definition:
inline bool isNull() const
-
parameters: NONE
- output: (bool) Returns true if the template is empty or if m has no data.
- example:
Template t; t.isNull(); // returns true t.append(Mat()); t.isNull(); // returns true t.append(Mat::ones(1, 1, CV_8U)); t.isNull(); // returns false
void merge(const Template &other)
Append the contents of another template. The files are appended using append.
-
function definition:
inline void merge(const Template &other)
-
parameters:
Parameter Type Description other const Template & Template to be merged -
output: (void)
- example:
Template t1("picture1.jpg"), t2("picture2.jpg"); Mat m1, m2; t1.append(m1); t2.append(m2); t1.merge(t2); t1.file; // returns picture1.jpg;picture2.jpg[seperator=;] t1; // returns [m1, m2]
size_t bytes() const
Get the total number of bytes in the template
-
function definition:
size_t bytes() const
-
parameters: None
- output: (int) Returns the sum of the bytes in each Mat in the Template
- example:
Template t; Mat m1 = Mat::ones(1, 1, CV_8U); // 1 byte Mat m2 = Mat::ones(2, 2, CV_8U); // 4 bytes Mat m3 = Mat::ones(3, 3, CV_8U); // 9 bytes t << m1 << m2 << m3; t.bytes(); // returns 14
Template clone() const
Clone the template
-
function definition:
Template clone() const
-
parameters: NONE
- output: (Template) Returns a new Template with copies of the file and each Mat that was in the original.
- example:
Template t1("picture.jpg"); t1.append(Mat::ones(1, 1, CV_8U)); Template t2 = t1.clone(); t2.file; // returns "picture.jpg" t2; // returns ["1"]