我正在尝试将图像叠加在kinect视频源上(使用kinect 2.0,使用更新的SDK)。我将图像导入到我的资源文件夹(通过visual studio),并在XAML构建器中显示,但是当程序开始时,除了视频之外什么也没有显示。任何帮助将不胜感激。
这是我参与的XAML代码
<Window x:Class="Bitness.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="600" Width="700"
Loaded="MainWindow_Loaded"
Closing="MainWindow_Closing">
<Window.Resources>
<SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
<SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />
<SolidColorBrush x:Key="KinectBlueBrush" Color="#ff00BCF2" />
</Window.Resources>
<Grid>
<Canvas>
<Image Source="Resources/Ball.png" Canvas.Left="20" Canvas.Top="200" />
</Canvas>
<Viewbox Grid.Row="1" HorizontalAlignment="Center">
<Grid Name="CompositeImage">
<Image Source="{Binding ImageSource}" Stretch="UniformToFill" />
<Image Source="{Binding BodySource}" Stretch="UniformToFill" />
</Grid>
</Viewbox>
<StatusBar HorizontalAlignment="Stretch" Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="{StaticResource MediumGreyBrush}">
<StatusBarItem Content="{Binding StatusText}" />
</StatusBar>
</Grid>