Team Bohemian Rasbian
For my second post I've decided to write about the first sprint so far. Bohemian Raspbian was able to split the jobs into 4 and I got a hold on the OpenCV application for the face detection program. This is the first time I have had the chance to look at OpenCV and so far I'm impressed. In my third year I remember Rob from the class having a go at this type of program but in RoboRealm and last year during my placement I was able to to control a version of the Lampbotics project using that program but it was not as reactive as this.
To start lets look at where I began. The first task for me was to install OpenCV onto the RPi 2. From searching the internet I found this Link which is a step by step guide for getting OpenCV on our version of the Pi. This install did take quite some time and due to the size of the original SD cards had to be done a number of times before I was ready to program. After the program was good and ready to go I had a look at the "facedetect.py" program that is found in the OpenCV samples file under Python2( if yee want to have a look). After running this program and installing the PiCamera drivers I was unsuccessful in getting this part working. Luckily for me Philip had been working on this code longer than I and was able to get it working. After a quick look at where I was going wrong I combined what I had learned from the Raspberry Pi website (for the code on running the PiCamera) with the Program for face detection that came with the OpenCV and got a working code. For me this code was too bulky, however lukily enough Harley from last year thought the same and had a slimmed down version that used the webcams. I easily converted this as before and was on my way.
As you can see the code works like a charm. For my thread I will be outputting two values for the servo to read. These I have aptly called "servox" and "servoy" that return a values between -90 and +90 (which can be seen here as a green dot in the centre) to be sent out on the thread. There is a lot more to the then I have let on to get different values and display boxes and what not but the full code can be seen here on my GitHub page.
The last section of my entry is in relation to the servos. Due to unforeseen circumstances and to meet a deadline for the group I had to write up a quick iteration of the servo code. This code has since been altered by Shaun who is currently working on getting it working in the threads. My first version of this code can be found here. The Final image is a quick user interface of what this code does but will be replaced by an automatic entry with the threads.
Thanks to Philip for the help with the PiCamera.
Luke, 2nd blog entry.