Talk:Project Smart Pill Box

Comments on Project Smart Pill Box -

Wasson05 said ...
In order to get Project Smart Pill Box up and running on your Beagle Board, you will need to install some additional libraries. This brief tutorial assumes you are running Ubuntu on the Beagle Board with a working webcam.

-Install OpenCV (instructions for Ubuntu: https://help.ubuntu.com/community/OpenCV)

-Copy the build_all.sh to your working directory from the examples folder of opencv-doc (default is /usr/share/doc/opencv-doc/examples/c/c/)

-Copy and unzip haarcascade_frontalface_alt.xml.gz to your working directory from the examples folder of opencv-doc (default is /usr/share/doc/opencv-doc/examples/haarcascades/haarcascades/)

-Download and unzip smart_pill_box.zip to your working directory from our wiki (http://processors.wiki.ti.com/index.php/File:Smart_pill_box.zip)

(Depending on your compiler, you may need to change "boolean" to "bool" in line 84 of smart_pill_box.cpp)

-Run "sh build_all.sh" from the terminal

-Run "./smart_pill_box"

-Take your medicine!

We mentioned above in the wiki that we initially had a great deal of trouble getting the webcam to behave nicely with Linux and OpenCV. In the end, the webcam was able to function by installing the package "ubuntu-netbook" (we tried this version because the webcam worked fine when we tested our program on an Ubuntu Netbook Remix EEEPC). This version isn't ideal because it contains a lot of unnecessary packages, but we installed it since we weren't sure what was causing the webcam to act up. In doing so, we verified that the only issue with our setup before was with some software between the OS and webcam (not our Smart Pill Box program). Most likely, we were missing some key libraries during our initial trials with the webcam and Beagle Board.

--Wasson05 00:25, 4 February 2011 (CST)

Wasson05 said ...
There have been some more developments for Project Smart Pill Box. Two days ago we were able to test out our program using a different webcam from a friend. We found that this webcam was spitting out "Corrupt JPEG data:" errors, and after some Googling, we discovered that this is a common issue with OpenCV on ARM. From what we understand, this occurs because OpenCV tries to force cameras to use JPEG compression, but some webcams (including our friend's) only work in YUYV mode. Since this could certainly affect BeagleBoard users, we worked to find a solution so that others could avoid the problems we faced. Basically what you have to do is recompile the OpenCV libraries without jpeg support. Though this fixes the camera issue, this unfortunately means you can no longer open jpeg files with OpenCV. For a tutorial to recompile OpenCV without jpeg support, please see the post by gal_shalif at http://opencv-users.1802565.n2.nabble.com/Webcam-Errors-td4975856.html

We've also made some modifications to our program that optimize its performance on the BeagleBoard. The program now runs much faster on our setup (BeagleBoard with Ubuntu-Netbook) when we lower the quality of the video stream. We plan to release these updates when the competition ends.

--Wasson05 22:57, 5 February 2011 (CST)