CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Posts
    4

    Arrow Webcam Capture problem

    Hello Everyone

    Currently , I am facing a stubborn problem capturing video from a webcam using JAVA.
    i've used JMF and OpenCV:

    JMF: it worked fine on my machine (check the specs below) .. but refused to work on any other machine i've tested ! ...
    the problem is with JMStudio ... although the webcam is present in the capture device list , when i select "capture" and choose the default options of the JMStudio's capture dialog box ..... another dialog box appears !!! , asking me to select the video source device , so i do , then an error box "Could not initialize capture device" .. and nothing happens !
    (the "select video source" box belongs to the javaw.exe process)

    OpenCV (wrapped for JAVA ubaa.net/shared/processing/opencv/):
    it worked fine on my machine also ... but failed on all other tested machines (see their specs below) ... when the program starts to capture , the same "select video source device" dialog appears ... then i select my webcam from the list .... i get a black screen ... no data is received from the buffer at all ! (also , opencvObj.width & height are both ZERO)

    i've also tried OpenCV through the "Processing" library ... but of no use


    Notes:
    1. my machine (that works) is older than the other tested machines (2008 vs 2010)
    2. my machine's webcam supports RGB ... other webcams support YUV ONLY ... (YUV works fine on my machine with JMF btw)
    3. I am using the latest version of JDK & JMF , but OpenCV v1.0 (for the wrapper to work correctly)

    Specs:
    1. my machine (webcam works fine in ALL cases):
    webcam: Creative Integrated webcam
    OS: Win7 32-bit

    2. other machines i've tested:
    webcam: HP integrated webcam - Dell integrated webcam
    OS: win7 32-bit & win7 64-bit


    Can anyone guide me to reach a solution ?

    Thanks

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Webcam Capture problem

    Did you run any installation programs on your machine when setting up JMF and/or OpenCV and, if so, did you run the same installation programs on the other machines or did you just copy over the jars etc.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  3. #3
    Join Date
    Oct 2010
    Posts
    4

    Re: Webcam Capture problem

    Quote Originally Posted by keang View Post
    Did you run any installation programs on your machine when setting up JMF and/or OpenCV and, if so, did you run the same installation programs on the other machines or did you just copy over the jars etc.
    I've installed JMF/OpenCV1.0 on all tested machines .. and used eclipse IDE to run/debug my program.

    Appreciating your help.

  4. #4
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Webcam Capture problem

    Unfortunately that's about the limit of my help. I know nothing about using webcams with java. I only mentioned the installation program because I had similar issues with hardware some time ago and eventually tracked it down to the installation program quietly adding DLL's to the OS which of course you don't get if you just install your application and the associated jars on another machine.

    Sorry I can't be of more help.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  5. #5
    Join Date
    Oct 2010
    Posts
    4

    Re: Webcam Capture problem

    Thanks you, keang.


    Can anyone help me ?

  6. #6
    Join Date
    Oct 2010
    Posts
    4

    Re: Webcam Capture problem

    any help ?

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

Featured