Sohorab Hossain
Sohorab Hossain

Reputation: 388

What does code from openCV do?

sample code of opencv 2.4.3 : find_obj_calonder.cpp has a line

 Mat img1 = imread( imgFilename, CV_LOAD_IMAGE_GRAYSCALE ), img2, H12;

what does it means ? actually i want to know about the coma separated codes (i.e. img2, H12). how coma separated codes can be placed out side of function argument ? sorry for my ignorance. enlighten me please... thanks in advance...

Upvotes: 1

Views: 131

Answers (2)

Martin Beckett
Martin Beckett

Reputation: 96109

Mat img1 = imread( imgFilename, CV_LOAD_IMAGE_GRAYSCALE ), img2, H12;

Is the same as:

Mat img1 = imread( imgFilename, CV_LOAD_IMAGE_GRAYSCALE );
Mat img2; 
Mat H12;

But it's horrible style - don't do this!

Upvotes: 3

Shafik Yaghmour
Shafik Yaghmour

Reputation: 158469

This code is simply declaring three variables of type Mat: img1, img2 and H12. It is also assigning a value to img1 which is the result of a function call:

imread( imgFilename, CV_LOAD_IMAGE_GRAYSCALE )

Upvotes: 4

Related Questions