MATLAB: Pass image to Matlab function from Python script

image processingpython to matlab

I want to pass image(which is numpy array) read using cv2.imread() in python
image = cv2.imread(path_to_image,0)
to a matlab function which processes this image
function a = AngleDetect(image)
Iam getting error as – unsupported Python data type: numpy.ndarray also tried formatting the image to
mat_a = matlab.double(image.tolist())
but in vain.

Best Answer

I found the solution to this problem in this forum Pass image from Python to a MATLAB function
Related Question