Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def image_array(pgm):
  2. pic = image.load_img(pgm, target_size=(224, 224))
  3. x = image.img_to_array(pic)
  4. x = np.expand_dims(x, axis=0)
  5. x = preprocess_input(x)
  6. npfeatures = np.array(x)
  7. return npfeatures
  8.  
  9. image = cv2.imread('C:/Users/N/Desktop/Test.jpg')
  10. gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement