supervision-js
    Preparing search index...

    Function createProjectedDetectionFrameSource

    • Wraps a detection source so every loaded frame that declares a source coordinate space is projected into the target space.

      The target is resolved per load because media dimensions are only known once the media has opened, while sources are composed before that. Frames without coordinateSpace, and loads made before a target exists, pass through by reference, so a producer already emitting media-pixel geometry pays nothing.

      The target is also handed to the wrapped source through DetectionFrameLoadOptions. A source that flattens child frames, such as a composite source, needs it to project each child while that child's own coordinateSpace is still attached; projecting the flattened result again here is then a no-op.

      Optional source hooks are forwarded only when the wrapped source implements them, so capability detection keeps working through the wrapper.

      Parameters

      Returns DetectionFrameSource