Ask Your Question
0

Finding a complex template on a image

asked 2020-07-11 11:20:36 -0600

muroromoi gravatar image

updated 2020-07-12 16:24:23 -0600

I am a beginner and trying to find a shape inside the red square on the picture: image description

The white dot can be in any position inside the circle. The circle placement is not entirely fixed in place.

So far I have tried MatchTemplate with images after Sobel, Canny. I also have tried parsing results of HoughCircles but there were still mistakes.

As a template with mask I have tried using the following:

image description image description

I think the problem could be with the template but I do not know how to correct it.

What would be the correct way to handle the problem?

EDIT: I have tried changing the mask:

image description

But I still do not get the correct result.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-07-11 12:03:00 -0600

berak gravatar image

updated 2020-07-11 12:51:02 -0600

well, the mask should cover the part, where you want to match something.

but your mask looks like it's the all-black inner circle part, that's wrong, you have to cover the red circle, (only !) not the inside (or outside), which are all probably just black, and thus useless

edit flag offensive delete link more

Comments

Show your code! Maybe I can help on this one.

despair104 gravatar imagedespair104 ( 2020-07-11 13:14:29 -0600 )edit

I have tried changing the mask (updated in the question) but still no correct result. Could you advice on that?

muroromoi gravatar imagemuroromoi ( 2020-07-12 16:25:04 -0600 )edit

you need the exact opposite of it (white, where you want it to match, black otherwise)

berak gravatar imageberak ( 2020-07-13 01:11:30 -0600 )edit

I inverted the mask colors but it still does not find the correct image section.

muroromoi gravatar imagemuroromoi ( 2020-07-24 16:59:39 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-07-11 11:20:36 -0600

Seen: 309 times

Last updated: Jul 12 '20