Click or drag to resize

SparseMat Class

Sparse matrix class.
Inheritance Hierarchy

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public class SparseMat : DisposableCvObject

The SparseMat type exposes the following members.

Constructors
Properties
  NameDescription
Protected propertyAllocatedMemory
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.)
Protected propertyAllocatedMemorySize
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.)
Public propertyCvPtr
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.)
Protected propertyDataHandle
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.)
Public propertyIsDisposed
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.)
Public propertyIsEnabledDispose
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.)
Top
Methods
  NameDescription
Public methodAddRef
manually increments the reference counter to the header.
Protected methodAllocGCHandle
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.)
Protected methodAllocMemory
Allocates the specified size of memory.
(Inherited from DisposableObject.)
Public methodAssignFrom(Mat)
Assignment operator. equivalent to the corresponding constructor.
Public methodAssignFrom(SparseMat)
Assignment operator. This is O(1) operation, i.e. no data is copied
Public methodAssignTo
not used now
Public methodChannels
Returns the number of sparse matrix channels.
Public methodClear
sets all the sparse matrix elements to 0, which means clearing the hash table.
Public methodClone
creates full copy of the matrix
Public methodConvertTo(SparseMat, Int32, Double)
multiplies all the matrix elements by the specified scale factor alpha and converts the results to the specified data type
Public methodConvertTo(Mat, Int32, Double, Double)
converts sparse matrix to dense n-dim matrix with optional type conversion and scaling.
Public methodCopyTo(Mat)
converts sparse matrix to dense matrix.
Public methodCopyTo(SparseMat)
copies all the data to the destination matrix. All the previous content of m is erased.
Public methodCreate
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.
Public methodDepth
Returns the depth of sparse matrix element.
Public methodDims
Returns the matrix dimensionality
Public methodDispose
Releases the resources
(Inherited from DisposableObject.)
Protected methodDispose(Boolean)
Releases the resources
(Inherited from DisposableObject.)
Protected methodDisposeManaged
Releases managed resources
(Inherited from DisposableObject.)
Protected methodDisposeUnmanaged
Releases unmanaged resources
(Overrides DisposableCvObjectDisposeUnmanaged.)
Public methodElemSize
returns the size of each element in bytes (not including the overhead - the space occupied by SparseMat::Node elements)
Public methodElemSize1
returns elemSize()/channels()
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodFindT(Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, null.
Public methodFindT(Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, null.
Public methodFindT(Int32, Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, null.
Public methodFindT(Int32, Int32, Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, null.
Public methodStatic memberFromMat
Create SparseMat from Mat
Public methodGetT(Int32, NullableInt64)
Returns a value to the specified array element.
Public methodGetT(Int32, NullableInt64)
Returns a value to the specified array element.
Public methodGetT(Int32, Int32, NullableInt64)
Returns a value to the specified array element.
Public methodGetT(Int32, Int32, Int32, NullableInt64)
Returns a value to the specified array element.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIndexerT
Gets a type-specific indexer. The indexer has getters/setters to access each matrix element.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHash(Int32)
Computes the element hash value (1D case)
Public methodHash(Int32)
Computes the element hash value (nD case)
Public methodHash(Int32, Int32)
Computes the element hash value (2D case)
Public methodHash(Int32, Int32, Int32)
Computes the element hash value (3D case)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodNotifyMemoryPressure
Notifies the allocated size of memory.
(Inherited from DisposableObject.)
Public methodNzCount
returns the number of non-zero elements (=the number of hash table nodes)
Public methodPtr(Int32, Boolean, NullableInt64)
Low-level element-access function.
Public methodPtr(Int32, Boolean, NullableInt64)
Low-level element-access function.
Public methodPtr(Int32, Int32, Boolean, NullableInt64)
Low-level element-access function.
Public methodPtr(Int32, Int32, Int32, Boolean, NullableInt64)
Low-level element-access function.
Public methodRefT
Gets a type-specific indexer. The indexer has getters/setters to access each matrix element.
Public methodRelease
Releases the resources
Public methodSetT(Int32, T, NullableInt64)
Set a value to the specified array element.
Public methodSetT(Int32, T, NullableInt64)
Set a value to the specified array element.
Public methodSetT(Int32, Int32, T, NullableInt64)
Set a value to the specified array element.
Public methodSetT(Int32, Int32, Int32, T, NullableInt64)
Set a value to the specified array element.
Public methodSize
Returns the array of sizes, or null if the matrix is not allocated
Public methodSize(Int32)
Returns the size of i-th matrix dimension (or 0)
Public methodThrowIfDisposed
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.)
Public methodToString
Returns a string that represents this Mat.
(Overrides ObjectToString.)
Public methodType
Returns the type of sparse matrix element.
Public methodValueT(Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
Public methodValueT(Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
Public methodValueT(Int32, Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
Public methodValueT(Int32, Int32, Int32, NullableInt64)
Return pthe specified sparse matrix element if it exists; otherwise, default(T).
Top
Fields
  NameDescription
Protected fieldptr
Data pointer
(Inherited from DisposableCvObject.)
Top
See Also