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 //
16 // (C) Idiap Research Institute //
18 // Contact <francois.fleuret@idiap.ch> for comments & bug reports //
19 ///////////////////////////////////////////////////////////////////////////
23 This class implement the notion of pi-feature, that is a feature
24 which can be evaluated on a pair image / referential, where the
25 referential is computed from a pose cell.
34 #include "rich_image.h"
35 #include "pi_referential.h"
41 PF_EDGE_HISTOGRAM_COMPARISON,
42 PF_GRAYSCALE_HISTOGRAM_COMPARISON,
45 int _tag, _edge_scale;
46 Rectangle _window_a, _window_b;
47 int _registration_a, _registration_b;
49 int random_registration_mode(int level);
50 void randomize_window(int registration_mode, Rectangle *window);
51 void draw_window(RGBImage *image, int registration_mode, Rectangle *window);
55 scalar_t response_edge_thresholding(RichImage *image, PiReferential *referential);
56 void draw_edge_thresholding(RGBImage *image, int r, int g, int b,
57 PiReferential *referential);
58 void print_edge_thresholding(ostream *os);
60 // EDGE ORIENTATION HISTOGRAM COMPARISON
62 scalar_t response_edge_histogram_comparison(RichImage *image, PiReferential *referential);
63 void draw_edge_histogram_comparison(RGBImage *image, int r, int g, int b,
64 PiReferential *referential);
65 void print_edge_histogram_comparison(ostream *os);
67 // GRAYSCALE HISTOGRAM COMPARISON
69 scalar_t response_grayscale_histogram_comparison(RichImage *image, PiReferential *referential);
70 void draw_grayscale_histogram_comparison(RGBImage *image,
72 PiReferential *referential);
73 void print_grayscale_histogram_comparison(ostream *os);
77 void randomize(int level);
79 scalar_t response(RichImage *image, PiReferential *referential);
81 void draw(RGBImage *image,
83 PiReferential *referential);
85 void print(ostream *os);