Archived

This topic is now archived and is closed to further replies.

Flurry

Fisheye Image Transforms

Recommended Posts

I’m very interested in seeing code for fisheye image transforms. I need to write a routine to create a panorama view from a fisheye image. I am told that Helmut Dersch''s wrote some tools to do this transform but his Web site is currently down (I think due to persecution by IPIX). If anyone knows how I can get hold of these routines then please let me know. Has anyone written a routine that will unwarp a hemispherical or angular fisheye image? If so then I’d like to see your transform. Cheers… Flurry

Share this post


Link to post
Share on other sites
Hm, I don''t know the answer to your question, however I suggest you look up articles on environment mapping, so-called sphere maps in particular. I know it''s not quite what you want, but it''s pretty close; if you can adapt the projection from the various sphere mapping articles out there to only a hemisphere and then apply the inverse to your image, it might just work.

- hillip@xenoage.de''>JQ
Full Speed Games. Period.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
this might work. the idea is based on reversing the anti-fisheye stuff from raycasters (get it?).

tan(a)=sqrt(x*x+y*y)/z, so =>
a=arctan( sqrt(x*x+y*y)/z )

so we take a fictive depth (z) to the picture. this provides us with the viewing angle (a). Now we calculate the distance from the picture (d) as follows:

d=z/cos(a)

And we use this distance for our perspective transformation.

u = x/d, v = y/d

As we can see we use d instead of z for our transformation basicly resulting in a fisheye effect.

I hope this works for you, just an idea that popped up.

earx

ps i hope this is what you want and not the other way around <G>

Share this post


Link to post
Share on other sites