i have not worked on the tool but try these
https://answers.launchpad.net/sikuli/+question/167056
http://nightly.sikuli.de/docs/org/sikuli/script/ImageFinder.html
http://doc.sikuli.org/finder.html
Thank you for the response, I was able to perform comparison using following code:
Finder f = new Finder(<<filepath of expected image>>);
f.find(actual); //actual is an object of Pattern class
if(f.hasNext())
{
System.out.println("Matching");
f.next();
}
else
{
System.out.println("Not matching");
}