OpenCV453
公開メンバ関数 | 静的公開メンバ関数 | 全メンバ一覧
cv::face::MACE クラスabstract

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) [詳解]

#include <mace.hpp>

cv::Algorithmを継承しています。

公開メンバ関数

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 [詳解]
 
- 基底クラス cv::Algorithm に属する継承公開メンバ関数
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< MACEload (const String &filename, const String &objname=String())
 constructor [詳解]
 
static CV_WRAP cv::Ptr< MACEcreate (int IMGSIZE=64)
 constructor [詳解]
 
- 基底クラス cv::Algorithm に属する継承静的公開メンバ関数
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 [詳解]
 

その他の継承メンバ

- 基底クラス cv::Algorithm に属する継承限定公開メンバ関数
void writeFormat (FileStorage &fs) const
 

詳解

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:

Ptr<face::MACE> mace = face::MACE::create(64);
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";
Ptr<face::MACE> mace = face::MACE::create(64);
mace->salt(owners_passphrase);
vector<Mat> pos_images = ...
mace->train(pos_images);
// now, users have to give a valid passphrase, along with the image:
Mat query = ...
cout << "enter passphrase: ";
string pass;
getline(cin, pass);
mace->salt(pass);
bool same = mace->same(query);

save/load your model:

Ptr<face::MACE> mace = face::MACE::create(64);
mace->train(pos_images);
mace->save("my_mace.xml");
// later:
Ptr<MACE> reloaded = MACE::load("my_mace.xml");
reloaded->same(some_image);
static CV_WRAP cv::Ptr< MACE > load(const String &filename, const String &objname=String())
constructor

関数詳解

◆ create()

static CV_WRAP cv::Ptr< MACE > cv::face::MACE::create ( int  IMGSIZE = 64)
static

constructor

引数
IMGSIZEimages will get resized to this (should be an even number)

◆ load()

static CV_WRAP cv::Ptr< MACE > cv::face::MACE::load ( const String &  filename,
const String &  objname = String() 
)
static

constructor

引数
filenamebuild a new MACE instance from a pre-serialized FileStorage
objname(optional) top-level node in the FileStorage

◆ salt()

virtual CV_WRAP void cv::face::MACE::salt ( const cv::String &  passphrase)
pure virtual

optionally encrypt images with random convolution

引数
passphrasea crc64 random seed will get generated from this

◆ same()

virtual CV_WRAP bool cv::face::MACE::same ( cv::InputArray  query) const
pure virtual

correlate query img and threshold to min class value

引数
querya Mat with query image

◆ train()

virtual CV_WRAP void cv::face::MACE::train ( cv::InputArrayOfArrays  images)
pure virtual

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

引数
imagesa vector<Mat> with the train images

このクラス詳解は次のファイルから抽出されました: