How To Reduce Focus Distance Of Camera Module
The original Raspberry Pi Photographic camera model v1.iii came from the factory set to ∞ (infinity) focus, so when yous used information technology out of the box for something like a landscape timelapse rig, or for security or monitoring purposes (where the Pi is at least 5 meters away from the subjects it's recording), everything would look well-baked and sharp.
For many fixed-focus cameras and lower-terminate photographic camera sensors, it makes sense to set them to infinity focus; closer objects are still recognizable, but slightly blurry. Nearly of these cameras don't need to focus on a person a meter away for a portrait, and they're also rarely used for FaceTime-like video chat.
For the Raspberry Pi Camera v2, the Raspberry Pi Foundation originally decided to have the focus set up for 1-two meters away, so if yous bought a v2 camera and used it for distant subjects (like I do for most of my pi-timelapse videos), then everything looked a fleck blurry or hazy out-of-the-box.
For example, when I swapped out my v1.3 camera for a v2 model this week to record some residential road construction, I concluded up getting a pretty poor image:
Find particularly the inset cone at slight magnification; it is non just blurry, but also washed out since a blurry image tin can really mess with the camera's autoexposure, resulting in a muddy picture that is at best a hazy reproduction of the scene.
The Raspberry Pi Foundation decided to set v2.one and greater cameras back to inifinity focus, and so this wouldn't exist an consequence with the latest camera. But a lot of resellers (including Amazon) are still shipping from their stock of v2 cameras with the focus set at a short altitude.
Warning: Adjusting the lens in the manner described below will likely void any warranty yous may have had, and you won't be able to return the camera module afterwards doing this. And so either be careful and suffer the consequences if something breaks... or don't do it and try to buy a newer photographic camera module with infinity focus from the factory!
Luckily, in that location's a fairly piece of cake ready: If you accept a pair of jeweler's pliers or mini needle-nose pliers, you lot can apply them to straight manipulate the lens focus; but grasp the front chemical element of the lens and rotate; if the lens is difficult to rotate (information technology has a slight amount of glue locking it in place from the factory), you may need to use another tweezers/pliers to carefully concur the base of the camera module, then give a fiddling back-and-forth twist until the lens starts rotating.
I bought this long-nose, or needle-nose pliers from Amazon; merely any small needle-nose pliers or a sturdy pair of tweezers should do fine.
To adjust focus, pinch the indentations with the pliers (gently), then give a small amount of torque (just enough to interruption the thin glue that sets manufacturing plant focus). Turn back and forth in small increments while taking pictures to confirm the correct focus.
In my instance, I needed to rotate the lens near 50° counter-clockwise (I rotated well-nigh 5°, took a pic, rotated another v°, etc. until the image was virtually as abrupt as I could make it), and the sharpness was greatly improved:
And here's that other blurry picture again, for comparison:
HollandJim on Reddit mentioned there's likewise a little $0.95 purpose-built Lens Aligning Tool available from Adafruit. It is worth picking upward this specialty tool if you plan on using your Pi camera in a diverseness of settings where focus would need to exist changed.
If you don't have minor pliers, and then a credit bill of fare, a drill, and a file will do in a pinch. Y'all would need to drill a hole in the credit carte du jour that'due south about 5/16" (~8mm), then file away slots in this pigsty (with a very small file) to line up to the indentations on the top of the camera lens. See this Q&A thread on the Raspberry Pi forums for more on that technique, and some of the explanation of why the v2 camera was made the way it was.
Source: https://www.jeffgeerling.com/blog/2017/fixing-blurry-focus-on-some-raspberry-pi-camera-v2-models
Posted by: blackwellcrientic.blogspot.com
0 Response to "How To Reduce Focus Distance Of Camera Module"
Post a Comment