Passing an image form python to matlab compiled code
Show older comments
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.
Answers (1)
sudheer devulapalli
on 18 Dec 2018
0 votes
you can split the layers and pass them to your function, then you can apply layerstack on recieved arguments.
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!