Skip to content

Tag: cv2

1 px thick line cv2

I need to draw a line in an image where no pixel is thicker than 1 pixel in the horizontal dimension. Despite I use thickness=1 in poly lines, in the resulting plot there may be 2 pixels horizontally adjacent set to 255, like in this pic: How can I prevent to have adjacent pixels set to 255? Or equivalently: …

How to add a delay when saving video frames as images

I have a series of videos and I want to save frames from them as images. This is my code: This code works but unfortunately, it takes a frame at every millisecond. This is not something I want. Instead, I want to save a frame at every 5 or 10 seconds. I thought about adding a time delay but that