It’s bit confusing if you are having long-term experience with R but need some OpenCV Python code. What worked for me
- download and install Python 3.8.3.
pip install opencv-python
- pip install opencv-contrib-python
although Spyder or Jupyter is recommended for data science, I went for PyCharm
- install Atom and follow the video instructions
- take care, numerous non working introductions out there, stick to recent version
Homebrew is struggling with the older python 2.7 version that is missing ssl support. Python 3.8 did not recognize cv2 but this finally worked
brew install python3
brew postinstall python3
pip3 install virtualenv virtualenvwrapper
virtualenv env_name --python="python3"
/Users/wjst/env_name/bin/pip3 install opencv-python
/Users/wjst/env_name/bin/pip3 install pandas scipy matplotlib Pillow tqdm sklearn imageio
/Users/wjst/env_name/bin/python3 -c "import cv2"
then I could finally run the image forgery detection from Github.
> from copy_move_detection import detect