I have numpy ndarray, result of opencv findContours().
I want to convert each element of the result from numpy array to tuple of tuples efficiently.
Tried tolist(), asarray() etc but none of them give me the exact result.
example
numpy array:
[[[191 307]]
[[190 308]]
[[181 308]]]
to tuple of tuples:
((191,307),(190,308),(181,308))
update
tuple(elements[0])
return
(array([[191 ,307]], dtype=int32),array([[190, 308]], dtype=int32),array([[181,308]], dtype=int32))