Go to the documentation of this file.00001 #include"cob_people_detection/face_normalizer.h"
00002 #include<iostream>
00003 #include<opencv/cv.h>
00004 #include<opencv/highgui.h>
00005 int main(int argc, const char *argv[])
00006 {
00007
00008 std::cout << "[FaceNormalizer] running scene no. " << argv[1] << "...\n";
00009 FaceNormalizer::FNConfig cfg;
00010 cfg.eq_ill = true;
00011 cfg.align = true;
00012 cfg.resize = true;
00013 cfg.cvt2gray = false;
00014 cfg.extreme_illumination_condtions = false;
00015
00016 FaceNormalizer fn;
00017 fn.init(cfg);
00018
00019 cv::Mat depth, img, xyz;
00020 std::string i_path;
00021 i_path = "/share/goa-tz/people_detection/eval/kinect3d_features/";
00022
00023 i_path.append(argv[1]);
00024 std::string pgm_path = i_path;
00025 std::cout << "FN running on " << pgm_path << std::endl;
00026
00027 img = cv::imread(pgm_path);
00028 cv::Mat wmat1;
00029 img.copyTo(wmat1);
00030 cv::Size norm_size = cv::Size(img.cols, img.rows);
00031
00032
00033 cv::imshow("ORIGINAL", wmat1);
00034 cv::Mat depth_res;
00035 fn.normalizeFace(wmat1, norm_size);
00036
00037
00038
00039 cv::imshow("NORMALIZED", wmat1);
00040 cv::waitKey(0);
00041
00042 std::cout << "..done\n";
00043 return 0;
00044 }