I have a working compiled Matlab code which I compiled using Matlab compiler. All I need to do is pass the image I obtain from python (ndarray) to the matlab compiled function. Only thing here is I would not have a matlab in the new machine where I use my compiled code. For better understanding
import mymatlabcompiledpackage
eng=mymatlabcompiledpackage.initalize() // initalizes everything from my matlab code without requiring matlab. I have also intalled matlab runtime
im=misc.imread('imglocation')
// below is the issue
out=eng.myfunction(im) // I cannot pass im here since it is ndarray
The solution that i know which works is pass matlab.uint8(im.tolist()) but for this i need the matlab.engine which requires matlab. Since I have already compiled every other function that i wrote in matlab. I just wish to know is there a way I could just pass an RGB image in a format that doesnt require me to use matlab engine.

답변 (1개)

sudheer devulapalli
sudheer devulapalli 2018년 12월 18일

0 개 추천

you can split the layers and pass them to your function, then you can apply layerstack on recieved arguments.

카테고리

도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

질문:

2017년 5월 30일

답변:

2018년 12월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by