Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Realtime video to laser projection

  1. #1
    Join Date
    Jan 2011
    Location
    Eindhoven, the Netherlands
    Posts
    18

    Default Realtime video to laser projection

    Hi All!

    I don't know whether this has been done already, but the idea struck me a few months ago to write a program that could trace a video so to project it with a laser in real-time.

    Using the OpenCV library I already managed to scan the image for contours, and convert the contours to simple x,y vector points. Not only images or video's but also webcam-input can be used!

    Currently I'm wrestling with the MS waveOut functions to output good buffers (it takes some effort to stream audio to the sound card) for use as galvo-input.

    When this finally works I'll try to make a working laser demo and post it!
    So Ill keep you updated

    I'm still having trouble to build an executable but if anyone is interested I could post the source code..!

    Attatched is a picture of the part that already works

    regards
    Attached Thumbnails Attached Thumbnails opencv + waveout.jpg  


  2. #2
    Join Date
    Aug 2009
    Location
    Churchill(hour S from Houston)
    Posts
    1,316

    Default

    WOW- that would really be something!! do keep it coming and TY for sharing~~!!!

    hak

  3. #3
    Join Date
    Nov 2009
    Location
    Sliedrecht, Netherlands
    Posts
    332

    Default

    welcome and nice to see you on the forum

    this post may be interesting to you http://www.photonlexicon.com/forums/...read.php/10447

  4. #4
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,192

    Default

    Quote Originally Posted by s060340 View Post
    Hi All!

    I don't know whether this has been done already, but the idea struck me a few months ago to write a program that could trace a video so to project it with a laser in real-time.

    Using the OpenCV library I already managed to scan the image for contours, and convert the contours to simple x,y vector points. Not only images or video's but also webcam-input can be used!

    Currently I'm wrestling with the MS waveOut functions to output good buffers (it takes some effort to stream audio to the sound card) for use as galvo-input.

    When this finally works I'll try to make a working laser demo and post it!
    So Ill keep you updated

    I'm still having trouble to build an executable but if anyone is interested I could post the source code..!

    Attatched is a picture of the part that already works

    regards
    Pretty cool. I also used OpenCV to create my own video to laser application. Works pretty well but I have not had time to apply the finishing touches and release it.

  5. #5
    Join Date
    Jan 2011
    Location
    Eindhoven, the Netherlands
    Posts
    18

    Default

    I got the streaming OK now, but the output signal is showing some really nasty artefacts

    I've added a screenshot of the sample image, together with a screendump of my scope.

    Notice that on the right the line gets all wobly, instead of smooth

    Also if you look at the picture with persist on, you'll notice that the signal drifts a few mV's from its center

    Does anyone know what could cause this?

    Help would be greatly appreciated!
    Attached Thumbnails Attached Thumbnails persist.bmp  

    waveform.bmp  

    screenshot.jpg  


  6. #6
    Join Date
    Jan 2011
    Location
    Eindhoven, the Netherlands
    Posts
    18

    Default

    I got the image steady now, so it doesn't drift anymore..

    The wobbling is still there though, it seems to appear when either of the x or y signals takes a leap, not sure whether this can be helped with software though.. any thougths?

    Maybe just add a low-pass filter to the signal output?

    Anyone got experience with this?

  7. #7
    Join Date
    May 2009
    Location
    UCSB
    Posts
    708

    Default

    I suspect that the offset is because normal sound cards are AC coupled, so the average X and Y voltages will always be 0 (averaged over a few ms). It is usually possible to short out the dc block caps on your sound card, or for testing you could write some code that adds in points to keep the x/y average at 0 for each frame.

  8. #8
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,334

    Default

    Hi, I'm surprised no one has mentioned it, because a few people how have replied to you have already seen demonstrations of it, but early last year I released a live video to laser app that does this. Please check it out!

    http://www.photonlexicon.com/forums/...light=lasercam


    Also, before that, Pangolin released one, and before that, Mamba released one. Those are called 'VST'

    If you have any questions, comments, or suggestions, let's chat! Send me a PM and we'll exchange contact details.

  9. #9
    Join Date
    Jan 2011
    Location
    Eindhoven, the Netherlands
    Posts
    18

    Default

    Laserwinkel already mentioned it, actually (2nd post)..

    Still, I want to continue my project because I'm gaining very much experience in programming and hardware communication (in fact this is only my 2nd serious programming project)

    As mentioned in my previous post, the main problem (in fact, the only problem left) is the output of the sound card..

    Did you get that problem too? or did you use a ILDA-interface output?

    I have ordered a external sound card of which i can try to eliminate the end caps - don't want to mess with my notebook's sound card though

    Off topic: Also I have rigged up my laser projector hardware for 95%, I need to replace a pot and a mirror and I can test it! Check out how this old computer power supply makes an excellent casing!
    Attached Thumbnails Attached Thumbnails Picture 004.jpg  

    Picture 006.jpg  

    Picture 005.jpg  

    Picture 003.jpg  


  10. #10
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,334

    Default

    Quote Originally Posted by s060340 View Post
    Laserwinkel already mentioned it, actually (2nd post)..

    Still, I want to continue my project because I'm gaining very much experience in programming and hardware communication (in fact this is only my 2nd serious programming project)

    As mentioned in my previous post, the main problem (in fact, the only problem left) is the output of the sound card..

    Did you get that problem too? or did you use a ILDA-interface output?

    I have ordered a external sound card of which i can try to eliminate the end caps - don't want to mess with my notebook's sound card though

    Off topic: Also I have rigged up my laser projector hardware for 95%, I need to replace a pot and a mirror and I can test it! Check out how this old computer power supply makes an excellent casing!
    Aha, great, I didn't click that link.

    About using a sound card, actually, early on I have written a dll interface to make a sound card act like a laser projector controller. Search for 'EzAudDac' and you'll find it. It also has a schematic of what you can do to use the sound card as a laser controller. I can give you the dll interface definitions if you want to use it, it makes sending frames to a sound card a lot easier.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •