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

Public Member Functions

None __init__ (self, imgSource, intrinsic, scene.SceneInterpreterV1 scene_interpreter, M_WtoC, M_WtoR=M_WtoR, Params params=Params())
 
def measure (self, rgb, dep)
 
def postprocess (self, rgb, dep)
 
def process (self, rgb, dep, puzzle_postprocess=True)
 
def publish_activity (self, char)
 
def publish_data (self)
 
def run (self)
 
def save_data (self)
 
def vis (self, rgb, dep)
 
def vis_input (self, rgb, dep)
 
def vis_near_hand_puzzles (self)
 
def vis_results (self)
 

Static Public Member Functions

def build (Params params=Params())
 
def buildFromRosbag (bag_path, Params params)
 Build the deployment runner instance from a store ROS bag. More...
 
def buildPub (Params params=Params(), bag_path=None)
 Builder for publishing the calibration data to ROS. More...
 

Public Attributes

 act_codebook
 
 act_mark_cache
 
 act_mark_pub
 
 BEV_mat
 
 depth_scale
 
 hTracker
 
 humanAndhumanImg
 
 humanImg
 
 humanMask
 
 img_BEV
 
 imgSource
 
 intrinsic
 
 M_WtoC
 
 M_WtoR
 
 meaBoardImg
 
 meaBoardMask
 
 params
 
 puzzleImg
 
 rate
 
 robotImg
 
 save_dir
 
 scene_interpreter
 
 test_dep_pub
 
 test_depth
 
 test_rgb
 
 test_rgb_pub
 
 visibleMask
 
 visualize
 

Detailed Description

@brief    Constructor for BaseSurveillanceDeploy class.
    
The Base class for deploying the Surveillance system.
It defines the default parameters, encompasses the calibration
process, and defines the API for further development.

@param[in]  imgSource       (callable) image source stream(s).
@param[in]  intrinsic       camera intrinsic parameters.
@param[in]  scene_interp    Scene interpreter instance.
@param[in]  M_WtoC          (optional) world to camera extrinsic.
@param[in]  M_WtoR          (optional) world to robot.
@param[in]  params          (optional) parameters structure.

Regarding the arguments,

imgSource (Callable): The image source(s) that can get the camera
  data in the following style (where status is a binary indicating
  whether the camera data is fetched successfully): 

  > rgb, dep, status = imgSource()

  Can pass None, which will disable the run API that deploy the
  system on the connected camera.

  The parameter instance params default to Params() if not provided.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self,
  imgSource,
  intrinsic,
scene.SceneInterpreterV1  scene_interpreter,
  M_WtoC,
  M_WtoR = M_WtoR,
Params   params = Params() 
)

Member Function Documentation

◆ build()

def build ( Params   params = Params())
static
Builder for saving the calibration data in the local cache folder.

NOTE: This function is not maintained, might contain bugs, and might be removed in the future. 
It saves the data in the video, image, or numpy npz format.
See below for more recent builders that save all the data in a rosbag.

Args:
    params (Params, optional):  The parameter passed. Defaults to Params().

Returns:
    _type_: _description_

◆ buildFromRosbag()

def buildFromRosbag (   bag_path,
Params  params 
)
static

Build the deployment runner instance from a store ROS bag.

Parameters
[in]bag_pathRosbag file with full path.
[in]params(Params, optional): Deployment parameters. Defaults to Params().
[out]BaseSurveillanceDeploy

◆ buildPub()

def buildPub ( Params   params = Params(),
  bag_path = None 
)
static

Builder for publishing the calibration data to ROS.

Args: params (Params, optional): The deployment parameters. Defaults to Params(). If params.reCalibrate is False, then will read the rosbag files for the calibration data to build the system, then run on the camera data bag_path (str): The rosbag file path. Necessary if the params.reCalibrate is False. Defaults to None

Returns: type: description

◆ measure()

def measure (   self,
  rgb,
  dep 
)
get the measure board

return the measure board mask and the measure board img

◆ postprocess()

def postprocess (   self,
  rgb,
  dep 
)
Overwrite to put any pose process that is built on top of the scene interpreter her

Args:
    rgb (_type_): _description_
    dep (_type_): _description_

◆ process()

def process (   self,
  rgb,
  dep,
  puzzle_postprocess = True 
)

◆ publish_activity()

def publish_activity (   self,
  char 
)

◆ publish_data()

def publish_data (   self)

◆ run()

def run (   self)

◆ save_data()

def save_data (   self)

◆ vis()

def vis (   self,
  rgb,
  dep 
)

◆ vis_input()

def vis_input (   self,
  rgb,
  dep 
)
@brief Visualize the input.

Args:
    rgb: The rgb image.
    dep: The depth image.

◆ vis_near_hand_puzzles()

def vis_near_hand_puzzles (   self)
@ brief Visualize the puzzle pices location near the hand.

◆ vis_results()

def vis_results (   self)
Overwrite to put any result-related visualization in this function.
Note: Maybe it is better to put the visualization function here.

Member Data Documentation

◆ act_codebook

act_codebook

◆ act_mark_cache

act_mark_cache

◆ act_mark_pub

act_mark_pub

◆ BEV_mat

BEV_mat

◆ depth_scale

depth_scale

◆ hTracker

hTracker

◆ humanAndhumanImg

humanAndhumanImg

◆ humanImg

humanImg

◆ humanMask

humanMask

◆ img_BEV

img_BEV

◆ imgSource

imgSource

◆ intrinsic

intrinsic

◆ M_WtoC

M_WtoC

◆ M_WtoR

M_WtoR

◆ meaBoardImg

meaBoardImg

◆ meaBoardMask

meaBoardMask

◆ params

params

◆ puzzleImg

puzzleImg

◆ rate

rate

◆ robotImg

robotImg

◆ save_dir

save_dir

◆ scene_interpreter

scene_interpreter

◆ test_dep_pub

test_dep_pub

◆ test_depth

test_depth

◆ test_rgb

test_rgb

◆ test_rgb_pub

test_rgb_pub

◆ visibleMask

visibleMask

◆ visualize

visualize

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