bibigone / k4a.net

K4A.Net - Three-in-one .NET library to work with Azure Kinect devices (also known as Kinect for Azure, K4A, Kinect v4). It includes sensor API, recording and playback API, body tracking API. Samples for WPF, .NET Core and Unity are included.
MIT License
165 stars 39 forks source link

Mirro #5

Closed yocop closed 5 years ago

yocop commented 5 years ago

How Can I get Mirror body tracker image?thanks

baSSiLL commented 5 years ago

Hi @Itpyc The exact way to mirror depends on your task. If it's only for render purposes then the easiest way is to apply a transform to UI elements. For instance, in BodyTracker sample you can set appropriate LayoutTransform for CapturedImage style.

        <Style x:Key="CapturedImage" TargetType="Image">
            <Setter Property="Margin" Value="1"/>
            <Setter Property="LayoutTransform">
                <Setter.Value>
                    <ScaleTransform ScaleX="-1" ScaleY="1"/>
                </Setter.Value>
            </Setter>
        </Style>

If you need to process skeletons in mirrored coordinate space then you can invert X coordinate of joint positions obtained from the API.