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)
[詳解]
|
virtual CV_WRAP void | salt (const cv::String &passphrase)=0 |
| optionally encrypt images with random convolution [詳解]
|
|
virtual CV_WRAP void | train (cv::InputArrayOfArrays images)=0 |
| 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 [詳解]
|
|
virtual CV_WRAP bool | same (cv::InputArray query) const =0 |
| correlate query img and threshold to min class value [詳解]
|
|
virtual CV_WRAP void | clear () |
| Clears the algorithm state [詳解]
|
|
virtual void | write (FileStorage &fs) const |
| Stores algorithm parameters in a file storage [詳解]
|
|
CV_WRAP void | write (const Ptr< FileStorage > &fs, const String &name=String()) const |
| simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
|
|
virtual CV_WRAP void | read (const FileNode &fn) |
| Reads algorithm parameters from a file storage [詳解]
|
|
virtual CV_WRAP bool | empty () const |
| Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read [詳解]
|
|
virtual CV_WRAP void | save (const String &filename) const |
|
virtual CV_WRAP String | getDefaultName () const |
|
|
static CV_WRAP cv::Ptr< MACE > | load (const String &filename, const String &objname=String()) |
| constructor [詳解]
|
|
static CV_WRAP cv::Ptr< MACE > | create (int IMGSIZE=64) |
| constructor [詳解]
|
|
template<typename _Tp > |
static Ptr< _Tp > | read (const FileNode &fn) |
| Reads algorithm from the file node [詳解]
|
|
template<typename _Tp > |
static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
| Loads algorithm from the file [詳解]
|
|
template<typename _Tp > |
static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
| Loads algorithm from a String [詳解]
|
|
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)
see also: [Savvides04]
this implementation is largely based on: https://code.google.com/archive/p/pam-face-authentication (GSOC 2009)
use it like:
vector<Mat> pos_images = ...
mace->train(pos_images);
Mat query = ...
bool
same = mace->same(query);
static CV_WRAP cv::Ptr< MACE > create(int IMGSIZE=64)
constructor
virtual CV_WRAP bool same(cv::InputArray query) const =0
correlate query img and threshold to min class value
you can also use two-factor authentication, with an additional passphrase:
String owners_passphrase = "ilikehotdogs";
mace->salt(owners_passphrase);
vector<Mat> pos_images = ...
mace->train(pos_images);
Mat query = ...
cout << "enter passphrase: ";
string pass;
getline(cin, pass);
mace->salt(pass);
bool same = mace->same(query);
save/load your model:
mace->train(pos_images);
mace->save("my_mace.xml");
reloaded->same(some_image);
static CV_WRAP cv::Ptr< MACE > load(const String &filename, const String &objname=String())
constructor