Image recognition not working, always matches over 95%
Posted: Tue Jul 05, 2016 5:08 pm
Hey,
I'm having some problems with image recognition. What I would like to do is have a screenshot of a map (repository item named canvas), and i have specific places on this map (screenshots of the map in various locations), and I would like to validate that they appear within a certain amount of time (5 seconds) when the map goes to those locations.
The problem at I am coming across is that it will almost always validate the images no matter where they are or what they look like. I had the similarity at 0.98 before which prevented most of the incorrect validations but also didn't correctly validate sometimes, but just about everywhere on the map will be successful at 0.95. I added EdgesSobel hoping this would solve the problem as the edges should be very different but it will still work.
I've tried using 'Validate.ContainsImage()' and I can't seem to get anywhere with that. I also made a screenshot of the map at real time, resized it to be bigger and then tried 'Imaging.contains()' but again no luck there. They both have very high similarity rates even when the images don't look alike at all.
Main questions:
1-I was trying to use 'Imaging.Find()' to find where the similarities were but I'm unsure how to post the results of this to the report and check where all the similarities are in the images. Is there a way to do this?
2-How does the imaging validation.contains work, pixel by pixel or if there is just a similar amount of pixels contained anywhere in the images?
3-I'm also wondering if someone can point me in the right direction for my image validation. I've attached a zip containing the current images I'm working with. I'm hoping the 'image_to_check_fail' and 'image_to_validate ' should have a low similarity as the image doesnt exist in it, where as 'image_to_check_successful' should have a very high similarity as it is contained in it.
I've attached a zip containing 3 images:
image_to_check_successful (matching against this should be successful)
image_to_check_fail (matching against this should fail)
image_to_validate (this is the image which should be found)
I'm having some problems with image recognition. What I would like to do is have a screenshot of a map (repository item named canvas), and i have specific places on this map (screenshots of the map in various locations), and I would like to validate that they appear within a certain amount of time (5 seconds) when the map goes to those locations.
The problem at I am coming across is that it will almost always validate the images no matter where they are or what they look like. I had the similarity at 0.98 before which prevented most of the incorrect validations but also didn't correctly validate sometimes, but just about everywhere on the map will be successful at 0.95. I added EdgesSobel hoping this would solve the problem as the edges should be very different but it will still work.
I've tried using 'Validate.ContainsImage()' and I can't seem to get anywhere with that. I also made a screenshot of the map at real time, resized it to be bigger and then tried 'Imaging.contains()' but again no luck there. They both have very high similarity rates even when the images don't look alike at all.
Main questions:
1-I was trying to use 'Imaging.Find()' to find where the similarities were but I'm unsure how to post the results of this to the report and check where all the similarities are in the images. Is there a way to do this?
2-How does the imaging validation.contains work, pixel by pixel or if there is just a similar amount of pixels contained anywhere in the images?
3-I'm also wondering if someone can point me in the right direction for my image validation. I've attached a zip containing the current images I'm working with. I'm hoping the 'image_to_check_fail' and 'image_to_validate ' should have a low similarity as the image doesnt exist in it, where as 'image_to_check_successful' should have a very high similarity as it is contained in it.
I've attached a zip containing 3 images:
image_to_check_successful (matching against this should be successful)
image_to_check_fail (matching against this should fail)
image_to_validate (this is the image which should be found)