简体   繁体   中英

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:


在此处输入图片说明


Any idea or algorithm for this?

Thanks in advance.

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

my2c

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM