2 * svrt is the ``Synthetic Visual Reasoning Test'', an image
3 * generator for evaluating classification performance of machine
4 * learning systems, humans and primates.
6 * Copyright (c) 2009 Idiap Research Institute, http://www.idiap.ch/
7 * Written by Francois Fleuret <francois.fleuret@idiap.ch>
9 * This file is part of svrt.
11 * svrt is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License version 3 as
13 * published by the Free Software Foundation.
15 * svrt is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with selector. If not, see <http://www.gnu.org/licenses/>.
33 static const int margin = 1;
34 static const int nb_max_pixels = Vignette::width * Vignette::height;
35 static const scalar_t gap_max = 0.25;
36 int n_pixels1, n_pixels2, n_pixels3, n_pixels4;
42 int generate_part_part(scalar_t *xp, scalar_t *yp, int *nb_pixels, scalar_t radius, scalar_t hole_radius,
43 scalar_t x1, scalar_t y1, scalar_t x2, scalar_t y2);
44 void generate_part(scalar_t *xp, scalar_t *yp, int *nb_pixels, scalar_t radius, scalar_t hole_radius);
45 int overwrites(Vignette *vignette, scalar_t xc, scalar_t yc, int first, int nb);
46 void draw(int part_number, Vignette *vignette, scalar_t xc, scalar_t yc, int first, int nb);
52 void randomize(scalar_t radius, scalar_t hole_radius);
53 void copy(Shape *shape);
54 void scale(scalar_t s);
55 void rotate(scalar_t alpha);
56 void symmetrize(scalar_t axis_x, scalar_t axis_y);
58 int overwrites(Vignette *vignette, scalar_t xc, scalar_t yc);
59 void draw(int part_number, Vignette *vignette, scalar_t xc, scalar_t yc);