Slashdot Mirror


Python + Motion detection = Fweemote

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."

7 of 30 comments (clear)

  1. Re:If only by Malevolyn · · Score: 2, Informative
    I hear that. Anyone with any real knowledge knows that these days language is mostly a matter of preference. Of course, Python is my language of choice and I do love how beautiful the code looks no matter how convoluted you try and write it.

    raw = os.popen('dir /B').read().rstrip().split('\n')
    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.
    --
    Your ad here.
  2. Re:Win32 because of webcam library by delire · · Score: 4, Informative

    What's wrong with the Python interface to Intel's immensely popular OpenCV. Firewire devices, USB, multiple cameras.. all are a breeze on Linux or those-other-two-popular-OS's.

    Using a Debian-based system as example:

    apt-get install python-opencv

    In a Python interpreter do:

    from opencv import cv

    then:

    help(cv)

    .. and prosper.

  3. Re:Win32 because of webcam library by doxology · · Score: 3, Funny

    Apparently, it's not very good at letting me know it exists =P. Thanks, I'll give it a whirl.

    --
    sigfault. core dumped.
  4. Re:If only by JohnFluxx · · Score: 3, Funny

    > I don't program in any version of C cuz I can never type those damn square brackets [] correctly

    You can't write 'because' either.

  5. Re:If only by theheadlessrabbit · · Score: 3, Funny

    "I do love how beautiful the code looks no matter how convoluted you try and write it."

    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.

    --
    -I only code in BASIC.-
  6. Congrats by EmperorKagato · · Score: 2, Insightful

    However, the C# version was already done by Johnny Chung Lee

    "Betta step up yo game"

    --
    ----- You know you have ego issues when you register a domain in your name.
  7. Re:Win32 because of webcam library by Weirdbro · · Score: 2, Informative

    Christ! Thats not a myminicity, thats a goatse. BEWARE!

    --
    I'm so lazy, I had my computer write this comment for me.