Ask Your Question
0

A question about image size concerning inverted image rows and colums

asked 2013-07-20 23:50:21 -0600

eyal gravatar image

updated 2013-07-21 15:36:57 -0600

Hi All,

when I load an image via imread command I get the image size ,that is row and columns are inverted. For example say I have an jpg image of size 48x24 pixels (when I right clicked the mouse in windows explorer I see its properties) and whan I ask OpenCV to cout image.rows I get 24 and when I print out image.cols I get 48.

I can't figure it out why rows and cols are inverted in OpenCV

Thank u in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-07-21 01:48:10 -0600

pheips gravatar image

updated 2013-07-21 01:52:53 -0600

They aren't inverted. If you have a look at the image size in e.g. the Explorer, they show you the size in width(cols) x height(rows) instead of rows x cols. Have a look at your image. It should be twice as wide as high.

edit flag offensive delete link more

Comments

Thank u for answering me :)

eyal gravatar imageeyal ( 2013-07-21 05:36:41 -0600 )edit

Question Tools

Stats

Asked: 2013-07-20 23:50:21 -0600

Seen: 217 times

Last updated: Jul 21 '13