Detecting feature
Roland from South Africa  [107 posts]
11 year
Hi All

I'm trying to figure out how to recognise a feature, by doing an image comparison, if thats the best way. I need to get a better idea of what it is about the image that makes it important.

To prevent spurious matches, is it better to mask off the reference image, much like you were looking at it through a keyhole? I imagine that if the reference image was just a square crop, with large contrasts near the edges, it would factor largely in the mathematics?

Attached are two images. One is the subject, where I am trying to detect the presence of a screw. The second is what I presume to be a good reference match image. Am I going about it in the right way?

Any suggested robo files would be most welcome.


Roland from South Africa  [107 posts] 11 year
Some more.. postamble..

I think a strategy to detect the screw, besides a simple image match, would go something like this;
- increase the contrast until the oval black hole is more distinct
- use the blob feature to select it by size
- use the blob XY location as a floating reference point marker
- keep a small hole mask overlay at X+a, Y-b (screw location)
- detect light level at this point

if there's reflection, light indicates screw presence. Is this feasible?


Steven Gentner from United States  [1446 posts] 11 year

Yes, you can use the black part as an anchor and then detect the light level of the screw relative to that black part. That's a good way to do this.

You'd also want to adjust based on the size of the black hole so that scale (distance from the camera to the object) is also not a factor. You can also do rotation too.

If you have a second image that shows the screw missing we can show you how to use the image_align module to align the image to a know template image which you can then just check the screw intensity always at the same location (i.e. you would not need to adjust for all the parameters)


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index