Shawn Lankton Online

vision, science, engineering, and fun

Archive for April, 2008

I’ve taken to writing all of my homework assignments for my (few remaining) classes in LaTeX, the markup language used by many to typeset scientific papers, theses, books, slides, posters, etc.

Why go through all this hassle for homeworks? Using LaTeX for homeworks
allows you to do lots of nice things like:

  • Have your work neatly typeset
  • Impress your professors who might recognize the fonts
  • Include equations easily
  • Put math right in the text
  • Not ever have to mess with MS Word

Being able to include equations is especially nice. When I do math
homeworks I often find it simpler to do derivations in LaTeX rather than
scratching them out on the backs of poorly written papers. If I make a
mistake somewhere, I can quickly change all down-line equations with a
find-replace procedure instead of having to re-write or cross out large blocks
of scribbles.

The template I use is mostly the same for every class. Sometimes I add or
remove things for specific courses to make the professors happy. I’ve posted
that basic template below. Enjoy, and let me know if you if you make any
improvements!

hw_template.tex
hw_template.pdf

Read Comments(0)  

Motorcycle School
04 15th, 2008

Last weekend, I spent all day Saturday and Sunday learning how to ride a motorcycle! I went to the American Honda Driver Education Center where they provide bikes, helmets, and instruction. I got to ride a sweet little Honda, and I must say: I’m pretty hooked on the feeling.

motorcycle

We practiced everything from fast turns to hard stops to the basics of shifting and driving. All that’s left to do is ride (on my bicycle) down to the DMV, get a little ‘M’ on my license, and of course… buy a motorcycle! Anybody have a nice one for sale?

Read Comments(1)  

A few months ago, I wrote about and uploaded some stereo vision work I had been doing. This work was an attempt to implement someone else’s paper. The paper I was implementing had three main components:

  1. 1.) Compute an estimate of the pixel disparity
  2. 2.) Segment the image with mean-shift segmentation
  3. 3.) Use the segments to determine filter disparity measurements

Recently, I was thinking of doing some work on stereo videos. Video processing requires very quick processing speeds, and mean-shift segmentation isn’t very quick! Thus, I started looking at faster ways to perform steps 2 and 3. After some experimentation, I found out that by using a selective mode filter, I was able to get satisfactory results much more quickly. Check out the slide show below for some results!



[red indicates close, blue indicates far away]

Another realization was that I could do Step 1 better too! In my original implementation, I had thrown away some useful feature information that could have been used to get measurements with less noise. Since then, those oversights have been corrected (in the code below and in the other project page).

Now that Steps 2 and 3 have been sped up with selective mode filtering, my implementation of Step 1 is the big bottleneck. The Step 1 code can be made much faster if I re-implement it in C++.

TO DO:

  1. 1.) Implement Step 1 code in C++
  2. 2.) Capture stereo video
  3. 3.) Process video
  4. 4.) …
  5. 5.) Profit

Can anybody help with suggestions for Step 4? By the way, here’s the code so-far.

stereo_modefilt.zip

Read Comments(7)  

The median filter is a well-known image processing filter. It provides a very nice way to smooth an image while preserving edges. The median filter replaces each pixel in the image with the median value of its neighboring pixels. A similar non-linear filter with slightly different properties is the mode filter which replaces each pixel with the mode of its neighboring pixels. I additionally make a slight modification so that “bad” pixels are ignored entirely in the computation of the mode.

This idea arose when I was trying to de-noise some images as well as do some in-painting of “bad” pixels (that have no value). Consider the image below. The darkest-blue areas are bad pixels. We have no information for those pixels. The other pixels are colored to show how far that pixel is from the camera. (see the post on Stereo Vision) However, some of the good pixels still have the wrong value. These are the noise pixels.


original data
[Initial Image]

In the rest this post I talk about how we use a selective mode filter to convert the above image into the one below. (There’s also download-able Matlab/C++ code)


selective modefilt
[Final Result of Selective Mode Filter]

Read the rest of this entry »

Read Comments(1)  

Everyone talks about like the brain like its a computer. Well, in some ways its similar. There are nerve cells that act like “wires” and run from one part of the brain to another. With the advent of a new kind of medical imaging technology called “Diffusion Weighted MRI” (DW-MRI), it is possible to find these wires using computer vision. Many people claim that it is important to find whole bundles of these wires in addition to the individual wires.

Recently, I’ve been working on a way to do this using partial differential equations (PDEs). Below you can see some of the results. First, thin white tubes are shown. These represent a single “wires” called fibers. From these single fibers, we determine the boundary of the whole bundle. We then show this as thick yellow tubes.

By studying the shape and size of these bundles, doctors may be able to detect mental illness early and improve the understanding of the brain! Hopefully I can help by making these pretty pictures : )

Read Comments(0)  

Today, I added demo code for the Hybrid Segmentation project. This segmentation algorithm (in the publications section) can be used to find the boundary of objects in images. This approach uses localized statistics and sometimes gets better results than classic methods. For an example, see the video below: The contour begins as a rectangle, but deforms over time so that it finally forms the outline of the monkey.

This can be used to segment many different classes of image. To try it out, download the demo below and run >>localized_seg_demo

localized_seg.zip

This code is based on a standard level set segmentation; it just optimizes a different energy. I’ve also made a demo which implements the well-known Chan-Vese segmentation algorithm. This technique is similar to the one above, but it looks at global statistics. This makes it more robust to initialization, but it also means that more constraints are placed on the image. Download it and see what you think! Again, unzip the file and run >>region_seg_demo

regionbased_seg.zip

For another Matlab implementation of Active Contours check out: James Malcolm’s Webpage. He has some codes for very fast approximate implementations as well as a full numerical implementation.

Read Comments(4)  

You’ll notice that the main page now has a section listing several RSS feeds for this site [What's RSS?]. There is also a new page showing feed links for each category and groups of categories! Hopefully this will help readers that want to keep current with some or all of the information I post!

sharing_rss

I’ve also added a “Share This” icon to the bottom of each post. This allows you to easily email posts to friends or submit them to social networking and bookmarking sites like Reddit, Digg, Facebook, etc.

Please let me know if you find these features helpful, and if you can think of any missing feeds, etc.

Read Comments(0)