You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Match(Region):
""" Extended Region object with additional data on click target, match score """
def init(self, score, target, rect):
super(Match, self).init(rect[0][0], rect[0][1], rect[1][0], rect[1][1])
self._score = float(score)
if not target or not isinstance(target, Location):
raise TypeError("Match expected target to be a Location object")
self._target = target
def getScore(self):
""" Returns confidence score of the match """
return self._score
def getTarget(self):
""" Returns the location of the match click target (center by default, but may be offset) """
return self.getCenter().offset(self._target.x, self._target.y)
def __repr__(self):
return "Match[{},{} {}x{}] score={.2f}, target={}".format(self.x, self.y, self.w, self.h, self._score, **# self.target.getTuple())**
The text was updated successfully, but these errors were encountered:
class Match(Region):
""" Extended Region object with additional data on click target, match score """
def init(self, score, target, rect):
super(Match, self).init(rect[0][0], rect[0][1], rect[1][0], rect[1][1])
self._score = float(score)
if not target or not isinstance(target, Location):
raise TypeError("Match expected target to be a Location object")
self._target = target
The text was updated successfully, but these errors were encountered: