← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242405]: Get the BufferedImage reference when calling Region.findAll()

 

Question #242405 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242405

    Status: Open => Answered

RaiMan proposed the following answer:
exactly this is in the example:

    // we look in the image taken from reg
    Finder fndr = new Finder(s.capture(reg));
    fndr.findAll("person.png");
    while (fndr.hasNext()) {
      matches.add(new Found(fndr.next(), reg));
    }
    Collections.sort(matches);

    p("ImageMatches %d", matches.size());
    for (Found m : matches) {
      m.getMatch().highlight(debugLight);
    }

instead of an Iterator<Match> you ask the Finder object after findAll
using hasNext and next.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.