IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Public Attributes | List of all members
boardMeasure Class Reference

Puzzle piece board measurement class, based on puzzle piece layer parsing. More...

Inheritance diagram for boardMeasure:
Inheritance graph
[legend]
Collaboration diagram for boardMeasure:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, params=CfgBoardMeasure())
 Constructor for the puzzle piece layer parsing class. More...
 
def findCorrectedContours (self, mask, FILTER=True)
 
def getState (self)
 Return the track-pointer state. More...
 
def mask2regions (self, I, M, verbose=False)
 
def measure (self, I, M)
 Process the passed imagery to recover puzzle pieces and manage their track states. More...
 
def process (self, I, M)
 Run the tracking pipeline for image measurement. More...
 
def regions2pieces (self, regions)
 Convert the region information into puzzle pieces. More...
 
- Public Member Functions inherited from centroidMulti
def __init__ (self, iPt=None, params=CfgCentMulti())
 Centroid track-pointer constructor. More...
 
def get (self, fname)
 Get parameter of the tracker. More...
 
def measure (self, I)
 Measure the track point from the given image. More...
 
def process (self, I)
 Process the input image according to centroid tracking. More...
 
def regionProposal (I)
 Find out the centroid for multiple objects. More...
 
def set (self, fname, fval)
 Set parameters for the tracker. More...
 
- Public Member Functions inherited from centroid
def adapt (self)
 Adapt internal tracking parameters. More...
 
def correct (self)
 Correct track state based on predication and measurement. More...
 
def display_cv (self, I, ratio=None, window_name="track point ")
 Use opencv display routines to plot the trackpoint along with the given image. More...
 
def displayDebugState (self, dbstate=None)
 Displays internally stored intermediate process output. More...
 
def displayState (self, dstate=None, ax=None)
 Displays the current track pointer measurement. More...
 
def emptyState (self)
 Return an empty state structure (in python a dataclass). More...
 
def offset (self, dp)
 Apply a vector offset to the track point. More...
 
def predict (self)
 Predict next track state based on current track state. More...
 
def setIfMissing (self, params, pname, pval)
 Set missing parameters in the registration parameters structure. More...
 
def setState (self, dPt)
 Use a track state element to define internal track state. More...
 
def transform (self, g)
 Apply a Lie group transformation (linear/affine) to the track point. More...
 

Public Attributes

 bMeas
 
 haveMeas
 
 pieceConstructor
 
 tpt
 
- Public Attributes inherited from centroidMulti
 haveMeas
 
 labelIm
 
 labelImage
 
 tpt
 
 trackProps
 
- Public Attributes inherited from centroid
 haveMeas
 
 params
 
 tpt
 

Detailed Description

Puzzle piece board measurement class, based on puzzle piece layer parsing.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  params = CfgBoardMeasure() 
)

Constructor for the puzzle piece layer parsing class.

Parameters
[in]theParamsThe parameters/config settings for the track pointer.

Member Function Documentation

◆ findCorrectedContours()

def findCorrectedContours (   self,
  mask,
  FILTER = True 
)
@brief Find the right contours given a binary mask image.

@param[in]  mask    The input binary mask image.
@param[in]  FILTER  Options (set to TRUE).

@param[ou]  desired_cnts    Contour list.

◆ getState()

def getState (   self)

Return the track-pointer state.

Override the original one.

Parameters
[out]tstateReturn the board measurement track state.

Reimplemented from centroid.

◆ mask2regions()

def mask2regions (   self,
  I,
  M,
  verbose = False 
)
@brief Convert the selection mask into a bunch of regions.
   Mainly based on findContours function.

Args:
I:  RGB image.
M:  Mask image.

Returns:
regions: A list of regions (mask, segmented image, location in the source image).

◆ measure()

def measure (   self,
  I,
  M 
)

Process the passed imagery to recover puzzle pieces and manage their track states.

Parameters
[in]IRGB image.
[in]MMask image.

◆ process()

def process (   self,
  I,
  M 
)

Run the tracking pipeline for image measurement.

Parameters
[in]IRGB image.
[in]MMask.

◆ regions2pieces()

def regions2pieces (   self,
  regions 
)

Convert the region information into puzzle pieces.

Parameters
[in]regionsList of region pairs (mask, segmented image, location in the source image).
[out]piecesList of puzzle pieces instances.

Member Data Documentation

◆ bMeas

bMeas

◆ haveMeas

haveMeas

◆ pieceConstructor

pieceConstructor

◆ tpt

tpt

The documentation for this class was generated from the following file: