#### Archived

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

# Fisheye Image Transforms

This topic is 5818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 on other sites
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>

1. 1
2. 2
3. 3
Rutin
24
4. 4
JoeJ
18
5. 5

• 14
• 23
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002228
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!