CMUcam4 Graphical User Interface

Version 79 (Kwabena Agyeman, 03/11/2013 09:45 pm)

1 6 Kwabena Agyeman
h1. CMUcam4 Graphical User Interface
2 1 Kwabena Agyeman
3 1 Kwabena Agyeman
h3. *Windows Setup*
4 7 Kwabena Agyeman
5 26 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Windows:
6 10 Kwabena Agyeman
7 61 Kwabena Agyeman
p(. 1. Download the "CMUcam4GUI.zip":/attachments/download/796/CMUcam4GUI_windows_100.zip file
8 33 Kwabena Agyeman
    2. Unzip it and extract the contents
9 38 Kwabena Agyeman
    3. Run the CMUcam4GUI.exe file
10 26 Kwabena Agyeman
11 1 Kwabena Agyeman
h3. *Linux Setup*
12 25 Kwabena Agyeman
13 26 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Linux:
14 10 Kwabena Agyeman
15 31 Kwabena Agyeman
p(. 1. Add your user name to the dialout group
16 26 Kwabena Agyeman
17 1 Kwabena Agyeman
<pre>
18 1 Kwabena Agyeman
sudo adduser username dialout
19 1 Kwabena Agyeman
</pre>
20 10 Kwabena Agyeman
21 31 Kwabena Agyeman
p(. 2. Now verify by typing
22 1 Kwabena Agyeman
23 1 Kwabena Agyeman
<pre>
24 1 Kwabena Agyeman
groups username
25 1 Kwabena Agyeman
</pre>
26 24 Kwabena Agyeman
27 29 Kwabena Agyeman
p(. 3. Now log out and then log back in
28 62 Kwabena Agyeman
    4. Download the "CMUcam4GUI.zip":/attachments/download/797/CMUcam4GUI_linux_100.zip file
29 57 Kwabena Agyeman
    5. Unzip it and extract the contents
30 62 Kwabena Agyeman
    6. Run the CMUcam4GUI.sh file
31 54 Kwabena Agyeman
32 24 Kwabena Agyeman
h3. *Macintosh Setup*
33 17 Kwabena Agyeman
34 26 Kwabena Agyeman
Follow the steps below to setup the CMUcam4GUI for Macintosh:
35 26 Kwabena Agyeman
36 60 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.
37 64 Kwabena Agyeman
    2. Download the "CMUcam4GUI Source":/attachments/785/CMUcam4GUI.zip
38 65 Kwabena Agyeman
    3. Open the CMUcam4GUI.pro file using QtCreator and switch to release mode from debug mode
39 65 Kwabena Agyeman
    4. Run the CMUcam4GUI.app file
40 1 Kwabena Agyeman
41 60 Kwabena Agyeman
_Question: Why don't you have a prebuilt MAC application?_
42 51 Kwabena Agyeman
43 66 Kwabena Agyeman
_Answer: Kwabena, the CMUcam4 developer, does not have a MAC..._ 
44 59 Kwabena Agyeman
45 59 Kwabena Agyeman
Note: The Macintosh version runs at a maximum baud rate of 115,000 BPS versus the Windows and Linux versions that run at a maximum baud rate of 230,400 BPS. If you can, please use the Windows or Linux versions for faster functionality.
46 55 Kwabena Agyeman
47 1 Kwabena Agyeman
h3. *CMUcam4GUI Manual*
48 1 Kwabena Agyeman
49 79 Kwabena Agyeman
_The CMUcam4GUI is very intuitive and implements all the same functionality in the Arduino Interface Library. This manual only exists to give an overview of the CMUcam4GUI and you should read the CMUcam4 Command List Manual if you need more information about CMUcam4 commands._
50 76 Kwabena Agyeman
51 76 Kwabena Agyeman
*Menu Bar and Tool Bar commands*
52 76 Kwabena Agyeman
53 75 Kwabena Agyeman
* Begin/Reset - Connect to the CMUcam4
54 75 Kwabena Agyeman
* End - Disconnect from the CMUcam4
55 76 Kwabena Agyeman
56 75 Kwabena Agyeman
* Sleep Lightly - Put the CMUcam4 into a very low power state
57 75 Kwabena Agyeman
* Sleep Deeply - Put the CMUcam4 into a ultra low power state
58 76 Kwabena Agyeman
59 75 Kwabena Agyeman
* Send Frame - Take a color image and display it in the viewing window
60 75 Kwabena Agyeman
* Send Bitmap - Take a binary image and display it in the viewing window
61 76 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - it must be tracking something for this to be useful
62 76 Kwabena Agyeman
63 75 Kwabena Agyeman
* Dump Frame - Take a color image and save it to the SD card
64 75 Kwabena Agyeman
* Dump Bitmap - Take a binary image and save it to the SD card
65 76 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - it must be tracking something for this to be useful
66 1 Kwabena Agyeman
67 75 Kwabena Agyeman
* Save Frame - Save the color image in the viewing window to a file
68 75 Kwabena Agyeman
* Save Bitmap - Save the binary image in the viewing window to a file
69 76 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - it must be tracking something for this to be useful
70 76 Kwabena Agyeman
71 75 Kwabena Agyeman
* Clear Frame - Erase the color image in the viewing window
72 75 Kwabena Agyeman
* Clear Bitmap - Erase the binary image in the viewing window
73 76 Kwabena Agyeman
** This is an 80x60 binary image of whatever the CMUcam4 is tracking - it must be tracking something for this to be useful
74 75 Kwabena Agyeman
75 75 Kwabena Agyeman
* Open - Open a color image to use with the track selection feature
76 75 Kwabena Agyeman
* Exit - Exit the application
77 75 Kwabena Agyeman
78 67 Kwabena Agyeman
*Viewing Tab*
79 67 Kwabena Agyeman
80 72 Kwabena Agyeman
!/attachments/798/viewing_tab.png!
81 72 Kwabena Agyeman
82 1 Kwabena Agyeman
* Send Frame Control - Select the horizontal and vertical resolution for the send frame button in the tool bar
83 73 Kwabena Agyeman
** You cannot move whatever you are taking a picture of while the send frame command is running
84 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
85 72 Kwabena Agyeman
** Use a smaller resolution to capture the image quicker - like 160x120
86 1 Kwabena Agyeman
87 1 Kwabena Agyeman
* Dump Frame Control - Select the horizontal and vertical resolution for the dump frame button in the tool bar
88 1 Kwabena Agyeman
** You cannot move whatever you are taking a picture of while the dump frame command is running
89 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
90 73 Kwabena Agyeman
** Use a smaller resolution to capture the image quicker - like 160x120
91 73 Kwabena Agyeman
92 73 Kwabena Agyeman
* Opacity Control - Select the sent frame and sent bitmap opacity - between 1.00 for 100% and 0.00 for 0%
93 73 Kwabena Agyeman
94 73 Kwabena Agyeman
* Tracking Control - Select a color blob in the viewing window to track
95 73 Kwabena Agyeman
** The selection rectangle should only enclose the pixels within the color blob you want to track
96 73 Kwabena Agyeman
** After selecting the color blob click the track color button to compute the color bounds to track that color blob
97 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
98 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)
99 72 Kwabena Agyeman
100 69 Kwabena Agyeman
*Tracking Tab*
101 67 Kwabena Agyeman
102 67 Kwabena Agyeman
!/attachments/799/tracking_tab.png!
103 67 Kwabena Agyeman
104 70 Kwabena Agyeman
*Options Tab*
105 67 Kwabena Agyeman
106 67 Kwabena Agyeman
!/attachments/800/options_tab.png!
107 67 Kwabena Agyeman
108 71 Kwabena Agyeman
*Disk Tab*
109 67 Kwabena Agyeman
110 67 Kwabena Agyeman
!/attachments/801/disk_tab.png!
111 67 Kwabena Agyeman
112 45 Kwabena Agyeman
If you encounter errors trying to connect to the CMUcam4, unplug your USB to serial device from the PC and plug it back in again. Also, make sure your serial converter can handle 115200 BPS and 230400 BPS. If you are using a FTDI chip then you'll be fine.
113 37 Kwabena Agyeman
114 39 Kwabena Agyeman
h3. *CMUcam4GUI Source*
115 43 Kwabena Agyeman
116 43 Kwabena Agyeman
Click "here":/attachments/785/CMUcam4GUI.zip to download the source code for the CMUcam4GUI.
117 43 Kwabena Agyeman
118 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.