cancel
Showing results for 
Search instead for 
Did you mean: 

Two Almost Identical Images

AlexAppelgren
Level 2
Hi, I'm trying to compare two almost identical images in two different stages. In the first stage I want to check if a checkbox is either white or not. The problem i'm having here is that the checkbox I'm working with is in a scanned document, so the background colour of the image is not white, but as much white it can get before it is actually white. I tried to us the 'Utility - Image Manipulation - Image is White' object, but this object only check for hex code (colour) ffffff (white). So now I'm wondering, is there any way to decide if an image is white-ish and note dark? In the second stage I want to see if a scanned pdf document contains a certain Logo. Right now im using a wait stage to see if condition 'Matches Image' can be satisfied. But as a result of that the image is scanned, the pixels are not identically laid out and therefor the condition is not satisfied. So I'm wondering, is there any way to see if two images Matches to, lets say, 90%? All Good!
2 REPLIES 2

John__Carter
Staff
Staff
Hi Alex - there are many 'nearly the same' matching algorithms out there but at present BP doesn't provide any out-of-the-box. If you wanted to implement one you'd need to use a code stage.   For the 'nearly white' image, you could try converting the image to pure black and white first. Again, you'd need a code stage to do this I'm afraid.

AlexAppelgren
Level 2
You dont happen to sit on any code/solution for the logo issue? The other issue I solved with the following code: Dim c as System.Drawing.Color Dim counter as integer White = False counter = 0 For y As Integer = 0 To Image.Height - 1   For x As Integer = 0 To Image.Width - 1      c = Image.GetPixel(x, y)      If c.Name(2) ""f"" or c.Name(4) ""f"" or c.Name(6) ""f"" Then           counter = counter + 1              If counter > 5 then                    White = False                    Exit Sub              End If      End If    Next Next White = True