11 #ifndef FEATURE_HISTOGRAM_H
12 #define FEATURE_HISTOGRAM_H
15 #include "i/i_float_io.h"
16 #include "i/i_float.h"
23 #warning "[Code police] Please don't indent code using tabs, in libkjb."
24 #warning "[Code police] Please use a 4-space indent, instead."
53 unsigned int dart_window_size,
54 unsigned int num_rows,
55 unsigned int num_cols,
71 std::vector<Fh_type> & previous_darts,
72 std::vector<Fh_type> & new_darts,
73 std::vector<bool> changed_darts,
80 std::vector<Fh_type> & new_darts
86 std::vector<Fh_type> & previous_darts,
87 std::vector<Fh_type> & new_darts,
88 std::vector<bool> changed_darts,
95 std::vector<Fh_type> & new_darts
101 std::vector<Fh_type> & new_darts
107 std::vector<Fh_type> & new_darts
118 std::vector<Fh_type> & new_darts,
125 std::vector<Fh_type> & new_darts,
132 std::vector<Fh_type> & new_darts,
139 std::vector<Fh_type> & new_darts,
146 std::vector<Fh_type> & new_darts,
147 unsigned int obj_index,
155 std::vector<Fh_type> & new_darts,
156 unsigned int obj_index,
157 unsigned int polymsh_index,
166 const std::vector<Image_dart> &
get_darts()
const {
return darts;}
172 double find_probability(
const Fh_type & dart1,
const Fh_type & dart2,
double diff);
174 bool find_probability2(
const Fh_type & dart1,
const Fh_type & dart2,
double diff,
double & prob);
176 bool find_probability3(
const Fh_type & dart1,
const Fh_type & dart2,
double diff,
double & prob);
178 std::vector<Image_dart> darts;
179 #warning "[Code police] Please don't start identifiers with underscore."
180 unsigned int _num_rows;
181 unsigned int _num_cols;
182 unsigned int _padding;
185 Matrix differential_matrix;
186 double all_different;
double compute_differential(const kjb::Matrix &assignment_matrix) const
Definition: feature_histogram.cpp:86
Definition: feature_histogram.h:25
unsigned int _col
Definition: feature_histogram.h:47
unsigned int get_num_darts()
Definition: feature_histogram.h:61
Definition: feature_histogram.h:37
Feature_histogram(DTLib::CImg< DTLib::FloatCHistogramPtr > &histo, unsigned int dart_window_size, unsigned int num_rows, unsigned int num_cols, int padding)
Definition: feature_histogram.cpp:28
This class implements matrices, in the linear-algebra sense, restricted to integer-valued elements...
Definition: l_int_matrix.h:71
void draw_object_polymesh(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, unsigned int obj_index, unsigned int polymsh_index, kjb::Image &img) const
Definition: feature_histogram.cpp:685
double compute_score(const kjb::Int_matrix &map, std::vector< Fh_type > &previous_darts, std::vector< Fh_type > &new_darts, std::vector< bool > changed_darts, double previous_score)
Definition: feature_histogram.cpp:107
const std::vector< Image_dart > & get_darts() const
Definition: feature_histogram.h:166
unsigned int extra_field
Definition: feature_histogram.h:31
void prepare_diff_matrix(DTLib::CImg< DTLib::FloatCHistogramPtr > &histo)
Definition: feature_histogram.cpp:67
double compute_score3(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts)
Definition: feature_histogram.cpp:520
void draw_object(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, unsigned int obj_index, kjb::Image &img)
Definition: feature_histogram.cpp:642
Definition: feature_histogram.h:34
void draw_room_floor(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, kjb::Image &img)
Definition: feature_histogram.cpp:728
void draw_room(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, kjb::Image &img)
Definition: feature_histogram.cpp:600
void draw_room_ceiling(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, kjb::Image &img)
Definition: feature_histogram.cpp:770
void draw_darts(kjb::Image &img)
Definition: feature_histogram.cpp:58
unsigned int element_1
Definition: feature_histogram.h:28
void draw_room_walls(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts, kjb::Image &img)
Definition: feature_histogram.cpp:812
double compute_score2(const kjb::Int_matrix &map, std::vector< Fh_type > &previous_darts, std::vector< Fh_type > &new_darts, std::vector< bool > changed_darts, double previous_score)
Definition: feature_histogram.cpp:427
unsigned int _row
Definition: feature_histogram.h:46
This class implements matrices, in the linear-algebra sense, with real-valued elements.
Definition: m_matrix.h:94
Code for a wrapper class around the C struct KJB_Image.
Support for error handling exception classes in libKJB.
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
double compute_score4(const kjb::Int_matrix &map, std::vector< Fh_type > &new_darts)
Definition: feature_histogram.cpp:560
Image_dart(unsigned int irow, unsigned int icol)
Definition: feature_histogram.h:40
unsigned int element_3
Definition: feature_histogram.h:30
const Matrix & get_diff_matrix() const
Definition: feature_histogram.h:110
unsigned int element_2
Definition: feature_histogram.h:29