I joined VS In 2008, the C + + Win32 console application was created. I open an image in a window. I want to get the same results by clicking on a button on a form and looking at the picture in a picture box, for example Picturebox 1.
So, I have created the C + + Windows project project and pasted this code in the public domain, and he piled up errors, did I need something to do the toolkit or the GUI stuff?
I do not know how this works like this little, and I would like to know how.
Code
#include "stdafx.h" #include "highgui.h" int _tmain (int arguments, _TCHAR * argv []) {Const char * imagename = "lena.jpg"; Cv :: Mat img = cv :: imread (imagename); // matlab style cvLoadImage if another function call (img.empty ()) {fprintf (stderr, "food image does not load% s \ n", imagename); Return -1; } If (! Img.data) // Return the check-1 for the correct loading images; CV :: Nominated Wando ("Image", CV_Windo_Autos IJEG); // Create a window cv :: imsho ("image", img); // Display images cv :: waitKey (); Return 0; } Many thanks
Comments
Post a Comment