hls::Mat<int ROWS, int COLS, int T>

The template class to represent an image in HLS Video Library.

Template Parameters


  • ROWS - Maximum number of rows in an image.
  • COLS - Maximum number of columns in an image.
  • T - Image type. Use HLS_8UC1, ..., HLS_64FC4 to create 1-4 channel images, similar definition to CV_8UC1 ~ CV_64FC4 in OpenCV.

Class members


rows

Number of rows in an image.

cols

Number of columns in an image.

Mat()

Default constructor, create an image with maximum size.

Mat(int rows, int cols)

Constructor, create an image with specified size(rows, cols).

Mat(Size size)

Constructor, create an image with specified size(size.rows, size.cols).

Scalar<N, T> read()

Read (sequentially load) an pixel from an image, save it to the returning Scalar<N, T>, which has the same channels and depth as the image.

void read(Scalar<N, T>& s)

Read (sequentially load) an pixel from an image, save it to Scalar<N, T>, which has the same channels and depth as the image.

void operator >> (Scalar<N, T>& s)

Read (sequentially load) an pixel from an image, save it to Scalar<N, T>, which has the same channels and depth as the image.

void write(Scalar<N, T> s)

Write (sequentially store) an pixel to an image, Scalar<N, T> has the same channels and depth as the image.

void operator << (Scalar<N, T> s)

Write (sequentially store) an pixel from an image, save it to Scalar<N, T>, which has the same channels and depth as the image.

bool empty()

check the image is empty or not.

int type()

return image type.

int depth()

return image depth.

int channels()

return image channels.