We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f0b4a24 + 657578f commit 4d69e78Copy full SHA for 4d69e78
plantcv/plantcv/find_objects.py
@@ -32,6 +32,8 @@ def find_objects(img, mask):
32
if len(np.shape(ori_img)) == 2:
33
ori_img = cv2.cvtColor(ori_img, cv2.COLOR_GRAY2BGR)
34
objects, hierarchy = cv2.findContours(mask1, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)[-2:]
35
+ # Cast tuple objects as a list
36
+ objects = list(objects)
37
for i, cnt in enumerate(objects):
38
cv2.drawContours(ori_img, objects, i, (255, 102, 255), -1, lineType=8, hierarchy=hierarchy)
39
0 commit comments