CMUcam4 Graphical User Interface

Version 99 (Kwabena Agyeman, 03/11/2013 11:37 pm)

1 6 Kwabena Agyeman
h1. CMUcam4 Graphical User Interface
2 1 Kwabena Agyeman
3 89 Kwabena Agyeman
h3. *What the CMUcam4GUI is*
4 87 Kwabena Agyeman
5 99 Kwabena Agyeman
!/attachments/802/viewing_tab_resize.png!:/attachments/798/viewing_tab.png!/attachments/803/tracking_tab_resize.png!:/attachments/799/tracking_tab.png!/attachments/804/options_tab_resize.png!:/attachments/800/options_tab.png!/attachments/805/disk_tab_resize.png!:/attachments/801/disk_tab.png
6 98 Kwabena Agyeman
7 97 Kwabena Agyeman
The CMUcam4GUI is a useful tool that makes working with the CMUcam4 easier. The CMUcam4GUI allows you to take pictures with your CMUcam4 and view them on your computer and use the pictures to compute the color tracking bounds of colored objects in the picture you want the CMUcam4 to track. Using the CMUcam4GUI you can quickly determine the color tracking bounds for an object in one lighting scene and widen the color tracking bounds to support tracking the object in changing lighting scenes. The CMUcam4GUI also allows you to see what the CMUcam4 is tracking in real time without a TV by displaying the contents of tracking, mean, histogram, and frame packets graphically that are sent by the CMUcam4. Additionally, the CMUcam4GUI allows you to play with all the CMUcam4 options in real time like controlling the pan and tilt servos, color tracking options, and low-level camera controls. Finally, the CMUcam4GUI allows you to manage the secure digital card attached to the CMUcam4 remotely through the CMUcam4.
8 87 Kwabena Agyeman
9 1 Kwabena Agyeman
h3. *Windows Setup*
10 7 Kwabena Agyeman
11 26 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Windows:
12 10 Kwabena Agyeman
13 61 Kwabena Agyeman
p(. 1. Download the "CMUcam4GUI.zip":/attachments/download/796/CMUcam4GUI_windows_100.zip file
14 33 Kwabena Agyeman
    2. Unzip it and extract the contents
15 38 Kwabena Agyeman
    3. Run the CMUcam4GUI.exe file
16 26 Kwabena Agyeman
17 1 Kwabena Agyeman
h3. *Linux Setup*
18 25 Kwabena Agyeman
19 26 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Linux:
20 10 Kwabena Agyeman
21 31 Kwabena Agyeman
p(. 1. Add your user name to the dialout group
22 26 Kwabena Agyeman
23 1 Kwabena Agyeman
<pre>
24 1 Kwabena Agyeman
sudo adduser username dialout
25 1 Kwabena Agyeman
</pre>
26 10 Kwabena Agyeman
27 31 Kwabena Agyeman
p(. 2. Now verify by typing
28 1 Kwabena Agyeman
29 1 Kwabena Agyeman
<pre>
30 1 Kwabena Agyeman
groups username
31 1 Kwabena Agyeman
</pre>
32 24 Kwabena Agyeman
33 29 Kwabena Agyeman
p(. 3. Now log out and then log back in
34 62 Kwabena Agyeman
    4. Download the "CMUcam4GUI.zip":/attachments/download/797/CMUcam4GUI_linux_100.zip file
35 57 Kwabena Agyeman
    5. Unzip it and extract the contents
36 62 Kwabena Agyeman
    6. Run the CMUcam4GUI.sh file
37 54 Kwabena Agyeman
38 24 Kwabena Agyeman
h3. *Macintosh Setup*
39 17 Kwabena Agyeman
40 60 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Macintosh:
41 64 Kwabena Agyeman
42 1 Kwabena Agyeman
p(. 1. Install the QtSDK for Mac "here":http://www.developer.nokia.com/info/sw.nokia.com/id/da8df288-e615-443d-be5c-00c8a72435f8/Qt_SDK.html.
43 65 Kwabena Agyeman
    2. Download the "CMUcam4GUI Source":/attachments/785/CMUcam4GUI.zip
44 95 Kwabena Agyeman
    3. Open the CMUcam4GUI.pro file using QtCreator and switch to release mode from debug mode
45 96 Kwabena Agyeman
    4. Open the CMUcom4.h file and change the "#define CMUCOM4_FAST_BAUD_RATE" to 115200 from 230400 (Mac's can't handle the 230400 BPS baud rate) 
46 95 Kwabena Agyeman
    5. Click run
47 51 Kwabena Agyeman
48 66 Kwabena Agyeman
_Question: Why don't you have a prebuilt MAC application?_
49 59 Kwabena Agyeman
50 90 Kwabena Agyeman
_Answer: Kwabena, the CMUcam4 developer, does not have a MAC..._
51 55 Kwabena Agyeman
52 1 Kwabena Agyeman
h3. *CMUcam4GUI Manual*
53 1 Kwabena Agyeman
54 84 Kwabena Agyeman
The CMUcam4GUI is very intuitive and implements all the same functionality in the "CMUcam4 Arduino Interface Library":/docs/cmucam4/arduino_api/. This manual only exists to give an overview of the CMUcam4GUI and you should read the "CMUcam4 Command List User Manual":/documents/11 if you need more information about CMUcam4 commands. If you encounter errors trying to connect to the CMUcam4, unplug your USB to serial device from your computer and plug it back in again. Also, make sure your serial converter can handle 19200 BPS, 115200 BPS, and 230400 BPS. If you are using a FTDI chip based converter then you should be fine.
55 76 Kwabena Agyeman
56 76 Kwabena Agyeman
*Menu Bar and Tool Bar commands*
57 76 Kwabena Agyeman
58 86 Kwabena Agyeman
Tool Bar Commands
59 82 Kwabena Agyeman
60 80 Kwabena Agyeman
* *Begin/Reset* - Connect to the CMUcam4
61 80 Kwabena Agyeman
* *End* - Disconnect from the CMUcam4
62 76 Kwabena Agyeman
63 80 Kwabena Agyeman
* *Sleep Lightly* - Put the CMUcam4 into a very low power state
64 80 Kwabena Agyeman
* *Sleep Deeply* - Put the CMUcam4 into a ultra low power state
65 76 Kwabena Agyeman
66 80 Kwabena Agyeman
* *Send Frame* - Take a color image and display it in the viewing window
67 80 Kwabena Agyeman
* *Send Bitmap* - Take a binary image and display it in the viewing window
68 80 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - the CMUcam4 must be tracking something for this to be useful
69 76 Kwabena Agyeman
70 80 Kwabena Agyeman
* *Dump Frame* - Take a color image and save it to the SD card
71 80 Kwabena Agyeman
* *Dump Bitmap* - Take a binary image and save it to the SD card
72 80 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - the CMUcam4 must be tracking something for this to be useful
73 82 Kwabena Agyeman
74 86 Kwabena Agyeman
Menu Bar Commands
75 1 Kwabena Agyeman
76 80 Kwabena Agyeman
* *Save Frame* - Save the color image in the viewing window to a file
77 80 Kwabena Agyeman
* *Save Bitmap* - Save the binary image in the viewing window to a file
78 80 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - the CMUcam4 must be tracking something for this to be useful
79 76 Kwabena Agyeman
80 80 Kwabena Agyeman
* *Clear Frame* - Erase the color image in the viewing window
81 80 Kwabena Agyeman
* *Clear Bitmap* - Erase the binary image in the viewing window
82 80 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - the CMUcam4 must be tracking something for this to be useful
83 75 Kwabena Agyeman
84 80 Kwabena Agyeman
* *Open* - Open a color image to use with the track selection feature
85 80 Kwabena Agyeman
* *Exit* - Exit the application
86 75 Kwabena Agyeman
87 67 Kwabena Agyeman
*Viewing Tab*
88 67 Kwabena Agyeman
89 72 Kwabena Agyeman
!/attachments/798/viewing_tab.png!
90 72 Kwabena Agyeman
91 80 Kwabena Agyeman
* *Send Frame Control* - Select the horizontal and vertical resolution for the send frame button in the tool bar
92 73 Kwabena Agyeman
** You cannot move whatever you are taking a picture of while the send frame command is running
93 75 Kwabena Agyeman
** If the image quality looks bad then turn off auto-gain and auto-white balance and make sure the CMUcam4 is looking at an illuminated object
94 72 Kwabena Agyeman
** Use a smaller resolution to capture the image quicker - like 160x120
95 1 Kwabena Agyeman
96 80 Kwabena Agyeman
* *Dump Frame Control* - Select the horizontal and vertical resolution for the dump frame button in the tool bar
97 1 Kwabena Agyeman
** You cannot move whatever you are taking a picture of while the dump frame command is running
98 75 Kwabena Agyeman
** If the image quality looks bad then turn off auto-gain and auto-white balance and make sure the CMUcam4 is looking at an illuminated object
99 73 Kwabena Agyeman
** Use a smaller resolution to capture the image quicker - like 160x120
100 73 Kwabena Agyeman
101 80 Kwabena Agyeman
* *Opacity Control* - Select the sent frame and sent bitmap opacity - between 1.00 for 100% and 0.00 for 0%
102 73 Kwabena Agyeman
103 80 Kwabena Agyeman
* *Tracking Control* - Select a color blob in the viewing window to track
104 73 Kwabena Agyeman
** The selection rectangle should only enclose the pixels within the color blob you want to track
105 73 Kwabena Agyeman
** After selecting the color blob click the track color button to compute the color bounds to track that color blob
106 73 Kwabena Agyeman
*** The algorithm works by computing the mean and standard deviation of the red, green, and blue color channels inside of the selection rectangle
107 74 Kwabena Agyeman
*** The Confidence Interval Level Coefficient selects how much of the standard deviation to add +/- to the means of the red, green, and blue color channels - between 0 for +/- (stdev * 1) to 99 for +/- (stdev * 10)
108 72 Kwabena Agyeman
109 69 Kwabena Agyeman
*Tracking Tab*
110 67 Kwabena Agyeman
111 67 Kwabena Agyeman
!/attachments/799/tracking_tab.png!
112 67 Kwabena Agyeman
113 70 Kwabena Agyeman
*Options Tab*
114 67 Kwabena Agyeman
115 67 Kwabena Agyeman
!/attachments/800/options_tab.png!
116 67 Kwabena Agyeman
117 71 Kwabena Agyeman
*Disk Tab*
118 67 Kwabena Agyeman
119 1 Kwabena Agyeman
!/attachments/801/disk_tab.png!
120 90 Kwabena Agyeman
121 90 Kwabena Agyeman
* *Disk Information* - Get information about the geometry of the disk
122 90 Kwabena Agyeman
* *Disk Space* - Get information about the space on the disk
123 93 Kwabena Agyeman
124 90 Kwabena Agyeman
* *Disk Control* - Unmount/format the disk
125 92 Kwabena Agyeman
** Note: You should unmount the disk after using any SD card related command before closing the graphical user interface
126 91 Kwabena Agyeman
** Note: Clicking the format disk button will immediately format the disk
127 90 Kwabena Agyeman
128 90 Kwabena Agyeman
* *New File* - Make a new file with some text or append some text to a file
129 90 Kwabena Agyeman
* *New Folder* - Make a new folder
130 90 Kwabena Agyeman
131 90 Kwabena Agyeman
* *File Explorer* - Interact with the files/folders on the SD card from your computer
132 90 Kwabena Agyeman
** Click refresh to list the contents of the current directory
133 94 Kwabena Agyeman
** Change a file's or a folder's attributes by clicking on the attributes check boxes
134 90 Kwabena Agyeman
*** Double click on a folder to enter it
135 90 Kwabena Agyeman
*** Double click on a file to open it
136 91 Kwabena Agyeman
**** Do not try to open files larger than about 10 KB (unless you feel like waiting forever) because the file transfer is very slow at around 4 KBs
137 91 Kwabena Agyeman
**** You can move files and folders by renaming them with a new path e.g. rename "txt.txt" to "../txt.txt"
138 37 Kwabena Agyeman
139 39 Kwabena Agyeman
h3. *CMUcam4GUI Source*
140 43 Kwabena Agyeman
141 43 Kwabena Agyeman
Click "here":/attachments/785/CMUcam4GUI.zip to download the source code for the CMUcam4GUI.
142 43 Kwabena Agyeman
143 46 Kwabena Agyeman
You will need the Qt 1.2.1 SDK (Desktop 4.8.1) to compile the code which you can download "here":http://www.developer.nokia.com/info/sw.nokia.com/id/da8df288-e615-443d-be5c-00c8a72435f8/Qt_SDK.html.