PIA-Group / BioSPPy

Biosignal Processing in Python
Other
569 stars 273 forks source link

add opencv-python to requirements.txt #82

Closed wenh06 closed 3 years ago

wenh06 commented 3 years ago

opencv-python is in setup.py, but NOT in requirements.txt.

afonsocraposo commented 3 years ago

Thank you for the PR! Before merging, I'll try to remove the opencv-python dependency from BioSPPy since it's an heavier library and it's only used once.

wenh06 commented 3 years ago

Thank you for the PR! Before merging, I'll try to remove the opencv-python dependency from BioSPPy since it's an heavier library and it's only used once.

Yes, you use cv2 here. Recently, a docker image of mine failed to be built with the following message

from biosppy.signals.tools import filter_signal
File "/opt/conda/lib/python3.7/site-packages/biosppy/__init__.py", line 19, in <module>
from .signals import abp, bcg, bvp, ppg, ecg, eda, eeg, emg, resp, tools
File "/opt/conda/lib/python3.7/site-packages/biosppy/signals/bcg.py", line 26, in <module>
from cv2 import matchTemplate,TM_CCORR_NORMED,TM_CCORR
File "/opt/conda/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Afterwards I noticed that biosppy has a recent update. Should I stick to the previous version, or add

RUN apt-get install ffmpeg libsm6 libxext6  -y

to fix this bug? Thank you!

afonsocraposo commented 3 years ago

I removed the BCG module from the master branch until some issues on this module are fixed https://github.com/PIA-Group/BioSPPy/commit/6977d10794381ab903db2cf0ce8c245d32b1bbd7. Anyone can try to fix the problems highlighted as TODO in https://github.com/PIA-Group/BioSPPy/commit/c8559c52568f055c458f049956fab49c0b4e2dea.