I am using Sikulix.jar to search images in my project. My code is as follows:
Finder f;
Match m;
Points2D coords = new Point2D.Double(-1, -1);
try {
f = new Finder(ImageIO.read(new File("my_large_image.png")));
f.find(ImageIO.read("my_sub_image.png"));
if (f.hasNext()) {
m = f.next();
coords.setLocation(m.getTarget().getX(), m.getTarget().getY());
}
} catch (IOException e) {}
The image to be found is just a part of the large image. However the coords always returns (-1, -1). Any helps about the implementation? Thank you.
Update 11/25 I may found a solution but I do not know if it is correct. The image is found when I scale my testing large image down (from 1080*1920 to 540*960). But the similarity is 0.66.