Functions | Variables
outlet_model.cpp File Reference
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <cv.h>
#include <highgui.h>
#include <ml.h>
#include "outlet_pose_estimation/detail/outlet_model.h"
#include "outlet_pose_estimation/detail/learning.h"
#include "outlet_pose_estimation/detail/planar.h"
#include "outlet_pose_estimation/detail/outlet_tuple.h"
Include dependency graph for outlet_model.cpp:

Go to the source code of this file.

Functions

float avgLine (IplImage *grey, cv::Point2f *line_ends)
void calc_contrast_factor (IplImage *grey, CvRect rect, float &contrast, float &variation)
void calc_labels (const vector< CvRect > &rects, const vector< outlet_feature_t > &keypts, vector< int > &labels)
void calc_outlet_coords (CvMat *rotation_vector, CvMat *translation_vector, const vector< cv::Point3f > &object_points, vector< outlet_t > &outlets)
void calc_outlet_coords (vector< outlet_t > &outlets, const outlet_template_t &outlet_template, CvMat *intrinsic_matrix, CvMat *distortion_params)
int calc_outlet_coords (vector< outlet_t > &outlets, CvMat *map_matrix, CvPoint3D32f origin, CvPoint2D32f scale, CvMat *rotation_vector, CvMat *translation_vector, CvMat *inv_map_matrix)
void calc_outlet_coords_ground (vector< outlet_t > &outlets, const outlet_template_t &outlet_template, CvMat *intrinsic_matrix, CvMat *distortion_params)
void calc_outlet_dist_stat (const vector< outlet_t > &outlets, float &mean, float &stddev)
void calc_outlet_tuple_dist_stat (const vector< outlet_t > &outlets, float &ground_dist_x1, float &ground_dist_x2, float &ground_dist_y)
IplImage * calc_tuple_distance_map (IplImage *tuple_mask)
void detect_outlets (IplImage *src, vector< outlet_feature_t > &features, vector< outlet_t > &outlets, outlet_tuple_t *outlet_tuple, const char *output_path, const char *filename)
void draw_outlets (IplImage *temp, const vector< outlet_t > &outlets)
void DrawKeypoints (IplImage *img, std::vector< outlet_feature_t > keypts)
void estimateCameraPosition (const vector< cv::Point2f > &image_points, const vector< cv::Point3f > &object_points, CvMat *intrinsic_matrix, CvMat *distortion_params, CvMat *rotation_vector, CvMat *translation_vector)
void extract_intensity_features (IplImage *grey, const vector< outlet_feature_t > &keypts, CvMat **mat, int equalize_hist, const vector< int > &labels, const char *buf)
void filter_canny (IplImage *grey, vector< outlet_feature_t > &features)
void filter_features_distance_mask (vector< outlet_feature_t > &features, IplImage *distance_map)
void filter_features_mask (vector< outlet_feature_t > &features, IplImage *mask)
void filter_negative_samples (const vector< CvRect > &rects, vector< outlet_feature_t > &keypts, float fraction)
void filter_outlets (IplImage *grey, vector< outlet_t > &outlets, CvRTrees *rtrees)
void filter_outlets_mask (vector< outlet_t > &outlets, IplImage *mask)
void filter_outlets_size (vector< outlet_t > &outlets)
int filter_outlets_templ (vector< outlet_t > &outlets, const char *filename)
void filter_outlets_templ_ex (vector< outlet_t > &outlets, CvMat *map_matrix, IplImage *mask)
int filter_outlets_templmatch (IplImage *src, vector< outlet_t > &outlets, IplImage *templ, const char *output_path, const char *filename, CvMat **homography, CvPoint3D32f *origin, CvPoint2D32f *scale)
void filter_outlets_tuple (vector< outlet_t > &outlets, IplImage *tuple_mask, CvPoint2D32f hor_dir)
void FilterPoints (IplImage *grey, vector< outlet_feature_t > &keypts, const CvRTrees *rtrees)
vector< outlet_feature_t >
::const_iterator 
find_fartherst_hole (const vector< vector< outlet_feature_t >::const_iterator > &candidates, outlet_feature_t feature)
void find_hole_candidates (IplImage *grey, IplImage *mask, CvSeq *socket, float hole_contrast, vector< CvSeq * > &holes)
void find_holes (const vector< outlet_feature_t > &holes, vector< outlet_t > &outlets, IplImage *grey, IplImage *mask, IplImage *img)
int find_origin_chessboard (IplImage *src, CvMat *map_matrix, CvPoint3D32f &origin, float bar_length)
void find_outlet_features (IplImage *src, vector< outlet_feature_t > &features, const char *filename)
void find_outlet_features_fast (IplImage *src, vector< outlet_feature_t > &features, float hole_contrast, const char *output_path, const char *filename)
int find_outlet_position (outlet_t outlet, IplImage *tuple_mask)
void findPreciseGroundHoleLocation (IplImage *grey, cv::Point2f center, cv::Point2f &hole)
void findPreciseOutletLocations (IplImage *grey, const outlet_template_t &outlet_template, vector< outlet_t > &outlets)
void findPreciseOutletLocationsAvg (IplImage *grey, const outlet_template_t &outlet_template, vector< outlet_t > &outlets)
void findPrecisePowerHoleLocation (IplImage *grey, cv::Point2f center, cv::Point2f dir, cv::Point2f dir_perp, cv::Point2f &hole)
void flipOutlet (std::vector< outlet_t > &outlets)
cv::Point3f flipVector (cv::Point3f vec, cv::Point3f center)
int generate_outlet_samples (IplImage *grey, outlet_t outlet, int count, CvMat **predictors, const char *filename)
void get_outlet_coordinates (const outlet_t &outlet, CvPoint3D32f *points)
void getImagePoints (const std::vector< outlet_t > &outlets, std::vector< cv::Point2f > &image_points, std::vector< bool > &is_detected)
CvRect getOutletROI (const vector< outlet_t > &outlets)
int is_outlet_inside_roi (const outlet_roi_t &outlet_roi, outlet_t outlet, string img_name)
int is_point_incenter_roi (const vector< CvRect > &rects, CvPoint point)
int is_point_inside_roi (const vector< CvRect > &rects, CvPoint point)
int is_point_inside_roi (const outlet_roi_t &outlet_roi, CvPoint point, string img_name)
int is_rect_inside_rect (CvRect large, CvRect smaller)
int load_homography_map (const char *filename, CvMat **map_matrix)
IplImage * load_match_template_mask (const char *filename)
CvPoint3D32f map_point_rt (CvPoint3D32f point, CvMat *rotation_mat, CvMat *translation_vector)
void move_features (vector< outlet_feature_t > &features, CvPoint origin)
bool outlet_orient_pred_dist_greater (outlet_t outlet1, outlet_t outlet2)
bool outlet_orient_pred_greater (outlet_t outlet1, outlet_t outlet2)
CvRect outlet_rect (outlet_t outlet)
float outlet_size (outlet_t outlet)
void read_outlet_roi (const char *filename, outlet_roi_t &outlet_roi)
void select_central_outlets (vector< outlet_t > &outlets, int count)
void select_orient_outlets (CvPoint2D32f orientation, vector< outlet_t > &outlets, int count)
int select_orient_outlets_ex (IplImage *grey, vector< outlet_t > &outlets, const char *filename)
int test_adjacency (const vector< outlet_feature_t > &features, outlet_feature_t f)
void train_outlet_model (const char *path, const char *config_filename, const char *roi_filename, const char *forest_filename)
CvMat * vector2mat (const vector< int > &vec)
void write_pr (const char *pr_filename, const char *image_filename, const outlet_roi_t &outlet_roi, const vector< outlet_t > &outlets)

