locked
Is it possible to communicate between services in C# and C++ RRS feed

  • Question

  • Hi,

    I want to process images from both a webcam and a simulated webcam. The task is to extract features from both images and I would like to use OpenCV. OpenCV only supports C++ which is a bugger. I know that there have been some attempts trying to wrap OpenCV functunality into C#, but it seems diffucult to me. Most services in MSRS are written in CSharp but as I understand services can also be written in C++. So my question is, is it possible run one service written in CSharp and one written in C++ under the same node, and is it possible for them to communicate with each other.

    Please give me code samples of how to write a service in C++

    If you know any good image processing libraries for C#, that can extract features such as circles, lines, blobs, ect, please let me know.

    Thanks
    Anders
    Thursday, November 8, 2007 8:02 AM

Answers

  • Hi Anders
    I am currently using a combination of services written in both C# and C++ and it works fine. The only problem seem to be that MSRS Services written in C++ uses special .Net C++ features such a managed classes, which makes it a bit more difficult to interface to more basic C++ libraries - however it is possible.

    You can find links to a range of MSRS C++ tutorials here:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1935994&SiteID=1



    Regards
    - Lars-Peter

    Thursday, November 8, 2007 10:02 PM
  •  

    There are also slightly more advanced tutorials here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2091502 about integration between MSRS and DDK which go through several concepts that apply to other native to managed interop scenarios.

     

    Pavel

    Monday, November 12, 2007 7:40 PM

All replies

  • The three off-the-shelf products I'm aware of:
    1. VOLTS-IQ http://volts-iq.com [shameless self-plug].  VOLTS does high-level vision, like tracking and object detection.  The augmented webcam service also does basic edge detection but you'd have to write your own line/circle extractor.
    2. Roborealm  http://www.roborealm.com/  Roborealm has an MSRS API and lets you do some of the low-level vision tasks you're describing.
    3. MSRS samples.  MSRS ships with a color blob detector.  I haven't played with it much so can't comment on its performance, but the sample code is free.

    It's definitely possible to do interop with openCV but it also definitely involves some pain.  I'd start by reading up on C#/C++ interop in general to get a basic understanding of how it works.

    I haven't tried to write any services in C++.  I'd also be curious to hear from people who have. :-)


    Thursday, November 8, 2007 5:17 PM
  • Hi Anders
    I am currently using a combination of services written in both C# and C++ and it works fine. The only problem seem to be that MSRS Services written in C++ uses special .Net C++ features such a managed classes, which makes it a bit more difficult to interface to more basic C++ libraries - however it is possible.

    You can find links to a range of MSRS C++ tutorials here:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1935994&SiteID=1



    Regards
    - Lars-Peter

    Thursday, November 8, 2007 10:02 PM
  •  

    There are also slightly more advanced tutorials here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2091502 about integration between MSRS and DDK which go through several concepts that apply to other native to managed interop scenarios.

     

    Pavel

    Monday, November 12, 2007 7:40 PM
  • http://code.google.com/p/opencvdotnet/
    Wednesday, May 7, 2008 4:44 PM