00001
00002
00003 #include <iostream.h>
00004 #include <stdio.h>
00005 #include <stdlib.h>
00006 #include <string.h>
00007 #include <tip.h>
00008
00009
00010
00011
00012
00013
00014
00015 int main(int argc, char *argv[])
00016 {
00017
00018 if (argc != 2) {
00019 cout << "Usage: " << argv[0] << " <input_image>" << endl;
00020 exit(0);
00021 }
00022
00023
00024 Image< float > im1;
00025 im1.readImage(argv[1]);
00026 im1.setName("test_image");
00027 cout << "Min: " << im1.min() << "\t" << "Max: " << im1.max() << endl;
00028 im1.showImage();
00029
00030
00031 Image< float > im2;
00032 Contrast(im1, 10, 100, im2);
00033 im2.setName("test_image_2");
00034 cout << "Min: " << im2.min() << "\t" << "Max: " << im2.max() << endl;
00035 im2.showImage();
00036
00037
00038 Image< float > im3;
00039 Contrast(im1, 10, 100, 80, 200, im3);
00040 im3.setName("test_image_3");
00041 cout << "Min: " << im3.min() << "\t" << "Max: " << im3.max() << endl;
00042 im3.showImage();
00043
00044 char l;
00045 cin >> l;
00046 im1.closeWindow();
00047 im2.closeWindow();
00048 im3.closeWindow();
00049 return(1);
00050 }