poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Working Fisheye Lens?

Sun May 26, 2013 11:03 am

Nice. If you want to get rid of the CA (the colored edges) you can use the free ViewNX2 viewer/editor from Nikon (Mac and Windows). It has an outstanding CA removal tool. Can be downloaded from: https://nikoneurope-en.custhelp.com/app ... a_id/56796

Full size, added contrast and used auto CA removal:
fisheye2.jpg
fisheye2.jpg (47.45 KiB) Viewed 10791 times
crop:
fisheye3.jpg
fisheye3.jpg (44.75 KiB) Viewed 10790 times

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Sun May 26, 2013 11:17 am

poing wrote:Nice. If you want to get rid of the CA (the colored edges) you can use the free ViewNX2 viewer/editor from Nikon (Mac and Windows). It has an outstanding CA removal tool. Can be downloaded from: https://nikoneurope-en.custhelp.com/app ... a_id/56796
Looks good. I'm probably not planning on doing too much with still capture at the moment but I'm sure other people will find the tool useful!

Video capture is still only using the centre of the sensor (as expected) so streamed video still looks the same as the 'before' picture. Hopefully that will be good enough for my projects, will hopefully find out today/tomorrow when I get some spare time to work on it (Booked up to build more Ikea furniture today...)

Leo

User avatar
jbeale
Posts: 3571
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Working Fisheye Lens?

Sun May 26, 2013 2:18 pm

JamesH did imply that a 1296x972 resolution video mode with the full sensor field of view ( 2x2 binned on-chip) should be possible, when some configuration issues are sorted.

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Mon May 27, 2013 9:01 pm

Well I've removed my fisheye lens from my video stream and its now situated here...

Image

I'm hoping with the wider view I'll be able to avoid driving into things quite so much!
So being able to get the full resolution when streaming video would be most useful!

Still need to do some further thinking about how to best mount everything, especially as people have a nasty habit of colliding with things when you give them the controls!

Leo

User avatar
jbeale
Posts: 3571
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

lens field of view, etc.

Tue May 28, 2013 1:58 am

R-Pi camera parameters
------------------------------------
Sensor size: 3.67 x 2.74 mm
Lens: f=3.6 mm, f/2.0
Angle of view: 54° 1' x 41° 40' (65 degrees diagonal)
Field of view @ 2m: 2.0 x 1.33 m (2.4 m diagonal)
Full-frame SLR lens equivalent: 35 mm
Near Focus:
1.8 meters for 3 um Circle of Confusion (2 pixels)
1 meter for 6 um Circle of Confusion (4 pixels)

Because the focal length of the lens is very nearly the same as the width of the sensor, that means the field of view is easy to remember: at x meters away, you can also see x meters horizontally (in 4x3 stills mode; a bit less in video mode)

field & angle calculators: http://www.tawbaware.com/maxlyons/calc.htm
sensor info: http://ovt.com/products/sensor.php?id=66
focal length measurement: http://www.raspberrypi.org/phpBB3/viewt ... 25#p357018
f-stop measurement: http://www.raspberrypi.org/phpBB3/viewt ... 46#p357135

Respectech
Posts: 53
Joined: Sat Sep 29, 2012 12:27 am

Re: Working Fisheye Lens?

Tue May 28, 2013 7:29 pm

LeoWhite wrote:I've now done a rpi-update and my camera (with fisheye lens attached) has gone from

Image to Image

(Click for full size!)
That's what I was looking for! :D

Can you tell me what type of fisheye lens you are using?

Thanks!

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Tue May 28, 2013 7:54 pm

Respectech wrote:
LeoWhite wrote:I've now done a rpi-update and my camera (with fisheye lens attached) has gone from

Image to Image

(Click for full size!)
That's what I was looking for! :D

Can you tell me what type of fisheye lens you are using?
A cheap one! The exact one I got was http://www.amazon.co.uk/dp/B006P82R70/

Leo

smx
Posts: 23
Joined: Sun May 26, 2013 8:59 pm

Re: Working Fisheye Lens?

Tue May 28, 2013 8:05 pm

LeoWhite wrote:
A cheap one! The exact one I got was http://www.amazon.co.uk/dp/B006P82R70/

Leo
Hey Leo,

you did attach the fisheye lense of the mentioned pack of three lenses? Would you be so kind and post a photo with the "wide angle lense" contained in the pack?

Cheers

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Tue May 28, 2013 8:24 pm

