Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!seismo!beno!black From: black@beno.CSS.GOV (Mike Black) Newsgroups: comp.graphics Subject: Re: Image restoration Keywords: image restore warp Message-ID: <49009@seismo.CSS.GOV> Date: 21 Jul 90 13:43:53 GMT References: <4187@tahoe.unr.edu> <1990Jul15.061617.19425@comspec.uucp> <48999@seismo.CSS.GOV> <1990Jul18.162340.12905@imax.com> Sender: usenet@seismo.CSS.GOV Distribution: usa Organization: Center for Seismic Studies, Arlington, VA Lines: 41 In article <1990Jul18.162340.12905@imax.com> dave@imax.com (Dave Martindale) writes: >In article <48999@seismo.CSS.GOV> black@beno.CSS.GOV (Mike Black) writes: >>I'm in need of an algorithm to undo the effect of a 90 degree field of view >>lens. I tried a dual-axis third order polynomial fit and it didn't handle >>the corners very well. > >First, you have to know the distortion characteristics of the lens. >Designers *try* to build lenses with minimal distortion, even if the >field of view is 90 degrees, so the distortion that remains is one >of the compromises that had to be accepted to get something else in >the design. Thus, every design of a wide-angle lens will have >different distortion characteristics. > >Or was this lens designed as a fisheye? > >Anyway, once you know what the distortion you are trying to correct >looks like, you can see how well various polynomials (or other functions) >will fit the curve. I maintain that you don't need to know a thing about the lens. I've taken an evenly spaced grid and pulled off x,y locations of where the points are. I've found that a 3rd order polynomial fits quite well in both axis. I've got two problems now: 1. I've found that the centroid of the fit changes based on which vertical or horizontal scan line I references (it looks like another parabolic function). 2. I'm still a little fuzzy on how to figure out that: x',y' = f(x,y) Using the target image coordinates. In other words, I want to iterate from x=0 to 511, y=0 to 511 and figure out where the distorted pixel is and put it in a non-distorted buffer. This will assure image fill. I figure that I will have to change to polar coordinates and then back again. I'm having problems finding out where the center of the field of view is so I can compute the polar coordinates from that point. I need to be extremely accurate and need to be able to prove the method. -- ------------------------------------------------------------------------------- : usenet: black@beno.CSS.GOV : land line: 407-494-5853 : I want a computer: : real home: Melbourne, FL : home line: 407-242-8619 : that does it all!: -------------------------------------------------------------------------------