[go: up one dir, main page]

Menu

[r1]: / aambuilding.cpp  Maximize  Restore  History

Download this file

75 lines (55 with data), 2.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/****************************************************************************
*
* Copyright (c) 2006 by JIA Pei, all rights reserved.
* Copyright (c) 2006 by Vision Open: http://www.visionopen.com/
*
* Author: JIA Pei
* Contact: jp4work@gmail.com
* URL: http://www.visionopen.com/members/jiapei.php
* The author administrates Vision Open -- http://www.visionopen.com
*
* This program 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.
*
* 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
*
* This software is partly based on the following open source:
*
* - Boost
* - OpenCV
*
* This software is using IMM Face Database, which can be downloaded from
* http://www2.imm.dtu.dk/~aam/.
*
* M. B. Stegmann, B. K. Ersb{\o}ll, and R. Larsen. FAME - a flexible appearance
* modelling environment. IEEE Trans. on Medical Imaging, 22(10):1319-1331, 2003
*
****************************************************************************/
// $Id: aambuilding.cpp,v 1.1.1.1 2006-09-03 17:49:04 JIA Pei Exp $
#include <vector>
#include <string>
#include <iostream>
#include "cv.h"
#include "highgui.h"
#include "ml.h"
#include "lv_io.h"
#include "lv_aambuilding.h"
using namespace std;
extern string hostImagePath = "./imm_face_db";
extern string traineddata = "./traineddata.txt"; // For output
extern const double TruncatePercentage = 0.95;
int main(int argc, char *argv[])
{
vector<string> AllTrainedASFFiles = lv_io::ScanNSortDirectory(hostImagePath, "asf"); //
vector<string> AllImgFiles4Training = lv_io::ScanNSortDirectory(hostImagePath, "jpg");
lv_aambuilding buildAAM(AllTrainedASFFiles, AllImgFiles4Training, traineddata);
return EXIT_SUCCESS;
}