Tracking

class hive.trigger.Tracking(test=False, ip='*', port=12345, environment=None, downsample=None, source_id='1')

Bases: QThread, Trigger

Position in pixels received from the tracking device and processed to extract the ROI with the hive_environment.npy file.

This file is generated by the tracking ui of the fklab module before launching the tracking on the external device. You could also do it manually by generating a numpy array with for each pixel a label.

Use in config file

Task:
    mode : ...
    trigger :
        - name: Tracking
          options:
            ip: 127.0.0.1   #Mandatory to add
            port: 12345     #Mandatory to add
            source id: 1  # source id of the message received - default 1
            environment: path/hive_mask.npy # environment created during configuration of the tracking
            downsample: 2 # send only one position of two

Use in task

See the process_detection method in your task

Parameters
  • ip (str, * (localhost)) – Ip address of the tracking device

  • port (str or int, 12345) – Port where the tracking device send positions

  • environment (str, None) – Path of the ROI file named hive_mask.npy

  • source_id (string, 1) – source identifier of the tracking device

Attributes Summary

ROI

send an event based on the ROI detection

Methods Summary

run()

Run in a separate thread waiting for receiving new position from the tracking device.

who_to_connect_where()

Attributes Documentation

ROI

send an event based on the ROI detection

Type

str

Methods Documentation

run()

Run in a separate thread waiting for receiving new position from the tracking device.

who_to_connect_where()