Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
IdApp.Cv.Matrix< T > Class Template Reference

Implements a Matrix, basic component for computations in Image Processing and Computer Vision. More...

Inheritance diagram for IdApp.Cv.Matrix< T >:
IdApp.Cv.IMatrix

Public Member Functions

 Matrix (int Width, int Height)
 Implements a Matrix, basic component for computations in Image Processing and Computer Vision. More...
 
 Matrix (int Width, int Height, T[] Data)
 Implements a Matrix, basic component for computations in Image Processing and Computer Vision. More...
 
virtual Matrix< T > ShallowCopy ()
 Creates a shallow copy of the matrix. The shallow copy points to the same underlying pixel data. More...
 
void SetXSpan (int Left, int Width)
 Sets Left and Width simultaneously. More...
 
void SetYSpan (int Top, int Height)
 Sets Top and Height simultaneously. More...
 
int StartIndex (int X, int Y)
 Gets the start index of a point in the image. More...
 
Matrix< T > Row (int RowIndex)
 Returns a row vector as a matrix. More...
 
Matrix< T > Column (int ColumnIndex)
 Returns a column vector as a matrix. More...
 
Matrix< T > Region (int Left, int Top, int Width, int Height)
 Returns a region of the matrix, as a new matrix. More...
 

Static Public Member Functions

static IMatrix LoadFromFile (string FileName)
 Loads an image into a matrix. More...
 

Protected Member Functions

 Matrix (int Width, int Height, T[] Data, int Left, int Top, int RowSize, int Start, int Skip)
 Implements a Matrix, basic component for computations in Image Processing and Computer Vision. More...
 

Properties

Type ElementType [get]
 Type of elements in matrix. More...
 
T[] Data [get]
 Underlying data on which the matrix is defined. More...
 
int Width [get, set]
 Width of matrix (number of columns) More...
 
int Height [get, set]
 Height of matrix (number of rows) More...
 
int Left [get, set]
 Left offset of matrix in underlying data array. More...
 
int Top [get, set]
 Top offset of matrix in underlying data array. More...
 
int RowSize [get]
 Number of elements per row in underlying data array. More...
 
int DataSize [get]
 Total number of elements in underlying data array. More...
 
int Start [get]
 Start offset of matrix in underlying data. More...
 
int Skip [get]
 Number of elements to skip from the right edge in the underlying data to the left edge of the new row. More...
 
this[int X, int Y] [get, set]
 Direct access to underlying elements in the matix. More...
 

Detailed Description

Implements a Matrix, basic component for computations in Image Processing and Computer Vision.

Template Parameters
TType of each pixel.
Type Constraints
T :struct 

Definition at line 10 of file Matrix.cs.

Constructor & Destructor Documentation

◆ Matrix() [1/3]

IdApp.Cv.Matrix< T >.Matrix ( int  Width,
int  Height 
)

Implements a Matrix, basic component for computations in Image Processing and Computer Vision.

Parameters
WidthWidth of Matrix
HeightHeight of Matrix

Definition at line 33 of file Matrix.cs.

◆ Matrix() [2/3]

IdApp.Cv.Matrix< T >.Matrix ( int  Width,
int  Height,
T[]  Data 
)

Implements a Matrix, basic component for computations in Image Processing and Computer Vision.

Parameters
WidthWidth of Matrix
HeightHeight of Matrix
DataUnderlying data.

Definition at line 44 of file Matrix.cs.

◆ Matrix() [3/3]

IdApp.Cv.Matrix< T >.Matrix ( int  Width,
int  Height,
T[]  Data,
int  Left,
int  Top,
int  RowSize,
int  Start,
int  Skip 
)
protected

Implements a Matrix, basic component for computations in Image Processing and Computer Vision.

Parameters
WidthWidth of Matrix
HeightHeight of Matrix
DataUnderlying data.
LeftLeft coordinate of matrix in underlying data.
TopTop coordinate of matrix in underlying data.
RowSizeSize of one row.
StartStart index of matrix in underlying data.
SkipNumber of elements to skip after last element in a row of the matrix to the first element of the next row.

Definition at line 71 of file Matrix.cs.

Member Function Documentation

◆ Column()

Matrix< T > IdApp.Cv.Matrix< T >.Column ( int  ColumnIndex)

Returns a column vector as a matrix.

Parameters
ColumnIndexZero-based column index.
Returns
Column vector as a matrix.

Definition at line 287 of file Matrix.cs.

◆ LoadFromFile()

static IMatrix IdApp.Cv.Matrix< T >.LoadFromFile ( string  FileName)
static