Variables

const int feature_count = xsize*ysize
const int xsize = 11
const int ysize = 11

Function Documentation

float avgLine ( IplImage *  grey,
cv::Point2f *  line_ends 
)

Definition at line 2191 of file outlet_model.cpp.

void calc_contrast_factor ( IplImage *  grey,
CvRect  rect,
float &  contrast,
float &  variation 
)

Definition at line 1397 of file outlet_model.cpp.

void calc_labels ( const vector< CvRect > &  rects,
const vector< outlet_feature_t > &  keypts,
vector< int > &  labels 
)

Definition at line 853 of file outlet_model.cpp.

void calc_outlet_coords ( CvMat *  rotation_vector,
CvMat *  translation_vector,
const vector< cv::Point3f > &  object_points,
vector< outlet_t > &  outlets 
)

Definition at line 1742 of file outlet_model.cpp.

void calc_outlet_coords ( vector< outlet_t > &  outlets,
const outlet_template_t outlet_template,
CvMat *  intrinsic_matrix,
CvMat *  distortion_params 
)

Definition at line 1757 of file outlet_model.cpp.

int calc_outlet_coords ( vector< outlet_t > &  outlets,
CvMat *  map_matrix,
CvPoint3D32f  origin,
CvPoint2D32f  scale,
CvMat *  rotation_vector,
CvMat *  translation_vector,
CvMat *  inv_map_matrix 
)

