Class LDA
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
DisposableObject + ICvPtrHolder
public class LDA : DisposableCvObject, IDisposable, ICvPtrHolder
- Inheritance
-
LDA
- Implements
- Inherited Members
Constructors
LDA(InputArray, InputArray, int)
Initializes and performs a Discriminant Analysis with Fisher's Optimization Criterion on given data in src and corresponding labels in labels.If 0 (or less) number of components are given, they are automatically determined for given data in computation.
public LDA(InputArray src, InputArray labels, int numComponents = 0)
Parameters
srcInputArraylabelsInputArraynumComponentsint
LDA(int)
constructor
public LDA(int numComponents = 0)
Parameters
numComponentsint
Methods
Compute(InputArray, InputArray)
Compute the discriminants for data in src (row aligned) and labels.
public void Compute(InputArray src, InputArray labels)
Parameters
srcInputArraylabelsInputArray
DisposeUnmanaged()
Releases unmanaged resources
protected override void DisposeUnmanaged()
Eigenvalues()
Returns the eigenvalues of this LDA.
public Mat Eigenvalues()
Returns
Eigenvectors()
Returns the eigenvectors of this LDA.
public Mat Eigenvectors()
Returns
Load(FileStorage)
Deserializes this object from a given cv::FileStorage.
public void Load(FileStorage node)
Parameters
nodeFileStorage
Load(string)
Deserializes this object from a given filename.
public void Load(string fileName)
Parameters
fileNamestring
Project(InputArray)
Projects samples into the LDA subspace. src may be one or more row aligned samples.
public Mat Project(InputArray src)
Parameters
srcInputArray
Returns
Reconstruct(InputArray)
Reconstructs projections from the LDA subspace. src may be one or more row aligned projections.
public Mat Reconstruct(InputArray src)
Parameters
srcInputArray
Returns
Save(FileStorage)
Serializes this object to a given cv::FileStorage.
public void Save(FileStorage fs)
Parameters
fsFileStorage
Save(string)
Serializes this object to a given filename.
public void Save(string fileName)
Parameters
fileNamestring
SubspaceProject(InputArray, InputArray, InputArray)
public static Mat SubspaceProject(InputArray w, InputArray mean, InputArray src)
Parameters
wInputArraymeanInputArraysrcInputArray
Returns
SubspaceReconstruct(InputArray, InputArray, InputArray)
public static Mat SubspaceReconstruct(InputArray w, InputArray mean, InputArray src)
Parameters
wInputArraymeanInputArraysrcInputArray