Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5114

Camera board • Re: RaspberryPi Camera module 3 WIDE resolution

$
0
0
Thanks for posting that, and thanks to the mod for fixing the code tags!!

There are indeed a few things going wrong there.

Firstly, you're not configuring the camera before starting it, so you'll get a "default" configuration. For a v3 camera this is probably OK, but it's not guaranteed, so just be aware of that. (Other cameras might choose a mode with a reduced field of view, for example.)

Then you aren't configuring a full resolution mode for the image capture, so you're getting the lower preview resolution instead. See this example for how to switch to a full resolution capture mode.

Note that setting the scaler crop, as you are doing, only affects the field of view. It doesn't change the sensor resolution, nor the size of your output images, so it isn't what you want here. Just remove it and switch correctly to a still capture mode, as shown above. (Also, the value of 4068 that you have is, I presume, a typo and you meant 4608. 4068 will actually reduce the field of view of your image and cause your output pixels to have a squished aspect ratio.)

Next, AfMode 1 is acutally "auto", not "manual", so it will cause commands to move the lens to be ignored. In fact, "manual" is the default, so you don't need to do anything. To avoid getting confused with those values, you can use

Code:

from libcamera import controls...picam2.set_controls({'AfMode': controls.AfModeEnum.Manual})
though as I said, it's not necessary.

Finally, the value 230 is not a valid lens position. Values should range from 0 (focus at infinity) to about 10 (focus at about 0.1m). The units are dioptres (1 / distance-in-metres). Note that the calibration is only approximate, and may very between modules, and also the angle of the module to the horizontal, among other things.

Statistics: Posted by therealdavidp — Fri Jul 05, 2024 8:34 am



Viewing all articles
Browse latest Browse all 5114

Trending Articles