◆ __init__()
      
        
          | def __init__ | ( |  | self, | 
        
          |  |  |  | tau = -float('inf') | 
        
          |  | ) |  |  | 
      
 
@brief  Constructor for the puzzle piece pca class.
Args:
    tau: The threshold param to determine difference.
 
 
 
◆ getEig()
@brief  To find the major and minor axes of a blob.
        See https://alyssaq.github.io/2015/computing-the-axes-or-orientation-of-a-blob/ for details.
Args:
    img: A mask image.
Returns:
    dict: A dict saving centerized points, main vectors.
 
 
 
◆ process()
      
        
          | def process | ( |  | self, | 
        
          |  |  |  | piece | 
        
          |  | ) |  |  | 
      
 
@brief  Compute PCA feature from the raw puzzle data.
Args:
    piece: A puzzleTemplate instance saving a passed puzzle piece's info
Returns:
    The rotation of the main vector.
 
 
 
◆ score()
      
        
          | def score | ( |  | self, | 
        
          |  |  |  | piece_A, | 
        
          |  |  |  | piece_B | 
        
          |  | ) |  |  | 
      
 
@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.
Returns:
    distance: The degree distance between passed puzzle piece data and stored puzzle piece. (counter-clockwise)
 
 
 
The documentation for this class was generated from the following file:
- /local/source/python/puzzle_solver/puzzle/pieces/redone/pca.py