Replies: 1 comment
-
I would recommend using Mat class instead of Matrix<> class. If you are using Mat class you can use the Reshape function to turn a 2D matrix into a vector: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have managed to load my trained data from an npy file, to a Matrix< float > of the shape [ 17, 187], along with labels stored in a Matrix< int > with shape [ 17, 1 ].
Further, I have a set of images ( single channel, grayscale ), of shape 11x17 stored in a Mat, that I would like to use as samples for the
FindNearest
function. However I cannot find a way to convert each image to a row in the Matrix.As I understand it, if I have 20 images to use for samples, I would create a Matrix of shape [ 20, 187 ], and set each row to a flattened array of the sample images? Is there a way to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions