Thursday, January 31, 2013

Display Image using OpenCV

You may chage the image path.

[sourcecode language="cpp"]
#include "stdafx.h"
#include<opencv\cv.h>
#include<opencv\cxcore.h>
#include<opencv\highgui.h>

int _tmain(int argc, _TCHAR* argv[])
{
IplImage *img = cvLoadImage("C:\\opencv3\\img\\opencv.png",1);
cvNamedWindow("Image:",1);//Create new window
cvShowImage("Image:",img);//Display image in the window
cvWaitKey(0);//Wait until user press any key
cvDestroyWindow("Image:");//Destroy the window named 'Image'
cvReleaseImage(&img);//Release memory used for the image
return 0;
}
[/sourcecode]

No comments:

Post a Comment

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE 1. Add middleware php artisan make:middleware Cors return $next($request) ->header('Acces...