Page 1 of 1

Fisheye effect

Posted: 2008-03-01T14:56:48-07:00
by dognose
I'm trying to convert a regular image to one that looks like it's been taken with a fisheye lense.

Image

does anyone have any ideas on how I'd do the distortion of an image necessary for this?

I'm looking for something more realistic than just the explode option.

Re: Fisheye effect

Posted: 2008-03-01T18:12:37-07:00
by fmw42

Re: Fisheye effect

Posted: 2008-03-02T23:47:27-07:00
by anthony
A reversed -implode will do this, but only if you limit it to a value less than 2. A value more that 2 exhibits infinities into the formula that results in artificial effects.

It is not exactly a fish eye distortion, and you may need to enlarge the image (add a temporary border) to expand the outside radius, to get what you want.

Also the pixel lookup is just interpolative, so parts of an image that is compressed by more than 50% will start have aliasing effects, (unless a super-sampling tenchnique is used to improve results). That will remain the case until I improve the general -distort function and migrate circular distorts to it (no time line for this, due to other commitments and a china trip in April).

If you must have a better fish eye distortion, look at the DIY distostion methods using the -fx operator.
http://imagemagick.org/Usage/distorts/a ... affine_diy
And the use of pre-calculated distortion maps for handling multiple images with the same distortion parameters.
http://imagemagick.org/Usage/distorts/#lut

Please let us know how you get on, the method/path you finally take, and hopefully some examples and results of what you achieve.

Re: Fisheye effect

Posted: 2008-03-03T23:32:39-07:00
by fmw42
You can now do something like this with my new pinbarrel script that allow you to apply barrel or pincushion distortion to an image with an arbitrary center point. See

http://www.fmwconcepts.com/imagemagick/index.html

I am trying to do a proper fisheye distortion, which maps the whole image into a circle (actually onto a hemisphere). What you have in your image is more a wide angle, not a true fisheye, I think.

Re: Fisheye effect

Posted: 2008-03-10T23:00:27-07:00
by fmw42
You can now do something like this with my new bubblewarp script that allows you to apply warp an image onto a hemisphere. It is not the same as a true 180 degree field of view fisheye effect, but similar.

http://www.fmwconcepts.com/imagemagick/index.html

I hope to do a proper fisheye distortion, but have not quite gotten around to it.