Puzzle piece edge based comparison.
More...
|
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') |
|
def | __init__ (self, theParams=CfgDifferent()) |
| Constructor for the difference matcher class. More...
|
|
def | compare (self, piece_A, piece_B) |
| Compare two puzzle pieces. More...
|
|
def | score (self, piece_A, piece_B) |
| Compute the score between two passed puzzle piece data. More...
|
|
def | solveMatchedPuzzle (self, puzzle, sol) |
|
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]
◆ __init__()
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.
◆ colorFeaExtract()
def colorFeaExtract |
( |
|
piece, |
|
|
|
feaLength = 300 |
|
) |
| |
|
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.
◆ compare()
def compare |
( |
|
self, |
|
|
|
piece_A, |
|
|
|
piece_B, |
|
|
|
method = 'type' |
|
) |
| |
Compare between two passed puzzle piece data.
- Parameters
-
[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. |
- Returns
- The comparison result (True/False).
◆ extractFeature()
def extractFeature |
( |
|
piece, |
|
|
|
method = None |
|
) |
| |
|
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.
◆ process()
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.
◆ score()
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
The documentation for this class was generated from the following file:
- /home/pvela/python/puzzle_solver/puzzle/pieces/edge.py