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!

1

1 Answer 1

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)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.