0


I have got a python function in which a neuronal network is implemented to process some image data and I got a simulation software which is written in C, so my goal is to embed the python function in the C code. It worked for me to hand over two parameters to another python function and get back the sum, just to test the approach of embedding python in C. For my actual problem, I want to pass over a two dimensional list, which contains the color value of all pixels of the image I want to process.

In face I found this solution, but this won´t work for me, because I want to pass a list which has the dimensions: [number of pixels in the image] x [3]. 3 is because I´m using the RBG color system.

//Werte einzeln übergebn...
zahl = Py_BuildValue("(iiiii iiiii iiiii)",a[0], a[1], a[2], a[3], a[4],
b[0], b[1], b[2], b[3], b[4],
c[0], c[1], c[2], c[3], c[4]);

ret = PyObject_CallObject(funk, zahl);


So is there another way to easily pass a large list over to my python function?
Would be really cool if somebody could help me, thank you!!!

Felix.A
  • 11
  • 2

0 Answers0