ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dspm::Mat::Rect Struct Reference

Rectangular area. More...

#include <mat.h>

Public Member Functions

 Rect (int x=0, int y=0, int width=0, int height=0)
 Constructor with initialization to 0.
void resizeRect (int x, int y, int width, int height)
 Resize rect area.
int areaRect (void)
 Get amount of elements in the rect area.

Data Fields

int x
int y
int width
int height

Detailed Description

Rectangular area.

The Rect is used for creating regions of interest ROI(s). The ROI is then used as a sub-matrix

Definition at line 48 of file mat.h.

Constructor & Destructor Documentation

◆ Rect()

dspm::Mat::Rect::Rect ( int x = 0,
int y = 0,
int width = 0,
int height = 0 )

Constructor with initialization to 0.

Parameters
[in]xx starting position (start col) of the rectangular area
[in]yy starting position (start row) of the rectangular area
[in]widthwidth (number of cols) of the rectangular area
[in]heightheight (number of rows) of the rectangular area

Definition at line 36 of file mat.cpp.

37{
38 this->x = x;
39 this->y = y;
40 this->width = width;
41 this->height = height;
42}
int width
Definition mat.h:51
int height
Definition mat.h:52

References height, width, x, and y.

Member Function Documentation

◆ areaRect()

int dspm::Mat::Rect::areaRect ( void )

Get amount of elements in the rect area.

Definition at line 52 of file mat.cpp.

53{
54 return this->width * this->height;
55}

References height, and width.

◆ resizeRect()

void dspm::Mat::Rect::resizeRect ( int x,
int y,
int width,
int height )

Resize rect area.

Parameters
[in]xx starting position (start col) of the new rectangular area
[in]yy starting position (start row) of the new rectangular area
[in]widthwidth (number of cols) of the new rectangular area
[in]heightheight (number of rows) of the new rectangular area

Definition at line 44 of file mat.cpp.

45{
46 this->x = x;
47 this->y = y;
48 this->width = width;
49 this->height = height;
50}

References height, width, x, and y.

Field Documentation

◆ height

int dspm::Mat::Rect::height

height (number of rows) of the rectangular area

Definition at line 52 of file mat.h.

Referenced by areaRect(), dspm::Mat::Get(), dspm::Mat::getROI(), dspm::operator<<(), Rect(), and resizeRect().

◆ width

int dspm::Mat::Rect::width

width (number of cols) of the rectangular area

Definition at line 51 of file mat.h.

Referenced by areaRect(), dspm::Mat::Get(), dspm::Mat::getROI(), dspm::operator<<(), Rect(), and resizeRect().

◆ x

int dspm::Mat::Rect::x

x starting position (start col) of the rectangular area

Definition at line 49 of file mat.h.

Referenced by dspm::Mat::Get(), dspm::Mat::getROI(), dspm::operator<<(), Rect(), and resizeRect().

◆ y

int dspm::Mat::Rect::y

y starting position (start row) of the rectangular area

Definition at line 50 of file mat.h.

Referenced by dspm::Mat::Get(), dspm::Mat::getROI(), dspm::operator<<(), Rect(), and resizeRect().


The documentation for this struct was generated from the following files: