Sparse matrix class.
Inheritance Hierarchy
OpenCvSharpDisposableObject
OpenCvSharpDisposableCvObject
OpenCvSharp.CPlusPlusSparseMat
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
The SparseMat type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SparseMat |
Creates empty SparseMat
| |
SparseMat(IntPtr) |
Creates from native cv::SparseMat* pointer
| |
SparseMat(CvSparseMat) |
converts old-style CvSparseMat to the new matrix; the data is not copied by default
| |
SparseMat(Mat) |
converts old-style CvMat to the new matrix; the data is not copied by default
| |
SparseMat(IEnumerableInt32, MatType) |
constructs n-dimensional sparse matrix
|
Properties
Name | Description | |
---|---|---|
AllocatedMemory |
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.) | |
AllocatedMemorySize |
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.) | |
CvPtr |
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.) | |
IsDisposed |
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.) | |
IsEnabledDispose |
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.) |
Methods
Name | Description | |
---|---|---|
Addref |
manually increments the reference counter to the header.
| |
AllocGCHandle |
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.) | |
AllocMemory |
Allocates the specified size of memory.
(Inherited from DisposableObject.) | |
AssignFrom(Mat) |
Assignment operator. equivalent to the corresponding constructor.
| |
AssignFrom(SparseMat) |
Assignment operator. This is O(1) operation, i.e. no data is copied
| |
AssignTo |
not used now
| |
Channels |
Returns the number of sparse matrix channels.
| |
Clear |
sets all the sparse matrix elements to 0, which means clearing the hash table.
| |
Clone |
creates full copy of the matrix
| |
ConvertTo(SparseMat, Int32, Double) |
multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type
| |
ConvertTo(Mat, Int32, Double, Double) |
converts sparse matrix to dense n-dim matrix with optional type conversion and scaling.
| |
CopyTo(Mat) |
converts sparse matrix to dense matrix.
| |
CopyTo(SparseMat) |
copies all the data to the destination matrix. All the previous content of m is erased.
| |
Create |
Reallocates sparse matrix.
If the matrix already had the proper size and type,
it is simply cleared with clear(), otherwise,
the old matrix is released (using release()) and the new one is allocated.
| |
Depth |
Returns the depth of sparse matrix element.
| |
Dims |
Returns the matrix dimensionality
| |
Dispose |
Releases the resources
(Inherited from DisposableObject.) | |
Dispose(Boolean) |
Releases the resources
(Overrides DisposableCvObjectDispose(Boolean).) | |
ElemSize |
returns the size of each element in bytes (not including the overhead - the space occupied by SparseMat::Node elements)
| |
ElemSize1 |
returns elemSize()/channels()
| |
Equals | (Inherited from Object.) | |
Finalize |
Destructor
(Inherited from DisposableObject.) | |
FindT(Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, null.
| |
FindT(Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, null.
| |
FindT(Int32, Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, null.
| |
FindT(Int32, Int32, Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, null.
| |
FromCvSparseMat | ||
FromMat | ||
GetT(Int32, NullableInt64) |
Returns a value to the specified array element.
| |
GetT(Int32, NullableInt64) |
Returns a value to the specified array element.
| |
GetT(Int32, Int32, NullableInt64) |
Returns a value to the specified array element.
| |
GetT(Int32, Int32, Int32, NullableInt64) |
Returns a value to the specified array element.
| |
GetHashCode | (Inherited from Object.) | |
GetIndexerT |
Gets a type-specific indexer.
The indexer has getters/setters to access each matrix element.
| |
GetType | (Inherited from Object.) | |
Hash(Int32) |
Computes the element hash value (1D case)
| |
Hash(Int32) |
Computes the element hash value (nD case)
| |
Hash(Int32, Int32) |
Computes the element hash value (2D case)
| |
Hash(Int32, Int32, Int32) |
Computes the element hash value (3D case)
| |
MemberwiseClone | (Inherited from Object.) | |
NotifyMemoryPressure |
Notifies the allocated size of memory.
(Inherited from DisposableObject.) | |
Ptr(Int32, Boolean, NullableInt64) |
Low-level element-access function.
| |
Ptr(Int32, Boolean, NullableInt64) |
Low-level element-access function.
| |
Ptr(Int32, Int32, Boolean, NullableInt64) |
Low-level element-access function.
| |
Ptr(Int32, Int32, Int32, Boolean, NullableInt64) |
Low-level element-access function.
| |
RefT |
Gets a type-specific indexer.
The indexer has getters/setters to access each matrix element.
| |
Release |
Releases the resources
| |
SetT(Int32, T, NullableInt64) |
Set a value to the specified array element.
| |
SetT(Int32, T, NullableInt64) |
Set a value to the specified array element.
| |
SetT(Int32, Int32, T, NullableInt64) |
Set a value to the specified array element.
| |
SetT(Int32, Int32, Int32, T, NullableInt64) |
Set a value to the specified array element.
| |
Size |
Returns the array of sizes, or null if the matrix is not allocated
| |
Size(Int32) |
Returns the size of i-th matrix dimension (or 0)
| |
ThrowIfDisposed |
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.) | |
ToCvSparseMat |
Creates the CvMat header or clone instance for the matrix.
| |
ToString |
Returns a string that represents this Mat.
(Overrides ObjectToString.) | |
Type |
Returns the type of sparse matrix element.
| |
ValueT(Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
| |
ValueT(Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
| |
ValueT(Int32, Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
| |
ValueT(Int32, Int32, Int32, NullableInt64) |
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
|
Operators
Name | Description | |
---|---|---|
(SparseMat to CvSparseMat) |
Creates the CvMat clone instance for the matrix.
|
Fields
Name | Description | |
---|---|---|
dataHandle |
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.) | |
ptr |
Data pointer
(Inherited from DisposableCvObject.) | |
SizeOf |
sizeof(cv::Mat)
|
See Also