I am using a c++ code to do some simulations on an image. At some point, I need to label the image clusters, for which I want to use python ndimage.label
(because it is almost 10 times faster than my labelling code). However, I am very new to python and have no idea how to pass the arguments (image) to python from C++. The search so far has given no results
- in the C++ code, the image is stored as
vector<vector<int>>
- The python code needs the image as
ndarray
- I would like to convert the output labelled array (
ndarray
) from python to avector<vector<int>>
again
Can anyone please suggest how can this be achieved. To begin with, any suggestions will do, although computational time is a big concern for me