Changeset 525

Show
Ignore:
Timestamp:
07/29/07 14:01:03 (3 years ago)
Author:
svnsync
Message:
 
Location:
trunk/projects/viola-jones
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/projects/viola-jones/main.c

    r431 r525  
    309309   cc3_camera_init (); 
    310310    
    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); 
    315315    
    316316   printf("Face Detector...\n\r"); 
    317317    
    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); 
    321321    
    322322   /* 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); 
    325325    
    326326   /* setup integral image structure */ 
    327327   cc3_img_tmp.channels=3; // RGB color  
    328    cc3_img_tmp.width=cc3_g_current_frame.width;  // equal to Int_Img_Width 
     328   cc3_img_tmp.width=cc3_g_pixbuf_frame.width;  // equal to Int_Img_Width 
    329329   cc3_img_tmp.height = 1;  // image will hold just 1 row for scanline processing 
    330330   cc3_img_tmp.pix = &image_row; 
     
    363363        
    364364 
    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 ); 
    366366       sprintf(img_name, "%s%04d%s","c:/img",num_frames,".txt"); 
    367367       fout = fopen(img_name, "w"); 
     
    703703 
    704704         
    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); 
    711710        // wait for the button to be pressed for the next frame 
    712711         
  • trunk/projects/viola-jones/vj.h

    r371 r525  
    55#ifndef MAIN_H 
    66#define MAIN_H 
     7 
     8#include <../../hal/lpc2106-cmucam3/cc3_hal.h> 
    79 
    810/*----------------------------------------*/