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


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

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


desc
@Simple test of the chain code algorithm.
I should add the test for the inverse operation,
  and we need an ascify of the image also.
@


1.2
log
@Added exit() for picky systems.
@
text
@// test-chain-code.c    Section: 12.2
//      Copyright 1994, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.

// Test the Chain Code extraction.


#include "chain-code.h"
#include "IntDI.h"

int main() {

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

    IA_Point<int> x0;
    IA_Array<u_char>
	cc = chain_code( in, x0 );

    cout << "Start point x0 = " << x0 << endl;
    for( int i=0; i<cc.len(); i++ ) {
	cout << cc( i ) << " ";
    }
    cout << endl;

    exit( 0 );
}
@


1.1
log
@Initial revision
@
text
@d11 1
a11 1
void main() {
d25 2
@
