Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hie,

Im trying to do a credential using a sample from SDK 7.0. So, i edit the SampleHardwareEventCredentialProvider project. I want to add an OpenCV window there but the window is not showing.

This is the code:

C++
HWND _hWnd = (HWND) cvNamedWindow("Input",CV_WINDOW_AUTOSIZE);

Am i do it wrong?

Please help me.

Thanks in advance.
Posted
Updated 13-Sep-12 22:05pm
v2

1 solution

You provided pretty few informations to work with.

But i can see that you are using the old (C-Style) Version of openCV, which isn't necessary if you're working with C++. You should rather use the new API which is much more convenient to use.

For example to read and show an image in a window you can use:
C++
Mat img = imread("image.jpg");
namedWindow("image", CV_WINDOW_AUTOSIZE);
imshow("image", img);


Some fundamentals of working with images in openCV are explained here:
http://docs.opencv.org/doc/user_guide/ug_mat.html[^]
 
Share this answer
 
Comments
mohdkhairiljohari 14-Sep-12 5:28am    
Thanx for the link. ^^

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900