Hi,
I have been struggling with the reshape function. I have a big matrix that I convert into a 1 column mat. When I convert the I column back to the original size, the image has an offset and doesn't fit the original no more.
Here my code more or less (PS. I have simplified it to this that demonstrates my problem):
vb.net code
frame = my_Original_mat Dim SingleColumn As Mat = frame.Clone.Reshape(0, frame.Cols * frame.Rows) 'makes it a 1 column mat
Dim Mymat As New Mat
SingleColumn.Col(0).CopyTo(Mymat) 'get the single column back out again
Dim OriginalShape As Mat = Mymat.Reshape(0, frame.Rows))
CvInvoke.Imshow("Original ", frame.Clone)
CvInvoke.Imshow("OriginalShape ", OriginalShape .Clone)
Sorry for the bad images...but I think you can see that the reshaped one is now shifted down. What am I doing wrong? I need a way to simply extract 1 column at the time from a build up matrix (I concat into this matrix). Let me know if anything else is needed and thanks for the help in advance.