exact image inside image using Finder

Asked by Maniraj on 2017-12-13

Hi,

I am Trying to Find Exact image from the image which i captured for Testing purpose i Edited image little In this case sikuli needs to show not Found but is proceeding in positive case(image Founded) like that it is showing. It should not be.

See below code Request you to suggest better way to find image exactly.. for below code..

                  String imagePath = "/Users/aathi/Desktop/websitestab/temp/"+imageName;
    System.out.println("/Users/aathi/Desktop/websitestab/temp/"+imageName);
    Thread.sleep(2000);
    BufferedImage regionsetimage = ScreenCapture(driver,imageName); // In this ScreenCapture will capture full page screenshot
    //ImageIO.write(regionsetimage, "PNG", new File("/Users/aathi/Desktop/testimage3.png"));
    //Finder has a constructor with a buffered image
    Finder window = new Finder(regionsetimage);// where to search in
    Pattern testImage = new Pattern(imagePath); // what to search
    window.find(testImage); // search and prepare Finder for revealing result
    Match found = null;
    if (window.hasNext())
    {
      found = window.next();
      System.out.println(imageName + " Image found");
    }
    else
    {
      System.out.println(imageName + " Image Not found");
    }

Help me out...

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2017-12-13
Last reply:
2017-12-13
RaiMan (raimund-hocke) said : #1

Please read the docs about Pattern and match score (as mentioned) earlier and get nearer to fully understand the concept of SikuliX.

Can you help with this problem?

Provide an answer of your own, or ask Maniraj for more information if necessary.

To post a message you must log in.