|
def | __init__ (self, signal_number, signal_cache_limit=1000, state_cache_limit=1000, signal_names=[], state_number=3, state_names=["Move", "Progress_Made", "Puzzle_in_Hand"], move_th=2, hand_track_color=[255, 0, 0], state_text_color=[255, 0, 0]) |
|
def | parse (self, List cur_signals) |
|
def | parse_move (self, cur_signals) |
|
def | parse_PinH (self, cur_signals) |
|
def | parse_progress (self, cur_signals) |
|
def | plot_states (self, rgb) |
|
def | visualize (self, rgb, ratio=0.5, window_name="States") |
|
def | __init__ (self, signal_number, state_number, signal_cache_limit=1000, state_cache_limit=1000, signal_names=[], state_names=[]) |
|
def | get_states (self) |
|
def | measure (self, List cur_signals) |
|
def | parse (self, cur_signals) |
|
def | update (self, cur_signals, cur_states) |
|
def | visualize_state_evolving (self, fh=None) |
|
def | __init__ (self) |
|
def | adapt (self) |
|
def | correct (self) |
|
def | measure (self, signal) |
|
def | predict (self) |
|
def | process (self, signal) |
|
The State Estimator v1.0
Fix to estimate three binary states: Move, Make_Puzzle_Progress, Puzzle_in_hand.
The signal used for the state estimation is:
1. The hand location,
2. The puzzle solving progress (percentage)
3. Piece in hand
For now allow customization for the signals and the states used for the development purpose
def parse |
( |
|
self, |
|
|
List |
cur_signals |
|
) |
| |
Parse the states out of the signals
Args:
cur_signals (np.ndarray, (signal_number, )): The signals of the current timestamp. \
According to the current design, the signals should be a list who stores: \
1. hand location (np.ndarray, (2, ))
2. Puzzle solving progress (percentage number)
3. puzzle piece in hand (binary)
Return:
cur_states (np.ndarray, (state_num, )): The states parsed of the current timestamp
def visualize |
( |
|
self, |
|
|
|
rgb, |
|
|
|
ratio = 0.5 , |
|
|
|
window_name = "States" |
|
) |
| |
Visualize the state process on the image data with the necessary facilitative plots
The state will be displayed on the top left corner of the frame.
For the facilitative plots,
(1) the hand tracker and the recent trajectory will be plotted
Args:
rgb (array, (H, W, 3)): The RGB image on which to display the states and drawing
ratio (float, ): The scaling ratio for the display
window_name (str): The window name for the display