Skip to content
Advertisement

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: what

Unable to deploy python program with cx_freeze due to cv2

So I have a fairly large python program that I want to port to other machines (ubuntu 18.04) without having to install all the python packages and dependencies for each machine, I chose to use cx_Freeze for this and it seems to build the project fine into a single executable but the executable crashes when calling cv2.imshow. I managed to

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

Flipping an image vertically in Python without using flip() method

I’m trying to flip an image vertically without using any default flip() or similar functions.I tried to iterate along the pixels and by using loops tried to reverse it so i can flip the image vertically. But the flipped image is looking like this: https://ibb.co/KKVkd2d What am i doing wrong? Answer To flip vertically you have to reverse rows in

Advertisement