$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
homogeneous_contrast.cc
1
#include <mln/value/int_u8.hh>
2
#include <mln/io/pgm/load.hh>
3
#include <mln/io/pgm/save.hh>
4
5
#include <scribo/preprocessing/homogeneous_contrast.hh>
6
#include <scribo/debug/usage.hh>
7
8
const
char
*args_desc[][2] =
9
{
10
{
"input.pgm"
,
"A gray-level image."
},
11
{
"h"
,
"The height attribute value for the leveling closing."
},
12
{0, 0}
13
};
14
15
16
17
void
usage
(
char
* argv[])
18
{
19
std::cerr <<
"usage: "
<< argv[0] <<
" input.pgm h output.pgm"
<< std::endl;
20
abort
();
21
}
22
23
24
25
int
main(
int
argc,
char
* argv[])
26
{
27
using namespace
mln;
28
using
value::int_u8;
29
30
if
(argc != 4)
31
return
scribo::debug::usage
(argv,
32
"Remove noise."
,
33
"input.pgm h output.pgm"
,
34
args_desc);
35
36
37
image2d<int_u8>
input;
38
io::pgm::load
(input, argv[1]);
39
40
int
h = std::atoi(argv[2]);
41
42
io::pgm::save
(
scribo::preprocessing::homogeneous_contrast
(input, h),
43
argv[3]);
44
}
scribo
src
preprocessing
homogeneous_contrast.cc
Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)