smx wrote:
LeoWhite wrote:
A cheap one! The exact one I got was http://www.amazon.co.uk/dp/B006P82R70/
you did attach the fisheye lense of the mentioned pack of three lenses? Would you be so kind and post a photo with the "wide angle lense" contained in the pack?
Hmm its a bit dark outside at the moment so won't be able to take a shot that is easy to compare against the others. Might have to wait till Thursday as I'm out at the Raspberry Pint London tomorrow. Of course we may be taking extra pictures there as I'll have my camera and lenses with me (Assuming I remember to pack them that is..)

Leo

smx
Posts: 23
Joined: Sun May 26, 2013 8:59 pm

Re: Working Fisheye Lens?

Tue May 28, 2013 9:00 pm

Thank you, Leo. Looking forward to the photos.

A pint of pi ... I'd love to join if I wouldn't be in Berlin. Makes me remember the days I lived in London.

edit: Funny, I just noticed your meetup will be held in the hostel's pub I lived in for my first couple of months over there.

erd
Posts: 3
Joined: Wed May 15, 2013 8:52 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 11:27 am

Hi,

I've just set up my raspberry Pi camera with a fisheye lens.

I was struggling with the small mounting holes on the camera board, so I have used the fisheye lens to hold the board. I have made a mount for the lens with a piece of 1 1/4" plastic waste pipe with a section cut out to reduce it's diameter. Then held it together with heat shrink - you can also use tape.

The waste pipe mount is screwed through the RPi case with a self tapper.

Slot cut into the case for the cable.

The lens uses a magnetic mount. Steel rings supplied with the lens are stuck around the camera, although there is not enough surface area on the camera for the 3M tape to work. All three rings were used to get enough spacing between lens and camera.

The camera is upside down, so use -rot 180 to correct.

I've mounted this on a pinball machine. The plan is to use timelapse to capture pained expressions of players during tournament games. The image capture runs indefinitely whist the jpeg files are transfered via scp to another computer to display them in a slideshow.
_MG_8943.jpg
Cardboard packer used to get the correct level.
_MG_8943.jpg (43.62 KiB) Viewed 10458 times
_MG_8942.jpg
RPi and camera mounted on pinball machine
_MG_8942.jpg (61.9 KiB) Viewed 10458 times
image_201306021211_00003.jpg
Camera output
image_201306021211_00003.jpg (49.48 KiB) Viewed 10458 times

erd
Posts: 3
Joined: Wed May 15, 2013 8:52 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 1:49 pm

I didn't mention the lens was this one http://www.amazon.co.uk/gp/product/B0093GEC06

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Sun Jun 02, 2013 5:10 pm

LeoWhite wrote:
smx wrote:
LeoWhite wrote:
A cheap one! The exact one I got was http://www.amazon.co.uk/dp/B006P82R70/
you did attach the fisheye lense of the mentioned pack of three lenses? Would you be so kind and post a photo with the "wide angle lense" contained in the pack?
Hmm its a bit dark outside at the moment so won't be able to take a shot that is easy to compare against the others. Might have to wait till Thursday as I'm out at the Raspberry Pint London tomorrow. Of course we may be taking extra pictures there as I'll have my camera and lenses with me (Assuming I remember to pack them that is..)
Well it was a bit too dark at the Raspberry Pint to take pictures (we were down in the basement!) and I've only just got around to getting things setup again (Left late in the evening to then find my car had a flat!)

So I've finally gotten around to taking pictures and we have normal (no lens)
Image

Wide
Image

and Fisheye
Image

(Click for full size)

Wilf1701
Posts: 1
Joined: Sun Jun 02, 2013 5:50 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 5:51 pm

Erd you're a genius.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24630
Joined: Sat Jul 30, 2011 7:41 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 6:25 pm

I wish I had a pinball table. I also wish I had one of those coffee table arcade games. I wish I had a bigger house to fit them all in.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 6:57 pm

LeoWhite wrote: So I've finally gotten around to taking pictures and we have normal (no lens)
Image

Wide
Image

and Fisheye
Image

(Click for full size)
The problem I see is that everything (except the bottom) outside the original field of view is very bad quality. Is the lens seated perpendicular to the camera board?

User avatar
g7ruh
Posts: 68
Joined: Mon Apr 23, 2012 9:49 am
Location: Blackfield UK

Re: Working Fisheye Lens?

Sun Jun 02, 2013 7:11 pm

The problem I see is that everything (except the bottom) outside the original field of view is very bad quality. Is the lens seated perpendicular to the camera board?
[/quote]

poing

I have noticed that the pi lens housing (being affixed by a bit of double sided tape) tends to lift off the main PCB a small amount. This is possibly caused by the spring-effect of the flex cable from the lens assembly to the small connector on the main camera PCB. Enough to cause this kind of issue, perhaps? I mounted the camera lens assembly on a pi case and to prevent the reverse situation (lens not moving, connector disconnecting) I placed a small bit of foam over the lens connector to ensure it says in place
see here http://www.raspberrypi.org/phpBB3/viewt ... 36#p361536

