Skip to content

Reference: Structured Light Pattern OSC Message Format

John De Witt edited this page Apr 17, 2017 · 1 revision

Pattern types

For now, there are three types of structured light patterns available in sldisp: binary gray code, sinusoid, and monochrome. Colors are expressed as RGB triplets normalized to [0,1]. For integers representing bools, 0 is false; 1 is true. For integers representing an axis, X is considered the zeroth axis; Y the first. This page outlines how to form valid OSC messages to change the displayed pattern.

OSC type field

OSC uses a string to describe the data elements contained in a message. i=int, f=float. For example, "iiff" is two ints followed by two floats in a message. For all pattern messages, the first value is always an int which specifies the pattern type (graycode 0, sinusoid 1, monochrome 2).

Binary Gray Code

iiiifff

int patterntype=0

int inverted

int axis

int bit : bits to shift

float r

float g

float b

Sinusoid

iiifffff

int patterntype=1

int inverted

int axis

float freq : cycles per pixel

float phase : radians

float r

float g

float b

Monochrome

iifff

int patterntype=2

int inverted

float r

float g

float b