Changeset 159
- Timestamp:
- 03/04/06 15:15:57 (3 years ago)
- Files:
-
- trunk/lib/cc3_ilp/cc3_color_info.c (modified) (3 diffs)
- trunk/lib/cc3_ilp/cc3_color_info.h (modified) (1 diff)
- trunk/projects/cmucam2/cmucam2.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/cc3_ilp/cc3_color_info.c
r158 r159 21 21 pkt->scratch_x=0; 22 22 pkt->scratch_y=0; 23 pkt->scratch_pix=0; 23 24 24 25 return 1; … … 35 36 cc3_pixel_t cp; 36 37 cc3_get_pixel( img, x, 0, &cp ); 38 pkt->scratch_pix++; 37 39 if(cc3_g_current_frame.coi==CC3_ALL ) { 38 40 uint8_t i; … … 67 69 for(i=0; i<3; i++ ) 68 70 { 71 pkt->mean.channel[i]=pkt->scratch_mean[i]/pkt->scratch_pix; 69 72 pkt->deviation.channel[i]=((pkt->max.channel[i]-pkt->mean.channel[i])+ 70 73 (pkt->mean.channel[i]-pkt->min.channel[i]))/2; trunk/lib/cc3_ilp/cc3_color_info.h
r158 r159 14 14 uint16_t scratch_x,scratch_y; 15 15 uint32_t scratch_mean[3]; 16 uint32_t scratch_pix; 16 17 } cc3_color_info_pkt_t; 17 18 trunk/projects/cmucam2/cmucam2.c
r158 r159 26 26 POLL_MODE, 27 27 LINE_MODE, 28 SEND_JPEG, 28 29 VIRTUAL_WINDOW, 29 30 DOWN_SAMPLE, … … 104 105 else line_mode=0; 105 106 } 107 break; 108 case SEND_JPEG: 109 if(n!=0 && n!=1) { error=1; break; } else print_ACK(); 110 //init_jpeg(); 111 112 106 113 break; 107 114 case SEND_FRAME: … … 305 312 cmucam2_cmds[DOWN_SAMPLE]="DS"; 306 313 cmucam2_cmds[LINE_MODE]="LM"; 314 cmucam2_cmds[SEND_JPEG]="SJ"; 307 315 } 308 316 … … 380 388 381 389 } 382 383
