$extrastylesheet
Olena
User documentation 2.1
An Image Processing Platform
Scribo
Modules
Namespaces
Classes
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
font_boldness.cc
1
// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory (LRDE).
2
//
3
// This file is part of Olena.
4
//
5
// Olena is free software: you can redistribute it and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, version 2 of the License.
8
//
9
// Olena is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
16
18
19
#include <cstdio>
20
#include <cstdlib>
21
22
#include <mln/core/image/image2d.hh>
23
#include <mln/data/compare.hh>
24
25
#include <mln/io/ppm/load.hh>
26
#include <mln/io/pbm/load.hh>
27
28
#include <mln/value/rgb8.hh>
29
30
#include <scribo/estim/font_boldness.hh>
31
32
#include "tests/data.hh"
33
34
using namespace
mln;
35
36
int
main()
37
{
38
image2d<bool>
input;
39
io::pbm::load
(input, SCRIBO_IMG_DIR
"/phillip.pbm"
);
40
41
volatile
float
val = scribo::estim::font_boldness(input);
42
val = ((
int
)(val * 100) / 100.f);
43
44
volatile
float
ref = 18.44f;
45
mln_assertion(val == ref);
46
}
scribo
tests
estim
font_boldness.cc
Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)