Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cellpose/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def imread(filename):
return img
elif ext != ".npy":
try:
img = cv2.imread(filename, -1) #cv2.LOAD_IMAGE_ANYDEPTH)
img = cv2.imread(str(filename), -1) #cv2.LOAD_IMAGE_ANYDEPTH)
if img.ndim > 2:
img = img[..., [2, 1, 0]]
return img
Expand Down Expand Up @@ -325,7 +325,7 @@ def imsave(filename, arr):
else:
if len(arr.shape) > 2:
arr = cv2.cvtColor(arr, cv2.COLOR_BGR2RGB)
cv2.imwrite(filename, arr)
cv2.imwrite(str(filename), arr)


def get_image_files(folder, mask_filter, imf=None, look_one_level_down=False):
Expand Down
Loading