5 tactics to make short classes work

http://www.flickr.com/photos/childofwar/3097124543/sizes/m/in/photostream/Have a short (1-4 hour) class/tutorial to give? Want your students to learn tons and rave about the class? Want them to teach you and stay engaged in the topic moving forward?

Here are a few tips I’ve picked up from running mini-classes in academic and professional settings:

  • Listen to the room
  • Build skills through lessons
  • Let them get their hands dirty
  • Do the boring stuff in advance
  • Follow up with homeworks

These are mostly related to programming-type topics (see here and here from some examples), but I’ll bet the ideas are broadly applicable. Hopefully you can share some of your experiences as either a student or teacher in the comments!

Continue reading “5 tactics to make short classes work”

Convert images to data with Plot Digitizer

You’re scouring the internet for data to prove your point…
After hours of searching, you finally found it!
One problem – it’s a chart in a pdf…

Charts are better than nothing, but you really want to have the numbers in Excel or Matlab so you can do analysis and get big insights (or at least make a nicer-looking chart).

The answer is Plot Digitizer

Continue reading “Convert images to data with Plot Digitizer”

Homemade muscles: quitting my gym for a better workout

I made a new-years resolution this year: quit going to the gym.

Instead, I brought the gym into my apartment and re-vamped my workout so that I can take it anywhere. I’ll outline a workout strategy to get a kickass workout in 15 minutes with or without gear.

Basically: Use your whole body, work where you sleep, and do it hard.

Continue reading “Homemade muscles: quitting my gym for a better workout”

Advanced LaTeX Workshop

The “LaTeX Intro Workshop” was such a big hit that I was asked to do an advanced workshop as a follow up.

LaTeX

I will cover these main topics:

  • LaTeX Basics
  • GT Thesis Writing
  • Useful packages
  • BibTeX bibliographies
  • Advanced figure tutorial
  • Beamer slides presentation tutorial
  • Beamer poster tutorial

While there is certainly enough minutia within LaTeX to keep someone busy forever trying to learn it all, I decided to focus on some of the bigger-picture topics that might benefit everyone. After all, there’s always google to answer those little specific questions.

Here are the files for the tutorial that will be covered during the talk:

advanced_latex_presentation.zip

This zip file holds three different tutorials. The first is a tutorial on creating beautiful figures. The second is on creating slideshows in beamer. The third is a short intro to making posters in beamer.

This tutorial will be performed LIVE on March 26th at 3pm in the Homer Rice Instructional Center in the Georgia Tech Library.

LaTeX Intro Workshop

LaTeX (pronounced lah-tech) is a powerful tool for creating beautiful documents. This post covers a workshop I gave recently introducing LaTeX to some curious graduate students. The materials here show some of the features and walk new users through the basics of using LaTeX.

This would make a nice tutorial for others trying to teach LaTeX as well as enterprising students trying to find a quick way to jump in and start using it. The workshop I taught was part of a class put on by the Georgia Tech Library. I will teach a second class on Dec. 1, 2008. Much of the work in creating these examples was done by David Reid and adopted (slightly) by me.

I began the class with this presentation:

LaTeX Introduction Presentation

This covers what LaTeX is, why it’s useful, and walks the class through the setup of the integrated TeX editor use used, TeXnicCenter. This talk also introduces the examples covered during the workshop. Below is a link to the example files used.

LaTeX Workshop Files

I walked the class through each of the files, explaining peculiarities and pointing out the differences between commands, environments, etc. The workshop finished with a quick summary of some of the other uses of LaTeX including making slides and posters. I also provided links to these very useful resources:

David’s Slideshow
The Not So Short Guide to LaTeX2e

I may try to tape-record the next class and post the video here for anyone interested in watching.

LaTeX Beamer Poster Theme and Template

Some background: LaTeX is a typesetting tool used to layout documents. Beamer is a package for LaTeX that helps make nice looking slides and posters. Recently Philippe Dreuw devised a very nice way to make really slick posters using LaTeX and Beamer. These posters are a great way to demonstrate your work at presentations and conferences.

I’ve been making posters this way sine my friend introduced me to them. He and I spent time figuring things out, and I wanted to share! Below you’ll find a simple to use template for making posters as well as examples and some how-to’s that will help you make posters like this one I made for an up-coming conference in Alaska!


LaTeX Poster
[pdf of this poster]

First, you’ll need to install LaTeX and the Beamer class. Next, download the zip file below which has some style files as well as a sample tex file.

