Image background in image recognition

조회 수: 1 (최근 30일)
Mats
Mats 2019년 12월 14일
댓글: Image Analyst 2020년 1월 9일
Hi!
I want to find all occurences of this symbol in an image and is currently using CORR2 with a function that steps pixel-by-pixel through a larger image and try to find this symbol. The problem i find is that there are multiples of this symbol partially overlapping which it doesnt recognize as the image i compare to has a white background. How can I make corr2 (or a similar setup) to only match based on the black arrms of the symbol and not the background?
(Although image is attached it does not show, it is essentially a symbol with two crosses overlayed with one tilted 45 degrees.)
  댓글 수: 4
Image Analyst
Image Analyst 2020년 1월 6일
Yep, I think my code (in my answer below) will find it. Did you even try it? If not, why not?
Mats
Mats 2020년 1월 8일
Hi!
Haven't tried it due to winter holidays =)
Will try it this week and get back to you afterward

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2020년 1월 6일
See attached demo that uses normxcorr2() to find a template in a larger image.
  댓글 수: 2
Mats
Mats 2020년 1월 9일
Hi, I tried that one in 16 iterations where in each iteration I removed the mark it had identified and rerun the function. The result starts out good but then diverges and finds all sorts of other symbols (see attached screenshot).
Do you have a suggestion how to enforce the oblique lines in the correlation?
Image Analyst
Image Analyst 2020년 1월 9일
Try raising the threshold to make sure it gets regions that are only really VERY close to the template.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by