Skip to content

Releases: eac-ufsm/internoise2021-headtracker

Webcam HeadTracker

23 May 15:21
Compare
Choose a tag to compare

Description

Head tracker via camera face tracking.

Built on top of the Google's MediaPipe face_mesh (python release).


Executables for windows only (sorry), for other platforms you may try to use the python files

How to use:

  • Download and extract the files in HeadTracker.rar and run HeadTracker application located inside the folder.
    Optionally you may download the .exe file, but be aware the starting time is slightly higher for this more compact version.

  • Connect to any plataform that accepts UDP/IP connection using IP:'127.0.0.1' and PORT:50050 .

Interpreting received data:

The HeadTracker application currently sends to the server yaw, pitch and roll information in degrees. The data are json encoded bytes (deppending on the application it needs to be decoded).

Example: reading data in Matlab:

% Open the HeadTracker application (make sure the file path is added to matlab path variables)
open('HeadTracker.exe')   

% Connect to the local server
udpr = dsp.UDPReceiver('RemoteIPAddress', '127.0.0.1',...
                       'LocalIPPort',50050); 

% Read data from the head tracker
while true   
    py_output = step(udpr);
    if ~isempty(py_output)
        data = str2double(split(convertCharsToStrings(char(py_output)), ','));
        disp([' yaw:', num2str(data(1)),...
             ' pitch:', num2str(data(2)),...
             ' roll:', num2str(data(3))])
    end
end 
 

Another example of the head tracking connection to matlab is posted here.