Changeset 399

Show
Ignore:
Timestamp:
02/11/07 20:17:28 (2 years ago)
Author:
goodea
Message:

enum update

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/hal/lpc2106-cmucam3/cc3.c

    r393 r399  
    282282  } 
    283283 
    284   if (_cc3_g_current_camera_state.colorspace == CC3_RGB) { 
     284  if (_cc3_g_current_camera_state.colorspace == CC3_COLORSPACE_RGB) { 
    285285    off0 = 0; 
    286286    off1 = 1; 
    287287    off2 = 2; 
    288288  } 
    289   else if (_cc3_g_current_camera_state.colorspace == CC3_YCRCB) { 
     289  else if (_cc3_g_current_camera_state.colorspace == CC3_COLORSPACE_YCRCB) { 
    290290    off0 = 1; 
    291291    off1 = 0; 
     
    308308 
    309309    switch (cc3_g_pixbuf_frame.coi) { 
    310     case CC3_ALL: 
     310    case CC3_CHANNEL_ALL: 
    311311      _cc3_second_green_valid = false; 
    312312      for (j = 0; j < width; j++) { 
     
    322322      break; 
    323323 
    324     case CC3_RED: 
     324    case CC3_CHANNEL_RED: 
    325325      for (j = 0; j < width; j++) { 
    326326        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    341341      break; 
    342342 
    343     case CC3_GREEN: 
     343    case CC3_CHANNEL_GREEN: 
    344344      for (j = 0; j < width; j++) { 
    345345        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    360360      break; 
    361361 
    362     case CC3_BLUE: 
     362    case CC3_CHANNEL_BLUE: 
    363363      for (j = 0; j < width; j++) { 
    364364        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    516516  cc3_g_pixbuf_frame.coi = chan; 
    517517 
    518   cc3_g_pixbuf_frame.channels = (chan == CC3_ALL ? 3 : 1); 
     518  cc3_g_pixbuf_frame.channels = (chan == CC3_CHANNEL_ALL ? 3 : 1); 
    519519 
    520520  return true; 
     
    545545  _cc3_g_current_camera_state.auto_exposure = true; 
    546546  _cc3_g_current_camera_state.auto_white_balance = false; 
    547   _cc3_g_current_camera_state.colorspace = CC3_RGB; 
     547  _cc3_g_current_camera_state.colorspace = CC3_COLORSPACE_RGB; 
    548548  _cc3_set_register_state (); 
    549549 
     
    562562  cc3_g_pixbuf_frame.y1 = cc3_g_pixbuf_frame.raw_height; 
    563563  cc3_g_pixbuf_frame.y_loc = 0; 
    564   cc3_g_pixbuf_frame.subsample_mode = CC3_NEAREST; 
     564  cc3_g_pixbuf_frame.subsample_mode = CC3_SUBSAMPLE_NEAREST; 
    565565  cc3_g_pixbuf_frame.reset_on_next_load = false; 
    566566 
    567   cc3_pixbuf_set_coi(CC3_ALL); 
     567  cc3_pixbuf_set_coi(CC3_CHANNEL_ALL); 
    568568 
    569569  _cc3_update_frame_bounds (&cc3_g_pixbuf_frame); 
     
    747747 * Sets the resolution, cc3_g_pixbuf_frame width and height not updated 
    748748 * until next pixbuf load. 
    749  * Takes enum CC3_LOW_RES and CC3_HIGH_RES
     749 * Takes enum CC3_RES_LOW and CC3_RES_HIGH
    750750 */ 
    751751void cc3_set_resolution (cc3_camera_resolution_t cam_res) 
     
    762762} 
    763763 
    764 /** 
    765  * This sets the hardware colorspace that comes out of the camera. 
    766  * You can choose between CC3_RGB or CC3_YCRCB.  In RGB mode, then 
    767  * address pixels with CC3_RED, CC3_GREEN, CC3_BLUE, and CC3_GREEN2 
    768  * in YCrCb mode, use CC3_CR, CC3_Y, CC3_CB, CC3_Y2 when indexing 
    769  * the pixel array. 
    770  */ 
     764 
    771765void cc3_set_colorspace (cc3_colorspace_t colorspace) 
    772766{ 
  • trunk/hal/lpc2106-cmucam3/cc3_hal.c

    r392 r399  
    110110        cc3_set_raw_register (0x14, 0x20); 
    111111        // Set the resolution and update the size flags 
    112         if (_cc3_g_current_camera_state.resolution == CC3_LOW_RES) { 
     112        if (_cc3_g_current_camera_state.resolution == CC3_RES_LOW) { 
    113113            _cc3_g_current_camera_state.raw_width = CC3_LO_RES_WIDTH; // 88 * 2; 
    114114            _cc3_g_current_camera_state.raw_height = CC3_LO_RES_HEIGHT; // 144; 
  • trunk/hal/virtual-cam/cc3.c

    r394 r399  
    8181                } 
    8282  printf( "cc3_pixbuf_loaded()\n" ); 
    83   if(_cc3_g_current_camera_state.colorspace==CC3_YCRCB) 
     83  if(_cc3_g_current_camera_state.colorspace==CC3_COLORSPACE_YCRCB) 
    8484        { 
    8585        printf( "*Virtual-Camera Error: Das YCrCb Colorspace ist Verboten...\n" ); 
     
    117117   do{ 
    118118   // skip every other row in low-res mode 
    119      if(_cc3_g_current_camera_state.resolution==CC3_LOW_RES  && col_cnt>=176 )  
     119     if(_cc3_g_current_camera_state.resolution==CC3_RES_LOW  && col_cnt>=176 )  
    120120        { 
    121121        for(k=0; k<352; k++ ) 
     
    145145   val = b2 = fgetc(fp); 
    146146  // skip every other pixel in low-res mode 
    147    if(_cc3_g_current_camera_state.resolution ==CC3_LOW_RES  ) { 
     147   if(_cc3_g_current_camera_state.resolution ==CC3_RES_LOW  ) { 
    148148    r = fgetc(fp); 
    149149    g = fgetc(fp); 
     
    347347  } 
    348348 
    349   if (_cc3_g_current_camera_state.colorspace == CC3_RGB) { 
     349  if (_cc3_g_current_camera_state.colorspace == CC3_COLORSPACE_RGB) { 
    350350    off0 = 0; 
    351351    off1 = 1; 
    352352    off2 = 2; 
    353353  } 
    354   else if (_cc3_g_current_camera_state.colorspace == CC3_YCRCB) { 
     354  else if (_cc3_g_current_camera_state.colorspace == CC3_COLORSPACE_YCRCB) { 
    355355    off0 = 1; 
    356356    off1 = 0; 
     
    373373 
    374374    switch (cc3_g_pixbuf_frame.coi) { 
    375     case CC3_ALL: 
     375    case CC3_CHANNEL_ALL: 
    376376      _cc3_second_green_valid = false; 
    377377      for (j = 0; j < width; j++) { 
     
    387387      break; 
    388388 
    389     case CC3_RED: 
     389    case CC3_CHANNEL_RED: 
    390390      for (j = 0; j < width; j++) { 
    391391        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    406406      break; 
    407407 
    408     case CC3_GREEN: 
     408    case CC3_CHANNEL_GREEN: 
    409409      for (j = 0; j < width; j++) { 
    410410        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    425425      break; 
    426426 
    427     case CC3_BLUE: 
     427    case CC3_CHANNEL_BLUE: 
    428428      for (j = 0; j < width; j++) { 
    429429        uint8_t *p = ((uint8_t *) mem) + (r * width + j); 
     
    586586  cc3_g_pixbuf_frame.coi = chan; 
    587587 
    588   cc3_g_pixbuf_frame.channels = (chan == CC3_ALL ? 3 : 1); 
     588  cc3_g_pixbuf_frame.channels = (chan == CC3_CHANNEL_ALL ? 3 : 1); 
    589589 
    590590  return 1; 
     
    613613  _cc3_g_current_camera_state.auto_exposure = true; 
    614614  _cc3_g_current_camera_state.auto_white_balance = false; 
    615   _cc3_g_current_camera_state.colorspace = CC3_RGB; 
     615  _cc3_g_current_camera_state.colorspace = CC3_COLORSPACE_RGB; 
    616616  _cc3_set_register_state (); 
    617617 
     
    637637  cc3_g_pixbuf_frame.y1 = cc3_g_pixbuf_frame.raw_height; 
    638638  cc3_g_pixbuf_frame.y_loc = 0; 
    639   cc3_g_pixbuf_frame.subsample_mode = CC3_NEAREST; 
     639  cc3_g_pixbuf_frame.subsample_mode = CC3_SUBSAMPLE_NEAREST; 
    640640  cc3_g_pixbuf_frame.reset_on_next_load = false; 
    641641 
    642   cc3_pixbuf_set_coi(CC3_ALL); 
     642  cc3_pixbuf_set_coi(CC3_CHANNEL_ALL); 
    643643 
    644644  _cc3_update_frame_bounds (&cc3_g_pixbuf_frame); 
  • trunk/hal/virtual-cam/cc3_hal.c

    r387 r399  
    104104        //cc3_set_raw_register (0x14, 0x20); 
    105105        // Set the resolution and update the cc3_g_current_frame size flags 
    106         if (_cc3_g_current_camera_state.resolution == CC3_LOW_RES) { 
     106        if (_cc3_g_current_camera_state.resolution == CC3_RES_LOW) { 
    107107            _cc3_g_current_camera_state.raw_width = CC3_LO_RES_WIDTH; 
    108108            _cc3_g_current_camera_state.raw_height = CC3_LO_RES_HEIGHT; 
  • trunk/include/cc3.h

    r396 r399  
    4444 */ 
    4545typedef enum { 
    46   CC3_LOW_RES = 0,  /**< QCIF */ 
    47   CC3_HIGH_RES = 1  /**< CIF */ 
     46  CC3_RES_LOW = 0,  /**< Low resolution */ 
     47  CC3_RES_HIGH = 1  /**< High resolution */ 
    4848} cc3_camera_resolution_t; 
    4949 
     
    5353 */ 
    5454typedef enum { 
    55   CC3_SINGLE = 0,  /**< Only channel in single-channel images */ 
    56   CC3_RED = 0,     /**< Red channel in RGB images */ 
    57   CC3_GREEN = 1,   /**< Green channel in RGB images */ 
    58   CC3_BLUE = 2,    /**< Blue channel in RGB images */ 
    59   CC3_Y = 0,       /**< Y channel in YCrCb images */ 
    60   CC3_CR = 1,      /**< Cr channel in YCrCb images */ 
    61   CC3_CB = 2,      /**< Cb channel in YCrCb images */ 
    62   CC3_ALL          /**< All channels in an image */ 
     55  CC3_CHANNEL_SINGLE = 0,  /**< Only channel in single-channel images */ 
     56  CC3_CHANNEL_RED = 0,     /**< Red channel in RGB images */ 
     57  CC3_CHANNEL_GREEN = 1,   /**< Green channel in RGB images */ 
     58  CC3_CHANNEL_BLUE = 2,    /**< Blue channel in RGB images */ 
     59  CC3_CHANNEL_Y = 0,       /**< Y channel in YCrCb images */ 
     60  CC3_CHANNEL_CR = 1,      /**< Cr channel in YCrCb images */ 
     61  CC3_CHANNEL_CB = 2,      /**< Cb channel in YCrCb images */ 
     62  CC3_CHANNEL_ALL          /**< All channels in an image */ 
    6363} cc3_channel_t; 
    6464 
     
    6767 */ 
    6868typedef enum { 
    69   CC3_YCRCB = 0,   /**< YCrCb colorspace */ 
    70   CC3_RGB = 1      /**< RGB colorspace */ 
     69  CC3_COLORSPACE_YCRCB = 0,   /**< YCrCb colorspace */ 
     70  CC3_COLORSPACE_RGB = 1      /**< RGB colorspace */ 
    7171} cc3_colorspace_t; 
    7272 
     
    7575 */ 
    7676typedef enum { 
    77   CC3_NEAREST,     /**< Nearest neighbor subsampling */ 
    78   CC3_MEAN,        /**< Mean of neighbors subsampling */ 
    79   CC3_RANDOM       /**< Random neighbor subsampling */ 
     77  CC3_SUBSAMPLE_NEAREST,     /**< Nearest neighbor subsampling */ 
     78  CC3_SUBSAMPLE_MEAN,        /**< Mean of neighbors subsampling */ 
     79  CC3_SUBSAMPLE_RANDOM       /**< Random neighbor subsampling */ 
    8080} cc3_subsample_mode_t; 
    8181 
  • trunk/lib/cc3-ilp/cc3_color_info.c

    r392 r399  
    5555        cc3_get_pixel( img, x, 0, &cp );         
    5656        pkt->scratch_pix++; 
    57         if(cc3_g_pixbuf_frame.coi==CC3_ALL ) {         
     57        if(cc3_g_pixbuf_frame.coi==CC3_CHANNEL_ALL ) {         
    5858                uint8_t i; 
    5959                for(i=0; i<3; i++ ) 
  • trunk/lib/cc3-ilp/cc3_color_track.c

    r392 r399  
    6666      bool pixel_good = 0; 
    6767 
    68       if (cc3_g_pixbuf_frame.coi == CC3_ALL) { 
     68      if (cc3_g_pixbuf_frame.coi == CC3_CHANNEL_ALL) { 
    6969        if (pixel[0] >= pkt->lower_bound.channel[0] 
    7070            && pixel[0] <= pkt->upper_bound.channel[0] 
     
    166166      //cc3_pixbuf_read(); 
    167167      cc3_get_pixel (img, x, 0, &cp); 
    168       if (cc3_g_pixbuf_frame.coi == CC3_ALL) { 
     168      if (cc3_g_pixbuf_frame.coi == CC3_CHANNEL_ALL) { 
    169169        if (cp.channel[0] >= pkt->lower_bound.channel[0] && 
    170170            cp.channel[0] <= pkt->upper_bound.channel[0] && 
  • trunk/lib/cc3-ilp/cc3_ilp.c

    r392 r399  
    3030  uint32_t size_x, size_y; 
    3131  uint8_t *row = cc3_malloc_rows(1); 
    32   uint8_t num_channels = cc3_g_pixbuf_frame.coi == CC3_ALL ? 3 : 1; 
     32  uint8_t num_channels = cc3_g_pixbuf_frame.coi == CC3_CHANNEL_ALL ? 3 : 1; 
    3333 
    3434 
  • trunk/lib/cc3-ilp/cc3_img_writer.c

    r366 r399  
    1212FILE *f; 
    1313static uint32_t ppm_cnt=0; 
    14 if(img->channels==CC3_ALL ) ppm=1; 
     14if(img->channels==CC3_CHANNEL_ALL ) ppm=1; 
    1515else ppm=0; 
    1616do { 
     
    4545size_x = img->width; 
    4646size_y = img->height; 
    47 if(img->channels!=CC3_ALL)  
     47if(img->channels!=CC3_CHANNEL_ALL)  
    4848{ 
    4949        printf( "ppm_write only works with 3 channel images\n" ); 
  • trunk/projects/Makefile

    r378 r399  
    1 SUBDIRS=cmucam2 hello-world jpeg-cam benchmark 
     1SUBDIRS=cmucam2 hello-world jpeg-cam benchmark edge-follow polly \ 
     2        led-test png-grab spoonBot ppm-grab eeprom-test 
    23 
    34# Build rules 
  • trunk/projects/benchmark/bench.c

    r209 r399  
    2727  cc3_camera_init (); 
    2828   
    29   cc3_set_colorspace(CC3_RGB); 
    30   cc3_set_resolution(CC3_LOW_RES); 
     29  cc3_set_colorspace(CC3_COLORSPACE_RGB); 
     30  cc3_set_resolution(CC3_RES_LOW); 
    3131  cc3_set_auto_white_balance(true); 
    3232  cc3_set_auto_exposure(true); 
  • trunk/projects/cmucam2/cmucam2.c

    r392 r399  
    8989 
    9090  cc3_camera_init (); 
    91   cc3_set_resolution(CC3_LOW_RES); 
     91  cc3_set_resolution(CC3_RES_LOW); 
    9292 
    9393  cc3_pixbuf_load(); 
     
    9696 
    9797  cc3_servo_init (); 
    98   cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 1); 
     98  cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 1); 
    9999 
    100100  while (true) { 
     
    152152          print_ACK (); 
    153153        if (arg_list[0] == 1) 
    154           cc3_set_resolution(CC3_HIGH_RES); 
    155         else 
    156           cc3_set_resolution(CC3_LOW_RES); 
     154          cc3_set_resolution(CC3_RES_HIGH); 
     155        else 
     156          cc3_set_resolution(CC3_RES_LOW); 
    157157 
    158158        // re-init fifo 
     
    186186          print_ACK (); 
    187187        //init_jpeg(); 
    188         // cc3_set_resolution(CC3_HIGH_RES); 
    189         //cc3_pixbuf_set_subsample (CC3_NEAREST, 1, 1); 
     188        // cc3_set_resolution(CC3_RES_HIGH); 
     189        //cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 1, 1); 
    190190 
    191191        cc3_jpeg_send_simple(); 
     
    247247        else 
    248248          print_ACK (); 
    249         cc3_pixbuf_set_subsample (CC3_NEAREST, arg_list[0] * 2, arg_list[1]); 
     249        cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, arg_list[0] * 2, arg_list[1]); 
    250250        break; 
    251251 
  • trunk/projects/cmucam2/polly.c

    r392 r399  
    4444    return 0; 
    4545 
    46   cc3_set_colorspace (CC3_RGB); 
    47   cc3_set_resolution (CC3_LOW_RES); 
     46  cc3_set_colorspace (CC3_COLORSPACE_RGB); 
     47  cc3_set_resolution (CC3_RES_LOW); 
    4848  cc3_set_auto_white_balance (true); 
    4949  cc3_set_auto_exposure (true); 
     
    5151  cc3_pixbuf_load (); 
    5252 
    53   cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
    54   cc3_pixbuf_set_coi (CC3_GREEN); 
     53  cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 
     54  cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
    5555 
    5656 
    5757  // setup an image structure  
    58   //img.channels=CC3_GREEN; 
     58  //img.channels=CC3_CHANNEL_GREEN; 
    5959  img.channels = 1; 
    6060  img.width = cc3_g_pixbuf_frame.width; 
     
    9393 
    9494#ifdef MMC_DEBUG 
    95   cc3_pixbuf_set_coi (CC3_ALL); 
     95  cc3_pixbuf_set_coi (CC3_CHANNEL_ALL); 
    9696  write_raw_fifo_ppm (); 
    97   cc3_pixbuf_set_coi (CC3_GREEN); 
     97  cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
    9898  cc3_pixbuf_rewind (); 
    9999#endif 
  • trunk/projects/edge-follow/main.c

    r392 r399  
    4343  cc3_camera_init (); 
    4444 
    45   cc3_set_colorspace (CC3_RGB); 
    46   cc3_set_resolution (CC3_LOW_RES); 
     45  cc3_set_colorspace (CC3_COLORSPACE_RGB); 
     46  cc3_set_resolution (CC3_RES_LOW); 
    4747  cc3_set_auto_white_balance (false); 
    4848  cc3_set_auto_exposure (true); 
    49   cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
    50   //cc3_pixbuf_set_coi (CC3_GREEN); 
    51   cc3_pixbuf_set_coi (CC3_ALL); 
     49  cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 
     50  //cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
     51  cc3_pixbuf_set_coi (CC3_CHANNEL_ALL); 
    5252 
    5353  cc3_clr_led (1); 
     
    109109        // process image using green channel 
    110110        cc3_get_pixel (&tmp_img, x, 0, &p); 
    111         p_filter.channel[0] = p.channel[CC3_GREEN]; 
     111        p_filter.channel[0] = p.channel[CC3_CHANNEL_GREEN]; 
    112112        cc3_set_pixel (&img, x, i, &p_filter); 
    113113 
    114114        // glare removal using red color channel 
    115         if (p.channel[CC3_RED] > 200 && p.channel[CC3_GREEN] > 150) 
     115        if (p.channel[CC3_CHANNEL_RED] > 200 && p.channel[CC3_CHANNEL_GREEN] > 150) 
    116116          cc3_set_pixel (&mask_img, x, i, &p_black); 
    117117        else 
  • trunk/projects/eeprom-test/main.c

    r379 r399  
    4747    cc3_camera_init (); 
    4848    
    49     cc3_set_colorspace(CC3_RGB); 
    50     cc3_set_resolution(CC3_LOW_RES); 
     49    cc3_set_colorspace(CC3_COLORSPACE_RGB); 
     50    cc3_set_resolution(CC3_RES_LOW); 
    5151    cc3_set_auto_white_balance(true); 
    5252    cc3_set_auto_exposure(true); 
  • trunk/projects/hello-world/main.c

    r397 r399  
    3131    cc3_camera_init (); 
    3232    
    33     cc3_set_colorspace(CC3_RGB); 
    34     cc3_set_resolution(CC3_LOW_RES); 
     33    cc3_set_colorspace(CC3_COLORSPACE_RGB); 
     34    cc3_set_resolution(CC3_RES_LOW); 
    3535    cc3_set_auto_white_balance(true); 
    3636    cc3_set_auto_exposure(true); 
     
    117117                // get a pixel from the img row memory 
    118118                cc3_get_pixel( &img, x, 0, &my_pix ); 
    119                 if(my_pix.channel[CC3_RED]>max_red) 
     119                if(my_pix.channel[CC3_CHANNEL_RED]>max_red) 
    120120                        { 
    121                         max_red=my_pix.channel[CC3_RED]; 
     121                        max_red=my_pix.channel[CC3_CHANNEL_RED]; 
    122122                        my_x=x; 
    123123                        my_y=y; 
  • trunk/projects/jpeg-cam/main.c

    r392 r399  
    2525  cc3_filesystem_init(); 
    2626 
    27   //cc3_set_colorspace(CC3_YCRCB); 
    28   cc3_set_resolution(CC3_HIGH_RES); 
    29   // cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
     27  //cc3_set_colorspace(CC3_COLORSPACE_YCRCB); 
     28  cc3_set_resolution(CC3_RES_HIGH); 
     29  // cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 
    3030  cc3_wait_ms(1000); 
    3131 
  • trunk/projects/png-grab/main.c

    r392 r399  
    2727  cc3_filesystem_init(); 
    2828 
    29  // cc3_set_colorspace(CC3_YCRCB); 
    30   cc3_set_resolution(CC3_HIGH_RES); 
    31   // cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
     29  cc3_set_resolution(CC3_RES_HIGH); 
    3230  cc3_wait_ms(1000); 
    3331 
  • trunk/projects/polly/main.c

    r392 r399  
    3737  cc3_camera_init (); 
    3838 
    39   cc3_set_colorspace (CC3_RGB); 
    40   cc3_set_resolution (CC3_LOW_RES); 
     39  cc3_set_colorspace (CC3_COLORSPACE_RGB); 
     40  cc3_set_resolution (CC3_RES_LOW); 
    4141  cc3_set_auto_white_balance (true); 
    4242  cc3_set_auto_exposure (true); 
    4343 
    4444 
    45   cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
    46   cc3_pixbuf_set_coi (CC3_GREEN); 
     45  cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 
     46  cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
    4747 
    4848  cc3_clr_led (0); 
  • trunk/projects/polly/polly.c

    r392 r399  
    4646    return 0; 
    4747 
    48   cc3_set_colorspace (CC3_RGB); 
    49   cc3_set_resolution (CC3_LOW_RES); 
     48  cc3_set_colorspace (CC3_COLORSPACE_RGB); 
     49  cc3_set_resolution (CC3_RES_LOW); 
    5050  cc3_set_auto_white_balance (true); 
    5151  cc3_set_auto_exposure (true); 
     
    5353  cc3_pixbuf_load(); 
    5454 
    55   cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
    56   cc3_pixbuf_set_coi (CC3_GREEN); 
     55  cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 
     56  cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
    5757 
    5858 
    5959  // setup an image structure  
    60   //img.channels=CC3_GREEN; 
     60  //img.channels=CC3_CHANNEL_GREEN; 
    6161  img.channels = 1; 
    6262  img.width = cc3_g_pixbuf_frame.width; 
     
    9595 
    9696#ifdef MMC_DEBUG 
    97   cc3_pixbuf_set_coi (CC3_ALL); 
     97  cc3_pixbuf_set_coi (CC3_CHANNEL_ALL); 
    9898  write_raw_fifo_ppm (); 
    99   cc3_pixbuf_set_coi (CC3_GREEN); 
     99  cc3_pixbuf_set_coi (CC3_CHANNEL_GREEN); 
    100100  cc3_pixbuf_rewind (); 
    101101#endif 
  • trunk/projects/ppm-grab/main.c

    r392 r399  
    2525  cc3_filesystem_init(); 
    2626 
    27  // cc3_set_colorspace(CC3_YCRCB); 
    28   cc3_set_resolution(CC3_HIGH_RES); 
    29   // cc3_pixbuf_set_subsample (CC3_NEAREST, 2, 2); 
     27  cc3_set_resolution(CC3_RES_HIGH); 
    3028  cc3_wait_ms(1000); 
    3129