geezacoleman / OpenWeedLocator

An open-source, low-cost, image-based weed detection device for in-crop and fallow scenarios.
MIT License
348 stars 62 forks source link

~/owl/./owl.py --show-display not working on rapi 5 or rpi 3b #125

Closed pedro26538 closed 1 month ago

pedro26538 commented 6 months ago

this log is with rpi 5 with rpi cam

(owl) raspi@raspberrypi:~ $ ~/owl/./owl.py --show-display [INFO] Setting up nozzles... [INFO] Nozzle setup complete. Initiating camera... Traceback (most recent call last): File "/home/raspi/owl/./owl.py", line 546, in owl = Owl(input_file_or_directory=args.input, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/raspi/owl/./owl.py", line 158, in init from picamera import PiCameraMMALError File "/home/raspi/.virtualenvs/owl/lib/python3.11/site-packages/picamera/init.py", line 72, in from picamera.exc import ( File "/home/raspi/.virtualenvs/owl/lib/python3.11/site-packages/picamera/exc.py", line 41, in import picamera.mmal as mmal File "/home/raspi/.virtualenvs/owl/lib/python3.11/site-packages/picamera/mmal.py", line 49, in _lib = ct.CDLL('libmmal.so') ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/ctypes/init.py", line 376, in init self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: libmmal.so: cannot open shared object file: No such file or directory

geezacoleman commented 6 months ago

Which version of Raspian are you running and what was the install method? The error you're receiving is likely because picamera isn't installed, usually because the OS is Raspbian Bookworm or a recent version, which doesn't support picamera.

This has been fixed over on the Picamera2 branch and should be merging it to the main branch this week. Feel free to try out this branch, just make sure to replace the git clone https://github.com/geezacoleman/OpenWeedLocator with git clone -b picamera2 https://github.com/geezacoleman/OpenWeedLocator/tree/picamera2 owl, otherwise you'll end up with the code from the main branch which won't help.