Leaper WaferScan Toolkit
中文 / English 2.x
Data Structures | Enumerations
LPVMLLib Module Reference

LPV Machine learning Library, provides classes for classification/detection/inspection tasks that involves machine learning technology. More...

Data Structures

interface  ILClassifier
 This interface provide functionalities of the machine learning based image classification. More...
 
interface  ILFeature
 This interface provide functionalities of the image features, which is used for feature extraction from image in machine learning technology. More...
 
interface  ILModel
 This interface provide functionalities of the machine learning model. More...
 
interface  ILParameterized
 This interface provide parameterized interface for the machine learning feature and model objects. More...
 
interface  ILSample
 This interface represents a sample instance, which usually contains an image and an optional region object. More...
 
interface  ILSampleDatabase
 This interface represents a sample database for training and testing sample organization and management. More...
 
class  LClassifier
 
class  LFeature
 
class  LModel
 
class  LSample
 
class  LSampleDatabase
 

Enumerations

enum  LPVConductivity { LPVConductPMG1 = 0 , LPVConductPMG2 = 1 , LPVConductWeickert = 2 , LPVConductCharbonnier = 3 }
 This enumeration represents the type of the conductivity coefficient used in AKAZE feature. More...
 
enum  LPVFeatureType { LPVFeatureReserved = 0 , LPVFeatureORB = 1 , LPVFeatureHOG = 2 , LPVFeatureAKAZE = 3 }
 This enumeration represents the type of feature extracted from the image. More...
 
enum  LPVKNNDistance {
  LPVKNNDistanceEuclidean = 0 , LPVKNNDistanceManhattan = 1 , LPVKNNDistanceMax = 2 , LPVKNNDistanceHistIntersection = 3 ,
  LPVKNNDistanceHellinger = 4 , LPVKNNDistanceChiSquare = 5
}
 This enumeration represents the distance calculation method used in KNN model for measuring the similarity between samples. More...
 
enum  LPVKNNMatchAlgo {
  LPVKNNMatchBruteForce = 0 , LPVKNNMatchKDTree = 1 , LPVKNNMatchKmeans = 2 , LPVKNNMatchComposite = 3 ,
  LPVKNNMatchHierarchical = 4 , LPVKNNMatchAuto = 5
}
 This enumeration represents the algorithm for the nearest searching used in KNN model. More...
 
enum  LPVKNNWeight { LPVKNNWeightByDistance = 0 , LPVKNNWeightUniformed = 1 }
 This enumeration represents the weighting method for KNN model to voting the final result label from K neighbors. More...
 
enum  LPVModelType { LPVModelReserved = 0 , LPVModelKNN = 1 , LPVModelSVM = 2 }
 This enumeration represents the type of machine learning model. More...
 
enum  LPVSampleType { LPVSampleTrain = 1 , LPVSampleTest = 2 }
 This enumeration represents the type of the sample instance. More...
 
enum  LPVSVMKernel { LPVSVMKernelLinear = 0 , LPVSVMKernelPolynomial = 1 , LPVSVMKernelRBF = 2 , LPVSVMKernelSigmoid = 3 }
 This enumeration represents the type of the kernel used in the SVM model. More...
 
enum  LPVSVMType { LPVSVMTypeCSupport = 0 , LPVSVMTypeNuSupport = 1 }
 This enumeration represents the type of the SVM model. More...
 

Detailed Description

LPV Machine learning Library, provides classes for classification/detection/inspection tasks that involves machine learning technology.

This library provides classes for machine learning tasks. To include the definitions of the library's classes, use the following directive:

Example Code

C++ Snippets: MLClassification.cpp
C# Snippets: MLClassification.cs

Enumeration Type Documentation

◆ LPVConductivity

This enumeration represents the type of the conductivity coefficient used in AKAZE feature.

For all the equations below, \( dL \) is the first order image derivative, \( k \) is the contrast factor.

Enumerator
LPVConductPMG1 

Perona & Malik G1: \( \exp{(-dL^2 / k^2)} \)

LPVConductPMG2 

Perona & Malik G2: \( 1 / (1 + dL^2 / k^2) \)