Definition at line 1859 of file outlet_model.cpp.

void calc_outlet_coords_ground ( vector< outlet_t > &  outlets,
const outlet_template_t outlet_template,
CvMat *  intrinsic_matrix,
CvMat *  distortion_params 
)

Definition at line 1810 of file outlet_model.cpp.

void calc_outlet_dist_stat ( const vector< outlet_t > &  outlets,
float &  mean,
float &  stddev 
)

Definition at line 1910 of file outlet_model.cpp.

void calc_outlet_tuple_dist_stat ( const vector< outlet_t > &  outlets,
float &  ground_dist_x1,
float &  ground_dist_x2,
float &  ground_dist_y 
)

Definition at line 1925 of file outlet_model.cpp.

IplImage* calc_tuple_distance_map ( IplImage *  tuple_mask)

Definition at line 2001 of file outlet_model.cpp.

void detect_outlets ( IplImage *  src,
vector< outlet_feature_t > &  features,
vector< outlet_t > &  outlets,
outlet_tuple_t outlet_tuple,
const char *  output_path,
const char *  filename 
)

Definition at line 631 of file outlet_model.cpp.

void draw_outlets ( IplImage *  temp,
const vector< outlet_t > &  outlets 
)

Definition at line 1527 of file outlet_model.cpp.

void DrawKeypoints ( IplImage *  img,
std::vector< outlet_feature_t keypts 
)

Definition at line 27 of file outlet_model.cpp.

void estimateCameraPosition ( const vector< cv::Point2f > &  image_points,
const vector< cv::Point3f > &  object_points,
CvMat *  intrinsic_matrix,
CvMat *  distortion_params,
CvMat *  rotation_vector,
CvMat *  translation_vector 
)

Definition at line 1717 of file outlet_model.cpp.

void extract_intensity_features ( IplImage *  grey,
const vector< outlet_feature_t > &  keypts,
CvMat **  mat,
int  equalize_hist,
const vector< int > &  labels,
const char *  buf 
)

Definition at line 867 of file outlet_model.cpp.

void filter_canny ( IplImage *  grey,
vector< outlet_feature_t > &  features 
)

Definition at line 1546 of file outlet_model.cpp.

void filter_features_distance_mask ( vector< outlet_feature_t > &  features,
IplImage *  distance_map 
)

Definition at line 2021 of file outlet_model.cpp.

void filter_features_mask ( vector< outlet_feature_t > &  features,
IplImage *  mask 
)

Definition at line 1986 of file outlet_model.cpp.

void filter_negative_samples ( const vector< CvRect > &  rects,
vector< outlet_feature_t > &  keypts,
float  fraction 
)

Definition at line 1380 of file outlet_model.cpp.

void filter_outlets ( IplImage *  grey,
vector< outlet_t > &  outlets,
CvRTrees *  rtrees 
)

Definition at line 1000 of file outlet_model.cpp.

void filter_outlets_mask ( vector< outlet_t > &  outlets,
IplImage *  mask 
)

