As the title suggests, I have a custom python function that processes images. I would like to read in an image using matlab, pass this image to the python function, and then receive the modified image that the python function returns. The caveat here is that the python function contains modifications from non-standard python library (such as PIL).
I've tried something as I've shown below, but judging by the off-base error messages I'm receiving, I don't think this was a promising thread. Therefore, I've opted not to show the error messages as I think they might mislead potential solutions.
% Import the python module mod = py.importlib.import_module('mymod');
% Read in the RGB image array inputImage = imread('image.jpg');
% Attempt to modify the image using the custom python function that utilizes PIL and return a modified image array modifiedImage = mod.mymod.some_function(inputImage);
Any help is greatly appreciated, thank you!