- Timestamp:
- Dec 1, 2009, 6:01:25 PM (15 years ago)
- Location:
- liacs/mss/project
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
liacs/mss/project/Makefile
r8 r15 3 3 CFLAGS+= -I/usr/include/opencv -lcxcore -lcv -lhighgui -lcvaux -lml 4 4 5 all: uinput 6 sudo ./uinput 5 7 6 all: colour-tracking8 tracking: colour-tracking 7 9 ./colour-tracking 1 8 10 -
liacs/mss/project/colour-tracking.c
r14 r15 27 27 } 28 28 29 int cvInitSystem(int argc, char *argv[]) {29 int InitSystem(int argc, char *argv[]) { 30 30 // Don't care which camera to use. Use specified number elsewise 31 31 int cam_number = -1; 32 32 if (argc > 1) 33 cam_number = atoi(argv[1]) > 0 ? atoi(argv[1]) : -1;33 cam_number = atoi(argv[1]); 34 34 printf("Using camera %i\n", cam_number); 35 35 CvCapture *capture = cvCaptureFromCAM(cam_number); … … 86 86 int step = image->widthStep/sizeof(uchar); 87 87 88 cvCopy(image, output, NULL); 88 //cvCopy(image, output, NULL); 89 //Remove Noise from images 90 cvSmooth(image,output,CV_BLUR, 3, 3, 3,3); 89 91 cvCopy(image, routput, NULL); 90 92 cvCopy(image, goutput, NULL); … … 159 161 // wait for any to press to quit 160 162 // Eeks! also HACK to make it refresh properly 161 if (cvWaitKey(20 0) != -1) {163 if (cvWaitKey(20) != -1) { 162 164 break; 163 165 } … … 177 179 178 180 // Get ourself into the highGUI main stuff 181 // Quick at 1.0.0, not needing in 2.0x anymore 179 182 int main(int argc, char *argv[]) { 180 return cvInitSystem(argc, argv);183 return InitSystem(argc, argv); 181 184 }
Note:
See TracChangeset
for help on using the changeset viewer.