Definition at line 1970 of file outlet_model.cpp.

void filter_outlets_size ( vector< outlet_t > &  outlets)

Definition at line 2113 of file outlet_model.cpp.

int filter_outlets_templ ( vector< outlet_t > &  outlets,
const char *  filename 
)

Definition at line 1651 of file outlet_model.cpp.

void filter_outlets_templ_ex ( vector< outlet_t > &  outlets,
CvMat *  map_matrix,
IplImage *  mask 
)

Definition at line 1618 of file outlet_model.cpp.

int filter_outlets_templmatch ( IplImage *  src,
vector< outlet_t > &  outlets,
IplImage *  templ,
const char *  output_path,
const char *  filename,
CvMat **  homography,
CvPoint3D32f *  origin,
CvPoint2D32f *  scale 
)

Definition at line 736 of file outlet_model.cpp.

void filter_outlets_tuple ( vector< outlet_t > &  outlets,
IplImage *  tuple_mask,
CvPoint2D32f  hor_dir 
)

Definition at line 2067 of file outlet_model.cpp.

void FilterPoints ( IplImage *  grey,
vector< outlet_feature_t > &  keypts,
const CvRTrees *  rtrees 
)

Definition at line 964 of file outlet_model.cpp.

vector<outlet_feature_t>::const_iterator find_fartherst_hole ( const vector< vector< outlet_feature_t >::const_iterator > &  candidates,
outlet_feature_t  feature 
)

Definition at line 173 of file outlet_model.cpp.

void find_hole_candidates ( IplImage *  grey,
IplImage *  mask,
CvSeq *  socket,
float  hole_contrast,
vector< CvSeq * > &  holes 
)

Definition at line 37 of file outlet_model.cpp.

void find_holes ( const vector< outlet_feature_t > &  holes,
vector< outlet_t > &  outlets,
IplImage *  grey,
IplImage *  mask,
IplImage *  img 
)

Definition at line 193 of file outlet_model.cpp.

int find_origin_chessboard ( IplImage *  src,
CvMat *  map_matrix,
CvPoint3D32f &  origin,
float  bar_length 
)

Definition at line 1944 of file outlet_model.cpp.

void find_outlet_features ( IplImage *  src,
vector< outlet_feature_t > &  features,
const char *  filename 
)

Definition at line 445 of file outlet_model.cpp.

void find_outlet_features_fast ( IplImage *  src,
vector< outlet_feature_t > &  features,
float  hole_contrast,
const char *  output_path,
const char *  filename 
)

Definition at line 1041 of file outlet_model.cpp.

int find_outlet_position ( outlet_t  outlet,
IplImage *  tuple_mask 
)

Definition at line 2052 of file outlet_model.cpp.

void findPreciseGroundHoleLocation ( IplImage *  grey,
cv::Point2f  center,
cv::Point2f &  hole 
)

Definition at line 2232 of file outlet_model.cpp.

void findPreciseOutletLocations ( IplImage *  grey,
const outlet_template_t outlet_template,
vector< outlet_t > &  outlets 
)

Definition at line 2153 of file outlet_model.cpp.

void findPreciseOutletLocationsAvg ( IplImage *  grey,
const outlet_template_t outlet_template,
vector< outlet_t > &  outlets 
)

Definition at line 2250 of file outlet_model.cpp.

void findPrecisePowerHoleLocation ( IplImage *  grey,
cv::Point2f  center,
cv::Point2f  dir,
cv::Point2f  dir_perp,
cv::Point2f &  hole 
)

Definition at line 2206 of file outlet_model.cpp.

void flipOutlet ( std::vector< outlet_t > &  outlets)

Definition at line 2303 of file outlet_model.cpp.

cv::Point3f flipVector ( cv::Point3f  vec,
cv::Point3f  center 
)

Definition at line 2296 of file outlet_model.cpp.

int generate_outlet_samples ( IplImage *  grey,
outlet_t  outlet,
int  count,
CvMat **  predictors,
const char *  filename 
)

Definition at line 1249 of file outlet_model.cpp.

