Skip to content

Commit

Permalink
testing with a opencv-python that is smaller in size
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Jan 8, 2025
1 parent 82309c2 commit a0133e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion clustimage/clustimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import os
import logging
import fnmatch
import cv2
import matplotlib.pyplot as plt
from matplotlib import offsetbox

Expand All @@ -50,6 +49,14 @@
# Register HEIF opener for Pillow
register_heif_opener()

try:
import cv2
except ImportError:
raise ImportError(
"The 'opencv-python' library is not installed. Please install it using the following command:\n"
"pip install opencv-python")


# Configure the logger
logger = logging.getLogger('')
[logger.removeHandler(handler) for handler in logger.handlers[:]]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ scikit-learn
matplotlib
scikit-image
scipy
opencv-python
pypickle
imagehash
pypickle
ismember
pillow-heif
opencv-python-headless
1 change: 1 addition & 0 deletions requirements_additional.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
piexif
geopy
folium
opencv-python

0 comments on commit a0133e5

Please sign in to comment.