Finding Lights in Firefly
Once each of the lights have been
uniquely addressed (control boards also have an address, so the address need only be unique to their string) it
is then necessary to determine their location in 3D space.
No initial assumptions can be made about a fairy light's location in 3D
space, as there is no correllation between the address of a light and its
location, so instead the location of each light is determined using
cameras.
Firstly, this requires the lights to flash out a known code to represent
its address. This code can then be detected by the camera, enabling the camera
to pinpoint the light's location and the address attached to that light.
However, for any one camera, this will only provide information on the 2D
projection of the light onto the camera's field of view, so for 3D location it
is necessary for the light to be seen by two cameras in a known 3D coordinate
system. This is done by attaching fairy lights with a known (and otherwise
unused) address to the second camera, and using the first camera as the origin
of the coordinate space, enabling positioning of the camera, and calculation
of its bearing and inclination. Roll is intentionally set to zero with the use
of a spirit level to limit complexity.
With the added information from the second camera, the location of each
light can then be determined, with each string of lights calibrated in turn.
The Christmas tree used in the current example pictures used 6 camera
locations for calibration.