|
def | __init__ (self, theDetector, theTracker, trackFilter, Params params) |
|
def | det_mask (self) |
|
def | draw_layer (self, img=None, raw_detect=False, ax=None) |
|
def | get_mask (self) |
|
def | get_state (self) |
|
def | measure (self, I) |
|
def | update_params (self, name, val) |
|
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
theDetector, |
|
|
|
theTracker, |
|
|
|
trackFilter, |
|
|
Params |
params |
|
) |
| |
Base class for the layer segmentation approach
Build upon the the simple detector -> tracker -> trackfilter pipeline
Now building a base classs of the following process pipeline:
preprocess -> detect -> postprocess -> track -> trackfilter
where:
- preprocess: the preprocess of the input image
- Postprocess: post process of the detected layer mask
- params: need to has the field of the Params class
◆ det_mask()
◆ draw_layer()
def draw_layer |
( |
|
self, |
|
|
|
img = None , |
|
|
|
raw_detect = False , |
|
|
|
ax = None |
|
) |
| |
Visualize the layer result
@ param[in] img The input image. Default is None. If not None, then will crop the layer mask area and show.
If None, then will only plot the binary mask
@ param[in] raw_detect bool. Default is False. If set to true, will draw the raw detected mask without postprocessing,
and will not display the trackerstate
◆ get_mask()
◆ get_state()
◆ measure()
Set a common processing pipeline?
But different detector or tracker will generate different result name.
e.g. the layer mask should be obtained from fg_detector.getForeGround() and bg_detector.getBackground() separetely
similar for the trackers
Might be better off defining the pipeline separately for different subclass of segmentor? Or just make up some default?
TODO: here requires the tracker instance to have the process & getstate API.
might be better to also limit the input to some base tracker class with those APIs?
Reimplemented in Human_ColorSG_HeightInRange.
◆ update_params()
def update_params |
( |
|
self, |
|
|
|
name, |
|
|
|
val |
|
) |
| |
◆ layer_mask
◆ layer_mask_det
◆ layer_state
◆ params
The documentation for this class was generated from the following file:
- /home/pvela/python/surveillance/Surveillance/layers/base.py