head	1.2;
access;
symbols;
locks; strict;
comment	@ * @;


1.2
date	94.08.29.04.47.34;	author rjj;	state Exp;
branches;
next	1.1;

1.1
date	94.07.01.01.18.05;	author rjj;	state Exp;
branches;
next	;


desc
@Initial implementation for the Hopfield Neural Network algorithm.  Buggy!
@


1.2
log
@Added standard file header and exit() in main().
@
text
@// test-convert.c       Section: 13.2
//      Copyright 1994, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.


#include "convert-hopfield-images.h"
#include "scale-to-uchar.h"

int main(int argc, char *argv[]) {

    // if a value was passed on the command line, use that as the
    // width to make the image, otherwise default to 10.

    int argvalue( argc > 1 ? atoi(argv[1]) : 0);
    unsigned int width(argvalue > 0 ? argvalue : 10);
    cerr << "Using width = " << width << endl;


    IA_Image<IA_Point<int>,int>
	in( read_int_PGM( cin ) );

    // The input examplars are 1D, but are treated as 2D, arrgh...

    IA_Set<IA_Point<int> >
	in_ps( in.domain() ),
	idi_ps( IA_boxy_pset( IA_Point<int>(0),
			      IA_Point<int>( in.domain().sup()(0) ) ) );

    IA_Point<int> ps_inf( idi_ps.inf() ), ps_sup( idi_ps.sup() );
    cerr << "idi_ps.inf(): " << ps_inf << "\t"
	 << "idi_ps.sup(): " << ps_sup << endl;


    IA_Image<IA_Point<int>,int>
	idi( idi_ps, in.value_array().data_start(), in.domain().card() );
    
    convert_to_2D( idi, width ).write_PGM( cout );

    exit( 0 );
}
@


1.1
log
@Initial revision
@
text
@d1 3
a3 1
// test-convert.c
d5 1
d9 1
a9 1
void main(int argc, char *argv[]) {
d38 2
@
