Live data from Hacker News

Converting a fisheye image into a panoramic, spherical or perspective projection

paulbourke.net

1–10 of 28 posts

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#2
Transformations like these have wide applicability. Performing optics in software so to speak, is more flexible and cheaper than grinding lenses and building special cameras.

I was charged once, with transforming images for projection onto a sphere through special lenses. I didn't know the lens transform, the manufacturer kept that secret. I did know that the intensity across the spherical surface was of uniform brightness - the manufacturer boasted about this. With that bound I could guess the transform, as each pixel of the source image would have to illuminate an equal surface area of sphere once projected.

The manufacturer advertised a service to do this transform on your image, but they wanted $10K for each run! Once I presented my insights and a little math, they capitulated and did it at cost. I never got to write my projection software in the end.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#3

Transformations like these have wide applicability. Performing optics in software so to speak, is more flexible and cheaper than grinding lenses and building special cameras. I was charged once, with transforming images for projection onto a sphere through special lenses. I didn't know the lens transform, the manufacturer kept that secret. I did know that the intensity across the spherical surface was of uniform brig…

Hey, that's a nice case study!

Could you give me some pointers on where I could start studying about the math involved? Are those topics usually covered by good books on computer graphics?

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#4
> If "straight" lines are not straight that normally means the fisheye center or radius are not specified correctly or the angle is not defined correctly.

Is it possible to make the computer guess the correct value with AI? I guess a method is to identify the artificial objects like walls and doors, and assume they have straight lines. The nice curved tops of the windows may be a problem. And probably there must be a special case for circles like the clock.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#5
The applications of this are interesting to say the least.

Something i am currently working on is using fisheye images of the sky to predict cloud motion and to then estimate solar PV power output in the short term i.e. one to five minutes out.

It sounds simple but it isn’t yet even a child can observe cloud motion and predict to some degree when the disc of the sun will be obscured. Part of the inaccuracy is in the distortion caused by the fisheye lens.

I would be interested in seeing how well this works for subjects at infinity i.e. a fisheye lens pointed at the sky.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#6
I bought some interesting photos from an artist who has done some things like this, sort of in reverse:

https://kovasi.photo/

no connection to him other than as a customer.

By the way, printing on aluminum seems like a really nice way to mount art on the wall

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#7
post #6

I bought some interesting photos from an artist who has done some things like this, sort of in reverse: https://kovasi.photo/ no connection to him other than as a customer. By the way, printing on aluminum seems like a really nice way to mount art on the wall

Thanks for sharing ... his photography is surreal.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#8

> If "straight" lines are not straight that normally means the fisheye center or radius are not specified correctly or the angle is not defined correctly. Is it possible to make the computer guess the correct value with AI? I guess a method is to identify the artificial objects like walls and doors, and assume they have straight lines. The nice curved tops of the windows may be a problem. And probably there must be a…

Calibrating using known objects should be possible. Most road sign dimensions are specified in national laws, motor vehicle headlights must be a specific distance apart, etc.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#9

> If "straight" lines are not straight that normally means the fisheye center or radius are not specified correctly or the angle is not defined correctly. Is it possible to make the computer guess the correct value with AI? I guess a method is to identify the artificial objects like walls and doors, and assume they have straight lines. The nice curved tops of the windows may be a problem. And probably there must be a…

For a single image, you'd need some heuristics to distinguish curved objects from camera distortions. If you have multiple frames, you can SLAM your way out of the problem (essentially, match features and solve a big fit which optimized feature positions, camera positions and camera distortions). But by far the easiest option is to just calibrate it, through https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.h... or one of the many alternative methods.

Re: Converting a fisheye image into a panoramic, spherical or perspective projection

#10
post #3

Transformations like these have wide applicability. Performing optics in software so to speak, is more flexible and cheaper than grinding lenses and building special cameras. I was charged once, with transforming images for projection onto a sphere through special lenses. I didn't know the lens transform, the manufacturer kept that secret. I did know that the intensity across the spherical surface was of uniform brig…

Hey, that's a nice case study! Could you give me some pointers on where I could start studying about the math involved? Are those topics usually covered by good books on computer graphics?

I loved "Multiple View Geometry" by Hartley & Zisserman, but also "Computer Vision" by Rick Szelisky is pretty comprehensible and covers a lot of (pre-ML) stuff.
Post reply on HN