SerdarHelli commited on
Commit
b14c33b
1 Parent(s): 9448c8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def load_image(image_file):
27
  def convert_one_channel(img):
28
  #some images have 3 channels , although they are grayscale image
29
  if len(img.shape)>2:
30
- img=img[:,:,0]
31
  return img
32
  else:
33
  return img
 
27
  def convert_one_channel(img):
28
  #some images have 3 channels , although they are grayscale image
29
  if len(img.shape)>2:
30
+ img= cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
31
  return img
32
  else:
33
  return img