none
Starting WebCam service

    Question

  • I'm trying to use the webcam service, but I'm not being successful.

     

    I start has stated in the example and I get this response:

     

    C:\Microsoft Robotics Studio (1.5)>dsshost /p:50000 /m:"c:\Microsoft Robotics St
    udio (1.5)\samples\config\WebCam.manifest.xml"
    *   Service uri:  [08/28/2007 19:04:02][http://robotica3:50000/directory]
    *   Service uri:  [08/28/2007 19:04:03][http://robotica3:50000/constructor/8ceab
    554-82b6-4b20-9f16-499ebcec59f7]
    *   Starting manifest load: file:///c:/Microsoft%20Robotics%20Studio%20(1.5)/sam
    ples/config/WebCam.manifest.xml [08/28/2007 19:04:04][http://robotica3:50000/man
    ifestloaderclient]
    *   Manifest load complete [08/28/2007 19:04:06][http://robotica3:50000/manifest
    loaderclient]

     

    Log:

     

    Service cannot start. No cameras enumerated: System.Runtime.InteropServices.COMException (0x80040275): Exception from HRESULT: 0x80040275 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at Microsoft.Robotics.Vision.Camera.get_BaseFilter() at Microsoft.Robotics.Vision.FrameGrabber.FromCamera(Camera camera) at Microsoft.Robotics.Vision.Camera.get_Formats() at Microsoft.Robotics.Services.MultiDeviceWebCam.WebCamService.<GetInitialState>d__b.MoveNext() in C:\Microsoft Robotics Studio (1.5)\samples\Sensors\WebCam\WebCam.cs:line 188

    Category StdError
    Level Error
    Time 2007-08-29T13:16:07.7718123+01:00
    Subject Service cannot start. No cameras enumerated: System.Runtime.InteropServices.COMException (0x80040275): Exception from HRESULT: 0x80040275 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at Microsoft.Robotics.Vision.Camera.get_BaseFilter() at Microsoft.Robotics.Vision.FrameGrabber.FromCamera(Camera camera) at Microsoft.Robotics.Vision.Camera.get_Formats() at Microsoft.Robotics.Services.MultiDeviceWebCam.WebCamService.<GetInitialState>d__b.MoveNext() in C:\Microsoft Robotics Studio (1.5)\samples\Sensors\WebCam\WebCam.cs:line 188
    Source http://robotica3:50000/webcam
    CodeSite Boolean MoveNext()() at line:196, fileC:\Microsoft Robotics Studio (1.5)\samples\Sensors\WebCam\WebCam.cs

     

    When I check in the control panel nothing it seems nothing happens (the webcam service is not started)

     

    I've checked both VFW and WDM drivers and both work normally (with AMCAP app for example). All webcamera based applications work normally too.

     

    Any hint?

     

    Best Regards

     

    Germano Veiga

     

     

     

    Tuesday, August 28, 2007 7:01 PM

Answers

  • I found the problem.

     

    One of the cameras listed by Microsoft.Robotics.Vision.CameraCollection() didn't have any "suported format" neither "path". This made the service dropp with an exception "no cameras enumerated".

    This was caused by a UEye USB camera (industrial camera) that was listed in the system (it was not connected at the time).

    I solved it with a smaller try catch, that allows the other cameras to be listed.

     

     

    Best Regards



    Germano Veiga

     

     

     

     

    Wednesday, August 29, 2007 6:12 PM

All replies

  • Hi,

    The source for the webcam service is in C:\Microsoft Robotics Studio (1.5)\samples\Sensors\WebCam

    Camera enumeration is done by a black box call to vision.CameraCollection();  in GetInitialState();  If you know the device path of your camera, you might be able to fake it by inserting a few lines of code that manually instantiate the camera instance. YMMV

    R

    Wednesday, August 29, 2007 4:36 PM
  • I found the problem.

     

    One of the cameras listed by Microsoft.Robotics.Vision.CameraCollection() didn't have any "suported format" neither "path". This made the service dropp with an exception "no cameras enumerated".

    This was caused by a UEye USB camera (industrial camera) that was listed in the system (it was not connected at the time).

    I solved it with a smaller try catch, that allows the other cameras to be listed.

     

     

    Best Regards



    Germano Veiga

     

     

     

     

    Wednesday, August 29, 2007 6:12 PM