Open tonytonyhsiao opened 2 months ago
installed numpy
dependency, put aside opencv
for now.
encounter numpy.core.multiarray
failed to import while running examine_focus_w_frid_scipy.py
Refactor the old examine_focus_w_grid_scipy.py
file to eliminate the existing bug. The current version(haven't pushed yet) successfully detects blur levels on a live camera feed using a grid overlay.
TODO: The current GUI is built with tkinter, which might be causing the lagging image issue. Consider replacing it to improve performance.
FUTURE: Explore installing OpenCV and possibly upgrading to a newer Raspberry Pi OS for enhanced functionality."
Steps to Successfully Install opencv
:
numpy
version is 1.19.4
.!pip install opencv-contrib-python==4.1.0.25
.python -c "import cv2; print(cv2.__version__)"
, you might encounter an error indicating that libxxx is not found
.cd ~/.virtualenvs/dencam_env/lib/python3.7/site-packages/cv2
. You should see a file named cv2.cpython-37m-arm-linux-gnueabihf.so
.ldd cv2.cpython-37m-arm-linux-gnueabihf.so
..so
files, some of which may show => not found
.ldd cv2.cpython-37m-arm-linux-gnueabihf.so | grep "not found"
. This will filter out the existing files and only show the missing ones. For example: libhdf5_serial.so.103 => not found libsz.so.2 => not found.
.so
files, use apt-file
. Since apt-file
isn’t installed by default, install it with: sudo apt install apt-file
.sudo apt-file update
..so
file. For example: apt-file search libhdf5_serial.so.103
.libhdf5-100: /usr/lib/arm-linux-gnueabihf/libhdf5_serial.so.100
libhdf5-100: /usr/lib/arm-linux-gnueabihf/libhdf5_serial.so.100.0.1
libhdf5-100
provides the required .so
file for OpenCV
. Install it: sudo apt install libhdf5-100
.(the package shows ahead of the ":")python -c "import cv2; print(cv2.__version__)"
. Everything should now work correctly.Resolved the lagging issue by switching from SciPy
to OpenCV
and removing Tkinter
. I've created a branch and pushed the code.
changing the grid number by config file: SOLVED
TODO:
Picamera overlay
for renderingI've updated the focus tool code based on our last discussion (round, reduce the width, center the text, configure text size and transparency). I've also addressed part of the Pylint suggestions and added docstrings.
Installed the Dencam repo on a new Raspberry Pi, following the
README
file, but encountered the errors shown below:After running
pip install .[all]
, I had to manually open thesetup.py
file to install the dependencies individually. Successfully installed:'minimalmodbus==2.0.1' 'netifaces' 'picamera' (install this first) 'pyserial' 'pyyaml' 'rpi.gpio' For the additional dependencies, I successfully installed numpy (but had to specify version 1.19.4).
However, I was unsuccessful in installing
opencv
, and it is also missing from the old Dencam SD card."