1

I have read the documentation of opencv regarding image processing but I am still pretty new to opencv. I am trying to convert some images into matrix so that I can do some classification after that. Can anyone help tell me how I should start this? Thanks so much!

JoshJoshJosh
  • 897
  • 2
  • 11
  • 20

1 Answers1

1

If you simply read an image with opencv in python, you will get it in a matrix. Eg.:

import cv2
img = cv2.imread('a.jpg',0)
type(img)
Out[3]: numpy.ndarray
img.shape
Out[4]: (200, 200)
quantummind
  • 2,086
  • 1
  • 14
  • 20