Skip to content
Advertisement

Tag: image-processing

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

How to apply an operation to every PIXEL (not every rgb component!) of a python image (either using numpy, opencv or PIL)?

I’m trying to apply a function over all pixels of an image (in my specific case I want to do some colour approximation per pixel, but I don’t think this is relevant for the problem) in an efficient way. The thing is that I’ve found different approaches to do so, but all of them apply a function over each component

Detect rectangles in an image with Python

I have a large collection of binary images like these ones: On each image I need to detect the white rectangle. The rectangles have different dimensions and orientations and sometimes they are interrupted by a black line (see image 2). I think the problem is easy to solve if one could remove the noisy background. Thus, I tried first using

Advertisement