FaceTrackNoIR
FaceTracking with just your webcam or smartphone!
Donate
HAT Logo Forward

HAT Tracker: The serial interface to get data from your Arduino, Raspberry etc.

 

Supports any device which sends serial data (also tested with Bluetooth COM).

Info:

The HeadArduinoTracker or HAT-tracker plugin was originally written by Furax49 and was adapted for FaceTrackNoIR v200 by Wim Vriend. It reads data-frames from the selected COM-port, checks the validity and then relays the data to FaceTrackNoIR.

 

The HAT-tracker also gives several options to relay commands from FaceTrackNoIR to the serial device, so it can handle "Start", "Stop" and "Center" commands itself.

 

If you have questions regarding the HAT-tracker plugin, please post them here: [discussion:hat]

 

Info for developers, who want to send HAT data to FaceTrackNoIR:

// Arduino frame structure
#pragma pack(push,2)
struct TArduinoData
{
    quint16 Begin;         // Header trame 0xAAAA;
    quint16 Code;         // 0-999 = TRACKING (+frame counter), 1000-1999 = CALIBRATING (+frame counter)
    float Rot[3];
    float Trans[3];
    quint16 End;            // End trame 0x5555;
} ;
#pragma pack(pop)

 

A sample Arduino script can be found in the SourceForge Files section.

 

Please drop me an e-mail, if you want to interface with FaceTrackNoIR and need some help... I would also be interested in any projects using FaceTrackNoIR. Quite a number of "serious" applications can be enhanced with head-tracking!

Advantages:

  • Reduce CPU-load for your gaming PC;
  • Possible to use any external tracker, which offers HAT serial data; Extensively tested with a Bluetooth COM-port;
  • Very simple setup.

Downloads:

The current version of the HAT-Tracker is part of the free PluginPack that's available for download from SourceForge. You can find the latest version here:Download Plugins

Settings:

 HAT General settings

General tab:

 

Serial port: select the COM-port here. In the example, a Bluetooh COM-port was used.

 

Zero, Center and Reset: send a command to the serial device. You can configure these on the Command tab .

 

Axis Configuration: per axis (from the HAT-frame) you can select which FaceTrackNoIR axis to assign it to, whether to enable it and if the value should be inverted.

 HAT Command settings

Command tab:

 

Arduino Commands:

Here you can configure whichs character or string to send to the Arduino, following a command from FaceTrackNoIR.

 

Generally it may not be necessary to interrupt the serial device at all. In the example, only the "Center" command is handled by the Arduino. When the text-box for "Center" contains one or more characters, FaceTrackNoIR will not perform this command itself (to prevent double-centering).

 

Serial Parameters:

Here you configure the port-settings for the COM-port.

 

These are pretty self-explanatory.

 HAT About settings

About tab:

 

Here you can send "custom" commands to the serial device and monitor the automated commands and their return-value(s).

 

Known Issues and limitations:

  • The HAT-tracker is (still) single-instance. So you cannot run two instances of the tracker as Primary and Secondary at the same time.
  • The settings of the COM-ports must match exactly. It's the most tricky thing about COM-ports in general.
  • Configuring a Bluetooth COM-port can be a bit difficult. The configuration differs per manufactor.