Loads an image into a matrix.

Parameters
FileNameFilename of image file.
Returns
Matrix iamge.

Definition at line 347 of file Matrix.cs.

◆ Region()

Matrix< T > IdApp.Cv.Matrix< T >.Region ( int  Left,
int  Top,
int  Width,
int  Height 
)

Returns a region of the matrix, as a new matrix.

Parameters
LeftZero-based left offset where the region begins.
TopZero-based top offset where the region begins.
WidthWidth of region
HeightHeight of region
Returns
Column vector as a matrix.

Definition at line 314 of file Matrix.cs.

◆ Row()

Matrix< T > IdApp.Cv.Matrix< T >.Row ( int  RowIndex)

Returns a row vector as a matrix.

Parameters
RowIndexZero-based row index.
Returns
Row vector as a matrix.

Definition at line 263 of file Matrix.cs.

◆ SetXSpan()

void IdApp.Cv.Matrix< T >.SetXSpan ( int  Left,
int  Width 
)

Sets Left and Width simultaneously.

Parameters
LeftNew Left
WidthNew Width

Definition at line 184 of file Matrix.cs.

◆ SetYSpan()

void IdApp.Cv.Matrix< T >.SetYSpan ( int  Top,
int  Height 
)

Sets Top and Height simultaneously.

Parameters
TopNew Top
HeightNew Height

Definition at line 203 of file Matrix.cs.

◆ ShallowCopy()

virtual Matrix< T > IdApp.Cv.Matrix< T >.ShallowCopy ( )
virtual

Creates a shallow copy of the matrix. The shallow copy points to the same underlying pixel data.

Returns
Shallow copy

Reimplemented in IdApp.Cv.Basic.Shape.

Definition at line 90 of file Matrix.cs.

◆ StartIndex()

int IdApp.Cv.Matrix< T >.StartIndex ( int  X,
int  Y 
)

Gets the start index of a point in the image.

Parameters
XX-Coordinate
YY-Coordinate
Returns
Index into underlying data set.

Implements IdApp.Cv.IMatrix.

Definition at line 253 of file Matrix.cs.

Property Documentation

◆ Data

T [] IdApp.Cv.Matrix< T >.Data
get

Underlying data on which the matrix is defined.

Definition at line 114 of file Matrix.cs.

◆ DataSize

int IdApp.Cv.Matrix< T >.DataSize
get

Total number of elements in underlying data array.

Implements IdApp.Cv.IMatrix.

Definition at line 223 of file Matrix.cs.

◆ ElementType

Type IdApp.Cv.Matrix< T >.ElementType
get

Type of elements in matrix.

Implements IdApp.Cv.IMatrix.

Definition at line 109 of file Matrix.cs.

◆ Height

int IdApp.Cv.Matrix< T >.Height
getset

Height of matrix (number of rows)

Implements IdApp.Cv.IMatrix.

Definition at line 135 of file Matrix.cs.

◆ Left

int IdApp.Cv.Matrix< T >.Left
getset

Left offset of matrix in underlying data array.

Implements IdApp.Cv.IMatrix.

Definition at line 150 of file Matrix.cs.

◆ RowSize

int IdApp.Cv.Matrix< T >.RowSize
get

Number of elements per row in underlying data array.

Implements IdApp.Cv.IMatrix.

Definition at line 218 of file Matrix.cs.

◆ Skip

int IdApp.Cv.Matrix< T >.Skip
get

Number of elements to skip from the right edge in the underlying data to the left edge of the new row.

Implements IdApp.Cv.IMatrix.

Definition at line 233 of file Matrix.cs.

◆ Start

int IdApp.Cv.Matrix< T >.Start
get

Start offset of matrix in underlying data.

Implements IdApp.Cv.IMatrix.

Definition at line 228 of file Matrix.cs.

◆ this[int X, int Y]

T IdApp.Cv.Matrix< T >.this[int X, int Y]
getset

Direct access to underlying elements in the matix.

Parameters
XZero-based X-coordinate (column)
YZero-based Y-coordinate (row)
Returns
Pixel/Element

Definition at line 241 of file Matrix.cs.

◆ Top

int IdApp.Cv.Matrix< T >.Top
getset

Top offset of matrix in underlying data array.

Implements IdApp.Cv.IMatrix.

Definition at line 166 of file Matrix.cs.

◆ Width

int IdApp.Cv.Matrix< T >.Width
getset

Width of matrix (number of columns)

Implements IdApp.Cv.IMatrix.

Definition at line 119 of file Matrix.cs.


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