Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.

FYI: Success with OV9653 120deg Fisheye Sensor

+5 votes

For anyone interested. There is an available OV9653 (the same camera sensor, same connector) but comes with a 120deg fisheye lens instead and it works well. It's hard to find and a bit pricey, but if you need it for your application, it does exist. 

The other method is to use an add-on phone lens, which would require a modified camera shell where the external lens can be screwed on. I noticed that these external add-on phone camera lenses have a standard screw size, so one modified shell design can allow for interchanging those lenses. 

One view with OV9653 with 120deg lens

View 1

Another view

Second View

Two add on lenses that work well too, albeit losing some of the image peripheral from lens obstruction.

Add on Lenses. 180deg and 235deg.

The original and the alternative camera sensor. 

The orignal camera, and the other with 120deg lens

asked Mar 28, 2017 in Hardware Questions by alsaibie (740 points)

3 Answers

0 votes

Very nice work, thanks for sharing!

I just talked to our camera sensor manufacturer and they could make a model with 120deg fisheye lens if we order at least 100. Estimated cost around $10 extra compared to standard lens. All, please note that some algorithms may not work well because the wider field of view creates some distortions of the image. This could be a problem for things like SURF, QR-code, ARuCo, etc. But you may be able to write a GPU shader to do the dewarping directly on the JeVois GPU at a very low cost in terms of JeVois CPU utilization. You would possibly extend the GPU component that is already developed for the GPU demo, and implement a dewarping shader instead of twirl and others in that demo.

Anyone interested, please email jevoisinc@gmail.com with subject line "interested in fisheye lens" and if there is enough interest we will order some.

answered Mar 28, 2017 by JeVois (46,580 points)
Unwraping on the GPU sounds very interesting and will definitely speed up my work. I've started reading into shaders and unwraping. If you have any helpful resources, it would be great if you can share them. Thanks.
+3 votes

I added a dewarping shader under DemoGPU. You can find it in this branch here:
https://github.com/alsaibie/jevoisbase/tree/GPUDewrap/src/Modules/DemoGPU 

It works pretty well. 30fps for 320x240 on Jevois (Ignore the numbers on the images, they're from a host daemon run, 457fps wouldn't be bad though hehe). Requires some parameter tweaking. Thanks again for pointing this out. 

It implements a logarithmic model with a backward mapping approach on the fragment shader. It boils down to tweaking parameters (s and lamda) in fisheye function. The code is adopter from here

answered Apr 7, 2017 by alsaibie (740 points)
Wow, really nice work! So you could be running other things on the CPU if you delay 1 frame (process frame N-1 on CPU while frame N is being de-warped). Great stuff. Or just use JeVois for dewarping and then some host CPU for additional processing. Since this was a fork of jevoisbase, may we integrate it into it for everyone to enjoy, we will give you proper credit of course?
Of course! Just sent a pull request. Added build directories and doc to gitignore too.
0 votes
Awesome!

You're right that it's tricky to get hold of the camera module with the lens attached, but it's much, *much* easier to get the 1/4" M7x0.35 lenses individually for a few dollars on Aliexpress. I happened to have one in my junk box, and I was able to successfully swap the lens. Be warned, the original lens is cemented in really well and it takes a sharp blade, a sharp eye, some finesse, and finally a stiff twist with some pliers (possibly after a stiff drink for courage) to actually free it up. And the threads are extremely fine, so it's fiddly to get the new lens to go in straight.

On the upside - the larger lens improves the low light performance. And I've got a lens cap for it :D
answered Apr 27, 2017 by pelrun (2,330 points)
...