Changeset 525
- Timestamp:
- 07/29/07 14:01:03 (3 years ago)
- Location:
- trunk/projects/viola-jones
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/projects/viola-jones/main.c
r431 r525 309 309 cc3_camera_init (); 310 310 311 cc3_ set_colorspace(CC3_RGB);312 cc3_ set_resolution(CC3_LOW_RES);313 cc3_ set_auto_white_balance(true);314 cc3_ set_auto_exposure(true);311 cc3_camera_set_colorspace(CC3_COLORSPACE_RGB); 312 cc3_camera_set_resolution(CC3_CAMERA_RESOLUTION_LOW); 313 cc3_camera_set_auto_white_balance(true); 314 cc3_camera_set_auto_exposure(true); 315 315 316 316 printf("Face Detector...\n\r"); 317 317 318 cc3_ clr_led (0);319 cc3_ clr_led (1);320 cc3_ clr_led (2);318 cc3_led_set_state(0,0); 319 cc3_led_set_state(1,0); 320 cc3_led_set_state(2,0); 321 321 322 322 /* sample wait command in ms */ 323 cc3_ wait_ms(1000);324 cc3_ set_led (0);323 cc3_timer_wait_ms(1000); 324 cc3_led_set_state(0,1); 325 325 326 326 /* setup integral image structure */ 327 327 cc3_img_tmp.channels=3; // RGB color 328 cc3_img_tmp.width=cc3_g_ current_frame.width; // equal to Int_Img_Width328 cc3_img_tmp.width=cc3_g_pixbuf_frame.width; // equal to Int_Img_Width 329 329 cc3_img_tmp.height = 1; // image will hold just 1 row for scanline processing 330 330 cc3_img_tmp.pix = &image_row; … … 363 363 364 364 365 fprintf( fp, "P2\n%d %d\n255\n", cc3_g_ current_frame.width, cc3_g_current_frame.height-top_offset-bottom_offset );365 fprintf( fp, "P2\n%d %d\n255\n", cc3_g_pixbuf_frame.width, cc3_g_pixbuf_frame.height-top_offset-bottom_offset ); 366 366 sprintf(img_name, "%s%04d%s","c:/img",num_frames,".txt"); 367 367 fout = fopen(img_name, "w"); … … 703 703 704 704 705 cc3_clr_led (0); 706 707 cc3_set_led (2); 708 while(!cc3_read_button()); 709 cc3_set_led (0); 710 cc3_clr_led (2); 705 cc3_led_set_state(0,0); 706 cc3_led_set_state(2,1); 707 while(!cc3_button_get_state()); 708 cc3_led_set_state(0,1); 709 cc3_led_set_state(2,0); 711 710 // wait for the button to be pressed for the next frame 712 711 -
trunk/projects/viola-jones/vj.h
r371 r525 5 5 #ifndef MAIN_H 6 6 #define MAIN_H 7 8 #include <../../hal/lpc2106-cmucam3/cc3_hal.h> 7 9 8 10 /*----------------------------------------*/
