As the borescope camera was not in stock in the FarmBot shop I ordered a similar USB camera with the same dimensions. It worked in principle bit the pictures had a very low resolution, darkened to the corers and were very blurry.
So I ordered a better but bigger camera (5MP) and designed a new camera mount for this bigger HD-camera.
Here is the Link to my onshape design: https://cad.onshape.com/documents/0c7a2ad4d38ff17d7fad60fa/w/a4eeb42e08bde05944e14301/e/1dc0903a1bc512e4f9d094fc
Here is the link to the camera: https://www.amazon.de/gp/product/B07T6TS55Q/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1
This new camera takes much better pictures which do not get darker at the corners. That alone makes it more suitable for scanning the whole beet. Here is an example:
However the camera greatly struggles with daylight. During the whole day it always takes very blurry photos which are overexposed. I believe this is because it is designed to inspect small dark spaces and photos during the day are out of the range of expectations for the automatic mode. Here is an exaple of a photo during daylight:
My Question: Is there any way to manually set camera settings?
USB borescope cameras connect like normal webcams to Linux. You can access the via v4l2 which includes tools to manually set the settings:
v4l2-ctl --list-devices will list all the attached camera devices. At a FarmBot there should be only one:
/dev/video0. The command
v4l2-ctl -d /dev/video0 --list-ctrls will print out which settings can be set for the attached camera model and prints out most of the set values. Each can also be read with
The best part is that all the settings can also be written with
--set-ctrl. Here is an example:
v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=166
The FarmBot could improve the quality of beet scans by setting the exposure after the first image to manual mode and resetting it after the last image. In my case manually setting focus, exposure, gain and white balance would allow me to take much better photos during the day. With therse better photos the weed detection would also work more reliably.
If there was an easy way to connect to the Linux on the Raspberry Pi via SSH I would have tested this myself. As I understand that’s not possible with FBOS. So an alternative solution would be to integrate some manual controls in the web interface which run the
v4l2-ctl commands on the Pi. I hope this is not hard to implement.