2020-09-05 07:25:07 -0600 | marked best answer | Difference in drawn result between cv2.drawContours and drawing contours with a loop Hello I am hoping someone could help me understand this strange result I stumbled upon today while drawing contours. When I draw all the contours at once with cv2.drawContours(image, contours, -1, (255, 50, 255),1) I get a nice result: However, when I draw each contour individually by looping through the contours with a for loop: for cnt in contours: cv2.drawContours(blank2, cnt, -1, (255, 50, 255), 1) I get a very low quality result where the car shape is not even fully outlined anymore I have tried displaying the images with cv2.imShow, zooming in, increasing line thickness and I keep getting this weird result. Is there a difference I do not know about between drawing the contours in these two different ways? I have copy pasted my code below. Thank you for your help! |
2020-06-18 04:34:38 -0600 | commented answer | Difference in drawn result between cv2.drawContours and drawing contours with a loop Aaaaahhhh Thank you!!! Ive been copy pasting without checking my arguments. Glad I can blame python and not myself : ) |
2020-06-18 04:28:19 -0600 | received badge | ● Student (source) |
2020-06-18 04:11:26 -0600 | asked a question | Difference in drawn result between cv2.drawContours and drawing contours with a loop Difference in drawn result between cv2.drawContours and drawing contours with a loop Hello I am hoping someone could he |