June 5, 2009


Well, as you can see, apparently I forgot to blog yesterday. We had a research team meeting in the lab and then we just started working and I completely forgot. Oh well.

So, a lot of progress has been made since the last time I blogged. I did indeed get my function sending move commands to work. It turns out that for some reason new commands would overwrite old commands, so I ended up changing it so that it only sent one command at a time. Since then we've gotten all the basics of the three classes we've been using to communicate with the head working. We incorporated Taylor's face tracking algorithm in, fine tuned it, and now the head can track heads fairly well. Although, due to the low resolution on the cameras, we can only track faces no more than 7 feet away. The really neat thing is that not only does it track faces, but it also shows emotion and searches. When it sees a face, it moves to a happy expression, after losing the face it becomes sad, and if it can't require the face for a certain amount of time, it becomes worried. As well, when it loses a face it begins to search around for a face in a semi-random fashion. I think we pretty much have the algorithm working now up to the point where we want it to.

I have also been working on fleshing out the code for the head more. Professor Stoytchev is going to end up making it a general library for everyone who wants to use the head, so I've been trying to make it as powerful and easy to use as possible. For example, in the face tracking version of the head code, the program must specify the serial ports to connect to for the boards to the head (there are 2). This can be quite difficult as these may change depending on where the boards are plugged in, and if they switch that would as well cause problems. So I've been working on an auto connect function that queries the operating system for a list of available serial ports and tries to connect to each. Last night I spend a significant amount of time working on it. I hit a brick wall when I got the function working and connecting properly, but for some reason it screwed up standard in. After it would connect, my program would no longer take input from standard in, it would just skip it. I spent about two hours last night banging my head against the wall, to no avail. Then Cody G. came in real quick to shut off his computer, and ended up staying for an hour until we fixed it. It turns out that when I opened a serial port to check to see if it had the head on it, since I was using a temporary variable for it, the actual variable for the port would never get initialized if the port was unable to open. But regardless, my code would then close the serial port, whether it opened or not. As it turns out, when I passed the close() function an uninitialized variable, I was really passing it a value of 0. And do you know what resides at the 0th buffer spot on the OS? Standard in. In effect, I was closing standard in. I didn't even know you could do that. I guess I'm just glad that I got it to work.

Currently I'm working on adding a record and playback function, so that head movements can be recorded and played back anytime. After that I think I'm going to use Doxogyn to attempt to generate really good documentation for the code, and then I think I will be done with it.


 
Topic revision: r1 - 2009-06-05 - 17:57:54 - ConnorSchenck



tip TWiki Tip of the Day
TWiki Skins
Skins overlay regular templates with alternate header/footer layouts. You can use Skins to change the ... Read on Read more

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback