From mwirth@cs.umanitoba.ca Mon Oct 10 14:03:30 1994 X-VM-Message-Order: (1 6 2 3 4 5 7 8) X-VM-Summary-Format: "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n" X-VM-Labels: nil X-VM-VHeader: ("Resent-" "From:" "Sender:" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:") nil X-VM-Bookmark: 8 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["2235" "" " 4" "October" "1994" "20:43:44" "GMT" "Michael Wirth" "mwirth@cs.umanitoba.ca" "<36seq0$suj@canopus.cc.umanitoba.ca>" "74" "Image Registration Transformation Methods (File 1)" "^From:" nil nil "10" "1994100420:43:44" "Image Registration Transformation Methods (File 1)" (number " " mark " Michael Wirth Oct 4 74/2235 " thread-indent "\"Image Registration Transformation Methods (File 1)\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!gatech!swiss.ans.net!solaris.cc.vt.edu!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!scipio.cyberstore.ca!vanbc.wimsey.com!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 74 Distribution: world Message-ID: <36seq0$suj@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration Transformation Methods (File 1) Date: 4 Oct 1994 20:43:44 GMT There are five files: The first file contains 5 header files, which must be separated and saved as the following files: imagematrix.h inverse.h average_filters.h gaussian.h error.h The next four files contain the transformation methods: affine.c - Affine Transformation polyquad.c - Polynomial Transformation - Quadratic polycubic.c - Polynomial Transformation - Cubic spline.c - Spline Transformation Each file can be compiled using the standard Sun C++ compiler. Input to each of the programmes is in the following format: a.out reference_file distorted_file transformed_file control_points where: reference_file = the reference image distorted_file = the image to be transformed transformed_file = the transformed image control_points = a file containing the control point pairs, in the following form: U1 V1 X1 Y1 U2 V2 X2 Y2 . . . . . . . . . . . . Un Vn Xn Yn U and V are the x and y coordinates of the control point pairs in the reference image and X and Y are the corresponding x and y coordinates of the control point pairs in the distorted image. n is the number of control-point pairs. The images are treated as discrete 2D arrays, and the files are of the PGM form: columns rows - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ....... ....... ....... - - - - - - - - - - - - - - - - - - - - - columns = the number of columns rows = the number of rows - = a grayscale value (0-255) The programme will produce a transformed image of the form shown above and also the Mean-Square-Root-Error estimate for each control-point pair. (c) September 1994, Michael Wirth -- -------------------------------------------------------------------------------- Michael Wirth Email: mwirth@silver.cs.umanitoba.ca Department of Computer Science Snail: Box 654 Tache Residence University of Manitoba University of Manitoba Winnipeg, Manitoba Winnipeg, MB R3T 2N1 CANADA R3T 2N1 -------------------------------------------------------------------------------- From mwirth@cs.umanitoba.ca Mon Oct 10 14:04:00 1994 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["13972" "" " 5" "October" "1994" "18:22:40" "GMT" "Michael Wirth" "mwirth@cs.umanitoba.ca" "<36uqtg$n2q@canopus.cc.umanitoba.ca>" "681" "Image Registration Header Files" "^From:" nil nil "10" "1994100518:22:40" "Image Registration Header Files" (number " " mark " Michael Wirth Oct 5 681/13972 " thread-indent "\"Image Registration Header Files\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!inxs.ncren.net!taco.cc.ncsu.edu!gatech!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 681 Distribution: world Message-ID: <36uqtg$n2q@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration Header Files Date: 5 Oct 1994 18:22:40 GMT Oops... seems the header files only posted locally, so here it is again. ====================================================================== Imagematrix.h ====================================================================== #include #include #define MAX(a, b) (a > b ? (a) : (b)) typedef int AImage[500][500]; typedef double Afilter[150][150]; typedef int Contour[600][2]; typedef int MPoints[50][2]; void ViewImageMatrix(AImage A, int nrow, int ncolumn) { for (int i=0; i> column >> row; for (int i=0; i> A[i][j]; fp.close(); } void CopyImage(AImage A, AImage B, int row, int column) { for (int i=0; i> N; for (int i=0; i> temp >> C[i][0] >> C[i][1]; fp.close(); } void WriteContour(char *filename, Contour C, int N) { ofstream fq; fq.open(filename,ios::out); fq << N << endl; for (int i=0; i> M1[i][0] >> M1[i][1] >> M2[i][0] >> M2[i][1]; i++; } while (!fp.eof()); fp.close(); N = i - 1; } void WritePGM(char *filename, AImage A, int r, int c) { int i,j,k,max=0,row,column; AImage B; ifstream fp; ofstream fq; WriteImage("image.tmp",A,r,c); fp.open("image.tmp",ios::in); fp >> row >> column; double shade[400][400]; for (i=0; i> shade[i][j]; B[i][j] = (int) shade[i][j]; max = MAX(max, B[i][j]); } fp.close(); fq.open(filename,ios::out); fq << "P2\n" << row << " " << column << " " << max << "\n"; fq << "# gridtopgm M.W. 1994\n"; for (i=0; i=i && p=0; i--) { temp = 0.0; for (j=i+1; j #include #include #define PI 3.1415926535979 void Bartlett_Filter(AImage data, AImage newImage, int nrow, int ncolumn) { static int filter[3][3] = { {1,2,1},{2,4,2},{1,2,1} }; float avg, temp; for (int x=0; x=0 && j+y=0) { temp += data[i+x][j+y]*filter[i+1][j+1]; avg += filter[i+1][j+1]; } } } newImage[x][y] = (int)(temp/avg); } } void Box_Filter(AImage data, AImage newImage, int nrow, int ncolumn) { static int filter[3][3] = { {1,1,1},{1,1,1},{1,1,1} }; float temp; for (int x=0; x=0 && j+y=0) temp += data[i+x][j+y]*filter[i+1][j+1]; } } newImage[x][y] = (int)temp/9; } } void Add_Snow_Noise(AImage data, int nrow, int ncolumn) { double randtemp; for (int i=0; i= noise) data[i][j] -= noise; } } } void ReSample(AImage A, AImage B, int nrow, int ncolumn) { int i,j; float maxvalue=0.0, minvalue=500.0; for (i=0; i maxvalue) maxvalue = A[i][j]; if (A[i][j] < minvalue) minvalue = A[i][j]; } for (i=0; i=0 && j+y=0) { temp += data[i+x][j+y]*Hfilter[i+1][j+1]; avg += Hfilter[i+1][j+1]; } } if (temp > 0) tempImage[x][y] = (int)temp; else tempImage[x][y] = 0; } ReSample(tempImage,newImage,nrow,ncolumn); } ================================================================== gaussian.h ================================================================== typedef double matrix20x20[20][20]; typedef double matrix20x1[20][1]; typedef double matrix25x25[25][25]; typedef double matrix25x1[25][1]; void Gaussian_Elimination2(matrix20x20 A, matrix20x1 B, matrix20x1 C, int n) { int i,j,k,p,FOUND=0; double temp; matrix20x20 M; for (i=0; i=i && p=0; i--) { temp = 0.0; for (j=i+1; j=i && p=0; i--) { temp = 0.0; for (j=i+1; j #include #include void Match_Error(MPoints A, MPoints B, int n) { int i; float error,temp1,temp2,msre=0.0; cout << "Reference" << "\t\t" << "Distorted" << endl; for (i=0; i\t" << B[i][0] << "," << B[i][1]; cout << "\t" << error << endl; } cout << "MSRE = " << msre/n << endl; } ================================================================== ================================================================== Please direct any comments to the following address, as I am returning to Australia, and as yet do not have an email address: Michael Wirth 7 Pipit Parade Burleigh Waters Queensland 4220 AUSTRALIA Copies of my Master's thesis can be obtained from Dafoe Library at the University of Manitoba. regards Michael -- -------------------------------------------------------------------------------- Michael Wirth Email: mwirth@silver.cs.umanitoba.ca Department of Computer Science Snail: Box 654 Tache Residence University of Manitoba University of Manitoba Winnipeg, Manitoba Winnipeg, MB R3T 2N1 CANADA R3T 2N1 -------------------------------------------------------------------------------- From mwirth@cs.umanitoba.ca Mon Oct 10 14:05:03 1994 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["4477" "" " 4" "October" "1994" "20:48:44" "GMT" "Michael Wirth" "mwirth@cs.umanitoba.ca" "<36sf3c$suj@canopus.cc.umanitoba.ca>" "183" "Image Registration - Affine Transformation" "^From:" nil nil "10" "1994100420:48:44" "Image Registration - Affine Transformation" (number " " mark " Michael Wirth Oct 4 183/4477 " thread-indent "\"Image Registration - Affine Transformation\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 183 Distribution: world Message-ID: <36sf3c$suj@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration - Affine Transformation Date: 4 Oct 1994 20:48:44 GMT #include #include #include #include #include "imagematrix.h" #include "inverse.h" #include "error.h" #define PI 3.1415926535979 // Image Registration by Affine Transformation // RST - Rotation, Scaling (Uniform) and Translation void Find_Properties(MPoints A, MPoints B, int n, float &a, float &b, float &h, float &k) { matrix4x4 X; float Y[4][1], W[4][1]; float s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0,s6=0.0,s7=0.0,temp,temp1; float theta,alpha; int i,j; for (i=0; i" "229" "Image Registration Method - Quadratic Polynomial" "^From:" nil nil "10" "1994100420:51:13" "Image Registration Method - Quadratic Polynomial" (number " " mark " Michael Wirth Oct 4 229/6029 " thread-indent "\"Image Registration Method - Quadratic Polynomial\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 229 Distribution: world Message-ID: <36sf81$suj@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration Method - Quadratic Polynomial Date: 4 Oct 1994 20:51:13 GMT #include #include #include #include #include "imagematrix.h" #include "inverse.h" #include "average_filters.h" #include "gaussian.h" #define PI 3.1415926535979 // Image Registration by Polynomial Warping // Quadratic Polynomial - General Affine Distortions void Find_Properties(MPoints A, MPoints B, int n, int C, float &a0, float &a1, float &a2, float &a3, float &a4, float &a5) { matrix6x6 X; float Y[6][1], W[6][1]; float s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0,s6=0.0,temp; float x=0.0,y=0.0,xsq=0.0,ysq=0.0,xy=0.0,xsqy=0.0,xysq=0.0; float xsqysq=0.0,xcb=0.0,ycb=0.0,xq=0.0,yq=0.0,xycb=0.0,xcby=0.0; float theta,alpha; int i,j; for (i=0; i maxx) maxx = (int)tempx; if (tempy < miny) miny = (int)tempy; if (tempy > maxy) maxy = (int)tempy; } for (i=0; i" "311" "Image Registration Method - Cubic Polynomial" "^From:" nil nil "10" "1994100420:52:02" "Image Registration Method - Cubic Polynomial" (number " " mark " Michael Wirth Oct 4 311/8900 " thread-indent "\"Image Registration Method - Cubic Polynomial\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 311 Distribution: world Message-ID: <36sf9i$suj@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration Method - Cubic Polynomial Date: 4 Oct 1994 20:52:02 GMT #include #include #include #include #include "imagematrix.h" #include "inverse.h" #include "average_filters.h" #include "gaussian.h" #include "error.h" #define PI 3.1415926535979 // Image Registration by Polynomial Warping // Cubic Polynomial - Geometric Distortions void Find_Properties(MPoints A, MPoints B, int n, int C, float &a0, float &a1, float &a2, float &a3, float &a4, float &a5, float &a6, float &a7, float &a8, float &a9) { matrix20x20 X; matrix20x1 Y, Z; float s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0,s6=0.0,s7=0.0,s8=0.0,s9=0.0,s0=0.0; float x=0.0,x2=0.0,x3=0.0,x4=0.0,x5=0.0,x6=0.0; float y=0.0,y2=0.0,y3=0.0,y4=0.0,y5=0.0,y6=0.0; float sumx=0.0,sumx2=0.0,sumx3=0.0,sumx4=0.0,sumx5=0.0,sumx6=0.0; float sumy=0.0,sumy2=0.0,sumy3=0.0,sumy4=0.0,sumy5=0.0,sumy6=0.0; float sumxy=0.0,sumx2y2=0.0,sumx3y3=0.0; float sumxy2=0.0,sumx2y=0.0,sumxy3=0.0,sumx3y=0.0,sumxy4=0.0,sumx4y=0.0; float sumxy5=0.0,sumx5y=0.0,sumx2y3=0.0,sumx3y2=0.0,sumx2y4=0.0,sumx4y2=0.0; float theta,alpha; int i,j; for (i=0; i maxx) maxx = (int)tempx; if (tempy < miny) miny = (int)tempy; if (tempy > maxy) maxy = (int)tempy; } for (i=0; i" "270" "Image Registration Technique - Surface Spline Transformation" "^From:" nil nil "10" "1994100420:52:43" "Image Registration Technique - Surface Spline Transformation" (number " " mark " Michael Wirth Oct 4 270/5603 " thread-indent "\"Image Registration Technique - Surface Spline Transformation\"\n") nil] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!concert!news.duke.edu!zombie.ncsc.mil!MathWorks.Com!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!cs.umanitoba.ca!mwirth Newsgroups: sci.image.processing Organization: Computer Science, University of Manitoba, Winnipeg, Canada Lines: 270 Distribution: world Message-ID: <36sfar$suj@canopus.cc.umanitoba.ca> NNTP-Posting-Host: silver.cs.umanitoba.ca From: mwirth@cs.umanitoba.ca (Michael Wirth) Subject: Image Registration Technique - Surface Spline Transformation Date: 4 Oct 1994 20:52:43 GMT #include #include #include #include #include "imagematrix.h" #include "inverse.h" #include "average_filters.h" #include "gaussian.h" #include "error.h" #define PI 3.1415926535979 typedef double Param[30]; // Image Registration by Surface Spline Fitting void Find_Properties(MPoints A, MPoints B, int n, int C, float &a0, float &a1, float &a2, Param D) { matrix25x25 X; matrix25x1 Y, Z; float s1=0.0,s2=0.0,s3=0.0,s4=0.0,s5=0.0,s6=0.0; float r; float theta,alpha; int i,j; for (i=0; i maxx) maxx = (int)tempx; if (tempy < miny) miny = (int)tempy; if (tempy > maxy) maxy = (int)tempy; } for (i=0; i" "23" "Re: TIFF library at Uni. of California, Berkeley" "^From:" nil nil "10" "1994102121:11:59" "TIFF library at Uni. of California, Berkeley" (number " " mark " Gary Von Colln Oct 21 23/650 " thread-indent "\"Re: TIFF library at Uni. of California, Berkeley\"\n") "<3838kc$go8@sun4.bham.ac.uk>"] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!darwin.sura.net!spool.mu.edu!uwm.edu!news.alpha.net!news.mathworks.com!noc.near.net!jericho.mc.com!maple!gary Newsgroups: sci.image.processing Organization: Mercury Computer Systems, Chelmsford MA 01824 Lines: 23 Distribution: world Message-ID: <389aqv$8ve@jericho.mc.com> References: <3838kc$go8@sun4.bham.ac.uk> NNTP-Posting-Host: maple.mc.com From: gary@maple.mc.com (Gary Von Colln) Sender: gary@maple (Gary Von Colln) Subject: Re: TIFF library at Uni. of California, Berkeley Date: 21 Oct 1994 21:11:59 GMT In article <3838kc$go8@sun4.bham.ac.uk>, S.S.Koh@BHAM.AC.UK (S.S.Koh) writes: |> Dear netter, |> Could anybody direct me to the ftp location of the University of |> California, Berkeley. I am looking for Sam Leffler who wrote the TIFF library. |> I would like to contact him concerning the TIFF library. Thank you in advance. |> |> |> Best regards, |> Edmund Koh |> (s.s.koh@bham.ac.uk) I have a copy of the TIFF library code. The README file gives the address sam@sgi.com The ftp sites for the code are sgi.com graphics/tiff/v3.0.tar.Z (192.48.153.1) ucbvax.berkeley.edu pub/tiff/v3.0.tar.Z (128.32.130.12) From metherall@aol.com Fri Oct 28 00:55:49 1994 Status: RO X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["320" "" "25" "October" "1994" "08:34:06" "-0400" "metherall@aol.com" "metherall@aol.com" "<38itvu$evt@newsbf01.news.aol.com>" "8" "Re: BMP File Format Searched" "^From:" nil nil "10" "1994102512:34:06" "BMP File Format Searched" (number " " mark " metherall@aol.com Oct 25 8/320 " thread-indent "\"Re: BMP File Format Searched\"\n") "<1994Oct17.135735.1999@cm.cf.ac.uk>"] nil) Path: saips.cv.nrao.edu!hearst.acc.Virginia.EDU!caen!math.ohio-state.edu!howland.reston.ans.net!news.sprintlink.net!EU.net!uunet!newstf01.cr1.aol.com!newsbf01.news.aol.com!not-for-mail Newsgroups: sci.image.processing Organization: America Online, Inc. (1-800-827-6364) Lines: 8 Message-ID: <38itvu$evt@newsbf01.news.aol.com> References: <1994Oct17.135735.1999@cm.cf.ac.uk> NNTP-Posting-Host: newsbf01.news.aol.com From: metherall@aol.com (METHERALL) Sender: news@newsbf01.news.aol.com Subject: Re: BMP File Format Searched Date: 25 Oct 1994 08:34:06 -0400 In article <1994Oct17.135735.1999@cm.cf.ac.uk>, spemk1@thor.cf.ac.uk (Mathias Koehrer) writes: There is a book called "Encyclopedia of Graphic File Formats" by J.murray and W. VanRyper and published by O'Reilly & Assoc.,Inc.(Sebastopol,CA), that has information on the BMP file format (along with many others). Jeanne