Karthik_elan
Karthik_elan

Reputation: 333

opencv: Manipulating edge-detected pixels

I am new to opencv image processing.

My task is simple. I have a canny-edge detected image. I have to get rid of some edge-detected pixels. For example, at the coordinates of say (20,20), the edge-detected pixel should be eliminated.

Is there any possibility to get some solution?

I would be really thankful if any of you can guide me in solving this.

Thank you very much, Karthik

Upvotes: -1

Views: 426

Answers (2)

Soumyajit
Soumyajit

Reputation: 445

You can change the parameters of the Canny edge detection and tune them to your needs. If you only want a specific point or say finite specific knows points which you want to get rid off then just access the underlying pixel data and set it to 0. width = image.cols i = y-position, j = x-position image.data[i*width + j] = 0.

Upvotes: 0

user2518618
user2518618

Reputation: 1407

The canny output is just a binary black and white image. You can use the drawing methods to paint the pixels in black.

Upvotes: 0

Related Questions