|
| def | __init__ (self, PuzzleTemplate y=None, r=(0, 0), id=None, theta=0, pieceStatus=PieceStatus.UNKNOWN) |
| | Constructor for the regular puzzle piece. More...
|
| |
| def | printEdgeType (self) |
| |
| def | rotatePiece (self, theta) |
| |
| def | setEdgeType (self, direction, etype) |
| | Set up the type of the chosen edge. More...
|
| |
| def | __init__ (self, PuzzleTemplate y=None, r=None, centroidLoc=None, id=None, theta=0, pieceStatus=PieceStatus.UNKNOWN) |
| | Constructor for template class. More...
|
| |
| def | deepcopy (self) |
| |
| def | displace (self, dr) |
| | Displace puzzle piece. More...
|
| |
| def | display (self, fh=None) |
| | Display the puzzle piece contents in an image window. More...
|
| |
| def | genFeature (self, theMatcher) |
| |
| def | getFeature (self, theMatcher=None) |
| | Get the feature vector of the puzzle piece. More...
|
| |
| def | getGraspLoc (self, kernel_size=10) |
| | Get the location in pixel coordinates to send the suction cup gripper to grasp the piece. More...
|
| |
| def | getMask (self, theMask, offset=[0, 0]) |
| | Get an updated mask of the target. More...
|
| |
| def | placeInImage (self, theImage, offset=[0, 0], CONTOUR_DISPLAY=False) |
| | Insert the puzzle piece into the image in the original location. More...
|
| |
| def | placeInImageAt (self, theImage, rc, theta=None, isCenter=False, CONTOUR_DISPLAY=True) |
| | Insert the puzzle piece into the image at the given location. More...
|
| |
| def | replaceSourceData (self, theImage, pOff=None) |
| | Replace a puzzle pieces source data by grabbing from an image. More...
|
| |
| def | rotate (self, theta) |
| | Rotate piece appearance by given angle. More...
|
| |
| def | setPlacement (self, r, isOffset=False, isCenter=False) |
| | Provide pixel placement location information. More...
|
| |
| def | setStatus (self, theStatus) |
| |
| def | size (self) |
| | Return the dimensions of the puzzle piece image. More...
|
| |
| def | toImage (self) |
| | Return the puzzle piece image (cropped). More...
|
| |
| def | update (self, matchedPiece) |
| | Update template board puzzle piece based on association. More...
|
| |
|
| def | buildFromMaskAndImage (theMask, theImage, cLoc, rLoc=None, pieceStatus=PieceStatus.MEASURED) |
| | Given a mask (individual) and an image of same base dimensions, use to instantiate a puzzle piece template. More...
|
| |
| def | upgradeTemplate (thePiece) |
| | Given a Template instance, transfer to a Regular instance. More...
|
| |
| def | buildFromFullMaskAndImage (theMask, theImage, cLoc=None, rLoc=None, pieceStatus=PieceStatus.MEASURED) |
| | Given a mask and an image of same base dimensions, use to instantiate a puzzle piece template. More...
|
| |
| def | buildFromMaskAndImage (theMask, theImage, cLoc=None, rLoc=None, centroidLoc=None, pieceStatus=PieceStatus.MEASURED) |
| | Given a mask (individual) and an image of same base dimensions, use to instantiate a puzzle piece template. More...
|
| |
| def | buildSphere (radius, color, rLoc=[0, 0]) |
| | Build a sphere piece. More...
|
| |
| def | buildSquare (size, color, rLoc=[0, 0]) |
| | Build a square piece. More...
|
| |
| def | getEig (img) |
| | To find the major and minor axes of a blob and then return the aligned rotation. More...
|
| |
A puzzle has Regular pieces when they are all of a consistent sizing such that their edge structure can be compared in a standard North, South, East, West approach.
Usually Regular pieces are part of a Gridded puzzle.