~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to imagery/i.smap/main.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/****************************************************************************
 
3
 *
 
4
 * MODULE:       i.smap
 
5
 * AUTHOR(S):    Michael Shapiro (USACERL) (original contributor)
 
6
 *               Markus Neteler <neteler itc.it>, 
 
7
 *               Roberto Flor <flor itc.it>, 
 
8
 *               Bernhard Reiter <bernhard intevation.de>, 
 
9
 *               Brad Douglas <rez touchofmadness.com>, 
 
10
 *               Glynn Clements <glynn gclements.plus.com>, 
 
11
 *               Jan-Oliver Wagner <jan intevation.de>
 
12
 * PURPOSE:      segment multispectral images using a spectral class model 
 
13
 *               known as a Gaussian mixture distribution
 
14
 * COPYRIGHT:    (C) 1999-2008 by the GRASS Development Team
 
15
 *
 
16
 *               This program is free software under the GNU General Public
 
17
 *               License (>=v2). Read the file COPYING that comes with GRASS
 
18
 *               for details.
 
19
 *
 
20
 *****************************************************************************/
 
21
#include <stdlib.h>
 
22
#include <unistd.h>
 
23
#include <grass/imagery.h>
 
24
#include <grass/glocale.h>
 
25
#include "bouman.h"
 
26
 
 
27
 
 
28
int main(int argc, char *argv[])
 
29
{
 
30
    struct parms parms;         /* command line parms */
 
31
    struct files files;         /* file descriptors, io, buffers */
 
32
    struct SigSet S;
 
33
    struct GModule *module;
 
34
 
 
35
    G_gisinit(argv[0]);
 
36
 
 
37
    module = G_define_module();
 
38
    G_add_keyword(_("imagery"));
 
39
    G_add_keyword(_("classification"));
 
40
    G_add_keyword(_("supervised classification"));
 
41
    G_add_keyword(_("segmentation"));
 
42
    G_add_keyword(_("SMAP"));
 
43
    module->description =
 
44
        _("Performs contextual image classification "
 
45
          "using sequential maximum a posteriori (SMAP) estimation.");
 
46
 
 
47
    parse(argc, argv, &parms);
 
48
    openfiles(&parms, &files);
 
49
    read_signatures(&parms, &S);
 
50
    create_output_labels(&S, &files);
 
51
 
 
52
    segment(&S, &parms, &files);
 
53
 
 
54
    closefiles(&parms, &files);
 
55
 
 
56
    G_done_msg(" ");
 
57
    
 
58
    exit(EXIT_SUCCESS);
 
59
}