Skip to content

Video2DPointScanner

in Lib.io.dmx.helpers

Scans a video input to detect the 2D positions of bright pixels, often used for projector-camera calibration or tracking LEDs.

This operator sequentially tests pixels by outputting a bright value and checking if the result is visible in the video feed. This process allows it to map the output pixel coordinates to the camera's view. The resulting 2D point map can be saved and later used with a [CameraCalibrator] to create a 3D spatial mapping.

Tips: - Connect a camera feed to VideoIn. - Set PixelCount to the number of lights or pixels you want to scan. - Use ScanTrigger to start the process. - The DebugTexture output is useful for visualizing the scanning process.

AKA: projector calibration, led tracking, blob detection, camera mapping, structured light

Input Parameters

Name (Relevancy & Type) Description
ApplyCorrection (Boolean) If enabled, applies the loaded camera calibration to the scanned points to get corrected 2D positions.
CalibrationPath (String) The path to the camera calibration file (usually a .json file generated by a calibration tool).
DebugMode (Boolean) Enables various debug visualizations and logging for troubleshooting the scanning process.
FilePath (String) The path to the file where the scanned 2D point data will be saved or loaded from.
Load (Boolean) A trigger to load the scanned point data from the specified FilePath.
LoadCalibration (Boolean) A trigger to load a camera calibration file from the specified CalibrationPath.
PixelBrightness (Single) The brightness (0-1) of the pixel being tested by the scanner.
PixelCount (Int32) The total number of pixels or points to scan for.
ResetScan (Boolean) A trigger to reset the scanning process and start from the beginning.
Save (Boolean) A trigger to save the currently scanned point data to the specified FilePath.
ScanIntervallum (Single) The time in seconds to wait between scanning each pixel when using ScanTrigger.
ScanTrigger (Boolean) A trigger to start the automatic scanning process. It will scan one pixel at a time with a delay defined by ScanIntervallum.
TestFullMode (Boolean) A debug mode that outputs a fully white texture, useful for checking projector alignment and coverage.
TestPixelMode (Boolean) A debug mode to test a single pixel at a time. The pixel index is controlled by the PixelCount parameter.
Threshold (Single) The brightness threshold (0-1) used to determine if a pixel in the video feed is considered 'on'.
VideoIn (Texture2D Required) The input video texture from a camera pointed at the projection surface or lights.

Outputs

Name Type
DebugTexture T3.Core.DataTypes.Texture2D
PixelOutput T3.Core.DataTypes.BufferWithViews
ScannedPoints2D T3.Core.DataTypes.BufferWithViews