beamer_poster_demo.zip

Continue reading “LaTeX Beamer Poster Theme and Template”

A Short MEX Tutorial and Demo

Matlab is a great programming language/environment because of its ease of use, great visualization, and rapid prototyping abilities. Raw speed is not one of its strong suits. MEX (Matlab Executables) are the answer. These functions allow you to program in C or C++ (ultra fast languages), but be able to call and use them from Matlab programs. This post is a short intro to mex files which should get you up and running.

What This Post Teaches

In this post, I show how to create a mex file, how to set up inputs and outputs, how to get access to Matlab objects, and how to manipulate them. I also give a skeleton mex program that might be helpful. There is a lot more to learn, and I’d refer you to the mex manual regardless.

Continue reading “A Short MEX Tutorial and Demo”

Beamer and Latex With Keynote Theme

LaTeX is a typsetting system that allows you to make great-looking documents, and is well-used to make academic papers. I even use it for homeworks and other documents. There are also packages that allow it to make fantastic posters and slide presentations as well. I spent the last few days getting caught up on this, and want to share what I’ve figured out:

  • A sexy Beamer theme that looks like Keynote
  • How to format the footer
  • How to make slide numbers
  • How to remove the navigation symbols
  • How to make movies show up in presentations
  • The best references

I’ll talk about each of these briefly and give links to download a demo presentation and the .tex and .sty files that made it. Here’s a sneak peek of what it looks like!

keynote beamer presentation

Continue reading “Beamer and Latex With Keynote Theme”

Ellipse Selection in Matlab

Much of the work on image segmentation that I do requires an initial guess of the answer. This initialization gives the algorithm something to improve. Hopefully, it improves all the way to the correct answer. You can use any manner of contour as an initialization. I like to select slightly different contours while I’m testing to make sure I’m not ‘over-tuning’ my system for some specific set of initial conditions.

Sometimes, it is preferable to use a very close initial outline like this:

Close initilization

(by the way, if you are interested in initializations like this see this code)

However, when you are trying to demonstrate the robustness of your technique (and/or you don’t want to waste time drawing a complicated contour) it is nice to use geometric shapes. Squares are popular, and can be captured using this simple Matlab code.

>>[rect] = getrect(1);

Many things in life are shaped more like ellipses, though. For this case, there are no built-in Matlab functions to get this type of initialization. Fear not! I wrote some simple code that allows you to capture graphically (or define in terms of parameters) an ellipse very simply. The params are major and minor radius (a, b), center location (x0, y0) and angle of rotation (rho).

>>[mask, a, b, x0, y0, rho] = get_ellipse(I, a, b, x0, y0, rho);

Here is an example of the type of initialization you can get (shown in white). Also in the image below you can see the final segmentation in green.

Ellipse Initialization

Download this .m file and try it out yourself.

Videos in Matlab and Linux

If you do computer vision research (as some of you may). Or any other type of research for that matter… Its a good idea to make nice videos of the results that you obtain. This is a simple disaster-proof way of demoing your work. I’ve been doing this quite a bit lately (as a result of all the video tracking work). I’ve come up with some tips, tricks, and tools that will help out the aspiring video-creator (who uses Matlab and Linux… otherwise you’re out of luck).

Personally, I find Matlab’s built-in avi code terrible. It’s just bad. Instead, I prefer to make figures that show what I want to show on each frame, save those out, and then compile them into a movie later. This seems to be the nicest command to save the frames out:

>>for i=1:last_frame
>> %% code to create the frame in a figure
>> f = getframe;
>> imwrite(f.cdata, sprintf('./video/%04d.png',i));
>>end

This should leave you with a directory full of .png files. From here you have to assemble these into a movie. This is a fantastic script called mkmpeg4 (download). The way to run it is as such (by the way, this only works in Linux with mplayer installed)

$mkmpeg4 -o output.avi -f 30 `ls *.png`
$mplayer output.avi

Note the ` quotation marks as opposed to your typical ‘ marks. This makes compressed videos that look good and will still play on Linux, Windows, and Mac. (Also, they work in PowerPoint). One final tip. If you want to go the other way; take a video and convert it to frames, here’s how:

$mplayer -vo png movie_to_unpack.avi

If you video file is interlaced (looks good in a player, extracted images look bad), try this instead:

$mplayer -nosound -vf pp=ci -vo png:z=0 movie_to_unpack.avi

Happy Matlab Video-ing. Feel free to post your own tips or correct mine in the comments.