It may mean that the camera lens assembly (black box) needs a firm fixing to the camera PCB and the focal plane is controlled by the mounting points on the camera PCB (again the post above where I will test this when my fish-eye lens arrives).

LeoWhite
Posts: 131
Joined: Mon Apr 08, 2013 9:20 am
Contact: Website

Re: Working Fisheye Lens?

Sun Jun 02, 2013 7:22 pm

poing wrote: The problem I see is that everything (except the bottom) outside the original field of view is very bad quality. Is the lens seated perpendicular to the camera board?
They lenses are just held in place with my robot arm in this case, so its probably not correctly lined up with the camera board (Mostly due to the limited space on my window sill...)

Certainly the best quality is without the lens, which considering the cost of the lenses I'm not all that surprised at!

erd
Posts: 3
Joined: Wed May 15, 2013 8:52 pm

Re: Working Fisheye Lens?

Sun Jun 02, 2013 10:15 pm

jamesh - you can join your local league if you want to play pinball http://www.ukpinballleague.co.uk

Look out for my other pinball RPi project, posting here soon...

Respectech
Posts: 53
Joined: Sat Sep 29, 2012 12:27 am

Re: Working Fisheye Lens?

Wed Jun 12, 2013 2:19 pm

The good news is that I found a fisheye lens that works great with the camera module. The bad news is that there are a lot of "mobile phone camera compatible" fisheye lenses that are blurry with the camera module. I tried 5 different fisheye lenses before I found one that works.

Any word on Raspivid using the full field of view of the sensor, as opposed to only the center of it?

User avatar
jbeale
Posts: 3571
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Working Fisheye Lens?

Wed Jun 12, 2013 2:23 pm

Respectech wrote:The good news is that I found a fisheye lens that works great with the camera module. The bad news is that there are a lot of "mobile phone camera compatible" fisheye lenses that are blurry with the camera module. I tried 5 different fisheye lenses before I found one that works.
Well don't leave us in suspense! Which one works well?

User avatar
jbeale
Posts: 3571
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Working Fisheye Lens?

Tue Jun 18, 2013 6:58 am

After two weeks, a "macro"/0.67x wide, and a fisheye lens advertised for iPhone 4/4s arrived from China. http://www.amazon.com/gp/product/B0073C0QSE/

I haven't tried on the R-Pi camera yet, but a quick test with my Samsung Galaxy Ace, which has a moderately good 5 Mpixel camera, suggests these lenses are going to be rather fuzzy. As expected for the price. Would like to know where to get a wide-angle converter worthy of the R-Pi camera's resolution.

User avatar
rkinch
Posts: 72
Joined: Sun Jun 02, 2013 7:19 am
Location: Palm Beach County, Florida USA
Contact: Website

Re: Working Fisheye Lens?

Tue Jun 18, 2013 9:24 am

jbeale wrote:Would like to know where to get a wide-angle converter worthy of the R-Pi camera's resolution.
Woefully impractical as a Galilean attachment. You'll have to remove the stock lens and substitute something proper like an M12 fisheye lens.

dan3008
Posts: 1172
Joined: Wed Aug 15, 2012 1:05 pm

Re: Working Fisheye Lens?

Tue Jun 18, 2013 10:54 am

rkinch wrote:You'll have to remove the stock lens and substitute something proper like an M12 fisheye lens.
If only the lens wasnt held in place. I know its removable, but would be nicer if we didnt have force it off
dan3008 wrote:Pays your money, takes your choice

User avatar
jbeale
Posts: 3571
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Working Fisheye Lens?

Tue Jun 18, 2013 2:51 pm

Ok, the cheap fisheye adaptor is hopeless. The 0.67x wide adaptor has distortion and edge issues, but is not without some use. Especially for something this cheap. Haven't measured, but if it really is 0.67x then the field of view is like going from a 35mm to a 24mm on a full SLR. Sample photo:
Image

Fullsize at Picasa: https://picasaweb.google.com/1099282360 ... 9235284978

Note, the fisheye image (not shown) seems quite out-of-focus everywhere, and I wonder if the fisheye adaptor needs to be mounted closer to the camera lens... will have to experiment more with it. I have my camera in a 3D printed case, so I can use the magnetic-attach rings provided for use with a mobile phone. The camera lens front is recessed a few mm back from the case front surface, maybe in an iPhone the lens is closer to the outer surface.
Last edited by jbeale on Tue Jun 18, 2013 5:16 pm, edited 3 times in total.

Return to “Camera board”