File size: 3,096 Bytes
7142654
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<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>