|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
Class detects the state of the puzzle sort region. More...


Public Member Functions | |
| def | __init__ (self, imRegions) |
| Constructor for simple puzzle scene activity detector. More... | |
| def | measure (self, y) |
| def | process (self, x) |
| Run entire processing pipeline. More... | |
Public Member Functions inherited from imageRegions | |
| def | __init__ (self, imRegions=None, processor=None) |
| Constructor for imageRegions class. More... | |
| def | addRegionByMask (self, regMask) |
| Provide a masked region to use for defining a new state. More... | |
| def | addRegionByPolygon (self, regPoly, imsize=None) |
| Add a region by specifying the polygon boundary. More... | |
| def | buildFromPolygons (imsize, thePolygons) |
| Construct an imageRegions instance with provided polygon regions. More... | |
| def | calibrateFromPolygonMouseInputOverImageRGB (theImage, theFile, initRegions=None) |
| Calibrate a region detector by requesting closed polygon input from user. More... | |
| def | emptyRegions (self) |
| Delete regions image if exists and return to uninitialized state. More... | |
| def | initRegions (self, imsize) |
| Initialize regions by providing target image dimensions. More... | |
| def | printState (self) |
| Print current region detection state (as string). More... | |
| def | regions_close_cv (self, window_name="Activity Regions") |
| Close the region image window. More... | |
| def | regions_display_cv (self, ratio=1, window_name="Activity Regions") |
| Display the region image to see labels. More... | |
| def | saveTo (self, fPtr, relpath="activity.byRegion") |
| Empty method for saving internal information to HDF5 file. More... | |
| def | setRegions (self, imRegions) |
| Provide a label image where the pixel label indicates the raw activity label. More... | |
| def | specifyPolyRegionsFromImageRGB (self, theImage, doClear=False) |
| Given an image, get user input as polygons that define the different regions. More... | |
| def | specifyRegionsFromMask (self, theMask, doClear=False) |
| Given an image, get user input as point clicks that select mask regions. More... | |
| def | stringState (self) |
| Convert current region detection state to string. More... | |
| def | wipeRegions (self) |
| Clear the regions image. More... | |
Public Member Functions inherited from fromState | |
| def | adapt (self) |
| Adapt detection model, if implemented. More... | |
| def | correct (self) |
| Correct detection state estimate, if implemented. More... | |
| def | detect (self, x) |
| Perform detection only, which basically keeps the model static if it would normally update. More... | |
| def | getState (self) |
| Get the current detection state estimate. More... | |
| def | predict (self) |
| Predict detection state outcome, if implemented. More... | |
| def | saveTo (self, fPtr) |
| Save configuration or other data to HDF5 file. More... | |
Public Member Functions inherited from Base | |
| def | __init__ (self) |
| Instantiate a detector Base activity class object. More... | |
| def | emptyDebug (self) |
| Return empty debug state information. More... | |
| def | emptyState (self) |
| Return empty state. More... | |
| def | getDebug (self) |
| Return current/latest debug state information. More... | |
| def | save (self, fileName) |
| Outer method for saving to a file given as a string. More... | |
Static Public Member Functions | |
| def | load (fileName, relpath=None) |
| Outer method for loading file given as a string (with path). More... | |
| def | loadFrom (fptr, relpath="activity.byRegion") |
| Inner method for loading internal information from HDF5 file. More... | |
Static Public Member Functions inherited from Base | |
| def | loadFrom (fPtr) |
| Empty method for loading internal information from HDF5 file. More... | |
Public Attributes | |
| start | |
| z | |
| zonemask | |
Public Attributes inherited from PuzzleActivities | |
| z | |
Public Attributes inherited from imageRegions | |
| imRegions | |
| Image regions array. More... | |
| isInit | |
| Flag specifying initialization state. More... | |
| lMax | |
| Max label associated to image regions. More... | |
| z | |
Public Attributes inherited from fromState | |
| processor | |
| Pre-processor or similar. More... | |
| z | |
| The detection outcome. More... | |
Public Attributes inherited from Base | |
| x | |
| Detection state. More... | |
Class detects the state of the puzzle sort region.
| def __init__ | ( | self, | |
| imRegions | |||
| ) |
Constructor for simple puzzle scene activity detector.
| [in] | imRegions | Label-type image. |
Reimplemented from PuzzleActivities.
|
static |
Outer method for loading file given as a string (with path).
Opens file, preps for loading, invokes loadFrom routine, then closes. Overloaded to invoke coorect loadFrom member function.
| [in] | fileName | The full or relative path filename. |
| [in] | relpath | The hdf5 (relative) path name to use for loading. Usually class has default, this is to override. |
Reimplemented from PuzzleActivities.
|
static |
Inner method for loading internal information from HDF5 file.
Load data from given HDF5 pointer. Assumes in root from current file pointer location.
Reimplemented from PuzzleActivities.
| def measure | ( | self, | |
| y | |||
| ) |
@brief Checks the measurment of hand and board to determine sort
state.
@param[in] y SortActivityInput
Reimplemented from PuzzleActivities.
| def process | ( | self, | |
| x | |||
| ) |
Run entire processing pipeline.
The entire pipeline consists of predict, measure, correct, and adapt. At least if there is a measurement. If no measurement, then only predict is executed since there is no measurement to interpret, correct, and adapt with.
Reimplemented from PuzzleActivities.
| start |
| z |
| zonemask |