Ask Your Question
0

loading an image

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

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

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

yogeshopencv gravatar image
edit flag offensive delete link more

Question Tools

Stats

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

Seen: 517 times

Last updated: Feb 27 '13