|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
Puzzle piece edge based comparison. More...


Public Member Functions | |
| def | __init__ (self, tau_shape=100, tau_color=400) |
| def | compare (self, piece_A, piece_B, method='type') |
| Compare between two passed puzzle piece data. More... | |
| def | process (self, piece, method=None) |
| def | score (self, piece_A, piece_B, method='type') |
Public Member Functions inherited from MatchDifferent | |
| def | __init__ (self, theParams=CfgDifferent()) |
| Constructor for the difference matcher class. More... | |
| def | compare (self, piece_A, piece_B) |
| Compare two puzzle pieces. More... | |
Public Member Functions inherited from Matcher | |
| def | score (self, piece_A, piece_B) |
| Compute the score between two passed puzzle piece data. More... | |
| def | solveMatchedPuzzle (self, puzzle, sol) |
Static Public Member Functions | |
| def | colorFeaExtract (piece, feaLength=300) |
| def | extractFeature (piece, method=None) |
Public Attributes | |
| tau_color | |
| tau_shape | |
Public Attributes inherited from Matcher | |
| params | |
Puzzle piece edge based comparison.
@note Not sure if properly integrated into current code-base. [2024/10/20 - PAV] @todo Need to confirm that works. [2024/10/20 - PAV]
| def __init__ | ( | self, | |
tau_shape = 100, |
|||
tau_color = 400 |
|||
| ) |
@brief Constructor for the puzzle piece edge class.
150 for lab space/400 for RGB space.
Args:
tau_shape: The threshold for the shape feature.
tau_color: The threshold for the color feature.
|
static |
@brief Extract the edge color feature from an input image of the edge.
Args:
edge: An EdgeDes instance.
feaLength: The resized feature vector length setting.
Returns:
colorFeaResizeList: The resized feature vector.
| def compare | ( | self, | |
| piece_A, | |||
| piece_B, | |||
method = 'type' |
|||
| ) |
Compare between two passed puzzle piece data.
| [in] | piece_A | Template instance with a piece's info. |
| [in] | piece_B | Template instance with a piece's info. |
| [in] | method | Comparison method to use. |
|
static |
@brief Extract the edge shape feature from an input image of the edge.
Args:
edge: An EdgeDes instance.
method: The comparison method, we have two modes: type or shape coords.
Returns:
shapeFeaList: The list of teh shape feature.
Reimplemented from Matcher.
| def process | ( | self, | |
| piece, | |||
method = None |
|||
| ) |
@brief Compute features from the data.
Args:
piece: A puzzle piece instance.
method: The method option.
Returns:
The shape & color feature vectors.
| def score | ( | self, | |
| piece_A, | |||
| piece_B, | |||
method = 'type' |
|||
| ) |
@brief Compute the score between two passed puzzle piece data.
Args:
piece_A: A template instance saving a piece's info.
piece_B: A template instance saving a piece's info.
method: We use some built-in functions in similaritymeasures
(pcm/frechet_dist/area_between_two_curves/curve_length_measure/dtw)
or just the types of the edges.
Returns:
distance_shape: The shape distance between the two passed data.
distance_color: The color distance between the two passed data.
| tau_color |
| tau_shape |