void get_outlet_coordinates ( const outlet_t outlet,
CvPoint3D32f *  points 
)

Definition at line 2106 of file outlet_model.cpp.

void getImagePoints ( const std::vector< outlet_t > &  outlets,
std::vector< cv::Point2f > &  image_points,
std::vector< bool > &  is_detected 
)

Definition at line 1698 of file outlet_model.cpp.

CvRect getOutletROI ( const vector< outlet_t > &  outlets)

Definition at line 2132 of file outlet_model.cpp.

int is_outlet_inside_roi ( const outlet_roi_t outlet_roi,
outlet_t  outlet,
string  img_name 
)

Definition at line 1234 of file outlet_model.cpp.

int is_point_incenter_roi ( const vector< CvRect > &  rects,
CvPoint  point 
)

Definition at line 812 of file outlet_model.cpp.

int is_point_inside_roi ( const vector< CvRect > &  rects,
CvPoint  point 
)

Definition at line 799 of file outlet_model.cpp.

int is_point_inside_roi ( const outlet_roi_t outlet_roi,
CvPoint  point,
string  img_name 
)

Definition at line 826 of file outlet_model.cpp.

int is_rect_inside_rect ( CvRect  large,
CvRect  smaller 
) [inline]

Definition at line 840 of file outlet_model.cpp.

int load_homography_map ( const char *  filename,
CvMat **  map_matrix 
)

Definition at line 1602 of file outlet_model.cpp.

IplImage* load_match_template_mask ( const char *  filename)

Definition at line 1593 of file outlet_model.cpp.

CvPoint3D32f map_point_rt ( CvPoint3D32f  point,
CvMat *  rotation_mat,
CvMat *  translation_vector 
)

Definition at line 1679 of file outlet_model.cpp.

void move_features ( vector< outlet_feature_t > &  features,
CvPoint  origin 
)

Definition at line 622 of file outlet_model.cpp.

Definition at line 1432 of file outlet_model.cpp.

bool outlet_orient_pred_greater ( outlet_t  outlet1,
outlet_t  outlet2 
)

Definition at line 1427 of file outlet_model.cpp.

CvRect outlet_rect ( outlet_t  outlet)

Definition at line 609 of file outlet_model.cpp.

float outlet_size ( outlet_t  outlet) [inline]

Definition at line 603 of file outlet_model.cpp.

void read_outlet_roi ( const char *  filename,
outlet_roi_t outlet_roi 
)

Definition at line 783 of file outlet_model.cpp.

void select_central_outlets ( vector< outlet_t > &  outlets,
int  count 
)

Definition at line 1438 of file outlet_model.cpp.

void select_orient_outlets ( CvPoint2D32f  orientation,
vector< outlet_t > &  outlets,
int  count 
)

Definition at line 1445 of file outlet_model.cpp.

int select_orient_outlets_ex ( IplImage *  grey,
vector< outlet_t > &  outlets,
const char *  filename 
)

Definition at line 1481 of file outlet_model.cpp.

int test_adjacency ( const vector< outlet_feature_t > &  features,
outlet_feature_t  f 
)

Definition at line 426 of file outlet_model.cpp.

void train_outlet_model ( const char *  path,
const char *  config_filename,
const char *  roi_filename,
const char *  forest_filename 
)

Definition at line 1300 of file outlet_model.cpp.

CvMat* vector2mat ( const vector< int > &  vec)

Definition at line 953 of file outlet_model.cpp.

void write_pr ( const char *  pr_filename,
const char *  image_filename,
const outlet_roi_t outlet_roi,
const vector< outlet_t > &  outlets 
)

Definition at line 1363 of file outlet_model.cpp.


Variable Documentation

const int feature_count = xsize*ysize

Definition at line 25 of file outlet_model.cpp.

const int xsize = 11

Definition at line 23 of file outlet_model.cpp.

const int ysize = 11

Definition at line 24 of file outlet_model.cpp.



outlet_pose_estimation
Author(s): Patrick Mihelich
autogenerated on Thu Nov 28 2013 11:46:23