Skip to content

Commit

Permalink
Updated version number, updated as_gray as per this issue BVLC/caffe#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcnz committed Oct 28, 2020
1 parent 33682eb commit 5a9f6f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion image_match/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = 'ryan'
__version__ = '1.1.2'
__version__ = '1.1.3'
4 changes: 2 additions & 2 deletions image_match/goldberg.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ def preprocess_image(image_or_path, bytestream=False, handle_mpo=False):
return rgb2gray(np.asarray(img, dtype=np.uint8))
elif type(image_or_path) in string_types or \
type(image_or_path) is text_type:
return imread(image_or_path, as_grey=True)
return imread(image_or_path, as_gray=True)
elif type(image_or_path) is bytes:
try:
img = Image.open(image_or_path)
arr = np.array(img.convert('RGB'))
except IOError:
# try again due to PIL weirdness
return imread(image_or_path, as_grey=True)
return imread(image_or_path, as_gray=True)
if handle_mpo:
# take the first images from the MPO
if arr.shape == (2,) and isinstance(arr[1].tolist(), MpoImageFile):
Expand Down

0 comments on commit 5a9f6f4

Please sign in to comment.