A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Webcam Color Detection

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    2

    Webcam Color Detection

    Hi

    So I'm working on a school project that will work so that a webcam can scan a grid of colors and determine what color it is and there by playing a sound tha is connected to that color. You can then create music by drawing different colors on a grid.
    I know that this is doable in AS3, I just don't know how exactly since im kind of new to this.

    So i managed to import the webcam image to flash, and that's all. How do I Proceed?
    * How do i get the webcam to detect colors? (Green, Blue, Red, Yellow and Black)
    * How do i connect these color detections to start playing a sound/movieclip?

    If anyone has the answers for this I'm really gratefull.
    Thanks in advance!


    This is the code id used to import the webcam.
    Code:
    import flash.media.Camera;
    import flash.media.Video;
    
    
    
    var camera:Camera = Camera.getCamera();
    
    if (camera != null) {
    
    	video.attachCamera(camera);
    } else {
    	trace("You need a camera.");
    	
    	
    }

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center