Pets, Plants, and Computer Vision
Header

Maker Faire Detroit

August 8th, 2011 | Posted by admin in computer vision | Detroit | entrepreneurship | Fun! | Ingenuitas | Maker Faire | Michigan | Open Source | pics or it didn't happen - (Comments Off on Maker Faire Detroit)




Here is some of the media from the Ingenuitas booth at the Detroit Maker Faire. I have been going through a bit of a family health emergency so I don’t have time to write everything about the faire that I would like to, suffice it to say we had a blast and my animation station application was a big hit. We got 183 separate animations. Also I have now been to the three big Maker Faires and Detroit is head and shoulders above the rest. I am so proud of the D and the work we are doing at Ingenuitas. The animation station should be available for download next week when we release SimpleCV 1.1 fully.



SimpleCV 1.0 Released!

June 20th, 2011 | Posted by admin in Ann Arbor | automation | code | computer vision | entrepreneurship | Ingenuitas | manufacturing | Michigan | New York | Open Source | OpenCV - (Comments Off on SimpleCV 1.0 Released!)

I’ve been so busy lately that I have had no time to write about all the projects I have been working on. Today I want to take a moment to announce the release of SimpleCV 1.0 by Ingenuitas. SimpleCV is shipped as a super pack that installs SimpleCV and all of the dependencies in a single shot on all of the most common operating systems(OSX, Windows, and Linux). The Ingenuitas team has been working hard to implement most the common image processing tasks one would need to do machine inspection; and to make the process of developing applications that use these operations as quick and painless as possible. This is a big milestone for us as it means we feel that we have a good initial feature set and we can start adding more advanced features to SimpleCV, features you won’t find in OpenCV or on the existing for-pay machine inspection systems. In our next development scrum I plan to roll out a whole host of new features that make it easy to perform image based classification tasks, and to make a first pass at camera calibration and measurement tasks. Our next release will also provide much tighter integration with the Microsoft Kinect. We are also going to work up quite a few really cool demos of SimpleCV for the Detroit Makers Faire and the World Makers Faire in New York City. The video above is a dry run of one of our demos at the Ann Arbor Makers Faire. This demo is shipped with SimpleCV so feel free to download the source code and give it a shot.

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.

Classifying Images

March 25th, 2011 | Posted by admin in C++ | classification | code | Columbia | computer vision | machine learning | OpenCV | segmentation - (Comments Off on Classifying Images)

Beach classifier, I wish I was here.

I have been burning the midnight oil finishing up a project for my Computational Photography course at Columbia University. For this project we had to make two classification systems, one which classified beach and grassland imagery using a given feature vector description, and a second classifier for any two objects using whatever technique we wished to generate the feature vectors. It was suggested that we do our work in Matlab, but we had the option to work in C++. I opted for the latter as I really wanted to write something that I could possible re-use in another project. The final system was developed under Windows using Visual Studio 9, and makes liberal use of OpenCV 2.2 and LibSVM 3.0.

"Misclassification"

The beach / grassland images were classified by dividing the image into a three by three grid and calculating the color average, color standard deviation, and color skew for each of the HSV channels. This feature vector was then used in a support vector machine with a linear kernel. The overall error rate was 13.33%. For the beach images 11.67% were misclassified as grassland, while 15.00% of the grass images were classified as beach. The classification is written in the top, left corner. If the image was misclassified there are two values listed. The red value is the classification, and the green value is true value.

Correctly Classified Grassland

For the second part of the project I wrote a system that classifies images as either screws or nails. The system assumes that both of these objects are aligned to be roughly vertical. I wrote a separate class awhile back that would re-orientate the images based on the major axis of the extracted contour. To do the classification I first thresholded the gray scale image and then extracted the resulting contour. After doing this a few morphological operations were performed on the contour and the Hu-moments and a few other statistics were calculated. I also applied the Canny edge detector to the images and piped the results into a Hough line detector. The results of the line detector were then binned according to length and orientation. This data was used to generate a feature vector which was used for classification via a support vector machine with a linear kernel. The overall error rate was 3.58%. 1.33% of the screw images were misclassified as nails, while 7.27% of the nail images were misclassified as screws. The classification is written in the top, left corner. I used the letter “N” to indicate nails, and the letter “S” to indicate If the image was misclassified there are two values listed. Some results are shown below.

Samples from the screw / nail classifier


The complete set of beaches and grassland images can be found in my beach / grassland classification set on flickr along with the complete set of screw/nail classification results. The code is posted on my computational photography Google code page. The code was written under the gun so it isn’t nearly as clean as I would like it to be, and everything is very data set specific. Hopefully once the semester is over I can go back and refactor it to be a more general solution.