User avatar
addeswe
Posts: 27
Joined: Fri Jul 19, 2013 3:49 pm
Location: Sweden

Moving the focus/Zoom

Fri Jul 19, 2013 3:51 pm

Hey.

Im working on a project where I need to move the focus out. Is there any objective or anything anyone heard of to make me acompish this?

Thanks in advance.
Andreas
“Knock, knock.” - “Who’s there?” - very long pause…. - “Java.”
If a python knocks on your door and says “Hi, I’m a vacuum cleaner!” it’s not true. That’s a python.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Moving the focus/Zoom

Fri Jul 19, 2013 4:26 pm

Its fixed focus and there is no zoom. Established way of altering the focus and zoom is supplementary lenses of some description. If you're feeling adventurous you can pick out the locking compound from around the lens and rotate it by hand / pliers etc to adjust the focus.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Moving the focus/Zoom

Fri Jul 19, 2013 5:23 pm

Don’t use pliers, use an eraser/rubber bung. It’s quite straight-forward when you’re careful.

User avatar
addeswe
Posts: 27
Joined: Fri Jul 19, 2013 3:49 pm
Location: Sweden

Re: Moving the focus/Zoom

Fri Jul 19, 2013 5:26 pm

Has anyone tried this before? :-)
What im trying to do is to create a peephole camera for my door at home. So that is why I need the focus to be "further out". I have no idea about photography so please talk/describe to me as you would to a 5 year old. :-)
“Knock, knock.” - “Who’s there?” - very long pause…. - “Java.”
If a python knocks on your door and says “Hi, I’m a vacuum cleaner!” it’s not true. That’s a python.

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

Re: Moving the focus/Zoom

Fri Jul 19, 2013 10:22 pm

How far away do you want the focal plane to be from the camera? For a door peephole I am guessing you want to focus on a face about 50 cm away?
My experiments suggest the manual focus adjustment formula on the R-Pi camera is

Code: Select all

turns = (3.5 cm / FL)   or to put it another way,
lens rotation angle = 360 * (3.5 cm / FL) 
where 'FL' is the focus distance you want measured in cm.

So in that case you can use a sharp tool to gently pry off the tiny dots of glue at the edge of the lens that fix it in place, and then use your method of choice (rubber stopper, pliers, etc) to unscrew the lens 3.5 / 50 = 0.07 of one full turn, which is 25 degrees counterclockwise. The black plastic box that is the camera module is not soldered down, it is glued to the camera PCB with something like silicone adhesive and it is not too difficult to knock it off the board. If you accidentally break your camera and/or lens doing this, I'm not responsible :-)

OR, a safer option is just buy an add-on closeup lens of 2 diopter (FL = 50 cm) and put that in front of the R-Pi camera lens. Some cheap reading glasses might work, look for a pair marked "+2" or 2 Diopter.

See also: http://www.raspberrypi.org/phpBB3/viewt ... 37#p366719
and http://www.raspberrypi.org/phpBB3/viewt ... 85#p350355

User avatar
addeswe
Posts: 27
Joined: Fri Jul 19, 2013 3:49 pm
Location: Sweden

Re: Moving the focus/Zoom

Sat Jul 20, 2013 8:15 am

Thanks jbeale. This sounds like the solution I was looking for. Will try the glasses since two of them are like £10. Quite much cheaper then a broken camera. :-)
“Knock, knock.” - “Who’s there?” - very long pause…. - “Java.”
If a python knocks on your door and says “Hi, I’m a vacuum cleaner!” it’s not true. That’s a python.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Moving the focus/Zoom

Mon Jul 22, 2013 11:51 am

I’ve compared my old cam (which I’ve re-focussed many times and then fixated at infinity) to the new cam I’ve received last Monday and the focus on the fresh cam is significantly worse compared to my old cam:

Old: Image

New: Image

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

Re: Moving the focus/Zoom

Mon Jul 22, 2013 12:35 pm

Ignoring the focus - why are they so different in colour? That's odd unless taken at different times of the day.

If you adjust the focus, does it get better?

Note the very very very latest firmware has a fix for a nasty lens flare issue that does reduce the sharpness very slightly (but we think unnoticeably).

I might do a post of the lens flare issue some time - it's really quite fascinating (I didn't fix it - came via another guy working here who knows about this stuff)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: Moving the focus/Zoom

Mon Jul 22, 2013 11:32 pm

jamesh wrote:Ignoring the focus - why are they so different in colour? That's odd unless taken at different times of the day.

If you adjust the focus, does it get better?
I was wondering about that as well. Maybe the bayer filter got bleached when I ran multi-day timelapses pointed into the sunrise?(sun visible from 6am - 10 am).

Don’t think focus will change the colors. It’s not a software difference? e.g. auto white-balance?

I took these within 5 minutes: screenshot, poweroff, swap cam, powerup, screenshot.
Note the very very very latest firmware has a fix for a nasty lens flare issue that does reduce the sharpness very slightly (but we think unnoticeably).

I might do a post of the lens flare issue some time - it's really quite fascinating (I didn't fix it - came via another guy working here who knows about this stuff)
Interesting. So it was a debayering artifact, not a burn-in, right?

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

Re: Moving the focus/Zoom

Tue Jul 23, 2013 9:06 am

towolf wrote:
jamesh wrote:Ignoring the focus - why are they so different in colour? That's odd unless taken at different times of the day.

If you adjust the focus, does it get better?
I was wondering about that as well. Maybe the bayer filter got bleached when I ran multi-day timelapses pointed into the sunrise?(sun visible from 6am - 10 am).

Don’t think focus will change the colors. It’s not a software difference? e.g. auto white-balance?

I took these within 5 minutes: screenshot, poweroff, swap cam, powerup, screenshot.
Note the very very very latest firmware has a fix for a nasty lens flare issue that does reduce the sharpness very slightly (but we think unnoticeably).

I might do a post of the lens flare issue some time - it's really quite fascinating (I didn't fix it - came via another guy working here who knows about this stuff)
Interesting. So it was a debayering artifact, not a burn-in, right?
We have a theory that its a reflection problem inside the pixel sites (I'm guessing some sort of reflection underneath the bayer mask) due to high incident angles from the lens flare. We got round it by altering the debayer crosstalk parameters as the green channel was being swamped IIRC. This was actually a side effect of tuning another omnivision sensor - we just reused the numbers when we discovered the same issue on the 5647 (actually reported by a old colleague of the guy working on the other Omnivision sensor!)

It's interesting to try and replicate the maze like pattern - I used a small spot light shone offcentre to force lens flare. It's very noticeable, and quite interesting.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “Camera board”