OpenCV reshape function does not work properly

Viewed 7867

I am using OpenCV reshape function in order to reshape Mat of 25 rows and 1 column (so we have 25 data values) into Mat of 5 rows and 5 columns.

data = mu.reshape(5, 5);

When I look at my data variable in debugger, it has 5 rows but 1 column. If I print data at row(0) and col(0) it outputs all five values. So basically each row at col(0) contains 5 values.

My desired result is to get 5 rows and 5 columns where on each (row,col) will be one value.

Thank you in advance for your help.

1 Answers
Related