Update the changelog
[opencv] / otherlibs / cvcam / src / windows / HowToUse.txt
1 #include <conio.h>
2 #include <stdio.h>
3 #include "cvcam.h"
4 #include "..\\highgui\\highgui.h"
5 #include "cv.h"
6
7 void __cdecl callback(void* _image)
8 {
9         IplImage* image = (IplImage*)_image;
10         cvLine(image, cvPoint(0, 0), cvPoint(image->width, image->height), CV_RGB(255, 0, 0), 1);
11 }
12
13 int main()
14 {
15         int cameras = cvcamGetCamerasCount();
16         if(cameras == -1)
17         {
18                 printf("\nNo cameras available on the system. Exiting...");
19                 return -1;
20         }
21
22         cvcamSetProperty(0, CVCAM_PROP_CALLBACK, &callback);
23         cvcamInit();
24         cvcamStart();
25         wait_key(0);
26         cvcamStop();
27         cvcamExit();
28
29         return 0;
30 }