Relative Content

Tag Archive for opencvimage-processingcomputer-vision

Extracting individual curves from an image

newbie here with little knowledge on opencv/image-processing with python. I’m trying to extract arrows/curves defined in an image (background – white). So far I tried using contours and a few basic approaches like masks, edge detection etc, but none helped.
Note: the findContours method actually found all the edges but the problem is I couldn’t then extract path of each arrows from it.

Break the curve wherever there is a significant change in the curve

Wherever there’s a significant change in the curve, I need to break the curve with a break thickness of just 1 pixel (I just want to break the curves into multiple parts). I have attached an image for reference. So after i read the image, i am thinning the curve and wherever there are red dots, i need to split it around that area.

OpenCV detect object contours knowing the approximate location of it

As input, I can get a colored photo of any brightness and contrast, all photos have in common that the object of interest is approximately in the middle and that the background of the object is approximately uniform, the object shape is simple (but may vary), as well as it’s texture. Usually the color of the object differs from the background color, and it’s obvious where it is on the picture for a human.
Knowing the approximate object location, am I able to do something with a picture, so that the background can be separated from the object?

Removing white pixels around the object with opencv

I have an object that I want to paste into image but the object has some white pixels that shouldn’t exist on the edges. How can I remove these white pixels? I have tried inpainting but it doesn’t seem to create anything useful. Is there any other method that I can use in OpenCV?