Class MACE
Minimum Average Correlation Energy Filter useful for authentication with (cancellable) biometrical features. (does not need many positives to train (10-50), and no negatives at all, also robust to noise/salting)
public class MACE : SharedPtrObject, IDisposable, IAlgorithm
- Inheritance
-
MACE
- Implements
- Inherited Members
- Extension Methods
Constructors
MACE(int)
Create a new MACE object
public MACE(int imgSize)
Parameters
imgSize
intimages will get resized to this (should be an even number)
MACE(string, string)
Read MACE from storage
public MACE(string fileName, string objName = "")
Parameters
fileName
stringBuild a new MACE instance from a pre-serialized FileStorage
objName
stringOptional top-level node in the FileStorage
Properties
AlgorithmPtr
Pointer to the unmanaged Algorithm object
public nint AlgorithmPtr { get; }
Property Value
Methods
DisposeObject()
Release the unmanaged memory associated with this BIF
protected override void DisposeObject()
Salt(string)
optionally encrypt images with random convolution
public void Salt(string passphrase)
Parameters
passphrase
stringa crc64 random seed will get generated from this
Same(IInputArray)
correlate query img and threshold to min class value
public bool Same(IInputArray query)
Parameters
query
IInputArraya Mat with query image
Returns
- bool
True if the query is the same
Train(IInputArrayOfArrays)
train it on positive features compute the mace filter: h = D(-1) * X * (X(+) * D(-1) * X)(-1) * C also calculate a minimal threshold for this class, the smallest self-similarity from the train images
public void Train(IInputArrayOfArrays images)
Parameters
images
IInputArrayOfArraysA VectorOfMat with the train images