Harph
Harph

Reputation: 2296

Binary Image Corner Detection

I have a matrix that represents a binary image (1 for each cell that represents "black" pixels and 0 for "white" ones). The black pixels represent the figures (shape and fill) of the image and the white ones the background. What I want to do is to detect the corners of the figures represented in the matrix.

2 examples:


enter image description here


Any idea or algorithm for this?

Thanks in advance.

Upvotes: 1

Views: 2006

Answers (2)

user475353
user475353

Reputation:

If I understand you correctly there is a template using C++ that allows you to scan each pixel, and you could do that and replace the black's with 1's and white with 0's.

I had to do a similar thing when I did webcam color detection with opencv. I can show you the part of the code im talking about if you like? Although I may be misunderstanding your question. However my code allows you to scan each pixel (or frame altho mine is taken from a web-cam you could do the same with an actual picture too)

Upvotes: 0

neuro
neuro

Reputation: 15180

Try the opencv libraries, they have python bindings and a lot of algorithms to do corner detection.

my2c

Upvotes: 5

Related Questions