/*********************************************** * * file d:\cips\findt.c * * Functions: This file contains * main * find_text * * Purpose: * This file contains the main calling * routine and subroutines to find * text on hidden top of an image. * * External Calls: * tiff.c - read_tiff_header * rtiff.c - read_tiff_image * wtiff.c - write_array_into_tiff_image * * Modifications: * 16 February 1998 - created * *************************************************/ #include "cips.h" short the_image[ROWS][COLS]; short out_image[ROWS][COLS]; main(argc, argv) int argc; char *argv[]; { char name[80], name2[80]; char response[80]; float factor; int i, ie, il, j, le, length, ll, width; struct tiff_header_struct image_header; if(argc < 3){ printf("\n\nNot enough parameters:"); printf("\n"); printf("\n usage: hidet image-file text-file "); exit(0); } strcpy(name, argv[1]); strcpy(name2, argv[2]); il = 1; ie = 1; ll = ROWS+1; le = COLS+1; read_tiff_header(name, &image_header); /***create_file_if_needed(name, name2, out_image);***/ length = (ROWS-10 + image_header.image_length)/ROWS; width = (COLS-10 +image_header.image_width)/COLS; printf("\nlength=%d width=%d", length, width); printf("\nHit enter to continue"); gets(response); for(i=0; i= (fpixel*0.1)) out_image[i][j] = 200; } } } /* ends loop over j */ } /* ends loop over i */ write_array_into_tiff_image(in2_name, out_image, il, ie, ll, le); } /* ends find_text */