Go to the documentation of this file.00001
00002
00003 #ifndef _G_HOUGH_H
00004 #define _G_HOUGH_H
00005
00006 #include <cv.h>
00007 #include <highgui.h>
00008 #include <vector>
00009 #include "outlet_pose_estimation/detail/features.h"
00010 #include "outlet_pose_estimation/detail/affine_transform.h"
00011 #include "outlet_pose_estimation/detail/outlet_model.h"
00012
00013
00014 CvSparseMat* buildHoughHist(std::vector<feature_t>& input, const std::vector<feature_t>& train_features, int* hist_size, float** ranges);
00015
00018
00020 void getMaxHistValues(const CvSparseMat* hist, int* hist_size, float** ranges, float**& maxs, int& count, int MIN_VOTES);
00022
00023 int getMaxHistValues(const CvSparseMat* hist, int* hist_size, float** ranges, float**& maxs, int& count);
00024
00025
00026
00027
00028
00029
00030 void calcOutletPosition(const std::vector<feature_t>& train_features, float* affine_transform, std::vector<feature_t>& features);
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 void calcExactLocation(std::vector<feature_t>& features,const std::vector<feature_t>& train_features, std::vector<feature_t>& src_outlet, std::vector<feature_t>& dst_outlet, float& reprojectionError, int accuracy = 10, bool useSecondAttraction = true);
00043
00044
00045
00046 float generalizedHoughTransform(std::vector<feature_t>& hole_candidates, const std::vector<feature_t>& train_features, int* hist_size, float** ranges, std::vector<outlet_t>& holes, IplImage* ghtImage = NULL, IplImage* resImage = NULL, char* output_path = 0, char* base_filename = 0);
00047
00048 void convertFeaturesToOutlet(const std::vector<feature_t>& res_features, std::vector<outlet_t>& holes, IplImage* resImage=0);
00049 void convertFeaturesToOutlet(const std::vector<feature_t>& res_features, const std::vector<bool>& is_detected, std::vector<outlet_t>& holes);
00050
00051 #endif