Changeset 503
- Timestamp:
- 03/24/07 11:14:03 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
projects/security-cam/main.c (modified) (4 diffs)
-
tools/cc3_image_viewer/bin/Debug/test.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
trunk/projects/security-cam/main.c
r490 r503 5 5 #include <cc3_frame_diff.h> 6 6 7 // How many pixels should change in a frame to be seen as motion 8 // Remember, the frame is downsampled to 16x16 7 9 #define NUM_PIX_CHANGE_THRESH 10 10 11 // How much the color of a single pixel should change to be detected 8 12 #define PIX_CHANGE_THRESH 20 9 13 … … 37 41 //cc3_set_colorspace(CC3_COLORSPACE_YCRCB); 38 42 cc3_camera_set_resolution (CC3_CAMERA_RESOLUTION_HIGH); 43 // Set camera to low-res for faster frame differencing 44 // cc3_camera_set_resolution (CC3_CAMERA_RESOLUTION_LOW); 39 45 // cc3_pixbuf_set_subsample (CC3_SUBSAMPLE_NEAREST, 2, 2); 40 46 cc3_timer_wait_ms (1000); … … 48 54 cc3_led_set_state (1, true); 49 55 50 cc3_camera_set_resolution (CC3_CAMERA_RESOLUTION_LOW);56 51 57 52 58 fd_pkt.coi = 1; … … 145 151 while (1); 146 152 } 153 // Switch to full color for stored images 154 cc3_pixbuf_frame_set_coi (CC3_CHANNEL_ALL); 155 // Save the jpeg 147 156 capture_current_jpeg (f); 157 // Switch back to a single COI for the frame diff 158 cc3_pixbuf_frame_set_coi (fd_pkt.coi); 148 159 149 160 fclose (f);
