Run a MATLAB script from python + pass args

前端 未结 2 1741
Happy的楠姐
Happy的楠姐 2020-12-09 11:32

I am looking to from MATLAB from Python. I need to use the MATLAB Image Acquisition Toolbox to acquire few images from a video camera.

MATLAB seems to be a nice solu

2条回答
  •  遥遥无期
    2020-12-09 12:11

    1. Python/OpenCV: you could use the native solution to acquire images from your video device. With OpenCV you can even do real-time image processing.
    2. matlab_wrapper: assuming that you have a MATLAB function (not script) that accepts some parameter and returns image array, e.g. [img] = get_image(some_parameter), you could write something like this:
    matlab = matlab_wrapper.MatlabSession()
    img = matlab.workspace.get_image(some_parameter)
    

    Disclaimer: I'm the author of matlab_wrapper

提交回复
热议问题