Slashdot Log In
Python + Motion detection = Fweemote
Posted by
timothy
on Tue Dec 25, 2007 03:01 PM
from the help-tom-cruise-find-future-crime dept.
from the help-tom-cruise-find-future-crime dept.
jedie writes "After reading about different Wiimote hacks on Slashdot I decided to make a video with some demos of my motion-detection library. You can watch the video here. There's a link to the sourcecode (GPL) as well, but the demo is win32 only. It's basically a webcam and some software in python to track LEDs (preferrably IRs). In the demo video, you see the software (albeit badly because of the webcam's IR filter being removed) tracking two differently colored LEDs, so multiplayer is possible. The software can track multiple points easily, and when combined with IR-LEDs, it's easy to simulate one Wiimote (i.e. calculating the distance and angle between two IR-LEDs to determine where the remote is relative to the webcam). I want the code to get some publicity, because I don't have time to work on it (dissertation, blabla) but I don't want the code (however messy it is) to go to waste."
Related Stories
[+]
Wiimote as Multi-Touch Display Controller 107 comments
Tmack writes "While hard-hacks with the Wiimote are somewhat old news, this particular implementation is quite interesting. Using the infrared camera on the Wiimote, pens with LEDs instead of ink, and an LCD projector, Johnny Chung Lee of Carnegie Mellon University has created software to use them as a (relatively) cheap multi-touch display. Any surface onto which you can project becomes an interactive multi-touch display, as demonstrated in the video at the link. He has the software available for download, along with some other neat projects.
Lee has also documented another impressive Wiimote hack.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Win32 because of webcam library (Score:1)
Re: (Score:1)
Re: (Score:2, Informative)
Re:Win32 because of webcam library (Score:5, Informative)
Using a Debian-based system as example:
apt-get install python-opencv
In a Python interpreter do:
from opencv import cv
then:
help(cv)
Parent
Re: (Score:3, Funny)
Re: (Score:3, Informative)
To be perfectly honest, however, I use certain languages for different things. Rather, I use Perl for IM stuff (AIM, IRC, etc), PHP on my sites, and Python for those two plus everything else including a teaching tool
Re: (Score:2)
Re: (Score:2)
Re: (Score:1, Insightful)
Compare it to PHP on the infamous Language Shootout site and you'll see Python is better in every way:
http://shootout.alioth.debian.org/debian/benchmark.php?test=all&lang=python&lang2=php [debian.org]
The same site shows that for both speed and memory use, Python is really better than most other languages. It even beats plain C++/gcc and C# on string manipulation
Re: (Score:2)
Try this one [debian.org] on for size.
All the crap Pythonites love to boast about and almost universally faster. I'd be careful using the Shootout as a reference though, as not every language gets the love it needs to get a fair shake in such comparisons. In the Python case, Regex DNA has seen some serious love that picked the best concepts from the other implementations in the pursuit of speed. Its place in the ranking is likely not a matter of libraries, as it uses th
Re: (Score:2)
Re:If only (Score:4, Funny)
You can't write 'because' either.
Parent
Re: (Score:2)
Re: (Score:2)
Have you tried this:
import dircache
dircache.listdir('.')
Re: (Score:2)
Re: (Score:2)
Besides, chains like th
Re: (Score:3, Funny)
if code aesthetics are really important to you, they you really must go with basic.
10 CLS
20 PRINT "Hello world"
30 END
Look at the beautiful symmetry!
Look at the even row of numbers in one column, and how they prop up the commands sitting beside them.
I must say, BASIC code is truly an example of sublime beauty.
I pity the fool who codes in Python.
Re: (Score:2)
Convoluted is exactly how I'd describe that horrible piece of buggy, platform-specific code that should be replaced by:
Congrats (Score:3, Insightful)
"Betta step up yo game"
Re: (Score:2)
I'll put up a video of multiple point tracking as well I suppose