sustaining_gazes/gui/OpenFaceOffline/UI_items/CameraParametersEntry.xaml

47 lines
3 KiB
XML

<Window x:Class="OpenFaceOffline.CameraParametersEntry"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Input camera parameters" Height="180" Width="300" ResizeMode="NoResize">
<Grid Background="WhiteSmoke">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
<ColumnDefinition Width="0.25*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.5*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" HorizontalAlignment="Left" Text="Enter camera parameters manually:" FontSize="13" VerticalAlignment="Center"/>
<Label Grid.Row="1" Grid.Column="0">Focal lengths</Label>
<Label Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">fx=</Label>
<TextBox Grid.Row="1" Grid.Column="2" VerticalContentAlignment="Center" IsEnabled="False" x:Name="fxTextBox" />
<Label Grid.Row="1" Grid.Column="3" HorizontalAlignment="Right">fy=</Label>
<TextBox Grid.Row="1" Grid.Column="4" VerticalContentAlignment="Center" IsEnabled="False" x:Name="fyTextBox" />
<Label Grid.Row="2" Grid.Column="0">Optical centre lengths</Label>
<Label Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right">cx=</Label>
<TextBox Grid.Row="2" Grid.Column="2" VerticalContentAlignment="Center" IsEnabled="False" x:Name="cxTextBox" />
<Label Grid.Row="2" Grid.Column="3" HorizontalAlignment="Right">cy=</Label>
<TextBox Grid.Row="2" Grid.Column="4" VerticalContentAlignment="Center" IsEnabled="False" x:Name="cyTextBox"/>
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="5" Name="warningLabel" Visibility="Hidden" FontStyle="Italic" Foreground="Red" HorizontalAlignment="Center">Parameters have to be a non negative reals</Label>
<Label Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4" FontSize="13">Infer parameters automatically</Label>
<Separator Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="5" VerticalAlignment="Top"></Separator>
<CheckBox Name="automaticCheckBox" Grid.Row="4" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="True" Click="CheckBox_Click"></CheckBox>
<Button Grid.Row="5" Grid.Column="5" Content="OK" Click="OKButton_Click" Width="40" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
</Grid>
</Window>