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!
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.
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?
Recently, I started looking at faster ways to perform dense stereo matching for some work with 3D video. After some experimentation, I found out that by using a selective mode filter paired with naive correspondence matching, I was able to get satisfactory results very quickly. Check out the slide show below for some results!
[red indicates close, blue indicates far away]
Here is a download-able Matlab demo, which should work on any pre-aligned stereo image pairs:
The entire code is written in Matlab/C++/MEX. The stereo matching is all in Matlab, and the selective mode filter is coded in C++ and callable from Matlab (meaning it must be compiled before it can run). Currently, the correspondence is the major bottleneck, so anyone who can improve this, please let me know! Enjoy.
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.
[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)
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 : )
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
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
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.
Top Commenters