2 ///////////////////////////////////////////////////////////////////////////
3 // This program is free software: you can redistribute it and/or modify //
4 // it under the terms of the version 3 of the GNU General Public License //
5 // as published by the Free Software Foundation. //
7 // This program is distributed in the hope that it will be useful, but //
8 // WITHOUT ANY WARRANTY; without even the implied warranty of //
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
10 // General Public License for more details. //
12 // You should have received a copy of the GNU General Public License //
13 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
15 // Written by Francois Fleuret, (C) IDIAP //
16 // Contact <francois.fleuret@idiap.ch> for comments & bug reports //
17 ///////////////////////////////////////////////////////////////////////////
21 This class implement the notion of pi-feature, that is a feature
22 which can be evaluated on a pair image / referential, where the
23 referential is computed from a pose cell.
32 #include "rich_image.h"
33 #include "pi_referential.h"
39 PF_EDGE_HISTOGRAM_COMPARISON,
40 PF_GRAYSCALE_HISTOGRAM_COMPARISON,
43 int _tag, _edge_scale;
44 Rectangle _window_a, _window_b;
45 int _registration_a, _registration_b;
47 int random_registration_mode(int level);
48 void randomize_window(int registration_mode, Rectangle *window);
49 void draw_window(RGBImage *image, int registration_mode, Rectangle *window);
53 scalar_t response_edge_thresholding(RichImage *image, PiReferential *referential);
54 void draw_edge_thresholding(RGBImage *image, int r, int g, int b,
55 PiReferential *referential);
56 void print_edge_thresholding(ostream *os);
58 // EDGE ORIENTATION HISTOGRAM COMPARISON
60 scalar_t response_edge_histogram_comparison(RichImage *image, PiReferential *referential);
61 void draw_edge_histogram_comparison(RGBImage *image, int r, int g, int b,
62 PiReferential *referential);
63 void print_edge_histogram_comparison(ostream *os);
65 // GRAYSCALE HISTOGRAM COMPARISON
67 scalar_t response_grayscale_histogram_comparison(RichImage *image, PiReferential *referential);
68 void draw_grayscale_histogram_comparison(RGBImage *image,
70 PiReferential *referential);
71 void print_grayscale_histogram_comparison(ostream *os);
75 void randomize(int level);
77 scalar_t response(RichImage *image, PiReferential *referential);
79 void draw(RGBImage *image,
81 PiReferential *referential);
83 void print(ostream *os);