views:

105

answers:

4

how complicated is it to develop a web service which works with matlab's functionality? As my project has a limited time frame, i need to know if there will be any blocking issues.

or is it better to work with openCV?

+1  A: 

While MATLAB can "use" (make requests to) a web service, it is difficult for a web service to control MATLAB. Starting up and shutting down MATLAB takes a long time. When MATLAB is running, it is difficult for it to "listen" and respond to web service requests.

You should partner with someone already familiar with MEX (Matlab Executable and MATLAB External Interface API). http://www.mathworks.com/support/tech-notes/1600/1605.html#intro

Finally, you will need a very recent version of MATLAB whose MEX interface is multithread-safe, and for the multithread part you will have to use the OS-specific threading.

rwong
+1  A: 

You can use the COM interface to Matlab from c#. You can write your own web service in c# that wraps the COM interface.

Lets say you code up your face recognition method in Matlab. Then you create a webservice that :

  1. Takes an image as input parameter
  2. (Maybe) converts it to a Matlab friendly format
  3. Instantiates a Matlab COM object (or resuses a cached instance)
  4. Calls you function in Matlab with the (converted) image
  5. Waits for Matlab to process the image and return facial data.
  6. Returns the facial data to the caller of the web service. Maybe some conversion here too.
Albin Sunnanbo
@Albin: You can do better than using the COM interface, finances permitting. Using the Builder NE toolbox, you can create a .NET assembly from the MATLAB code.
Richie Cotton
A: 

both matlab and opencv has issues on its own, so what exactly are you trying to achieve

fredC