Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

adding a row to a Mat matrix

Hi!I am using opencv and c++. I am trying to add a row of 1's in the last row of a matrix. When I display the matrix of the Mat object in command line,it displays everything like this http://i.imgur.com/JFb49of.jpg,where (55,118) is the first coordinate obtained,(24,56) is the second coordinate and (52,26) is the 3rd coordinate. What I need is a matrix which is displayed column wise like 55 24 52 118 56 26 1 1 1. My problem is I cannot get the formatting right. Can anyone help please?Thanks

adding a row to a Mat matrix

Hi!I am using opencv and c++. I am trying to add a row of 1's in the last row of a matrix. When I display the matrix of the Mat object in command line,it displays everything like this http://i.imgur.com/JFb49of.jpg,where (55,118) is the first coordinate obtained,(24,56) is the second coordinate and (52,26) is the 3rd coordinate. What I need is a matrix which is displayed column wise like 55 24 52 118 56 26 1 1 where (55,118),(24,56) and (52,26) are displayed column wise with their last rows having a 1. My problem is I cannot get the formatting right. Can anyone help please?Thanks