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

A basic detector class that processes a layered image (or mask and image) detection output. Converts all isolated regions into their own puzzle piece instances. More...

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

Public Member Functions

def __init__ (self, theParams=ParamPuzzle)
 Constructor for the puzzle piece layer parsing class. More...
 
def findCorrectedContours (self, mask, FILTER=True)
 Find the right contours given a binary mask image. More...
 
def getState (self)
 
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...
 
- 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
 
 params
 
 pieceConstructor
 
 tpt
 
- Public Attributes inherited from centroidMulti
 haveMeas
 
 labelIm
 
 labelImage
 
 tpt
 
 trackProps
 
- Public Attributes inherited from centroid
 haveMeas
 
 params
 
 tpt
 

Detailed Description

A basic detector class that processes a layered image (or mask and image) detection output. Converts all isolated regions into their own puzzle piece instances.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  theParams = ParamPuzzle 
)

Constructor for the puzzle piece layer parsing class.

Args: theParams: The parameters.

Member Function Documentation

◆ findCorrectedContours()

def findCorrectedContours (   self,
  mask,
  FILTER = True 
)

Find the right contours given a binary mask image.

Args: mask: The input binary mask image.

Returns: desired_cnts: Contour list.

◆ getState()

def getState (   self)
@brief  Return the track-pointer state. Override the original one.

Returns:
    tstate: The board measurement.

Reimplemented from centroid.

◆ 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 image.

Member Data Documentation

◆ bMeas

bMeas

◆ haveMeas

haveMeas

◆ params

params

◆ pieceConstructor

pieceConstructor

◆ tpt

tpt

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