Fixing blurry 8-50mm Zoom Lens for Raspberry Pi High Quality Camera
When you mounted the lense with C-mount, it might be that everything is extremely blurry.
To adjust it, might feel like a daunting task.
The issue is the focal point when you attach the lense too close to the sensor. For this, you have the lock-screw on the C-mount and haveshould not screw in the lense all the way to monitor the feed to get focus.end.
Ideally you'd open a video stream and watch it with the near/far focal ring in the middle and the tele/wide ring in the middle.While you adjust the C-mount screw depth.
You'd want to reach a point where either focal rings will have impact on sharpness with very tiny mainpulations (1/10th of a mm will be blurry or not blurry).
To focus with the focal rings, you'd set the tele/wide ring to approximately the object you want to have in focus and adjust the "near/far" until it becomes sharp.
You could make such a program and then refresh the page after every manipulation to focus the lens.
@app.route('/hq_snapshot')
def hq_snapshot():
path = "/tmp/hq_snapshot.jpg"
subprocess.run([
"rpicam-still",
"--camera", "0",
"--nopreview",
"--timeout", "300",
"--width", "1920",
"--height", "1080",
"-o", path
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return send_file(path, mimetype="image/jpeg")
After you're done, lock the lockscrew.
Now, you should be able to focus with the focal rings, you'd set the tele/wide ring to approximately the object you want to have in focus and adjust the "near/far" until it becomes sharp.