LPVConductWeickert 

Weickert: \( -3.315 / (dL^2 / k^2)^4 \)

LPVConductCharbonnier 

Charbonnier: \( 1 / \sqrt{(1 + dL^2 / k^2)} \)

◆ LPVFeatureType

This enumeration represents the type of feature extracted from the image.

Enumerator
LPVFeatureReserved 

Not-initialized feature.

LPVFeatureORB 

ORB(Oriented FAST and Rotated BRIEF) feature.

LPVFeatureHOG 

HOG(Histogram of Oriented Gradients) feature.

LPVFeatureAKAZE 

AKAZE(Accelerated-KAZE) feature.

◆ LPVKNNDistance

This enumeration represents the distance calculation method used in KNN model for measuring the similarity between samples.

For all the equations below, x and y is the two feature vectors of the two samples to compare, i is for the ith value.

Enumerator
LPVKNNDistanceEuclidean 

Euclidean(L2): \( \sum{(x_i - y_i)^2} \)

LPVKNNDistanceManhattan 

Manhattan(L1): \( \sum{|x_i - y_i|} \)

LPVKNNDistanceMax 

Maximum: \( \max{|x_i - y_i|} \) Only works with BruteForce or K-Means or Hierarchical matching

LPVKNNDistanceHistIntersection 

Histogram Intersection: \( \sum{\min{(x_i, y_i)}} \)

LPVKNNDistanceHellinger 

Hellinger: \( \sum{(\sqrt{x_i} - \sqrt{y_i})^2} \)

LPVKNNDistanceChiSquare 

Chi-Square: \( \sum{((x_i - y_i)^2/(x_i + y_i))} \text{ for } x_i + y_i > 0 \)

◆ LPVKNNMatchAlgo

This enumeration represents the algorithm for the nearest searching used in KNN model.

Enumerator
LPVKNNMatchBruteForce 

The naive Brute-Force algorithm, aka. searching one-by-one, used for small dataset.

LPVKNNMatchKDTree 

The samples are organized and searched in several KD-Trees.

LPVKNNMatchKmeans 

The samples are organized via K-Means algorithm.

LPVKNNMatchComposite 

Composite with KD-Tree and K-Means

LPVKNNMatchHierarchical 

The samples are organized via hierarchical clustering

LPVKNNMatchAuto 

The samples are organized via auto-tuned indexing

◆ LPVKNNWeight

This enumeration represents the weighting method for KNN model to voting the final result label from K neighbors.

Enumerator
LPVKNNWeightByDistance 

The voting is weight by the similarity distance between the sample and prediction feature.

LPVKNNWeightUniformed 

Each neighbor has the same weight

◆ LPVModelType

This enumeration represents the type of machine learning model.

Enumerator
LPVModelReserved 

Not-initialized model.

LPVModelKNN 

KNN(K-Nearest Neighbors) model.

LPVModelSVM 

SVM(Support Vector Machine) model.

◆ LPVSampleType

This enumeration represents the type of the sample instance.

Enumerator
LPVSampleTrain 

The sample instance in train set which is used for training

LPVSampleTest 

The sample instance in test set which is used for testing

◆ LPVSVMKernel

This enumeration represents the type of the kernel used in the SVM model.

For all the equations below, x and y is the two feature vectors of the two samples to compare, g, c and n are numeric parameters.

Enumerator
LPVSVMKernelLinear 

Linear: \( x^Ty \)

LPVSVMKernelPolynomial 

Polynomial: \( (g \cdot x^Ty + c)^n \)

LPVSVMKernelRBF 

RBF: \( \exp{(-g \cdot |x - y|^2)} \)

LPVSVMKernelSigmoid 

Sigmoid: \( \tanh{(g \cdot x^Ty + c)} \)

◆ LPVSVMType

enum LPVSVMType

This enumeration represents the type of the SVM model.

Enumerator
LPVSVMTypeCSupport 

C-SVM, C-support vector machine, uses the C parameter to optimize the strength of the regularization.

LPVSVMTypeNuSupport 

Nu-SVM, Nu-support vector machine, uses the Nu parameter to control the number of support vectors