Ask Your Question
0

adding a row to a Mat matrix

asked 2014-02-01 21:50:21 -0600

yum gravatar image

updated 2014-02-01 21:52:20 -0600

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 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

edit retag flag offensive close merge delete

Comments

Transpose the matrix before adding the row?

Nghia gravatar imageNghia ( 2014-02-02 03:47:54 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-02 08:11:13 -0600

FLY gravatar image

I think you need to transpose the matrix , Check this

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-01 21:50:21 -0600

Seen: 1,158 times

Last updated: Feb 02 '14