width and height of imread

asked 2015-07-11 14:05:54 -0600

kokiri gravatar image
const char* filename = "people.jpg";
Mat image = imread(filename, CV_LOAD_IMAGE_GRAYSCALE);

I would like the get the width and height of the image. Also I would like to divide the image into 9 parts

X  X  X
X  X  X
X  X  X

But before I can do that, I need to get the width and height

edit retag flag offensive close merge delete

Comments

You should read this and after this

LBerger gravatar imageLBerger ( 2015-07-11 14:29:38 -0600 )edit

read the documentation cv::Mat, cv::Mat::cols, cv::Mat::rows

sturkmen gravatar imagesturkmen ( 2015-07-11 14:35:45 -0600 )edit

Thanks, I managed to get what i wanted with image.rows and image.cols

kokiri gravatar imagekokiri ( 2015-07-11 14:56:17 -0600 )edit
1

you can share your code here :)

sturkmen gravatar imagesturkmen ( 2015-07-11 14:58:07 -0600 )edit