Python as a teaching (visualization) tool

Kyler Laird Kyler at
Fri Feb 13 16:11:59 CET 2004

I've been using Pyrex to get me through the Computer Vision
class I'm taking this semester
by dealing with the requirement that all programming
assignments be submitted as C code.  That's worked *very* well
for me and I'm thankful that I don't have to deal with writing
the assignments in C from scratch.  (I am sure that it would
degrade my understanding of the course material.)  Now I've
found another use for Python in this course.

Our lecture yesterday
was about Hough Transformations.
There were a lot of questions about how points in image space
appear in parameter space and what a point in parameter space
represents in image space.  I was a little confused and trying
to stay on top of the conversation.  The visualization in my
head was fuzzy.

The instructor made a comment along the lines of "No one ever
shows the sinusoidal curves in papers" and instructed us to go
home and try drawing some.  It struck me that it would be a
*huge* benefit to have tools to help students visualize these
concepts in the classroom.

So I built one.
*Now* I can see how the transform works.  Much better.  (The
parameterization used is for detection of lines.)

What does all of this have to do with Python?  Well, I did build
the little Hough tool using Python (and PIL), but while I was in
class thinking "There's got to be a better way to show this" I
kept thinking in terms of taking advantage of Python's
interactive nature to whip together tools like this in front of
a class.  Numeric, PIL, WxPython, SciPy, GGobi, MayaVi, ... if
an instructor had a basic understanding of some of these tools
and a handy framework for using them, explanations of many 
difficult concepts would come very naturally.

I don't mind building my own tools from rough building blocks,
but I'm going to watch for tools that would be more appropriate
for classroom presentations.  I welcome suggestions.


More information about the Python-list mailing list