Archive

Archive for the ‘Vision’ Category

PIL in OSX, The Easy Way

February 5th, 2008 3 comments

After spending about an hour fighting with PIL (Python Imaging Library) and trying to get it to install properly with all of its dependencies I discovered that some wonderful person posted a ready-made pil installer for osx. This worked like a charm. First try. No problems.

God I love it when people do stuff like this. Now, hang on as I learn to do image processing with Python on my mac.

Decoupling Camera and Target Motion

February 1st, 2008 No comments

Video tracking is widely used for surveillance, security, and defense purposes. In cases where the camera is not fixed due to pans and tilts, or due to being fixed on a moving platform, tracking can become more difficult. Camera motion must be taken into account, and objects that come and go from the field of view should be continuously and uniquely tracked. We propose a tracking system that can meet these needs by using a frame registration technique to estimate camera motion. This estimate is then used as the input control signal to a Kalman filter which estimates the target’s motion model based on measurements from a mean-shift localization scheme. Thus we decouple the camera and object motion and recast the problem in terms of a principled control theory solution.

Our experiments show that using a system built on these principles we are able to track videos with multiple objects in sequences with moving cameras. Furthermore, the techniques are computationally efficient and allow us to accomplish these results in real-time. Of specific importance is that when objects are lost off-frame they can still be uniquely identified and reacquired when they return to the field of view.

This work was published in the Proceedings of the SPIE on Electronic Imaging in this paper: Improved Tracking by Decoupling Camera and Target Motion.

See this paper and more on the publications page.

3D Vision with Stereo Disparity

December 19th, 2007 78 comments

Stereo Thumbnail2D is nice, but these days I’m getting interested in doing computer vision in 3D. One way to get 3D data is to use two cameras and determine distance by looking at the differences in the two pictures (just like eyes!). In this project I show some initial results and codes for computing disparity from stereo images.    Click to continue →

Mean Shift Segmentation in Matlab

November 16th, 2007 52 comments

Background

Recently I have decided to explore tracking from 3D point clouds extracted from stereo vision cameras. Step 1: Extract 3D point cloud from stereo vision cameras. So right now I’m implementing Segment-Based Stereo Matching Using Belief Propogation and Self-Adapting Dissimilarity Measure” by Klaus, Sormann, and Karner. This paper is defined by the source on stereo vision to be the best one around. This paper has two parts. Part 1: Segment the image. Part 2: Compute disparity (and depth) from the segments. Well, today I finished Part 1.

Stereo Cameras

First Try

The authors refer to a mean-shift segmentation algorithm presented in Mean Shift: A Robust Approach Toward Feature Space Analysis” [pdf] by Comaniciu and Meer to do the image segmentation. This paper (unlike some of my own previous work) leans towards oversegmentation of an image. Meaning that you prefer to get lots of little bits rather than the “right object” after the algorithm has run.

Well, after looking over the paper and getting a grasp for the mathematics, I took a crack at implementing it. Easily done… HOWEVER, my first attempt, written in Matlab, was painfully slow. (For a simple image it took 6 hours to run!) So, I got on the internet and came up with a better solution!

The Solution

Some great guys at Rutgers University implemented this paper in C++ and made the code available to the public under the name EDISON. (there’s also a nice GUI that goes along with this if you want to just play to see if these codes will work for you). Okay, so I had C++ codes that worked well (only 2 sec to do an image rather than 6 hours). The next step was to bring the code into Matlab.

Mean Shift Segmentation Results
These were the type of results I was trying for

I cracked my knuckles and got ready to write a MEX wrapper for this EDISON code. Then I said to myself, “Self, maybe you should check the ‘net first.” Turns out I had a good point. I found the website of Shai Bagon. Mr. Bagon had already made the MEX wrapper! Awesome.

I downloaded the codes and put them together. Mr. Bagon’s stuff worked right out of the box, although it would have saved me about an hour if I would have had this information (alternative readme.txt for Matlab Interface for EDISON). I also wrote my own wrapper-wrapper so that I could process grayscale images, and do simpler calls to accomplish what I wanted. If you’d like the code, download my wrapper-wrapper here (msseg.m).

Results

Here is a sample of the output of this algorithm. The first image is a regular photo of some posed objects. The second image is the segmented version. Notice how the regions of the image are much, much more constant. This image has been broken into “tiles” of constant color.

Left Image
The original image (part of a standard pair of test images).
segmented image
The segmented image (ready to be processed in step 2)

Conclusion

Don’t re-invent the wheel. Taking a first crack at the implementation was good, and it helped me understand the algorithm. However, there was no need for me to spend a week tweaking it to be super-fast or two days getting the Matlab interface working. These things had already been done! It feels nice to knock out a task that you thought was going to take a week in a few hours : ) Stay tuned for the stereo part of this paper coming soon. Then maybe people will be writing about my page!

Vision Research Report

October 8th, 2007 No comments

Recently I wrote about some startup companies in computer vision. However, this is only part of a good industry analysis. I also want to explore some of the interesting research going on in the field. Below is a list of some of the vision research that I’ve come across that seems most interesting (and applicable/marketable).

Seam Carving

This is brilliant (and brilliantly simple work). It solves a problem, and in doing so gives us tools to solve problems we didn’t even know we had! Its hard to explain, check the video out.

Dr. Ariel Shamir has a host of other interesting research as well: link.

Read on for more great research:    Click to continue →

Computer Vision Startups

October 5th, 2007 3 comments

I have spent some time researching startup companies involved in computer vision. This has largely been in an effort to understand the marketability of computer vision research (which I spend much of my time learning about and contributing to). In this post, you’ll find a list of some notable companies. Let me know if you know of some other good ones. (Of course this doesn’t include the big, big companies like Siemens, GE, Phillips, and HP that are working on medical image processing every day!    Click to continue →

Active Contours

May 15th, 2007 25 comments

UPDATE:
My new post: Sparse Field Active Contours
implements quicker, more accurate active contours.

The well-known Chan-Vese segmentation algorithm from the paper “Active Contours Without Edges,” is a great example of active contours. This technique deforms an initial curve so that it separates foreground from background based on the means of the two regions. The technique is very robust to initialization and gives very nice results when there is a difference between the foreground and background means.

In this video, the curve begins as a square. As time goes on the square changes shape so that it does a better and better job of separating the image into a light area and a dark area.

Below is a download-able Matlab demo. The code is very easy to read, and could be the foundation for lots of other active contour segmentation techniques.

sfm_chanvese_demo.zip (New! Described Here)

regionbased_seg.zip (old and slow)

I recently added some new active contour stuff based on a more complex (and sometimes more capable energy). Check out the latest results, and the full project writeup which is a little older!

Park-Find Business Plan

April 24th, 2007 3 comments

Park-Find ThumbnailIn this project I look at engineering from a different perspective… the business perspective. My team and I started with an idea: Track cars in a parking lot and use the information to help the whole operation run smoother. From there, we researched, though, and schemed until we had a sturdy business plan for the new venture.    Click to continue →

Visual Tracking

April 3rd, 2007 8 comments

My newest research focus has moved away from medical images and towards moving images… And instead of finding organs and tumors, I’m tracking moving objects in the videos. Check out some of my latest successes (and failures).    Click to continue →

Hybrid Segmentation

February 10th, 2007 19 comments

This algorithm analyzes statistics in small local regions of an image to try and separate the foreground from the background. This is an active contour segmentation technique, meaning a curve (or surface) is deformed over time to iteratively improve the segmentation until an optimum is reached.    Click to continue →