So…..I’m still not sure what bogging is really about, but I know I need to get into it to keep all my very interested readers happy. The boss says that I can blogg about anything, so I’ll start with my very selfish and very geeky interest. What I’m expecting to happen, as it sometimes does when I write reports, is that when I start blogging regularly and just start writing, I may get the hang of it. Hopefully one day soon.
At this moment in time, I’m the venue manager at the Cooperative Academy of Stoke on Trent and that is a job that I truly love for the fact that it provides me above all, with the opportunity to communicate with my fellow man, which is at times a much needed perk. In my spare time, I study mechatronic engineering, as probably mentioned a million times before and it is that subject that bring me to today’s topic.
Since I started studying in 2010, I had an idea of what I wanted to build in my final year. I knew I had an option between doing a theoretical project and actually making something. Well…..that was an easy decision to make! Who wants to become a qualified engineer and not play with cool stuff!? If I had that much writing in me, I’d probably have chosen to become a writer and not do dissertations as an engineering student.
So the idea of the “Human Tracking Camera System” was born. “What does it do?” I hear you ask. Well Sunshine, grab a cup o’ jo and sit tight while I explain.
The system is based upon a simple pan-tilt bracket which houses an off-the-shelf webcam, probably even cheaper than the one you may posses (£5 off of eBay! What a bargain!) Hang on…let me show you what the contraption looks like…..
Oh, please ignore my messy desk in the background. Anyhow, the pan-tilt system was designed using CAD and then printed with a 3D printer to produce most of what you see there. The camera sits on the little platform between the two uprights. X and y movement is controlled by servos and a quadrature encoder feedback system is present for both axes.
The idea behind all this is simply for the machine to recognise what you tell it to and then track its movement as it moves within the confines of the pan-tilt system limits. In this case the sideways field of view is 180 degrees (for the servo) plus or minus about 30 degrees at the limits due to the lens on the camera, so quite a big area. In the up-down direction, the servo limits have been set at 30 and 150 degrees for practical reasons. If the camera faces directly up, you get sky, if it faces directly down, you get floor…both pretty uninteresting in this application.
The both the pan-tilt and feedback subsystems are controlled by ATmel’s ATmega 328 microprocessor. Of course, since I am but a student, this comes in the form of my trusty Arduino Nano board. First off, because it is dirt cheap (under £10) and convenient to use at that. Secondly the support that is available on tinternet for Arduino and similar product, is phenominal!
The software side of the project is somewhat of a problem area for me at the moment. Two initial approaches were considered: Processing and LabView. Now, National Instruments’ LabView package is very, very expensive and the only reason I have access to it, is because I am a student and Staffs Uni has kindly brokered a deal where any of their existing students can use this package anywhere. I am really no good with LabView, so I looked for an alternative. If you’re familiar with the name Sparkfun or Arduino, you’ve probably come across the use of Processing in some of their tutorials and projects. It’s a natural fit for a project like this, so I went ahead and developed my software in Processing. But don’t be fooled, my software is very, very basic. It consists of a screen with the video on and I read the Serial code in the little IDE window provided. That’s it. On the plus side, Processing is free and can be downloaded here: https://processing.org/download/ Another alternative that I am seriously considering, due to its portability to any operating system, is C. I have played around with the OpenCV libraries a bit and it seems a bit difficult to use, but possible. C is after all my mother tongue. The OpenCV libraries are available from here: http://opencv.org/downloads.html
If you’ve read this far….congratulations for not falling asleep. You may wonder “why!?” Well, this human tracking camera system is simply the start for me. I needed to know how computer vision works and no sooner than I started understanding the principle, I had some applications. Why not incorporate it into things as simple as access systems where if I walk up to an electronically operated door, not only does the system say “Good day Paul” in a very posh voice, but also allows me in because I’m “on the list?” Of course one of the more impressive uses of computer vision/machine vision is now available for sale in the new Ford Focus where the car can find the parking space and park itself! How crazy is that!? The fact is that computer vision has been around for a while, but it is just starting to come into its own as more people understand it and thus trust it. Computer vision is an extremely powerful concept that is being applied to everyday existing technology for a whole range of reasons. It is certainly a concept that is here to stay and I wouldn’t be surprised if in ten years time, my mirror told me that my hair looks better how I had it yesterday! It is truly the vision of the future.
Obviously I can’t give all my secrets away in one go, so if the boss doesn’t tell me off for sharing my wealth of non-work knowledge with you, I shall post a blogg every week on this topic until I have written all that I can about the subject. I’m doing this, because at times I struggled to find information. The bloggs will cover the following:
2 – Arduino, where to start with it and my embedded code
3 – The quadrature encoder feedback system
4 – The software side
5 – Connecting the software with the embedded software using serial communication
6 – How about running it all from a battery on pcDuino?
That’s all I have so far, but we may carry on after that.
Till next week!