Forum Discussion
The current compare method doesn't give me enough flexibility other than just ignoring a specific number pixel differences. This method results in many false positives or if tolerance is set it too high it ends up missing actual problems. The compare method is much much faster and must be doing something similar to what I am trying to do so it seems this should be possible.
Do you have any suggestions on alternative tools or other methods that are not "this nested loop deal"?
ChiefBrian wrote:
The current compare method doesn't give me enough flexibility other than just ignoring a specific number pixel differences. This method results in many false positives or if tolerance is set it too high it ends up missing actual problems. The compare method is much much faster and must be doing something similar to what I am trying to do so it seems this should be possible.
Do you have any suggestions on alternative tools or other methods that are not "this nested loop deal"?
Quick google search found an image diff tool by Perforce, there's a commandline utility by Image Magick, guiffy software has an Image Diff Tool... so, yeah, bunch of them out there.
However, what you'll find with all of these is that every one of them has similar stuff about setting image threshholds, tolerance, color depth, etc.... so, much like Region.Compare, you'll still need to "tweak" the settings in order to find that sweet spot. So, no matter what you do, either with something you write custom, or if you use some other available utility, you'll run into the same pitfalls you mentioned of false postives, false negatives, etc., due to those VERY subtle differences in bitmap renderings that are always the case with any digital image. Even if you take two screenshots of the EXACT same component on the EXACT same screen in the EXACT same version of the software, there will STILL be slight differences in pixels due to just the way things are rendered via the graphics processor of a machine... you can't get away from it, unfortunately.
As Colin_McCrae said, you're attempting to do something in an interpreted language which is executed, not as a compiled executable, but via an engine that is literally reading the script line by line... it will ALWAYS be slower than any compiled tool... it's best to either use TestComplete's built in routine or one of these other utilities if speed is your concern... but regarding your desired accuracy... not sure you'll find anything.... best of luck!
- Colin_McCrae9 years agoCommunity Hero
If you want some other samples, in a veritable multitude of different languages, there are a pile of them here:
https://rosettacode.org/wiki/Percentage_difference_between_images
There are a few languages TestComplete supports in there. But, as already mentioned, they'd still be interpreted, and thus slow.
Of the non-supported stuff, there are probably some in there you could tweak, compile, and link to TestComplete.
But, for all the reasons already mentioned, you're not likely to gain much over the built in methods.
Related Content
- 3 months ago
- 10 years ago
Recent Discussions
- 16 hours ago
- 7 days ago
- 10 days ago