open source pkg v1
This commit is contained in:
6
pkg/OpenFace/gui/OpenFaceOffline/App.config
Normal file
6
pkg/OpenFace/gui/OpenFaceOffline/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
9
pkg/OpenFace/gui/OpenFaceOffline/App.xaml
Normal file
9
pkg/OpenFace/gui/OpenFaceOffline/App.xaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="OpenFaceOffline.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:OpenFaceOffline"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
75
pkg/OpenFace/gui/OpenFaceOffline/App.xaml.cs
Normal file
75
pkg/OpenFace/gui/OpenFaceOffline/App.xaml.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
||||
72
pkg/OpenFace/gui/OpenFaceOffline/FpsTracker.cs
Normal file
72
pkg/OpenFace/gui/OpenFaceOffline/FpsTracker.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2017, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// ACADEMIC OR NON-PROFIT ORGANIZATION NONCOMMERCIAL RESEARCH USE ONLY
|
||||
//
|
||||
// BY USING OR DOWNLOADING THE SOFTWARE, YOU ARE AGREEING TO THE TERMS OF THIS LICENSE AGREEMENT.
|
||||
// IF YOU DO NOT AGREE WITH THESE TERMS, YOU MAY NOT USE OR DOWNLOAD THE SOFTWARE.
|
||||
//
|
||||
// License can be found in OpenFace-license.txt
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace 2.0: Facial Behavior Analysis Toolkit
|
||||
// Tadas Baltrušaitis, Amir Zadeh, Yao Chong Lim, and Louis-Philippe Morency
|
||||
// in IEEE International Conference on Automatic Face and Gesture Recognition, 2018
|
||||
//
|
||||
// Convolutional experts constrained local model for facial landmark detection.
|
||||
// A. Zadeh, T. Baltrušaitis, and Louis-Philippe Morency,
|
||||
// in Computer Vision and Pattern Recognition Workshops, 2017.
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-specific normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
public class FpsTracker
|
||||
{
|
||||
public TimeSpan HistoryLength { get; set; }
|
||||
public FpsTracker()
|
||||
{
|
||||
HistoryLength = TimeSpan.FromSeconds(2);
|
||||
}
|
||||
|
||||
private Queue<DateTime> frameTimes = new Queue<DateTime>();
|
||||
|
||||
private void DiscardOldFrames()
|
||||
{
|
||||
while (frameTimes.Count > 0 && (MainWindow.CurrentTime - frameTimes.Peek()) > HistoryLength)
|
||||
frameTimes.Dequeue();
|
||||
}
|
||||
|
||||
public void AddFrame()
|
||||
{
|
||||
frameTimes.Enqueue(MainWindow.CurrentTime);
|
||||
DiscardOldFrames();
|
||||
}
|
||||
|
||||
public double GetFPS()
|
||||
{
|
||||
DiscardOldFrames();
|
||||
|
||||
if (frameTimes.Count == 0)
|
||||
return 0;
|
||||
|
||||
return frameTimes.Count / (MainWindow.CurrentTime - frameTimes.Peek()).TotalSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
199
pkg/OpenFace/gui/OpenFaceOffline/MainWindow.xaml
Normal file
199
pkg/OpenFace/gui/OpenFaceOffline/MainWindow.xaml
Normal file
@@ -0,0 +1,199 @@
|
||||
<Window x:Class="OpenFaceOffline.MainWindow"
|
||||
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:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:Sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:OpenFaceOffline"
|
||||
xmlns:OpenFaceOffline="clr-namespace:OpenFaceOffline"
|
||||
mc:Ignorable="d"
|
||||
Title="OpenFace offline" Height="500" Width="1300" MinWidth="700" MinHeight="350" Closing="Window_Closing" WindowStartupLocation="CenterScreen">
|
||||
<Grid Name="MainGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.1*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.6*"/>
|
||||
<ColumnDefinition Width="0.01*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20"/>
|
||||
<RowDefinition Height="3*" MinHeight="220"/>
|
||||
<RowDefinition Height="0.4*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Menu IsMainMenu="True" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5">
|
||||
<MenuItem Header="File">
|
||||
<MenuItem Header="Open video(s)" Click="videoFileOpenClick">
|
||||
</MenuItem>
|
||||
<MenuItem Header="Open image directory (as sequence)" Click="imageSequenceFileOpenClick">
|
||||
</MenuItem>
|
||||
<MenuItem Header="Open image(s)" Click="individualImageFilesOpenClick">
|
||||
</MenuItem>
|
||||
<MenuItem Header="Open image directory" Click="individualImageDirectoryOpenClick">
|
||||
</MenuItem>
|
||||
<MenuItem Header="Open webcam" Click="openWebcamClick">
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Name="RecordingMenu" Header="Record" >
|
||||
<MenuItem IsCheckable="True" Header="Record AUs" IsChecked="{Binding RecordAUs}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record pose" IsChecked="{Binding RecordPose}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record 2D landmarks" IsChecked="{Binding Record2DLandmarks}" />
|
||||
<MenuItem IsCheckable="True" Header="Record gaze" IsChecked="{Binding RecordGaze}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record 3D landmarks" IsChecked="{Binding Record3DLandmarks}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record HOG" IsChecked="{Binding RecordHOG}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record model parameters" IsChecked="{Binding RecordModelParameters}" />
|
||||
<MenuItem IsCheckable="True" Header="Record aligned faces" IsChecked="{Binding RecordAligned}"/>
|
||||
<MenuItem IsCheckable="True" Header="Record tracked images/videos" IsChecked="{Binding RecordTracked}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Name="SettingsMenu" Header="Recording settings">
|
||||
<MenuItem Name="OutputLocationItem" Header="Set output location..." Click="OutputLocationItem_Click" ></MenuItem>
|
||||
<MenuItem Header="Set output image size..." Click="setOutputImageSize_Click"></MenuItem>
|
||||
<MenuItem IsCheckable="True" Header="Mask aligned image" IsChecked="{Binding MaskAligned}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Name="AUSetting" Header="OpenFace settings" >
|
||||
<MenuItem IsCheckable="True" Header="Use dynamic AU models" IsChecked="{Binding DynamicAUModels}"/>
|
||||
<MenuItem Header="Set Camera parameters..." Click="setCameraParameters_Click"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="View">
|
||||
<MenuItem IsCheckable="True" Header="Show Video" Click="VisualisationChange" IsChecked="{Binding ShowTrackedVideo}"/>
|
||||
<MenuItem IsCheckable="True" Header="Show Appearance" Click="VisualisationChange" IsChecked="{Binding ShowAppearance}"/>
|
||||
<MenuItem IsCheckable="True" Header="Show Geometry" Click="VisualisationChange" IsChecked="{Binding ShowGeometry}"/>
|
||||
<MenuItem IsCheckable="True" Header="Show AUs" Click="VisualisationChange" IsChecked="{Binding ShowAUs}"/>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="Face Detector" Name="FaceDetectorMenu">
|
||||
<MenuItem x:Name="FaceDetHaar" Header="OpenCV (Haar)" IsCheckable="true" IsChecked="{Binding DetectorHaar}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
<MenuItem x:Name="FaceDetHOG" Header="dlib (HOG-SVM)" IsCheckable="true" IsChecked="{Binding DetectorHOG}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
<MenuItem x:Name="FaceDetCNN" Header="OpenFace (MTCNN)" IsCheckable="true" IsChecked="{Binding DetectorCNN}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="Landmark Detector" Name="LandmarkDetectorMenu">
|
||||
<MenuItem x:Name="LandmarkDetCLM" Header="CLM" IsCheckable="true" IsChecked="{Binding LandmarkDetectorCLM}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
<MenuItem x:Name="LandmarkDetCLNF" Header="CLNF" IsCheckable="true" IsChecked="{Binding LandmarkDetectorCLNF}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
<MenuItem x:Name="LandmarkDetCECLM" Header="CE-CLM" IsCheckable="true" IsChecked="{Binding LandmarkDetectorCECLM}" Click="ExclusiveMenuItem_Click"></MenuItem>
|
||||
</MenuItem>
|
||||
|
||||
</Menu>
|
||||
<Border Grid.Row="1" Grid.Column="4">
|
||||
<Label></Label>
|
||||
</Border>
|
||||
<Border Name="VideoBorder" Grid.Row="1" Grid.Column="0" BorderBrush="Black" BorderThickness="1" Background="LightGray" Margin="5,5,0,0">
|
||||
<OpenFaceOffline:OverlayImage x:Name="overlay_image" />
|
||||
</Border>
|
||||
|
||||
<GroupBox Name="AppearanceBorder" Grid.Row="1" Grid.Column="1" BorderBrush="Black" BorderThickness="1" MinHeight="100">
|
||||
<GroupBox.Header>
|
||||
Appearance features
|
||||
</GroupBox.Header>
|
||||
<Grid HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0">
|
||||
<OpenFaceOffline:SimpleImage x:Name="AlignedFace" MaxHeight="150"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1">
|
||||
<OpenFaceOffline:SimpleImage x:Name="AlignedHOG" MaxHeight="150"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="GeometryBorder" Grid.Row="1" Grid.Column="2" BorderBrush="Black" BorderThickness="1" MinHeight="100">
|
||||
<GroupBox.Header>
|
||||
Geometry features
|
||||
</GroupBox.Header>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="0" >
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<StackPanel Width="120" >
|
||||
<Label Name="headOrientationLabel" FontSize="18" HorizontalContentAlignment="Left">Orientation</Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" Width="60" HorizontalContentAlignment="Left">Turn:</Label>
|
||||
<Label Name="YawLabel" FontSize="12" MinWidth="30" HorizontalContentAlignment="Right">0°</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" Width="60" HorizontalContentAlignment="Left">Up/down:</Label>
|
||||
<Label Name="PitchLabel" FontSize="12" Width="30" HorizontalContentAlignment="Right">0°</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" Width="60" HorizontalContentAlignment="Left">Tilt:</Label>
|
||||
<Label Name="RollLabel" FontSize="12" Width="30" HorizontalContentAlignment="Right">0°</Label>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Line X1="0" X2="0" Y1="20" Y2="90" Width="2" Stroke="Gray"></Line>
|
||||
<StackPanel>
|
||||
<Label Name="headPoseLabel" FontSize="18" HorizontalContentAlignment="Left">Pose</Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" HorizontalContentAlignment="Left" Width="20">X:</Label>
|
||||
<Label Name="XPoseLabel" FontSize="12" HorizontalContentAlignment="Right" Width="50">0 mm</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" HorizontalContentAlignment="Left" Width="20">Y:</Label>
|
||||
<Label Name="YPoseLabel" FontSize="12" HorizontalContentAlignment="Right" Width="50">0 mm</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,0,0,0" FontSize="12" HorizontalContentAlignment="Left" Width="20">Z:</Label>
|
||||
<Label Name="ZPoseLabel" FontSize="12" HorizontalContentAlignment="Right" Width="50">0 mm</Label>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<StackPanel Width="120" >
|
||||
<Label Name="gazePanelLabel" FontSize="18" HorizontalContentAlignment="Left">Gaze</Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,-5,0,0" FontSize="12" Width="60" HorizontalContentAlignment="Left">Left-right:</Label>
|
||||
<Label Margin="0,-5,0,0" Name="GazeXLabel" FontSize="12" MinWidth="30" HorizontalContentAlignment="Right">0</Label>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Margin="5,-5,0,0" FontSize="12" Width="60" HorizontalContentAlignment="Left">Up/down:</Label>
|
||||
<Label Margin="0,-5,0,0" Name="GazeYLabel" FontSize="12" Width="30" HorizontalContentAlignment="Right">0</Label>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center">
|
||||
<OpenFaceOffline:MultiBarGraph x:Name="nonRigidGraph" HorizontalAlignment="Center" MinHeight="100"/>
|
||||
<Label HorizontalAlignment="Center">Non rigid parameters</Label>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Name="ActionUnitBorder" Grid.Row="1" Grid.Column="3" BorderBrush="Black" BorderThickness="1" MinHeight="100">
|
||||
<GroupBox.Header>
|
||||
Action Units
|
||||
</GroupBox.Header>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<GroupBox>
|
||||
<GroupBox.Header>
|
||||
Classification
|
||||
</GroupBox.Header>
|
||||
<OpenFaceOffline:MultiBarGraphHorz x:Name="auClassGraph" HorizontalAlignment="Center" MinWidth="100"/>
|
||||
<!--"<StackPanel Name="AU_classes_panel">
|
||||
</StackPanel>-->
|
||||
</GroupBox>
|
||||
<GroupBox>
|
||||
<GroupBox.Header>
|
||||
Regression
|
||||
</GroupBox.Header>
|
||||
<OpenFaceOffline:MultiBarGraphHorz x:Name="auRegGraph" HorizontalAlignment="Center" MinWidth="100"/>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button VerticalAlignment="Top" IsEnabled="False" Click="PauseButton_Click" Name="PauseButton">Pause</Button>
|
||||
<Button VerticalAlignment="Top" IsEnabled="False" Click="StopButton_Click" Name="StopButton">Stop</Button>
|
||||
<Button VerticalAlignment="Top" IsEnabled="False" Click="SkipButton_Click" Name="NextFrameButton">>> 1</Button>
|
||||
<Button VerticalAlignment="Top" IsEnabled="False" Click="SkipButton_Click" Name="NextFiveFramesButton">>> 5</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
1099
pkg/OpenFace/gui/OpenFaceOffline/MainWindow.xaml.cs
Normal file
1099
pkg/OpenFace/gui/OpenFaceOffline/MainWindow.xaml.cs
Normal file
File diff suppressed because it is too large
Load Diff
222
pkg/OpenFace/gui/OpenFaceOffline/OpenFaceOffline.csproj
Normal file
222
pkg/OpenFace/gui/OpenFaceOffline/OpenFaceOffline.csproj
Normal file
@@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A4760F41-2B1F-4144-B7B2-62785AFFE79B}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenFaceOffline</RootNamespace>
|
||||
<AssemblyName>OpenFaceOffline</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>..\..\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>..\..\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>logo1.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="FpsTracker.cs" />
|
||||
<Compile Include="UI_items\BarGraph.xaml.cs">
|
||||
<DependentUpon>BarGraph.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\BarGraphHorizontal.xaml.cs">
|
||||
<DependentUpon>BarGraphHorizontal.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\CameraParametersEntry.xaml.cs">
|
||||
<DependentUpon>CameraParametersEntry.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\CameraSelection.xaml.cs">
|
||||
<DependentUpon>CameraSelection.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\MultiBarGraph.xaml.cs">
|
||||
<DependentUpon>MultiBarGraph.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\MultiBarGraphHorz.xaml.cs">
|
||||
<DependentUpon>MultiBarGraphHorz.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\NumberEntryWindow.xaml.cs">
|
||||
<DependentUpon>NumberEntryWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\OverlayImage.xaml.cs">
|
||||
<DependentUpon>OverlayImage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UI_items\SimpleImage.xaml.cs">
|
||||
<DependentUpon>SimpleImage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="UI_items\BarGraph.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\BarGraphHorizontal.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\CameraParametersEntry.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\CameraSelection.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\MultiBarGraph.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\MultiBarGraphHorz.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\NumberEntryWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\OverlayImage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UI_items\SimpleImage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\lib\local\CppInerop\CppInerop.vcxproj">
|
||||
<Project>{78196985-ee54-411f-822b-5a23edf80642}</Project>
|
||||
<Name>CppInerop</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="logo1.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy /I /E /Y /D "$(ProjectDir)logo1.ico" "$(ProjectDir)$(OutDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
55
pkg/OpenFace/gui/OpenFaceOffline/Properties/AssemblyInfo.cs
Normal file
55
pkg/OpenFace/gui/OpenFaceOffline/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenFaceOffline")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("OpenFaceOffline")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
71
pkg/OpenFace/gui/OpenFaceOffline/Properties/Resources.Designer.cs
generated
Normal file
71
pkg/OpenFace/gui/OpenFaceOffline/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenFaceOffline.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenFaceOffline.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
pkg/OpenFace/gui/OpenFaceOffline/Properties/Resources.resx
Normal file
117
pkg/OpenFace/gui/OpenFaceOffline/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
30
pkg/OpenFace/gui/OpenFaceOffline/Properties/Settings.Designer.cs
generated
Normal file
30
pkg/OpenFace/gui/OpenFaceOffline/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenFaceOffline.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
17
pkg/OpenFace/gui/OpenFaceOffline/UI_items/BarGraph.xaml
Normal file
17
pkg/OpenFace/gui/OpenFaceOffline/UI_items/BarGraph.xaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<UserControl x:Class="OpenFaceOffline.BarGraph"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="100" d:DesignWidth="100">
|
||||
<StackPanel HorizontalAlignment="Center" >
|
||||
|
||||
<Border Name="barContainerPos" Background="PowderBlue" Width="32" DockPanel.Dock="Top" MinHeight="50">
|
||||
<Rectangle Name="barPos" Fill="CadetBlue" Height="0" VerticalAlignment="Bottom"/>
|
||||
</Border>
|
||||
<Border Name="barContainerNeg" Background="PowderBlue" Width="32" MinHeight="50">
|
||||
<Rectangle Name="barNeg" Fill="CadetBlue" Height="0" VerticalAlignment="Top"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
97
pkg/OpenFace/gui/OpenFaceOffline/UI_items/BarGraph.xaml.cs
Normal file
97
pkg/OpenFace/gui/OpenFaceOffline/UI_items/BarGraph.xaml.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BarGraph.xaml
|
||||
/// </summary>
|
||||
public partial class BarGraph : UserControl
|
||||
{
|
||||
private double targetValue = 0;
|
||||
|
||||
public BarGraph()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetValue(double value)
|
||||
{
|
||||
targetValue = 1.5 * value;
|
||||
if (targetValue > 0)
|
||||
{
|
||||
if (targetValue > barContainerPos.ActualHeight)
|
||||
targetValue = barContainerPos.ActualHeight;
|
||||
|
||||
barPos.Height = targetValue;
|
||||
barNeg.Height = 0;
|
||||
}
|
||||
if (targetValue < 0)
|
||||
{
|
||||
if (-targetValue > barContainerNeg.ActualHeight)
|
||||
targetValue = -barContainerNeg.ActualHeight;
|
||||
|
||||
barPos.Height = 0;
|
||||
barNeg.Height = -targetValue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<UserControl x:Class="OpenFaceOffline.BarGraphHorizontal"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="30" d:DesignWidth="200">
|
||||
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left" >
|
||||
<Label Name="Label" FontSize="10" Width="120">AU name</Label>
|
||||
<Border Name="barContainerPos" Background="PowderBlue" Height="12" DockPanel.Dock="Left" MinWidth="60">
|
||||
<Rectangle Name="barPos" Fill="CadetBlue" Width="0" HorizontalAlignment="Left"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,100 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for BarGraphHorizontal.xaml
|
||||
/// </summary>
|
||||
public partial class BarGraphHorizontal : UserControl
|
||||
{
|
||||
double targetValue = 0;
|
||||
|
||||
public BarGraphHorizontal(String label)
|
||||
{
|
||||
InitializeComponent();
|
||||
Label.Content = label;
|
||||
}
|
||||
|
||||
public void SetValue(double value)
|
||||
{
|
||||
targetValue = value;
|
||||
barPos.Width = targetValue * barContainerPos.ActualWidth;
|
||||
}
|
||||
|
||||
public double GetTarget()
|
||||
{
|
||||
return targetValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
@@ -0,0 +1,219 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for TextEntryWindow.xaml
|
||||
/// </summary>
|
||||
public partial class CameraParametersEntry : Window
|
||||
{
|
||||
public CameraParametersEntry(float fx, float fy, float cx, float cy)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.KeyDown += new KeyEventHandler(TextEntry_KeyDown);
|
||||
|
||||
if(fx == -1 || fy == -1 || cx == -1 || cy == -1)
|
||||
{
|
||||
this.fx = 500; this.fy = 500; this.cx = 320; this.cy = 240;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fx = fx; this.fy = fy; this.cx = cx; this.cy = cy;
|
||||
automaticCheckBox.IsChecked = false;
|
||||
fxTextBox.IsEnabled = true;
|
||||
fyTextBox.IsEnabled = true;
|
||||
cxTextBox.IsEnabled = true;
|
||||
cyTextBox.IsEnabled = true;
|
||||
}
|
||||
|
||||
fxTextBox.Text = this.fx.ToString();
|
||||
fyTextBox.Text = this.fy.ToString();
|
||||
cxTextBox.Text = this.cx.ToString();
|
||||
cyTextBox.Text = this.cy.ToString();
|
||||
|
||||
fxTextBox.TextChanged += ResponseTextBox_TextChanged;
|
||||
fyTextBox.TextChanged += ResponseTextBox_TextChanged;
|
||||
cxTextBox.TextChanged += ResponseTextBox_TextChanged;
|
||||
cyTextBox.TextChanged += ResponseTextBox_TextChanged;
|
||||
|
||||
}
|
||||
|
||||
private void OKButton_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
DialogResult = true;
|
||||
}
|
||||
|
||||
private void TextEntry_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
DialogResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
private float fx = -1, fy = -1, cx = -1, cy = -1;
|
||||
|
||||
public bool IsAutomatic
|
||||
{
|
||||
get { return automaticCheckBox.IsChecked == true; }
|
||||
}
|
||||
public float Fx
|
||||
{
|
||||
get { return automaticCheckBox.IsChecked == true ? -1 : fx; }
|
||||
}
|
||||
|
||||
public float Fy
|
||||
{
|
||||
get { return automaticCheckBox.IsChecked == true ? -1 : fy; }
|
||||
}
|
||||
public float Cx
|
||||
{
|
||||
get { return automaticCheckBox.IsChecked == true ? -1 : cx; }
|
||||
}
|
||||
public float Cy
|
||||
{
|
||||
get { return automaticCheckBox.IsChecked == true ? -1 : cy; }
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(automaticCheckBox.IsChecked == true)
|
||||
{
|
||||
fxTextBox.IsEnabled = false;
|
||||
fyTextBox.IsEnabled = false;
|
||||
cxTextBox.IsEnabled = false;
|
||||
cyTextBox.IsEnabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
fxTextBox.IsEnabled = true;
|
||||
fyTextBox.IsEnabled = true;
|
||||
cxTextBox.IsEnabled = true;
|
||||
cyTextBox.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Do not allow illegal characters like
|
||||
private void ResponseTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
float fx_n = (float)Double.Parse(fxTextBox.Text);
|
||||
float fy_n = (float)Double.Parse(fyTextBox.Text);
|
||||
float cx_n = (float)Double.Parse(cxTextBox.Text);
|
||||
float cy_n = (float)Double.Parse(cyTextBox.Text);
|
||||
|
||||
if (fx_n > 0 && fy_n > 0 && cx_n > 0 && cy_n > 0)
|
||||
{
|
||||
fx = fx_n;
|
||||
fy = fy_n;
|
||||
cx = cx_n;
|
||||
cy = cy_n;
|
||||
warningLabel.Visibility = System.Windows.Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
warningLabel.Visibility = System.Windows.Visibility.Visible;
|
||||
|
||||
fxTextBox.Text = fx.ToString();
|
||||
fyTextBox.Text = fy.ToString();
|
||||
cxTextBox.Text = cx.ToString();
|
||||
cyTextBox.Text = cy.ToString();
|
||||
|
||||
fxTextBox.SelectionStart = fxTextBox.Text.Length;
|
||||
fyTextBox.SelectionStart = fyTextBox.Text.Length;
|
||||
cxTextBox.SelectionStart = cxTextBox.Text.Length;
|
||||
cyTextBox.SelectionStart = cyTextBox.Text.Length;
|
||||
|
||||
}
|
||||
}
|
||||
catch (FormatException except)
|
||||
{
|
||||
fxTextBox.Text = fx.ToString();
|
||||
fyTextBox.Text = fy.ToString();
|
||||
cxTextBox.Text = cx.ToString();
|
||||
cyTextBox.Text = cy.ToString();
|
||||
|
||||
fxTextBox.SelectionStart = fxTextBox.Text.Length;
|
||||
fyTextBox.SelectionStart = fyTextBox.Text.Length;
|
||||
cxTextBox.SelectionStart = cxTextBox.Text.Length;
|
||||
cyTextBox.SelectionStart = cyTextBox.Text.Length;
|
||||
|
||||
warningLabel.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<Window x:Class="OpenFaceOffline.CameraSelection"
|
||||
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"
|
||||
xmlns:local="clr-namespace:OpenFaceOffline"
|
||||
mc:Ignorable="d"
|
||||
Title="Camera selection" Height="460" Width="600" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Closing="Window_Closing">
|
||||
<Grid>
|
||||
<Grid Name="camerasPanel" Visibility="Hidden">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="320" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="40" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.ColumnSpan="10" HorizontalContentAlignment="Center" FontSize="20">Choose Video Source</Label>
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="0" Name="ThumbnailPanel" HorizontalAlignment="Center">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="25" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
</Grid>
|
||||
<!-- Click="OpenFile_Click" -->
|
||||
<Button Width="150" Grid.Row="3" Height="35" Grid.ColumnSpan="10" FontSize="20" Click="Button_Click">Select camera</Button>
|
||||
</Grid>
|
||||
<Grid Name="LoadingGrid" Visibility="Visible">
|
||||
<StackPanel Grid.Row="1" Name="ProgressBar" Margin="20">
|
||||
<Label HorizontalAlignment="Center" FontSize="18">Loading Webcams</Label>
|
||||
<ProgressBar Height="20" Minimum="0" Maximum="100" Name="pbStatus" IsIndeterminate="True" />
|
||||
<Label HorizontalAlignment="Center" FontSize="18">Might take some time the first time</Label>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,244 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
using CppInterop;
|
||||
using System.Windows.Threading;
|
||||
using System.Threading;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CameraSelection.xaml
|
||||
/// </summary>
|
||||
public partial class CameraSelection : Window
|
||||
{
|
||||
|
||||
List<Border> sample_images;
|
||||
List<ComboBox> combo_boxes;
|
||||
|
||||
// id, width, height
|
||||
public Tuple<int, int, int> selected_camera;
|
||||
|
||||
List<List<Tuple<int, int>>> resolutions_all;
|
||||
int selected_camera_idx = -1;
|
||||
|
||||
// indicate if user clicked on camera
|
||||
public bool camera_selected = false;
|
||||
|
||||
public bool no_cameras_found = false;
|
||||
|
||||
public List<Tuple<int, String, List<Tuple<int, int>>, OpenCVWrappers.RawImage>> cams;
|
||||
|
||||
public void PopulateCameraSelections()
|
||||
{
|
||||
this.KeyDown += new KeyEventHandler(CameraSelection_KeyDown);
|
||||
|
||||
// Finding the cameras here
|
||||
if (cams == null)
|
||||
{
|
||||
String root = AppDomain.CurrentDomain.BaseDirectory;
|
||||
//cams = CameraInterop.Capture.GetCameras(root);
|
||||
cams = UtilitiesOF.SequenceReader.GetCameras(root);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
|
||||
sample_images = new List<Border>();
|
||||
|
||||
// Each cameras corresponding resolutions
|
||||
resolutions_all = new List<List<Tuple<int, int>>>();
|
||||
combo_boxes = new List<ComboBox>();
|
||||
|
||||
foreach (var s in cams)
|
||||
{
|
||||
|
||||
var b = s.Item4.CreateWriteableBitmap();
|
||||
s.Item4.UpdateWriteableBitmap(b);
|
||||
b.Freeze();
|
||||
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
int idx = i;
|
||||
Image img = new Image();
|
||||
img.Source = b;
|
||||
img.Margin = new Thickness(5);
|
||||
|
||||
ColumnDefinition col_def = new ColumnDefinition();
|
||||
ThumbnailPanel.ColumnDefinitions.Add(col_def);
|
||||
|
||||
Border img_border = new Border();
|
||||
img_border.SetValue(Grid.ColumnProperty, i);
|
||||
img_border.SetValue(Grid.RowProperty, 0);
|
||||
img_border.CornerRadius = new CornerRadius(5);
|
||||
|
||||
StackPanel img_panel = new StackPanel();
|
||||
|
||||
Label camera_name_label = new Label();
|
||||
camera_name_label.Content = s.Item2;
|
||||
camera_name_label.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
|
||||
img_panel.Children.Add(camera_name_label);
|
||||
img.Height = 200;
|
||||
img_panel.Children.Add(img);
|
||||
img_border.Child = img_panel;
|
||||
|
||||
sample_images.Add(img_border);
|
||||
|
||||
ThumbnailPanel.Children.Add(img_border);
|
||||
|
||||
ComboBox resolutions = new ComboBox();
|
||||
resolutions.Width = 80;
|
||||
combo_boxes.Add(resolutions);
|
||||
|
||||
resolutions_all.Add(new List<Tuple<int, int>>());
|
||||
|
||||
foreach (var r in s.Item3)
|
||||
{
|
||||
resolutions.Items.Add(r.Item1 + "x" + r.Item2);
|
||||
resolutions_all[resolutions_all.Count - 1].Add(new Tuple<int, int>(r.Item1, r.Item2));
|
||||
|
||||
}
|
||||
|
||||
resolutions.SelectedIndex = 0;
|
||||
for (int res = 0; res < s.Item3.Count; ++res)
|
||||
{
|
||||
if (s.Item3[res].Item1 >= 640 && s.Item3[res].Item2 >= 480)
|
||||
{
|
||||
resolutions.SelectedIndex = res;
|
||||
break;
|
||||
}
|
||||
}
|
||||
resolutions.SetValue(Grid.ColumnProperty, i);
|
||||
resolutions.SetValue(Grid.RowProperty, 2);
|
||||
ThumbnailPanel.Children.Add(resolutions);
|
||||
|
||||
img_panel.MouseDown += (sender, e) =>
|
||||
{
|
||||
ChooseCamera(idx);
|
||||
};
|
||||
|
||||
resolutions.DropDownOpened += (sender, e) =>
|
||||
{
|
||||
ChooseCamera(idx);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
i++;
|
||||
|
||||
}
|
||||
if (cams.Count > 0)
|
||||
{
|
||||
no_cameras_found = false;
|
||||
Dispatcher.Invoke(DispatcherPriority.Render, new TimeSpan(0, 0, 0, 0, 200), (Action)(() =>
|
||||
{
|
||||
ChooseCamera(0);
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
string messageBoxText = "No cameras detected, please connect a webcam";
|
||||
string caption = "Camera error!";
|
||||
MessageBoxButton button = MessageBoxButton.OK;
|
||||
MessageBoxImage icon = MessageBoxImage.Warning;
|
||||
MessageBox.Show(messageBoxText, caption, button, icon);
|
||||
selected_camera_idx = -1;
|
||||
no_cameras_found = true;
|
||||
Dispatcher.Invoke(DispatcherPriority.Render, new TimeSpan(0, 0, 0, 0, 200), (Action)(() =>
|
||||
{
|
||||
this.Close();
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public CameraSelection()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
// We want to display the loading screen first
|
||||
Thread load_cameras = new Thread(LoadCameras);
|
||||
load_cameras.Start();
|
||||
}
|
||||
|
||||
public void LoadCameras()
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = true;
|
||||
PopulateCameraSelections();
|
||||
|
||||
Dispatcher.Invoke(DispatcherPriority.Render, new TimeSpan(0, 0, 0, 0, 200), (Action)(() =>
|
||||
{
|
||||
LoadingGrid.Visibility = System.Windows.Visibility.Hidden;
|
||||
camerasPanel.Visibility = System.Windows.Visibility.Visible;
|
||||
}));
|
||||
}
|
||||
|
||||
public CameraSelection(List<Tuple<int, String, List<Tuple<int, int>>, OpenCVWrappers.RawImage>> cams)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.cams = cams;
|
||||
PopulateCameraSelections();
|
||||
|
||||
Dispatcher.Invoke(DispatcherPriority.Render, new TimeSpan(0, 0, 0, 0, 200), (Action)(() =>
|
||||
{
|
||||
LoadingGrid.Visibility = System.Windows.Visibility.Hidden;
|
||||
camerasPanel.Visibility = System.Windows.Visibility.Visible;
|
||||
}));
|
||||
}
|
||||
|
||||
private void ChooseCamera(int idx)
|
||||
{
|
||||
selected_camera_idx = idx;
|
||||
|
||||
foreach (var img in sample_images)
|
||||
{
|
||||
img.BorderThickness = new Thickness(1);
|
||||
img.BorderBrush = Brushes.Gray;
|
||||
}
|
||||
sample_images[idx].BorderThickness = new Thickness(4);
|
||||
sample_images[idx].BorderBrush = Brushes.Green;
|
||||
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Select();
|
||||
}
|
||||
|
||||
private void CameraSelection_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
Select();
|
||||
}
|
||||
}
|
||||
|
||||
private void Select()
|
||||
{
|
||||
camera_selected = true;
|
||||
|
||||
int selected_res = combo_boxes[selected_camera_idx].SelectedIndex;
|
||||
Tuple<int, int> resolution_selected = resolutions_all[selected_camera_idx][selected_res];
|
||||
|
||||
selected_camera = new Tuple<int, int, int>(selected_camera_idx, resolution_selected.Item1, resolution_selected.Item2);
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
// Do not close it as user might want to open it again
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
pkg/OpenFace/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml
Normal file
11
pkg/OpenFace/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml
Normal file
@@ -0,0 +1,11 @@
|
||||
<UserControl x:Class="OpenFaceOffline.MultiBarGraph"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="100" d:DesignWidth="300">
|
||||
<Grid Name="barGrid">
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
120
pkg/OpenFace/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs
Normal file
120
pkg/OpenFace/gui/OpenFaceOffline/UI_items/MultiBarGraph.xaml.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MultiBarGraph.xaml
|
||||
/// </summary>
|
||||
public partial class MultiBarGraph : UserControl
|
||||
{
|
||||
|
||||
int num_bars = 0;
|
||||
List<BarGraph> graphs;
|
||||
|
||||
public MultiBarGraph()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
graphs = new List<BarGraph>();
|
||||
}
|
||||
|
||||
public void Update(List<float> data)
|
||||
{
|
||||
// Create new bars if necessary
|
||||
if (num_bars != data.Count)
|
||||
{
|
||||
graphs = new List<BarGraph>();
|
||||
num_bars = data.Count;
|
||||
barGrid.Children.Clear();
|
||||
barGrid.ColumnDefinitions.Clear();
|
||||
foreach (var value in data)
|
||||
{
|
||||
BarGraph newBar = new BarGraph();
|
||||
newBar.SetValue(value);
|
||||
graphs.Add(newBar);
|
||||
barGrid.ColumnDefinitions.Add(new ColumnDefinition());
|
||||
Grid.SetColumn(newBar, graphs.Count);
|
||||
barGrid.Children.Add(newBar);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Update the bars
|
||||
for (int i = 0; i < data.Count; ++i)
|
||||
{
|
||||
graphs[i].SetValue(data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<UserControl x:Class="OpenFaceOffline.MultiBarGraphHorz"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
<Grid Name="barGrid">
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,150 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MultiBarGraphHorz.xaml
|
||||
/// </summary>
|
||||
public partial class MultiBarGraphHorz : UserControl
|
||||
{
|
||||
int num_bars = 0;
|
||||
Dictionary<String, BarGraphHorizontal> graphs;
|
||||
|
||||
// Name mapping
|
||||
Dictionary<String, String> mapping;
|
||||
|
||||
public MultiBarGraphHorz()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
graphs = new Dictionary<string, BarGraphHorizontal>();
|
||||
|
||||
mapping = new Dictionary<string, string>();
|
||||
mapping["AU01"] = "Inner Brow raiser";
|
||||
mapping["AU02"] = "Outer Brow raiser";
|
||||
mapping["AU04"] = "Brow lowerer";
|
||||
mapping["AU05"] = "Upper lid raiser";
|
||||
mapping["AU06"] = "Cheek raiser";
|
||||
mapping["AU07"] = "Lid tightener";
|
||||
mapping["AU09"] = "Nose wrinkler";
|
||||
mapping["AU10"] = "Upper lip raiser";
|
||||
mapping["AU12"] = "Lip corner puller (smile)";
|
||||
mapping["AU14"] = "Dimpler";
|
||||
mapping["AU15"] = "Lip corner depressor";
|
||||
mapping["AU17"] = "Chin Raiser";
|
||||
mapping["AU20"] = "Lip Stretcher";
|
||||
mapping["AU23"] = "Lip tightener";
|
||||
mapping["AU25"] = "Lips part";
|
||||
mapping["AU26"] = "Jaw drop";
|
||||
mapping["AU28"] = "Lip suck";
|
||||
mapping["AU45"] = "Blink";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Update(Dictionary<String, double> data)
|
||||
{
|
||||
// Create new bars if necessary
|
||||
if (num_bars != data.Count)
|
||||
{
|
||||
num_bars = data.Count;
|
||||
barGrid.Children.Clear();
|
||||
barGrid.RowDefinitions.Clear();
|
||||
graphs.Clear();
|
||||
|
||||
// Make sure AUs are sorted
|
||||
var data_labels = data.Keys.ToList();
|
||||
data_labels.Sort();
|
||||
|
||||
foreach (var label in data_labels)
|
||||
{
|
||||
BarGraphHorizontal newBar = new BarGraphHorizontal(label + " - " + mapping[label]);
|
||||
newBar.SetValue(data[label]);
|
||||
barGrid.RowDefinitions.Add(new RowDefinition());
|
||||
Grid.SetRow(newBar, graphs.Count);
|
||||
graphs.Add(label, newBar);
|
||||
barGrid.Children.Add(newBar);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Update the bars
|
||||
foreach (var value in data)
|
||||
{
|
||||
graphs[value.Key].SetValue(value.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<Window x:Class="OpenFaceOffline.NumberEntryWindow"
|
||||
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="Output image size" Height="110" Width="250" ResizeMode="NoResize">
|
||||
<Grid Background="WhiteSmoke">
|
||||
<StackPanel>
|
||||
<StackPanel FocusManager.FocusedElement="{Binding ElementName=ResponseTextBox}" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<TextBlock HorizontalAlignment="Center" Text="Output image size:" FontSize="12" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
||||
<TextBox Margin="0,4,0,0" x:Name="ResponseTextBox_x" FontSize="12" Width="50" TextChanged="ResponseTextBox_TextChanged" />
|
||||
<Label>x</Label>
|
||||
<TextBox Margin="0,4,0,0" x:Name="ResponseTextBox_y" FontSize="12" Width="50" TextChanged="ResponseTextBox_TextChanged" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
<Label Name="warningLabel" Visibility="Hidden" FontStyle="Italic" Foreground="Red" HorizontalAlignment="Center" VerticalAlignment="Center">Has to be a non negative integer</Label>
|
||||
<Button Content="OK" Click="OKButton_Click" Width="50" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,149 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for TextEntryWindow.xaml
|
||||
/// </summary>
|
||||
public partial class NumberEntryWindow : Window
|
||||
{
|
||||
public NumberEntryWindow(int initValue)
|
||||
{
|
||||
InitializeComponent();
|
||||
ResponseTextBox_x.Text = initValue.ToString();
|
||||
ResponseTextBox_y.Text = initValue.ToString();
|
||||
OutputInt = initValue;
|
||||
this.KeyDown += new KeyEventHandler(TextEntry_KeyDown);
|
||||
|
||||
}
|
||||
|
||||
//private string ResponseText_x
|
||||
//{
|
||||
// get { return ResponseTextBox_x.Text; }
|
||||
// set { ResponseTextBox_x.Text = value; }
|
||||
//}
|
||||
//private string ResponseText_y
|
||||
//{
|
||||
// get { return ResponseTextBox_y.Text; }
|
||||
// set { ResponseTextBox_y.Text = value; }
|
||||
//}
|
||||
|
||||
public int OutputInt;
|
||||
|
||||
private void OKButton_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
DialogResult = true;
|
||||
}
|
||||
|
||||
private void TextEntry_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
DialogResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Do not allow illegal characters like
|
||||
private void ResponseTextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
int OutputIntNew = Int32.Parse(ResponseTextBox_x.Text);
|
||||
if(OutputIntNew > 0)
|
||||
{
|
||||
OutputInt = OutputIntNew;
|
||||
warningLabel.Visibility = System.Windows.Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
warningLabel.Visibility = System.Windows.Visibility.Visible;
|
||||
ResponseTextBox_x.Text = OutputInt.ToString();
|
||||
ResponseTextBox_x.SelectionStart = ResponseTextBox_x.Text.Length;
|
||||
|
||||
}
|
||||
}
|
||||
catch (FormatException except)
|
||||
{
|
||||
ResponseTextBox_x.Text = OutputInt.ToString();
|
||||
ResponseTextBox_x.SelectionStart = ResponseTextBox_x.Text.Length;
|
||||
warningLabel.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
|
||||
ResponseTextBox_y.Text = OutputInt.ToString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<Image x:Class="OpenFaceOffline.OverlayImage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300" >
|
||||
</Image>
|
||||
256
pkg/OpenFace/gui/OpenFaceOffline/UI_items/OverlayImage.xaml.cs
Normal file
256
pkg/OpenFace/gui/OpenFaceOffline/UI_items/OverlayImage.xaml.cs
Normal file
@@ -0,0 +1,256 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for OverlayImage.xaml
|
||||
/// </summary>
|
||||
public partial class OverlayImage : Image
|
||||
{
|
||||
public OverlayImage()
|
||||
{
|
||||
InitializeComponent();
|
||||
OverlayLines = new List<List<Tuple<Point, Point>>>();
|
||||
OverlayPoints = new List<List<Point>>();
|
||||
OverlayPointsVisibility = new List<List<bool>>();
|
||||
OverlayEyePoints = new List<List<Point>>();
|
||||
GazeLines = new List<List<Tuple<Point, Point>>>();
|
||||
Confidence = new List<double>();
|
||||
FaceScale = new List<double>();
|
||||
|
||||
Progress = -1;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
OverlayLines.Clear();
|
||||
OverlayPoints.Clear();
|
||||
OverlayPointsVisibility.Clear();
|
||||
OverlayEyePoints.Clear();
|
||||
GazeLines.Clear();
|
||||
Confidence.Clear();
|
||||
FaceScale.Clear();
|
||||
}
|
||||
|
||||
protected override void OnRender(DrawingContext dc)
|
||||
{
|
||||
base.OnRender(dc);
|
||||
|
||||
if (OverlayLines == null)
|
||||
OverlayLines = new List<List<Tuple<Point, Point>>>();
|
||||
|
||||
if (OverlayPoints == null)
|
||||
OverlayPoints = new List<List<Point>>();
|
||||
|
||||
if (OverlayPointsVisibility == null)
|
||||
OverlayPointsVisibility = new List<List<bool>>();
|
||||
|
||||
if (OverlayEyePoints == null)
|
||||
OverlayEyePoints = new List<List<Point>>();
|
||||
|
||||
if (Source == null || !(Source is WriteableBitmap))
|
||||
return;
|
||||
|
||||
var width = ((WriteableBitmap)Source).PixelWidth;
|
||||
var height = ((WriteableBitmap)Source).PixelHeight;
|
||||
|
||||
// Go over all faces
|
||||
for (int i = 0; i < OverlayPoints.Count; i++)
|
||||
{
|
||||
|
||||
// The point and line size should be proportional to the face size and the image scaling
|
||||
double scaling_p = 0.88 * FaceScale[i] * ActualWidth / width;
|
||||
|
||||
// Low confidence leads to more transparent visualization
|
||||
double confidence = Confidence[i];
|
||||
if (confidence < 0.4)
|
||||
{
|
||||
confidence = 0.4;
|
||||
}
|
||||
|
||||
// Don't let it get too small
|
||||
if (scaling_p < 0.6)
|
||||
scaling_p = 0.6;
|
||||
|
||||
foreach (var line in OverlayLines[i])
|
||||
{
|
||||
|
||||
var p1 = new Point(ActualWidth * line.Item1.X / width, ActualHeight * line.Item1.Y / height);
|
||||
var p2 = new Point(ActualWidth * line.Item2.X / width, ActualHeight * line.Item2.Y / height);
|
||||
dc.DrawLine(new Pen(new SolidColorBrush(Color.FromArgb(200, (byte)(100 + (155 * (1 - confidence))), (byte)(100 + (155 * confidence)), 100)), 2.0 * scaling_p), p1, p2);
|
||||
}
|
||||
|
||||
foreach (var line in GazeLines[i])
|
||||
{
|
||||
|
||||
var p1 = new Point(ActualWidth * line.Item1.X / width, ActualHeight * line.Item1.Y / height);
|
||||
var p2 = new Point(ActualWidth * line.Item2.X / width, ActualHeight * line.Item2.Y / height);
|
||||
|
||||
var dir = p2 - p1;
|
||||
p2 = p1 + dir * scaling_p * 2;
|
||||
dc.DrawLine(new Pen(new SolidColorBrush(Color.FromArgb(200, (byte)(240), (byte)(30), (byte)100)), 5.0 * scaling_p), p1, p2);
|
||||
|
||||
}
|
||||
|
||||
for (int j = 0; j < OverlayPoints[i].Count; j++)
|
||||
{
|
||||
var p = OverlayPoints[i][j];
|
||||
|
||||
var q = new Point(ActualWidth * p.X / width, ActualHeight * p.Y / height);
|
||||
|
||||
if(OverlayPointsVisibility[i].Count == 0 || OverlayPointsVisibility[i][j])
|
||||
{
|
||||
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb((byte)(230 * confidence), 255, 50, 50)), null, q, 2.75 * scaling_p, 3.0 * scaling_p);
|
||||
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb((byte)(230 * confidence), 255, 255, 100)), null, q, 1.75 * scaling_p, 2.0 * scaling_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Draw fainter if landmark not visible
|
||||
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb((byte)(125 * confidence), 255, 50, 50)), null, q, 2.75 * scaling_p, 3.0 * scaling_p);
|
||||
dc.DrawEllipse(new SolidColorBrush(Color.FromArgb((byte)(125 * confidence), 255, 255, 100)), null, q, 1.75 * scaling_p, 2.0 * scaling_p);
|
||||
}
|
||||
}
|
||||
|
||||
for (int id = 0; id < OverlayEyePoints[i].Count; id++)
|
||||
{
|
||||
|
||||
var q1 = new Point(ActualWidth * OverlayEyePoints[i][id].X / width, ActualHeight * OverlayEyePoints[i][id].Y / height);
|
||||
|
||||
// The the eye points can be defined for multiple faces, turn id's to be relevant to one face
|
||||
|
||||
int next_point = id + 1;
|
||||
|
||||
if (id == 7) next_point = 0;
|
||||
if (id == 19) next_point = 8;
|
||||
if (id == 27) next_point = 20;
|
||||
|
||||
if (id == 35) next_point = 28;
|
||||
if (id == 47) next_point = 36;
|
||||
if (id == 55) next_point = 48;
|
||||
|
||||
var q2 = new Point(ActualWidth * OverlayEyePoints[i][next_point].X / width, ActualHeight * OverlayEyePoints[i][next_point].Y / height);
|
||||
|
||||
if (id < 28 && (id < 8 || id > 19) || (id >= 28 &&(id - 28<8 || id - 28 >19)))
|
||||
{
|
||||
dc.DrawLine(new Pen(new SolidColorBrush(Color.FromArgb(200, (byte)(240), (byte)(30), (byte)100)), 1.5 * scaling_p), q1, q2);
|
||||
}
|
||||
else
|
||||
{
|
||||
dc.DrawLine(new Pen(new SolidColorBrush(Color.FromArgb(200, (byte)(100), (byte)(30), (byte)240)), 2.5 * scaling_p), q1, q2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Only display the confidence of the last face
|
||||
double scaling = ActualWidth / 400.0;
|
||||
|
||||
int confidence_width = (int)(107.0 * scaling);
|
||||
int confidence_height = (int)(18.0 * scaling);
|
||||
|
||||
int final_id = Confidence.Count - 1;
|
||||
|
||||
Brush conf_brush = new SolidColorBrush(Color.FromRgb((byte)((1 - Confidence[final_id]) * 255), (byte)(Confidence[final_id] * 255), (byte)40));
|
||||
dc.DrawRoundedRectangle(conf_brush, new Pen(Brushes.Black, 0.5 * scaling), new Rect(ActualWidth - confidence_width - 1, 0, confidence_width, confidence_height), 3.0 * scaling, 3.0 * scaling);
|
||||
|
||||
FormattedText txt = new FormattedText("Confidence: " + (int)(100 * Confidence[final_id]) + "%", System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, new Typeface("Verdana"), 12.0 * scaling, Brushes.Black);
|
||||
dc.DrawText(txt, new Point(ActualWidth - confidence_width + 2, 2));
|
||||
|
||||
int fps_width = (int)(52.0 * scaling);
|
||||
int fps_height = (int)(18.0 * scaling);
|
||||
|
||||
dc.DrawRoundedRectangle(Brushes.WhiteSmoke, new Pen(Brushes.Black, 0.5 * scaling), new Rect(0, 0, fps_width, fps_height), 3.0 * scaling, 3.0 * scaling);
|
||||
FormattedText fps_txt = new FormattedText("FPS: " + (int)FPS, System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, new Typeface("Verdana"), 12.0 * scaling, Brushes.Black);
|
||||
dc.DrawText(fps_txt, new Point(2.0 * scaling, 0));
|
||||
|
||||
old_width = width;
|
||||
old_height = height;
|
||||
|
||||
// Drawing a progress bar at the bottom of the image
|
||||
if (Progress > 0)
|
||||
{
|
||||
int progress_bar_height = (int)(6.0 * scaling);
|
||||
dc.DrawRectangle(Brushes.GreenYellow, new Pen(Brushes.Black, 0.5 * scaling), new Rect(0, ActualHeight - progress_bar_height, Progress * ActualWidth, progress_bar_height));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// To allow for visualizing multiple faces use a List of Lists
|
||||
public List<List<Tuple<Point, Point>>> OverlayLines { get; set; }
|
||||
public List<List<Tuple<Point, Point>>> GazeLines { get; set; }
|
||||
public List<List<Point>> OverlayPoints { get; set; }
|
||||
public List<List<bool>> OverlayPointsVisibility { get; set; }
|
||||
public List<List<Point>> OverlayEyePoints { get; set; }
|
||||
public List<double> FaceScale { get; set; }
|
||||
public List<double> Confidence { get; set; }
|
||||
public double FPS { get; set; }
|
||||
|
||||
// 0 to 1 indicates how much video has been processed so far
|
||||
public double Progress { get; set; }
|
||||
|
||||
int old_width;
|
||||
int old_height;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<Image x:Class="OpenFaceOffline.SimpleImage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300" >
|
||||
</Image>
|
||||
@@ -0,0 +1,94 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016, Carnegie Mellon University and University of Cambridge,
|
||||
// all rights reserved.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED “AS IS” FOR ACADEMIC USE ONLY AND ANY EXPRESS
|
||||
// OR IMPLIED WARRANTIES WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
|
||||
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY.
|
||||
// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Notwithstanding the license granted herein, Licensee acknowledges that certain components
|
||||
// of the Software may be covered by so-called “open source” software licenses (“Open Source
|
||||
// Components”), which means any software licenses approved as open source licenses by the
|
||||
// Open Source Initiative or any substantially similar licenses, including without limitation any
|
||||
// license that, as a condition of distribution of the software licensed under such license,
|
||||
// requires that the distributor make the software available in source code format. Licensor shall
|
||||
// provide a list of Open Source Components for a particular version of the Software upon
|
||||
// Licensee’s request. Licensee will comply with the applicable terms of such licenses and to
|
||||
// the extent required by the licenses covering Open Source Components, the terms of such
|
||||
// licenses will apply in lieu of the terms of this Agreement. To the extent the terms of the
|
||||
// licenses applicable to Open Source Components prohibit any of the restrictions in this
|
||||
// License Agreement with respect to such Open Source Component, such restrictions will not
|
||||
// apply to such Open Source Component. To the extent the terms of the licenses applicable to
|
||||
// Open Source Components require Licensor to make an offer to provide source code or
|
||||
// related information in connection with the Software, such offer is hereby made. Any request
|
||||
// for source code or related information should be directed to cl-face-tracker-distribution@lists.cam.ac.uk
|
||||
// Licensee acknowledges receipt of notices for the Open Source Components for the initial
|
||||
// delivery of the Software.
|
||||
|
||||
// * Any publications arising from the use of this software, including but
|
||||
// not limited to academic journal and conference publications, technical
|
||||
// reports and manuals, must cite at least one of the following works:
|
||||
//
|
||||
// OpenFace: an open source facial behavior analysis toolkit
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency
|
||||
// in IEEE Winter Conference on Applications of Computer Vision, 2016
|
||||
//
|
||||
// Rendering of Eyes for Eye-Shape Registration and Gaze Estimation
|
||||
// Erroll Wood, Tadas Baltrušaitis, Xucong Zhang, Yusuke Sugano, Peter Robinson, and Andreas Bulling
|
||||
// in IEEE International. Conference on Computer Vision (ICCV), 2015
|
||||
//
|
||||
// Cross-dataset learning and person-speci?c normalisation for automatic Action Unit detection
|
||||
// Tadas Baltrušaitis, Marwa Mahmoud, and Peter Robinson
|
||||
// in Facial Expression Recognition and Analysis Challenge,
|
||||
// IEEE International Conference on Automatic Face and Gesture Recognition, 2015
|
||||
//
|
||||
// Constrained Local Neural Fields for robust facial landmark detection in the wild.
|
||||
// Tadas Baltrušaitis, Peter Robinson, and Louis-Philippe Morency.
|
||||
// in IEEE Int. Conference on Computer Vision Workshops, 300 Faces in-the-Wild Challenge, 2013.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace OpenFaceOffline
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for OverlayImage.xaml
|
||||
/// </summary>
|
||||
public partial class SimpleImage : Image
|
||||
{
|
||||
public SimpleImage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnRender(DrawingContext dc)
|
||||
{
|
||||
base.OnRender(dc);
|
||||
|
||||
if (Source == null || !(Source is WriteableBitmap))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
54
pkg/OpenFace/gui/OpenFaceOffline/confirm_gui_output.m
Normal file
54
pkg/OpenFace/gui/OpenFaceOffline/confirm_gui_output.m
Normal file
@@ -0,0 +1,54 @@
|
||||
addpath('../../matlab_runners/Demos');
|
||||
|
||||
root1 = "C:\Users\Tadas Baltrusaitis\Documents\OpenFace-CECLM_clean\exe\FeatureExtraction\processed";
|
||||
root2 = "C:\Users\Tadas Baltrusaitis\Documents\OpenFace-CECLM_clean\x64\Release\processed";
|
||||
|
||||
gui_files = dir(sprintf('%s/*.csv', root1));
|
||||
|
||||
for i = 1:numel(gui_files)
|
||||
|
||||
table_gui = readtable(sprintf('%s/%s', root1, gui_files(i).name));
|
||||
table_console = readtable(sprintf('%s/%s', root2, gui_files(i).name));
|
||||
|
||||
var_names = table_console.Properties.VariableNames;
|
||||
|
||||
for v =1:numel(var_names)
|
||||
|
||||
feat_gui = table_gui{:,var_names(v)};
|
||||
feat_console = table_console{:,var_names(v)};
|
||||
feat_diff = norm(abs(feat_gui - feat_console));
|
||||
if(feat_diff > 0.0001)
|
||||
fprintf('%s error - %.3f\n', var_names{v}, feat_diff);
|
||||
end
|
||||
end
|
||||
|
||||
% Compare the HOG file
|
||||
[~,name,~] = fileparts(gui_files(i).name);
|
||||
[hog_gui, valid_gui] = Read_HOG_file(sprintf('%s/%s.hog', root1, name));
|
||||
[hog_console, valid_console] = Read_HOG_file(sprintf('%s/%s.hog', root2, name));
|
||||
|
||||
feat_diff = norm(abs(hog_gui(:) - hog_console(:)));
|
||||
if(feat_diff > 0.0001)
|
||||
fprintf('HOG error - %.3f\n', feat_diff);
|
||||
end
|
||||
|
||||
feat_diff = norm(abs(valid_gui - valid_console));
|
||||
if(feat_diff > 0.0001)
|
||||
fprintf('Valid error - %.3f\n', feat_diff);
|
||||
end
|
||||
|
||||
% Compare the simalign ones
|
||||
gui_aligns = dir(sprintf('%s/%s_aligned/*.bmp', root1, name));
|
||||
console_aligns = dir(sprintf('%s/%s_aligned/*.bmp', root2, name));
|
||||
|
||||
for j=1:numel(gui_aligns)
|
||||
gui_align = imread(sprintf('%s/%s_aligned/%s', root1, name, gui_aligns(j).name));
|
||||
console_align = imread(sprintf('%s/%s_aligned/%s', root2, name, console_aligns(j).name));
|
||||
feat_diff = norm(abs(double(gui_align(:)) - double(console_align(:))));
|
||||
if(feat_diff > 0.1)
|
||||
fprintf('Aligned error - %.3f\n', feat_diff);
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
BIN
pkg/OpenFace/gui/OpenFaceOffline/logo1.ico
Normal file
BIN
pkg/OpenFace/gui/OpenFaceOffline/logo1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
5
pkg/OpenFace/gui/OpenFaceOffline/packages.config
Normal file
5
pkg/OpenFace/gui/OpenFaceOffline/packages.config
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="WindowsAPICodePack-Core" version="1.1.2" targetFramework="net452" />
|
||||
<package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net452" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user