Ask Your Question
0

loading an image

asked Feb 27 '13

chaitanya gravatar image

what is the command in opencv to load the image..??In some codes i see as cvload and other it as imread..what is the difference and can someone suggest a good reference to start programming using opencv in microsoft visual studio..

Preview: (hide)

2 answers

Sort by » oldest newest most voted
4

answered Feb 27 '13

berak gravatar image

the old(1.0) opencv Api used IplImages, CvMats and all those functions starting with cv, so:

1.0: IplImage * img = cvLoadImage("my.png");

the newer one(2.0) uses cv::Mats, and anything from namespace cv. so :

2.0: cv::Mat img = cv::imread("my.png");

yes, it's a bit confusing. if you're just starting with opencv, might better stick to the NEW one, because everything currently developed is using that.

Preview: (hide)
2

answered Feb 27 '13

yogeshopencv gravatar image
Preview: (hide)

Question Tools

Stats

Asked: Feb 27 '13

Seen: 597 times

Last updated: Feb 27 '13