I have not been able to format my numpy array the way I want it.I checked several post like How to remove specific elements in a numpy array most seemed close but none has what I want. If this question is a repition point me in the right direction.
im2, contours, hierarchy = cv2.findContours(th2,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
contours gives me this:
print(contours)
I get this:
[array([[[618, 737]]], dtype=int32), array([[[615, 737]]], dtype=int32), array([[[656, 731]],
[[655, 732]],
[[651, 732]],
[[649, 734]],
[[648, 734]],
[[647, 735]],
[[646, 734]],
[[645, 735]],
[[644, 735]],
[[643, 736]],
[[641, 736]],
[[640, 737]],
[[686, 737]],
[[686, 734]],
but I'd like to get an output that could give me a tuple in this format:
(x, y)
or if there was another way I could access the integers in the array that would be neat I already tried but did not get what I want
contours = tuple(map(tuple, contours))
contours = totuple(contours)
please help I'm a newbiee