Ask Your Question
0

loading an image

asked 2013-02-26 23:50:44 -0500

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
4

answered 2013-02-27 01:36:36 -0500

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.

edit flag offensive delete link more
2

answered 2013-02-27 05:34:22 -0500

yogeshopencv gravatar image
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-02-26 23:50:44 -0500

Seen: 142 times

Last updated: Feb 27 '13