Pets, Plants, and Computer Vision
Header

Simple Steganography

February 16th, 2013 | Posted by admin in code | computer vision | demo | Fun! | pics or it didn't happen | steganography - (Comments Off on Simple Steganography)

I had a moment to play with steganography while I was watching tv tonight. Steganography is a way of encoding text messages inside image files in such a way that they don’t alter the original image content. I came across this nice little tutorial using the stepic python library. I was able to get Stepic working with and hooked into SimpleCV with only a little bit of massaging (needed to turn SimpleCV Image to a PIL Image and back again). Here is the actual commit.

The Source Image

The Source Image

 

 

The encoded Image.

This dinosaur has an encoded message, can you find it?.

I wrote a little bit of code to test my work and to see if I could tease out the algorithm. Basically all I did was encode a message, in this case the wikipedia entry on stegosaurs, into an image and then subtracted that image from the original imaage to create a diff. To the naked eye both the source image and the encoded image look the same. The diff also looks as it should, that is to say all black. To dig a bit deeper I applied a histogram equalization function to stretch out the images’s dynamic range. Bingo, the encoding scheme is clearly visible.

The pixelwise difference between the source and encoded image.

The pixelwise difference between the source and encoded image.

The difference between the source and encode information using an equalize operation.

The difference between the source and encode information using an equalize operation.

The next step is to look at the individual color channels to see if they are holding on to any information. I could look at the actual algorithm in the source, but that would be no fun. It would be interesting to see if I could build a heuristic for determining which images have encoded data. I would also be useful to add AES encryption to the encode/decode calls in SimpleCV.

As a side note I tried to decode my image using this on-line utility but I had no luck. My guess is there are incompatibilities between the stable 0.3 release of the stepic library and the development 0.4 release that might be on the utility.

Crawl, Walk, Drive

February 14th, 2013 | Posted by admin in Ann Arbor | automation | Automation Alley | C++ | code | demo | FIRST | Maker Works | pics or it didn't happen | robots - (Comments Off on Crawl, Walk, Drive)

We finally got the FIRST Team 830 drive train up an running. We still have a lot of hardware to attach, but this is a good start. currently the control system and battery are just loosely attached with cable ties. This will change once we get the final build-out of the pickup and firing mechanism. We have yet to test the pneumatic gear shifters or a PID controller so in these videos the robot is in low gear and capped at seventy percent power.

This is the first run of the robot.

Once we got used to the control I slipped my cell-phone in a spare cRIO slot and got some video.

I have a few screen captures of our current design that gives the programming team a better idea of what other subsystems we need to code and design controls for. Unfortunately I don’t have a nice overview image of the final cad design.

Slight Overview

Disc Shooter

Pickup

Drive Train

Elevator

I have a few screen captures of our current design that gives the programming team a better idea of what other subsystems we need to code and design controls for. Unfortunately I don’t have a nice overview image of the final cad design.

We are down to the final week before bag and tag. Hopefully I will have more cool videos soon.

FRC 830 Drive Train First Run

February 10th, 2013 | Posted by admin in Ann Arbor | automation | Automation Alley | code | demo | FIRST | Maker Works | Michigan | pics or it didn't happen | robots - (Comments Off on FRC 830 Drive Train First Run)

It took a lot of work, but we finally have a working drive train and shooter. Now we just need to put the two together, add the pickup mechanism, and we are ready for competition.

Real-time fastener recognition

April 12th, 2011 | Posted by admin in augmented reality | classification | Columbia | computer vision | demo | lab work | machine learning | OpenCV | pics or it didn't happen - (Comments Off on Real-time fastener recognition)



I’ve had this idea, that I have been working on for awhile, to make a system that can recognize fasteners (screws, nuts, bolts, nails, washers, etc) on the fly and then measure some of the descriptive statistics of the parts (e.g. length, width, inner and outer diameter etc). Today I finally got a prototype of the recognition system up and running. The system uses a raw threshold of the scene to extract the parts from the scene background and then does some operations to get the parts into a standard form (namely aligned to the major axis) and then extracts some basic statistics like edge length and orientation histograms, and Hu moments. This feature vector then gets piped into a support vector machine to do the recognition. Right now the system runs at about 8FPS at full resolution. The training error on the SVM was about 13% but the training data was really, really, poor and not that large (i.e. 75 samples with about 10% of those being basically misfires from an automatic data extraction module I wrote). I still have a long way to go, as the feature extractor could use some work and the whole data processing pipeline needs to be optimized. Right now there are some fairly costly image rotation operations that can be modified to improve performance. I also need to train the full set of features not just bolts and nuts.

Once the recognition system is working well I hope to use the ALVAR augmented reality library and its fiducials to determine the part dimensions by assuming that the part is effectively planar with the fiducial. The fiducial should also give us a three dimensional location for the recognized part. Right now I am doing this work for the CGUI lab at Columbia. Our end game is to wrap this code up into an augmented reality system for maintenance applications where there may be knowledge shared between a remote subject matter expert and an on-site maintenance technology. Our hope is that a system like this can speed up maintenance tasks by assisting the maintainer in identifying parts and locating them faster. Part of the problem of using AR in this domain is that head mounted displays really don’t have all that great of resolution which reduces your visual acuity and makes it difficult to recognize individual parts.