C# Class Emgu.CV.EigenObjectRecognizer

ファイルを表示 Open project: fajoy/RTSPExample Class Usage Examples

Public Methods

Method Description
CalcEigenObjects ( Byte>.Image trainingImages, MCvTermCriteria &termCrit, Single>.Image &eigenImages, Single>.Image &avg ) : void

Caculate the eigen images for the specific traning image

EigenDecomposite ( Byte>.Image src, Single>.Image eigenImages, Single>.Image avg ) : float[]

Decompose the image as eigen values, using the specific eigen vectors

EigenObjectRecognizer ( Byte>.Image images, MCvTermCriteria &termCrit ) : System

Create an object recognizer using the specific tranning data and parameters, it will always return the most similar object

EigenObjectRecognizer ( Byte>.Image images, String labels, MCvTermCriteria &termCrit ) : System

Create an object recognizer using the specific tranning data and parameters, it will always return the most similar object

EigenObjectRecognizer ( Byte>.Image images, String labels, double eigenDistanceThreshold, MCvTermCriteria &termCrit ) : System

Create an object recognizer using the specific tranning data and parameters

EigenProjection ( float eigenValue ) : Byte>.Image

Given the eigen value, reconstruct the projected image

GetEigenDistances ( Byte>.Image image ) : float[]

Get the Euclidean eigen-distance between image and every other image in the database

Recognize ( Byte>.Image image ) : RecognitionResult

Try to recognize the image and return its label

Private Methods

Method Description
EigenObjectRecognizer ( ) : System
GenerateLabels ( int size ) : String[]

Method Details

CalcEigenObjects() public static method

Caculate the eigen images for the specific traning image
public static CalcEigenObjects ( Byte>.Image trainingImages, MCvTermCriteria &termCrit, Single>.Image &eigenImages, Single>.Image &avg ) : void
trainingImages Byte>.Image The images used for training
termCrit Emgu.CV.Structure.MCvTermCriteria The criteria for tranning
eigenImages Single>.Image The resulting eigen images
avg Single>.Image The resulting average image
return void

EigenDecomposite() public static method

Decompose the image as eigen values, using the specific eigen vectors
public static EigenDecomposite ( Byte>.Image src, Single>.Image eigenImages, Single>.Image avg ) : float[]
src Byte>.Image The image to be decomposed
eigenImages Single>.Image The eigen images
avg Single>.Image The average images
return float[]

EigenObjectRecognizer() public method

Create an object recognizer using the specific tranning data and parameters, it will always return the most similar object
public EigenObjectRecognizer ( Byte>.Image images, MCvTermCriteria &termCrit ) : System
images Byte>.Image The images used for training, each of them should be the same size. It's recommended the images are histogram normalized
termCrit Emgu.CV.Structure.MCvTermCriteria The criteria for recognizer training
return System

EigenObjectRecognizer() public method

Create an object recognizer using the specific tranning data and parameters, it will always return the most similar object
public EigenObjectRecognizer ( Byte>.Image images, String labels, MCvTermCriteria &termCrit ) : System
images Byte>.Image The images used for training, each of them should be the same size. It's recommended the images are histogram normalized
labels String The labels corresponding to the images
termCrit Emgu.CV.Structure.MCvTermCriteria The criteria for recognizer training
return System

EigenObjectRecognizer() public method

Create an object recognizer using the specific tranning data and parameters
public EigenObjectRecognizer ( Byte>.Image images, String labels, double eigenDistanceThreshold, MCvTermCriteria &termCrit ) : System
images Byte>.Image The images used for training, each of them should be the same size. It's recommended the images are histogram normalized
labels String The labels corresponding to the images
eigenDistanceThreshold double /// The eigen distance threshold, (0, ~1000]. /// The smaller the number, the more likely an examined image will be treated as unrecognized object. /// If the threshold is < 0, the recognizer will always treated the examined image as one of the known object. ///
termCrit Emgu.CV.Structure.MCvTermCriteria The criteria for recognizer training
return System

EigenProjection() public method

Given the eigen value, reconstruct the projected image
public EigenProjection ( float eigenValue ) : Byte>.Image
eigenValue float The eigen values
return Byte>.Image

GetEigenDistances() public method

Get the Euclidean eigen-distance between image and every other image in the database
public GetEigenDistances ( Byte>.Image image ) : float[]
image Byte>.Image The image to be compared from the training images
return float[]

Recognize() public method

Try to recognize the image and return its label
public Recognize ( Byte>.Image image ) : RecognitionResult
image Byte>.Image The image to be recognized
return RecognitionResult