List of usage examples for org.opencv.core Point equals
@Override public boolean equals(Object obj)
From source file:imageanalysis.Analyzer.java
public boolean compareRoiAgainstPattern(int xcoord, int ycoord, int width, int height) { screen = ImgTools.getImageFromClipboard(); // Crops roi around chosen mouse point Rect roi = new Rect(xcoord - width / 2, ycoord - height / 2, width, height); Mat actionButton = screen.submat(roi); // Preprocessing Imgproc.cvtColor(actionButton, actionButton, Imgproc.COLOR_BGR2GRAY); // Imgproc.medianBlur(actionButton, actionButton, 5); // Referent pattern Mat bonefoodPattern = Patterns.getBonefoodPattern(); // Imgproc.medianBlur(bonefoodPattern, bonefoodPattern, 5); // Match template // ... result should be the refPoint Mat result = new Mat(); Imgproc.matchTemplate(actionButton, bonefoodPattern, result, Imgproc.TM_SQDIFF); Point p = Core.minMaxLoc(result).minLoc; // System.out.println(p.toString()); return p.equals(refPoint); }