|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
OpenCV Histogram puzzle comparator class. More...


Public Member Functions | |
| def | __init__ (self, theParams=CfgHistogramCV()) |
| def | compare (self, piece_A, piece_B, tauMatch=None) |
| def | extractFeature (self, piece) |
| def | score (self, piece_A, piece_B) |
Public Member Functions inherited from MatchDifferent | |
| def | compare (self, piece_A, piece_B) |
| Compare two puzzle pieces. More... | |
Public Member Functions inherited from Matcher | |
| tuple[float, np.ndarray] | estimateAffineMatch (self, piece_A, piece_B) |
| Estimate the rigid affine transform that aligns piece A to piece B. More... | |
| "Matcher" | fit (self, groups, list[str]|None labels=None) |
| Given raw data regarding expected element instances, identify model to differentiate them if possible for this matcher type. More... | |
| "Matcher" | fitFromImageSegmented (self, Irgb, Iseg, hasLabs=False) |
| Given an image and a segmentation, generate fit. More... | |
| def | solveMatchedPuzzle (self, puzzle, sol) |
Additional Inherited Members | |
Static Public Member Functions inherited from Matcher | |
| tuple[np.ndarray, np.ndarray] | pcaFrame (piece) |
| Estimate a signed PCA frame from a puzzle piece's foreground pixels. More... | |
Public Attributes inherited from Matcher | |
| params | |
OpenCV Histogram puzzle comparator class.
| def __init__ | ( | self, | |
theParams = CfgHistogramCV() |
|||
| ) |
@brief Constructor for the puzzle piece histogram class. @param[in] tau Threshold param to determine difference.
Reimplemented from MatchDifferent.
| def compare | ( | self, | |
| piece_A, | |||
| piece_B, | |||
tauMatch = None |
|||
| ) |
@brief Compare histogram features and return the shared PCA alignment.
@return Tuple of ``(is_match, rotation_degrees, affine)``. The affine
transform maps @p piece_A global pixels onto @p piece_B.
| def extractFeature | ( | self, | |
| piece | |||
| ) |
@brief Compute histogram from the raw puzzle data.
See https://opencv-tutorial.readthedocs.io/en/latest/histogram/histogram.html
@param[in] piece Puzzle piece to use.
@param[out] Puzzle piece histogram.
Reimplemented from Matcher.
| def score | ( | self, | |
| piece_A, | |||
| piece_B | |||
| ) |
@brief Compute the score between two passed puzzle piece data. @param[in] piece_A Template instance saving a piece's info. @param[in] piece_B Template instance saving a piece's info. @param[out] Distance of the feature vectors. (Overload if not proper).
Reimplemented from Matcher.