Archive for December, 2013

7200OTAnother trip, another book (and a bonus deal)! Remember that Maker Faire Demo and all that image processing? I relied heavily on the Image Processing Toolbox in MATLAB and I thought I would share a good resource I came across.

Visual Media Processing Using MATLAB by George Siogkas is a good introduction to the Image Processing Toolbox. It starts with a brief overview of the MATLAB UI and then digs right into opening and displaying images. The book goes a good job of presenting processing logic and then code to execute that logic. I was able to quickly follow along and execute the same commands. After Siogkas does a few commands, he looks back at the code with a really helpful section called “What just happened?”. These sections are very helpful as they provide a different look at the code you just executed. I have found myself referring to these section and the preceding examples over and over. Each chapter contains several subtopics, so having these review sections is a good way to break things up and ensure you know what you’re doing. Also these sections tend to have big, bold headings, making it easy to find glancing though the book. (Which is more common for me while working on a project.)

The book is sort of a cross between a textbook and tutorial. Each chapter ends with a review quiz, but unlike textbook, this is not designed to be a drawn out homework assignment. Also unlike a textbook, the author takes on a more tutorial tone with very well thought out examples in which he guides you though each step. Like a textbook though, each chapter ends with a listed summary of point covered. I generally find summary sections to be sort of vague, but if it helps you, it is there. (The author lists things accomplished like “How to create …”, “How to isolate and expand …”)

Overall I really liked the book. It is a great reference and a good way to get start in MATLAB. You can find it on amazon or though the publisher. Speaking of which, that bonus deal I mentioned… Packet Publishing is having a holiday sale. You can click the banner below or follow this link. The deal is $5 for any ebook or video from packet now (December 19th) though January 3rd. A few of the books I have review come from Packet, so it might be a good way to pick up some books for the new year on the cheap!

782x300_Main_banner

Remember that Maker Faire demo I posted about a few weeks ago? Well as promised here is Part 2! This time I dive into the new features I added for the demo. The video format is a bit strange in that it presents a PowerPoint, but that was a requirement for a class. I ended up leveraging this work for my image processing class this semester.

One of the easiest ways to make a demo interactive is to kid a child a maker and say draw. That is exactly what this demo does. As the child draws, the robot or swarm will follow the line. I do some image processing to find the line. The first step is to reduce the search area. This is a huge time saver when it comes to processing and removes many of the issues of shadows or various markers and body parts the camera may see. Then it does a search in this region of interest (ROI) and looks for where the line intersects the ROI.

I tried to keep the new feature as streamlined as possible to avoid the issues of degraded performance. Image processing can be quite processor intensive. Since the code was already doing a lot of processing to get to this point, I wanted to ensure that any further enhancements did not add lag.

There is always room for improvement and one of those areas would be actually projecting the line to calculate the intersection. This would probably help for the cases where the line does not intersect the edge of the ROI, but that is a feature for another time. Check out the video for more details. It came together really well!