⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eigenfaces.h

📁 基于主成份分析(PCA)的人脸特征识别核心源程序。
💻 H
字号:
/***
 **     libface - Library of face recognition and supporting algorithms
        Copyright (c) 2003 Stefan Farthofer

	This file is part of libface, which is

        free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	For further information seek us at http://sourceforge.net/projects/openbio/
**	or write an email to dimitri.pissarenko@gmx.net or farthofer@chello.at.
***/

#ifndef __EIGENFACES_H
#define __EIGENFACES_H

#define EF_DIST_TRESH 20.0f

enum _efParameters { EF_FACES };

FRrecoAlgo* _efGetAlgo(void);

int _efInit(void);
const char* _efGetName(void);
int _efGetType(void);

int _efSetupAlgoInstance(FRrecognitionParameters* gParms, FRalgoParam* algoParms, unsigned int nrAlgoParms, FRimage* images, unsigned int nrImages, BYTE** parms);
size_t _efGetParametersSize(FRrecognitionParameters* gParms, BYTE* parms);
int _efSerializeParameters(FRrecognitionParameters* gParms, BYTE** parms, BYTE** mem, size_t maxsz, BYTE direction);
void _efFreeParameters(FRrecognitionParameters* gParms, BYTE** parms);
int _efCopyParameters(FRrecognitionParameters* gParms, BYTE** parmsDst, BYTE *parmsSrc);

int _efComputeTrait(FRrecognitionParameters* gParms, BYTE* parms, FRimage* image, BYTE** trait);
int _efCompareTraits(FRrecognitionParameters* gParms, BYTE* parms, BYTE* trait1, BYTE* trait2, float* probability);
size_t _efGetTraitSize(FRrecognitionParameters* gParms, BYTE* parms, BYTE* trait);
int _efSerializeTrait(FRrecognitionParameters* gParms, BYTE* parms, BYTE** trait, BYTE** mem, size_t maxsz, BYTE direction);
void _efFreeTrait(FRrecognitionParameters* gParms, BYTE* parms, BYTE** trait);

int _efTrainedDataToImages(FRrecognitionParameters* gParms, BYTE* parms, FRimage** images, unsigned int* nrImages);
int _efTrainedDataToText(FRrecognitionParameters* gParms, BYTE* parms, char** text);
int _efTraitToImages(FRrecognitionParameters* gParms, BYTE* parms, BYTE* trait, FRimage** images, unsigned int* nrImages);
int _efTraitToText(FRrecognitionParameters* gParms, BYTE* parms, BYTE* trait, char** text);


#endif /* header guard */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -