Project

General

Profile

Revision 256

Added by Rich Hong about 15 years ago

update vision.sh to repeatly run vision

View differences:

vision.c
48 48
    	cvNamedWindow("Source", 1);
49 49
    	// Show the image.
50 50
    	cvShowImage("Source", image03);
51
	}
52 51

  
53
    cvNamedWindow("Result", 1);
54
    if (DEBUG){
55
		// Create toolbars. HighGUI use.
52
    	cvNamedWindow("Result", 1);
53
	// Create toolbars. HighGUI use.
56 54
    	cvCreateTrackbar( "Threshold", "Result", &slider_pos, 255, process_image );
57 55
	}
58 56

  
59 57
	if (!DEBUG) loop_image();
60
    if (DEBUG) process_image(0);
58
	if (DEBUG) process_image(0);
61 59

  
62 60
    // Wait for a key stroke; the same function arranges events processing
63
    cvWaitKey(0);
61
    if (DEBUG) cvWaitKey(0);
64 62
    cvReleaseImage(&image02);
65 63
    cvReleaseImage(&image03);
66 64

  
67
    if (DEBUG) cvDestroyWindow("Source");
68
    cvDestroyWindow("Result");
65
    	if (DEBUG){
66
    		cvDestroyWindow("Source");
67
    		cvDestroyWindow("Result");
68
	}
69 69

  
70 70
    return 0;
71 71
}
......
162 162
	for (i=0;i<index;i++){
163 163
		if (bestc[i].count>7){
164 164
			printf("%d,%d\n",bestc[i].center.x,bestc[i].center.y);
165
			cvCircle(image04,bestc[i].center, 20, CV_RGB(0,0,0),5,8,0);
165
			//cvCircle(image04,bestc[i].center, 20, CV_RGB(0,0,0),5,8,0);
166 166
		}
167 167
	}
168 168
    // Show image. HighGUI use.
169
    cvShowImage( "Result", image04 );
169
    //cvShowImage( "Result", image04 );
170 170
}
171 171

  
172 172
// Define trackbar callback functon. This function find contours,

Also available in: Unified diff