mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
revamped
This commit is contained in:
parent
0c6fa4388b
commit
11f4e1028b
@ -9,11 +9,22 @@ using namespace cv; // all the new API is put into "cv" namespace. Export its co
|
||||
using namespace std;
|
||||
using namespace cv::flann;
|
||||
|
||||
void help()
|
||||
{
|
||||
cout <<
|
||||
"\nThis program shows how to use cv::Mat and IplImages converting back and forth.\n"
|
||||
"It shows reading of images, converting to planes and merging back, color conversion\n"
|
||||
"and also iterating through pixels.\n"
|
||||
"Call:\n"
|
||||
"./image [image-name Default: lena.jpg]\n" << endl;
|
||||
}
|
||||
|
||||
// enable/disable use of mixed API in the code below.
|
||||
#define DEMO_MIXED_API_USE 1
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
help();
|
||||
const char* imagename = argc > 1 ? argv[1] : "lena.jpg";
|
||||
#if DEMO_MIXED_API_USE
|
||||
Ptr<IplImage> iplimg = cvLoadImage(imagename); // Ptr<T> is safe ref-conting pointer class
|
||||
|
Loading…
Reference in New Issue
Block a user