Add files via upload
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.30501.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CameraPositionTracking", "CameraPositionTracking\CameraPositionTracking.csproj", "{38687380-0E7B-44AF-8500-15EF4173D3D5}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{38687380-0E7B-44AF-8500-15EF4173D3D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{38687380-0E7B-44AF-8500-15EF4173D3D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{38687380-0E7B-44AF-8500-15EF4173D3D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{38687380-0E7B-44AF-8500-15EF4173D3D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Application x:Class="CameraPositionTracking.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
StartupUri="MainWindow.xaml">
|
||||||
|
<Application.Resources>
|
||||||
|
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace CameraPositionTracking
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für "App.xaml"
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.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>{38687380-0E7B-44AF-8500-15EF4173D3D5}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>CameraPositionTracking</RootNamespace>
|
||||||
|
<AssemblyName>CameraPositionTracking</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<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.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>
|
||||||
|
<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>
|
||||||
|
<Content Include="ImageRec - Old.cs.txt" />
|
||||||
|
<Compile Include="FastLookUpTable.cs" />
|
||||||
|
<Compile Include="ImageRec.cs" />
|
||||||
|
<Compile Include="MainWindow.xaml.cs">
|
||||||
|
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</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="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<AppDesigner Include="Properties\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- 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>
|
|
@ -0,0 +1,117 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace CameraPositionTracking
|
||||||
|
{
|
||||||
|
class FastLookUpTable
|
||||||
|
{
|
||||||
|
private UInt32[] keyList;
|
||||||
|
private Byte[] rotationList;
|
||||||
|
private UInt16[] valueListX;
|
||||||
|
private UInt16[] valueListY;
|
||||||
|
|
||||||
|
private int xPos = 0;
|
||||||
|
private int yPos = 0;
|
||||||
|
private int rotVal = 0;
|
||||||
|
|
||||||
|
public int X
|
||||||
|
{
|
||||||
|
get { return xPos; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Y
|
||||||
|
{
|
||||||
|
get { return yPos; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Rotation
|
||||||
|
{
|
||||||
|
get { return rotVal; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int LoadFromFile(string Path)
|
||||||
|
{
|
||||||
|
FileStream lfile = File.OpenRead(Path);
|
||||||
|
byte[] buffer = new byte[lfile.Length];
|
||||||
|
|
||||||
|
lfile.Read(buffer, 0, buffer.Length);
|
||||||
|
|
||||||
|
int lines = LoadFromByteArray(buffer);
|
||||||
|
|
||||||
|
lfile.Close();
|
||||||
|
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> LoadAsyncFromFile(string Path)
|
||||||
|
{
|
||||||
|
FileStream lfile = File.OpenRead(Path);
|
||||||
|
byte[] buffer = new byte[lfile.Length];
|
||||||
|
|
||||||
|
await lfile.ReadAsync(buffer, 0, buffer.Length);
|
||||||
|
|
||||||
|
int lines = LoadFromByteArray(buffer);
|
||||||
|
|
||||||
|
lfile.Close();
|
||||||
|
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int LoadFromByteArray(byte[] buffer)
|
||||||
|
{
|
||||||
|
int lines = buffer.Length / 9;
|
||||||
|
|
||||||
|
keyList = new uint[lines];
|
||||||
|
rotationList = new byte[lines];
|
||||||
|
valueListX = new UInt16[lines];
|
||||||
|
valueListY = new UInt16[lines];
|
||||||
|
|
||||||
|
for (int i = 0; i < lines; i++)
|
||||||
|
{
|
||||||
|
int j = i * 9;
|
||||||
|
|
||||||
|
keyList[i] = ((uint)buffer[j] << 24) | ((uint)buffer[j + 1] << 16) | ((uint)buffer[j + 2] << 8) | buffer[j + 3];
|
||||||
|
rotationList[i] = buffer[j + 4];
|
||||||
|
valueListX[i] = (UInt16)(((UInt16)buffer[j + 5] << 8) | buffer[j + 6]);
|
||||||
|
valueListY[i] = (UInt16)(((UInt16)buffer[j + 7] << 8) | buffer[j + 8]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Select(int Value)
|
||||||
|
{
|
||||||
|
int i = keyList.Length / 2;
|
||||||
|
int di = i;
|
||||||
|
|
||||||
|
while (di > 0)
|
||||||
|
{
|
||||||
|
di = di / 2;
|
||||||
|
|
||||||
|
if (Value > keyList[i])
|
||||||
|
{
|
||||||
|
i += di;
|
||||||
|
}
|
||||||
|
else if (Value < keyList[i])
|
||||||
|
{
|
||||||
|
i -= di;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xPos = valueListX[i];
|
||||||
|
yPos = valueListY[i];
|
||||||
|
rotVal = rotationList[i];
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,738 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CameraPositionTracking
|
||||||
|
{
|
||||||
|
class ImageRec
|
||||||
|
{
|
||||||
|
private struct DigFilter
|
||||||
|
{
|
||||||
|
public int[,] filterMatrix;
|
||||||
|
public int xLen;
|
||||||
|
public int yLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int[] PrimarryBuffer;
|
||||||
|
private int[] workingBuffer;
|
||||||
|
private int[] SecondaryBuffer;
|
||||||
|
private int[] tempBuff;
|
||||||
|
|
||||||
|
public int Width;
|
||||||
|
public int Height;
|
||||||
|
public int PixelCount;
|
||||||
|
public bool LoopMode = false;
|
||||||
|
|
||||||
|
private int diagonalLen;
|
||||||
|
|
||||||
|
private static DigFilter ScharrOperatorX;
|
||||||
|
private static DigFilter ScharrOperatorY;
|
||||||
|
private static DigFilter GausFilterX;
|
||||||
|
private static DigFilter GausFilterY;
|
||||||
|
|
||||||
|
public ImageRec(int ImageWidth, int ImageHeight)
|
||||||
|
{
|
||||||
|
PrimarryBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
workingBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
SecondaryBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
IntSetImageData(ImageWidth, ImageHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetImageData(byte[] buffer, int scale)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
int i2 = 0;
|
||||||
|
int newWidth;
|
||||||
|
|
||||||
|
for (int y = 0; y < Height * scale; y += scale)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Width * scale; x += scale)
|
||||||
|
{
|
||||||
|
newWidth = Width * scale;
|
||||||
|
|
||||||
|
i = (x + y * newWidth) * 4;
|
||||||
|
//i = i2 * 4;
|
||||||
|
|
||||||
|
PrimarryBuffer[i2] = buffer[i];
|
||||||
|
PrimarryBuffer[i2] += buffer[i + 1];
|
||||||
|
PrimarryBuffer[i2] += buffer[i + 2];
|
||||||
|
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private int swPixel(int colorInteger)
|
||||||
|
{
|
||||||
|
return (colorInteger & 0xFF) + ((colorInteger >> 8) & 0xFF) + ((colorInteger >> 16) & 0xFF);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
private void IntSetImageData(int ImageWidth, int ImageHeight)
|
||||||
|
{
|
||||||
|
Height = ImageHeight;
|
||||||
|
Width = ImageWidth;
|
||||||
|
PixelCount = Height * Width;
|
||||||
|
diagonalLen = Isqrt(Width * Width + Height * Height);
|
||||||
|
|
||||||
|
prepareFilters();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareFilters()
|
||||||
|
{
|
||||||
|
ScharrOperatorX.filterMatrix = new int[,] { { 3, 0, -3 }, { 10, 0, -10 }, { 3, 0, -3 } };
|
||||||
|
ScharrOperatorX.xLen = 3;
|
||||||
|
ScharrOperatorX.yLen = 3;
|
||||||
|
|
||||||
|
ScharrOperatorY.filterMatrix = new int[,] { { 3, 10, 3 }, { 0, 0, 0 }, { -3, -10, -3 } };
|
||||||
|
ScharrOperatorY.xLen = 3;
|
||||||
|
ScharrOperatorY.yLen = 3;
|
||||||
|
|
||||||
|
GausFilterX.filterMatrix = new int[,] { { 25 }, { 61 }, { 83 }, { 61 }, { 25 } };
|
||||||
|
GausFilterX.xLen = 5;
|
||||||
|
GausFilterX.yLen = 1;
|
||||||
|
|
||||||
|
GausFilterY.filterMatrix = new int[,] { { 25, 61, 83, 61, 25 } };
|
||||||
|
GausFilterY.xLen = 1;
|
||||||
|
GausFilterY.yLen = 5;
|
||||||
|
|
||||||
|
//private int[,] filterGausY = { { 15, 32, 51, 59, 51, 32, 15 } };
|
||||||
|
//private int[,] filterGausX = { {15}, {32}, {51}, {59}, {51}, {32}, {15} };
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GausFilter()
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
SecondaryBuffer[GetArrayIndex(x, y)] = GetFilteredPixel(x, y, PrimarryBuffer, GausFilterX) / 256;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = GetFilteredPixel(x, y, SecondaryBuffer, GausFilterY) / 256;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Singulate(int FrameSizeX, int FrameSizeY, int Threshold)
|
||||||
|
{
|
||||||
|
int bigestValue = 0;
|
||||||
|
int bigestPos = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
workingBuffer[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x += FrameSizeX)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y += FrameSizeY)
|
||||||
|
{
|
||||||
|
bigestValue = 0;
|
||||||
|
bigestPos = -1;
|
||||||
|
|
||||||
|
for (int ix = -FrameSizeX; ix < FrameSizeX * 2; ix++)
|
||||||
|
{
|
||||||
|
for (int iy = -FrameSizeY; iy < FrameSizeY * 2; iy++)
|
||||||
|
{
|
||||||
|
i = GetArrayIndex(x + ix, y + iy);
|
||||||
|
if (bigestValue < PrimarryBuffer[i])
|
||||||
|
{
|
||||||
|
bigestValue = PrimarryBuffer[i];
|
||||||
|
if (ix >= 0 && ix < FrameSizeX && iy >= 0 && iy < FrameSizeY)
|
||||||
|
bigestPos = i;
|
||||||
|
else
|
||||||
|
bigestPos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bigestPos >= 0 && bigestValue > Threshold)
|
||||||
|
{
|
||||||
|
workingBuffer[bigestPos] = bigestValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FindContur(int FrameSizeX, int FrameSizeY, int Threshold)
|
||||||
|
{
|
||||||
|
int bigestValue = 0;
|
||||||
|
int bigestPos = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
workingBuffer[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x += FrameSizeX)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y += FrameSizeY)
|
||||||
|
{
|
||||||
|
bigestValue = 0;
|
||||||
|
bigestPos = -1;
|
||||||
|
|
||||||
|
for (int ix = -FrameSizeX; ix < FrameSizeX * 2; ix++)
|
||||||
|
{
|
||||||
|
for (int iy = -FrameSizeY; iy < FrameSizeY * 2; iy++)
|
||||||
|
{
|
||||||
|
i = GetArrayIndex(x + ix, y + iy);
|
||||||
|
if (bigestValue < PrimarryBuffer[i])
|
||||||
|
{
|
||||||
|
bigestValue = PrimarryBuffer[i];
|
||||||
|
if (ix >= 0 && ix < FrameSizeX && iy >= 0 && iy < FrameSizeY)
|
||||||
|
bigestPos = i;
|
||||||
|
else
|
||||||
|
bigestPos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bigestPos >= 0 && bigestValue > Threshold)
|
||||||
|
{
|
||||||
|
workingBuffer[bigestPos] = bigestValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearImage()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NomelizeImage()
|
||||||
|
{
|
||||||
|
int bigestValue = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
if (bigestValue < PrimarryBuffer[i])
|
||||||
|
{
|
||||||
|
bigestValue = PrimarryBuffer[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bigestValue > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = PrimarryBuffer[i] * 255 / bigestValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AmplifyImage(int Faktor)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = PrimarryBuffer[i] * Faktor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int Isqrt(int num)
|
||||||
|
{
|
||||||
|
if (0 == num) { return 0; } // Avoid zero divide
|
||||||
|
int n = (num / 2) + 1; // Initial estimate, never low
|
||||||
|
int n1 = (n + (num / n)) / 2;
|
||||||
|
|
||||||
|
while (n1 < n)
|
||||||
|
{
|
||||||
|
n = n1;
|
||||||
|
n1 = (n + (num / n)) / 2;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetFilteredPixel(int inpX, int inpY, int[] buffer, DigFilter filter)
|
||||||
|
{
|
||||||
|
int pixelValue = 0;
|
||||||
|
|
||||||
|
for (int x = 0; x < filter.xLen; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < filter.yLen; y++)
|
||||||
|
{
|
||||||
|
pixelValue += buffer[GetArrayIndex(inpX + x - filter.xLen / 2, inpY + y - filter.yLen / 2)] * filter.filterMatrix[x, y];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pixelValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetArrayIndex(int x, int y)
|
||||||
|
{
|
||||||
|
if (LoopMode)
|
||||||
|
{
|
||||||
|
if (x > Width - 1) x -= Width - 1;
|
||||||
|
if (y > Height - 1) y -= Height - 1;
|
||||||
|
if (x < 0) x += Width;
|
||||||
|
if (y < 0) y += Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x > Width - 1) x = Width - 1;
|
||||||
|
if (y > Height - 1) y = Height - 1;
|
||||||
|
if (x < 0) x = 0;
|
||||||
|
if (y < 0) y = 0;
|
||||||
|
}
|
||||||
|
return x + y * Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ConvoluteAtan()
|
||||||
|
{
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
int angle;
|
||||||
|
int slope;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
dx = GetFilteredPixel(x, y, PrimarryBuffer, ScharrOperatorX);
|
||||||
|
dy = GetFilteredPixel(x, y, PrimarryBuffer, ScharrOperatorY);
|
||||||
|
|
||||||
|
angle = (int)(Math.Atan2((double)dy, (double)dx) * 0x7FFF / Math.PI);
|
||||||
|
slope = Isqrt((dx * dx) + (dy * dy));
|
||||||
|
|
||||||
|
if (angle < 0) angle += 0x7FFF;
|
||||||
|
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = slope;
|
||||||
|
SecondaryBuffer[GetArrayIndex(x, y)] = angle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Convolute()
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = GetFilteredPixel(x, y, PrimarryBuffer, ScharrOperatorX);
|
||||||
|
SecondaryBuffer[GetArrayIndex(x, y)] = GetFilteredPixel(x, y, PrimarryBuffer, ScharrOperatorY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CombineBuffers()
|
||||||
|
{
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[i];
|
||||||
|
dy = SecondaryBuffer[i];
|
||||||
|
|
||||||
|
PrimarryBuffer[i] = Isqrt(dx * dx + dy * dy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SuppressNonMaximum()
|
||||||
|
{
|
||||||
|
int mSlope;
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetArrayIndex(x, 0)] = 0;
|
||||||
|
workingBuffer[GetArrayIndex(x, Height-1)] = 0;
|
||||||
|
}
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetArrayIndex(0, y)] = 0;
|
||||||
|
workingBuffer[GetArrayIndex(Width - 1, y)] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 1; x < Width-1; x++)
|
||||||
|
{
|
||||||
|
for (int y = 1; y < Height-1; y++)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
dy = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (bComp(dy, dx)) //Wagerechte Kante
|
||||||
|
{
|
||||||
|
mSlope = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (bComp(PrimarryBuffer[GetArrayIndex(x + 1, y)], mSlope) || bComp(PrimarryBuffer[GetArrayIndex(x - 1, y)], mSlope))
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = 0;
|
||||||
|
else
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = 1;
|
||||||
|
}
|
||||||
|
else //Senkrechte Kante
|
||||||
|
{
|
||||||
|
mSlope = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (bComp(SecondaryBuffer[GetArrayIndex(x, y + 1)], mSlope) || bComp(SecondaryBuffer[GetArrayIndex(x, y - 1)], mSlope))
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = 0;
|
||||||
|
else
|
||||||
|
workingBuffer[GetArrayIndex(x, y)] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] *= workingBuffer[i];
|
||||||
|
SecondaryBuffer[i] *= workingBuffer[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool bComp(int Val1, int Val2)
|
||||||
|
{
|
||||||
|
//return (Val1 & 0x7FFFFFFF) > (Val2 & 0x7FFFFFFF);
|
||||||
|
|
||||||
|
int v1 = Val1;
|
||||||
|
int v2 = Val2;
|
||||||
|
|
||||||
|
if (v1 < 0) v1 *= -1;
|
||||||
|
if (v2 < 0) v2 *= -1;
|
||||||
|
|
||||||
|
return v1 > v2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FastHoughTransformCircle(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
int slope2;
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
int iy = 0;
|
||||||
|
int ix = 0;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
dy = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
slope2 = (dx * dx) + (dy * dy);
|
||||||
|
|
||||||
|
if (slope2 > (127*127))
|
||||||
|
{
|
||||||
|
|
||||||
|
for (ix = 0; ix < Width; ix++)
|
||||||
|
{
|
||||||
|
if (dy*dy > dx*dx)
|
||||||
|
{
|
||||||
|
iy = (int)((ix - x) * dx / dy + y); //Create orthogonal line
|
||||||
|
if (iy >= 0 && iy < DestImageData.Height)
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(ix, iy)] += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iy = 0; iy < Height; iy++)
|
||||||
|
{
|
||||||
|
if (dx * dx > dy*dy)
|
||||||
|
{
|
||||||
|
ix = (int)((iy - y) * dy / dx + x); //Create orthogonal line
|
||||||
|
if (ix >= 0 && ix < DestImageData.Width)
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(ix, iy)] += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HoughTransformCircle(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
int angle;
|
||||||
|
int pos;
|
||||||
|
int normPos;
|
||||||
|
int normAngle;
|
||||||
|
int slope;
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
int iy = 0;
|
||||||
|
|
||||||
|
double aslope;
|
||||||
|
|
||||||
|
ConvoluteAtan();
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
angle = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
slope = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (slope > 127)
|
||||||
|
{
|
||||||
|
aslope = 1/Math.Tan((double)angle * Math.PI / 0x7FFF);
|
||||||
|
|
||||||
|
for (int ix = 0; ix < Width; ix++)
|
||||||
|
{
|
||||||
|
iy = (int)(aslope * (ix - x) + y);
|
||||||
|
|
||||||
|
if (iy > 0 && iy < DestImageData.Height)
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(ix, iy)] += 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HoughTransformLine(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
int angle;
|
||||||
|
int pos;
|
||||||
|
int normPos;
|
||||||
|
int normAngle;
|
||||||
|
int slope;
|
||||||
|
|
||||||
|
ConvoluteAtan();
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
angle = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
slope = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (slope > 4000)
|
||||||
|
{
|
||||||
|
pos = (int)(x * Math.Sin((double)angle * Math.PI / 0x7FFF) + y * Math.Cos((double)angle * Math.PI / 0x7FFF));
|
||||||
|
|
||||||
|
if (pos < 0)
|
||||||
|
{
|
||||||
|
pos *= -1;
|
||||||
|
angle += 0x7FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
normPos = pos * (DestImageData.Height - 1) / diagonalLen;
|
||||||
|
normAngle = angle * (DestImageData.Width - 1) / 0xFFFF;
|
||||||
|
|
||||||
|
if (normPos > DestImageData.Height - 1) normPos = DestImageData.Height - 1;
|
||||||
|
|
||||||
|
//DestImageData.intIntBuffer[DestImageData.GetArrayIndex(normAngle, normPos)] += slope;
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(normAngle, normPos)] += 10;
|
||||||
|
/*DestImageData.intIntBuffer[DestImageData.GetArrayIndex(normAngle+1, normPos)] += 8;
|
||||||
|
DestImageData.intIntBuffer[DestImageData.GetArrayIndex(normAngle, normPos+1)] += 8;
|
||||||
|
DestImageData.intIntBuffer[DestImageData.GetArrayIndex(normAngle+1, normPos+1)] += 8;*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HoughTransformLine2(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
int angle;
|
||||||
|
int dangle;
|
||||||
|
int pos;
|
||||||
|
int normPos;
|
||||||
|
int normAngle;
|
||||||
|
int slope;
|
||||||
|
|
||||||
|
ConvoluteAtan();
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
for (angle = 0; angle < 0xFFFF; angle += 0xFFFF / (DestImageData.Width - 1))
|
||||||
|
{
|
||||||
|
dangle = SecondaryBuffer[GetArrayIndex(x, y)];
|
||||||
|
slope = PrimarryBuffer[GetArrayIndex(x, y)];
|
||||||
|
|
||||||
|
if (slope > 32)
|
||||||
|
{
|
||||||
|
pos = (int)(x * Math.Sin((double)angle * Math.PI / 0x7FFF) + y * Math.Cos((double)angle * Math.PI / 0x7FFF));
|
||||||
|
|
||||||
|
if (pos < 0)
|
||||||
|
{
|
||||||
|
pos *= -1;
|
||||||
|
angle += 0x7FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
normPos = pos * (DestImageData.Height - 1) / diagonalLen;
|
||||||
|
normAngle = angle * (DestImageData.Width - 1) / 0xFFFF;
|
||||||
|
|
||||||
|
if (normPos > DestImageData.Height - 1) normPos = DestImageData.Height - 1;
|
||||||
|
|
||||||
|
//DestImageData.intIntBuffer[DestImageData.GetArrayIndex(normAngle, normPos)] += slope;
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(normAngle, normPos)] += 0x7FFF / (Math.Abs(angle - dangle) + 256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FindLines(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
if (PrimarryBuffer[GetArrayIndex(x, y)] > 0)
|
||||||
|
{
|
||||||
|
WriteLine(DestImageData, y, x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WriteLine(ImageRec DestImageData, int pos, int angle)
|
||||||
|
{
|
||||||
|
int[,] points = new int[4, 2];
|
||||||
|
int[,] lPoints = new int[4, 2];
|
||||||
|
int i2 = 0;
|
||||||
|
const int x = 0;
|
||||||
|
const int y = 1;
|
||||||
|
|
||||||
|
points[0, x] = (int)((pos * DestImageData.diagonalLen / (Height - 1)) / Math.Sin((double)angle / (Width - 1) * 2 * Math.PI));
|
||||||
|
points[0, y] = 0;
|
||||||
|
|
||||||
|
points[1, x] = 0;
|
||||||
|
points[1, y] = (int)((pos * DestImageData.diagonalLen / (Height - 1)) / Math.Cos((double)angle / (Width - 1) * 2 * Math.PI));
|
||||||
|
|
||||||
|
points[2, x] = points[0, 0] - (int)(DestImageData.Height / Math.Tan((double)angle / (Width - 1) * 2 * Math.PI));
|
||||||
|
points[2, y] = DestImageData.Height - 1;
|
||||||
|
|
||||||
|
points[3, x] = DestImageData.Width - 1;
|
||||||
|
points[3, y] = points[1, 1] - (int)(DestImageData.Width * Math.Tan((double)angle / (Width - 1) * 2 * Math.PI));
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (points[i, x] >= 0 && points[i, x] < DestImageData.Width &&
|
||||||
|
points[i, y] >= 0 && points[i, y] < DestImageData.Height)
|
||||||
|
{
|
||||||
|
lPoints[i2, x] = points[i, x];
|
||||||
|
lPoints[i2, y] = points[i, y];
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
drawLine(DestImageData, lPoints[0, x], lPoints[0, y], lPoints[1, x], lPoints[1, y]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawLine(ImageRec DestImageData, int x0, int y0, int x1, int y1)
|
||||||
|
{
|
||||||
|
int dx = Math.Abs(x1 - x0), sx = x0 < x1 ? 1 : -1;
|
||||||
|
int dy = -Math.Abs(y1 - y0), sy = y0 < y1 ? 1 : -1;
|
||||||
|
int err = dx + dy, e2; // error value e_xy
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(x0, y0)] = unchecked((int)0xFFFF0000);
|
||||||
|
if (x0 == x1 && y0 == y1) break;
|
||||||
|
e2 = 2 * err;
|
||||||
|
if (e2 > dy) { err += dy; x0 += sx; } // e_xy+e_x > 0
|
||||||
|
if (e2 < dx) { err += dx; y0 += sy; } // e_xy+e_y < 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void lineProfile(ImageRec DestImageData, int x0, int y0, int x1, int y1)
|
||||||
|
{
|
||||||
|
int dx = Math.Abs(x1 - x0), sx = x0 < x1 ? 1 : -1;
|
||||||
|
int dy = -Math.Abs(y1 - y0), sy = y0 < y1 ? 1 : -1;
|
||||||
|
int err = dx + dy, e2; // error value e_xy
|
||||||
|
double lineLen;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
//lineLen = Math.Sqrt(Math.Pow(x1 - x0, 2) + Math.Pow(y1 - y0, 2)) * ;
|
||||||
|
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetArrayIndex(x0, y0)] = unchecked((int)0xFFFF0000);
|
||||||
|
|
||||||
|
|
||||||
|
if (x0 == x1 && y0 == y1) break;
|
||||||
|
e2 = 2 * err;
|
||||||
|
if (e2 > dy) { err += dy; x0 += sx; } // e_xy+e_x > 0
|
||||||
|
if (e2 < dx) { err += dx; y0 += sy; } // e_xy+e_y < 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PrepareImageArray()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
workingBuffer[i] = PrimarryBuffer[i] / 3;
|
||||||
|
|
||||||
|
if (workingBuffer[i] > 255)
|
||||||
|
workingBuffer[i] = 255 << 8;
|
||||||
|
else if (workingBuffer[i] > 0)
|
||||||
|
workingBuffer[i] = ((workingBuffer[i] & 0xFF) << 8);
|
||||||
|
else if (workingBuffer[i] > -256)
|
||||||
|
workingBuffer[i] = ((-workingBuffer[i] & 0xFF) << 16);
|
||||||
|
else
|
||||||
|
workingBuffer[i] = (255 << 16);
|
||||||
|
|
||||||
|
workingBuffer[i] = unchecked((int)(0xff000000 | (uint)workingBuffer[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GetWrittenImage(ref int[] destArray)
|
||||||
|
{
|
||||||
|
PrepareImageArray();
|
||||||
|
|
||||||
|
if (destArray == null)
|
||||||
|
{
|
||||||
|
destArray = new int[PixelCount];
|
||||||
|
workingBuffer.CopyTo(destArray, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tempBuff = destArray;
|
||||||
|
destArray = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] Get32BitArray()
|
||||||
|
{
|
||||||
|
//PrepareImageArray();
|
||||||
|
|
||||||
|
byte[] destArray = new byte[PixelCount * 4];
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
destArray[i * 4 + 0] = (byte)PrimarryBuffer[i];
|
||||||
|
destArray[i * 4 + 1] = (byte)PrimarryBuffer[i];
|
||||||
|
destArray[i * 4 + 2] = (byte)PrimarryBuffer[i];
|
||||||
|
destArray[i * 4 + 3] = 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
return destArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,799 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CameraPositionTracking
|
||||||
|
{
|
||||||
|
class ImageRec
|
||||||
|
{
|
||||||
|
private struct DigFilter
|
||||||
|
{
|
||||||
|
public int[,] filterMatrix;
|
||||||
|
public int xLen;
|
||||||
|
public int yLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct IntPoint
|
||||||
|
{
|
||||||
|
public int X;
|
||||||
|
public int Y;
|
||||||
|
public int[] Neighbors;
|
||||||
|
public int[] Dists;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int[] PrimarryBuffer;
|
||||||
|
private int[] workingBuffer;
|
||||||
|
private int[] SecondaryBuffer;
|
||||||
|
private int[] tempBuff;
|
||||||
|
|
||||||
|
private IntPoint[] PointList;
|
||||||
|
private int PointCount;
|
||||||
|
|
||||||
|
public int Width;
|
||||||
|
public int Height;
|
||||||
|
public int PixelCount;
|
||||||
|
public bool LoopMode = false;
|
||||||
|
|
||||||
|
private int diagonalLen;
|
||||||
|
|
||||||
|
private static DigFilter ScharrOperatorX;
|
||||||
|
private static DigFilter ScharrOperatorY;
|
||||||
|
private static DigFilter GausFilterX;
|
||||||
|
private static DigFilter GausFilterY;
|
||||||
|
|
||||||
|
private const int SlopeTrashould = (256 * 256 * 16);
|
||||||
|
|
||||||
|
public IntPoint CentrePoint;
|
||||||
|
|
||||||
|
public ImageRec(int ImageWidth, int ImageHeight)
|
||||||
|
{
|
||||||
|
PrimarryBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
workingBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
SecondaryBuffer = new int[ImageHeight * ImageWidth];
|
||||||
|
IntSetImageData(ImageWidth, ImageHeight);
|
||||||
|
|
||||||
|
PointList = new IntPoint[256];
|
||||||
|
|
||||||
|
CentrePoint.X = ImageWidth / 2;
|
||||||
|
CentrePoint.Y = ImageHeight / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetImageData(byte[] Buffer, int Scale)
|
||||||
|
{
|
||||||
|
SetImageData(Buffer, Scale, Width, Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetImageData(byte[] Buffer, int Scale, int SrcWidth, int SrcHeight)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
int i2 = 0;
|
||||||
|
int xdiff = (SrcWidth - Width * Scale) / 2;
|
||||||
|
int ydiff = (SrcHeight - Height * Scale) / 2;
|
||||||
|
|
||||||
|
for (int y = 0; y < Height * Scale; y += Scale)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < Width * Scale; x += Scale)
|
||||||
|
{
|
||||||
|
i = (x + xdiff + (y + ydiff) * SrcWidth) * 4;
|
||||||
|
|
||||||
|
PrimarryBuffer[i2] = Buffer[i];
|
||||||
|
PrimarryBuffer[i2] += Buffer[i + 1];
|
||||||
|
PrimarryBuffer[i2] += Buffer[i + 2];
|
||||||
|
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IntSetImageData(int ImageWidth, int ImageHeight)
|
||||||
|
{
|
||||||
|
Height = ImageHeight;
|
||||||
|
Width = ImageWidth;
|
||||||
|
PixelCount = Height * Width;
|
||||||
|
diagonalLen = Isqrt(Width * Width + Height * Height);
|
||||||
|
|
||||||
|
prepareFilters();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareFilters()
|
||||||
|
{
|
||||||
|
ScharrOperatorX.filterMatrix = new int[,] { { 3, 0, -3 }, { 10, 0, -10 }, { 3, 0, -3 } };
|
||||||
|
ScharrOperatorX.xLen = 3;
|
||||||
|
ScharrOperatorX.yLen = 3;
|
||||||
|
|
||||||
|
ScharrOperatorY.filterMatrix = new int[,] { { 3, 10, 3 }, { 0, 0, 0 }, { -3, -10, -3 } };
|
||||||
|
ScharrOperatorY.xLen = 3;
|
||||||
|
ScharrOperatorY.yLen = 3;
|
||||||
|
|
||||||
|
GausFilterX.filterMatrix = new int[,] { { 25 }, { 61 }, { 83 }, { 61 }, { 25 } };
|
||||||
|
GausFilterX.xLen = 5;
|
||||||
|
GausFilterX.yLen = 1;
|
||||||
|
|
||||||
|
GausFilterY.filterMatrix = new int[,] { { 25, 61, 83, 61, 25 } };
|
||||||
|
GausFilterY.xLen = 1;
|
||||||
|
GausFilterY.yLen = 5;
|
||||||
|
|
||||||
|
//private int[,] filterGausY = { { 15, 32, 51, 59, 51, 32, 15 } };
|
||||||
|
//private int[,] filterGausX = { {15}, {32}, {51}, {59}, {51}, {32}, {15} };
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GausFilter()
|
||||||
|
{
|
||||||
|
int fVal;
|
||||||
|
int yW;
|
||||||
|
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
yW = y * Width;
|
||||||
|
|
||||||
|
for (int x = 2; x < Width - 2; x++)
|
||||||
|
{
|
||||||
|
fVal = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
fVal += PrimarryBuffer[x + i - 2 + yW] * GausFilterX.filterMatrix[i, 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondaryBuffer[x + yW] = fVal / 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondaryBuffer[0 + yW] = PrimarryBuffer[0 + yW];
|
||||||
|
SecondaryBuffer[1 + yW] = PrimarryBuffer[1 + yW];
|
||||||
|
SecondaryBuffer[Width - 2 + yW] = PrimarryBuffer[Width - 2 + yW];
|
||||||
|
SecondaryBuffer[Width - 1 + yW] = PrimarryBuffer[Width - 1 + yW];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 2; y < Height - 2; y++)
|
||||||
|
{
|
||||||
|
fVal = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
fVal += SecondaryBuffer[x + (y + i - 2) * Width] * GausFilterY.filterMatrix[0, i];
|
||||||
|
}
|
||||||
|
|
||||||
|
workingBuffer[x + y * Width] = fVal / 256;
|
||||||
|
}
|
||||||
|
|
||||||
|
workingBuffer[x + 0 * Width] = SecondaryBuffer[x + 0 * Width];
|
||||||
|
workingBuffer[x + 1 * Width] = SecondaryBuffer[x + 1 * Width];
|
||||||
|
workingBuffer[x + (Height - 2) * Width] = SecondaryBuffer[x + (Height - 2) * Width];
|
||||||
|
workingBuffer[x + (Height - 1) * Width] = SecondaryBuffer[x + (Height - 1) * Width];
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Singulate(int FrameSizeX, int FrameSizeY, int Threshold)
|
||||||
|
{
|
||||||
|
int bigestValue = 0;
|
||||||
|
int bigestPos = 0;
|
||||||
|
int bigestPosX = 0;
|
||||||
|
int bigestPosY = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
PointCount = 0;
|
||||||
|
PointList.Initialize();
|
||||||
|
|
||||||
|
for (i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
workingBuffer[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x += FrameSizeX)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y += FrameSizeY)
|
||||||
|
{
|
||||||
|
bigestValue = 0;
|
||||||
|
bigestPos = -1;
|
||||||
|
|
||||||
|
for (int ix = -FrameSizeX; ix < FrameSizeX * 2; ix++)
|
||||||
|
{
|
||||||
|
for (int iy = -FrameSizeY; iy < FrameSizeY * 2; iy++)
|
||||||
|
{
|
||||||
|
i = GetIndex(x + ix, y + iy);
|
||||||
|
if (bigestValue < PrimarryBuffer[i])
|
||||||
|
{
|
||||||
|
bigestValue = PrimarryBuffer[i];
|
||||||
|
if (ix >= 0 && ix < FrameSizeX && iy >= 0 && iy < FrameSizeY)
|
||||||
|
{
|
||||||
|
bigestPos = i;
|
||||||
|
bigestPosX = ix;
|
||||||
|
bigestPosY = iy;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bigestPos = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bigestPos >= 0 && bigestValue > Threshold && PointCount < PointList.Length)
|
||||||
|
{
|
||||||
|
workingBuffer[bigestPos] = 255; // bigestValue;
|
||||||
|
workingBuffer[bigestPos + 1] = 255; // bigestValue;
|
||||||
|
workingBuffer[bigestPos - 1] = 255; // bigestValue;
|
||||||
|
PointList[PointCount].X = bigestPosX + x;
|
||||||
|
PointList[PointCount].Y = bigestPosY + y;
|
||||||
|
PointList[PointCount].Neighbors = new int[8];
|
||||||
|
PointList[PointCount].Dists = new int[8];
|
||||||
|
PointCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Array.Sort(PointList, delegate(IntPoint X, IntPoint Y)
|
||||||
|
{
|
||||||
|
return IntPointDist(X, CentrePoint) - IntPointDist(Y, CentrePoint);
|
||||||
|
});
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void ClearImage()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void NormelizeImage()
|
||||||
|
{
|
||||||
|
int bigestValue = 0;
|
||||||
|
int smalestValue = 255;
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
if (bigestValue < PrimarryBuffer[i]) bigestValue = PrimarryBuffer[i];
|
||||||
|
if (smalestValue > PrimarryBuffer[i]) smalestValue = PrimarryBuffer[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bigestValue > smalestValue)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = PrimarryBuffer[i] * 255 / (bigestValue - smalestValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AmplifyImage(int Faktor)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] = PrimarryBuffer[i] * Faktor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int Isqrt(int num)
|
||||||
|
{
|
||||||
|
if (0 == num) { return 0; } // Avoid zero divide
|
||||||
|
int n = (num / 2) + 1; // Initial estimate, never low
|
||||||
|
int n1 = (n + (num / n)) / 2;
|
||||||
|
|
||||||
|
while (n1 < n)
|
||||||
|
{
|
||||||
|
n = n1;
|
||||||
|
n1 = (n + (num / n)) / 2;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetFilteredPixel(int inpX, int inpY, int[] buffer, DigFilter filter)
|
||||||
|
{
|
||||||
|
int pixelValue = 0;
|
||||||
|
|
||||||
|
for (int x = 0; x < filter.xLen; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < filter.yLen; y++)
|
||||||
|
{
|
||||||
|
pixelValue += buffer[GetIndex(inpX + x - filter.xLen / 2, inpY + y - filter.yLen / 2)] * filter.filterMatrix[x, y];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pixelValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetIndex(int x, int y)
|
||||||
|
{
|
||||||
|
if (LoopMode)
|
||||||
|
{
|
||||||
|
if (x > Width - 1) x -= Width - 1;
|
||||||
|
if (y > Height - 1) y -= Height - 1;
|
||||||
|
if (x < 0) x += Width;
|
||||||
|
if (y < 0) y += Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x > Width - 1) x = Width - 1;
|
||||||
|
if (y > Height - 1) y = Height - 1;
|
||||||
|
if (x < 0) x = 0;
|
||||||
|
if (y < 0) y = 0;
|
||||||
|
}
|
||||||
|
return x + y * Width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Convolute()
|
||||||
|
{
|
||||||
|
int pValX;
|
||||||
|
int pValY;
|
||||||
|
|
||||||
|
for (int x = 1; x < Width - 1; x++)
|
||||||
|
{
|
||||||
|
for (int y = 1; y < Height - 1; y++)
|
||||||
|
{
|
||||||
|
pValX = 0;
|
||||||
|
pValY = 0;
|
||||||
|
|
||||||
|
for (int xf = 0; xf < 3; xf++)
|
||||||
|
{
|
||||||
|
for (int yf = 0; yf < 3; yf++)
|
||||||
|
{
|
||||||
|
pValX += PrimarryBuffer[x + xf - 1 + (y + yf - 1) * Width] * ScharrOperatorX.filterMatrix[xf, yf];
|
||||||
|
pValY += PrimarryBuffer[x + xf - 1 + (y + yf - 1) * Width] * ScharrOperatorY.filterMatrix[xf, yf];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
workingBuffer[GetIndex(x, y)] = pValX;
|
||||||
|
SecondaryBuffer[GetIndex(x, y)] = pValY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tempBuff = PrimarryBuffer;
|
||||||
|
PrimarryBuffer = workingBuffer;
|
||||||
|
workingBuffer = tempBuff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CombineBuffers()
|
||||||
|
{
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[i];
|
||||||
|
dy = SecondaryBuffer[i];
|
||||||
|
|
||||||
|
PrimarryBuffer[i] = Isqrt(dx * dx + dy * dy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SuppressNonMaximum()
|
||||||
|
{
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetIndex(x, 0)] = 0;
|
||||||
|
workingBuffer[GetIndex(x, Height - 1)] = 0;
|
||||||
|
}
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
workingBuffer[GetIndex(0, y)] = 0;
|
||||||
|
workingBuffer[GetIndex(Width - 1, y)] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 1; x < Width - 1; x++)
|
||||||
|
{
|
||||||
|
for (int y = 1; y < Height - 1; y++)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[GetIndex(x, y)];
|
||||||
|
dy = SecondaryBuffer[GetIndex(x, y)];
|
||||||
|
|
||||||
|
if (bComp(dy, dx)) //Wagerechte Kante
|
||||||
|
{
|
||||||
|
if (bComp(PrimarryBuffer[GetIndex(x + 1, y)], dx) || bComp(PrimarryBuffer[GetIndex(x - 1, y)], dx))
|
||||||
|
workingBuffer[GetIndex(x, y)] = 0;
|
||||||
|
else
|
||||||
|
workingBuffer[GetIndex(x, y)] = 1;
|
||||||
|
}
|
||||||
|
else //Senkrechte Kante
|
||||||
|
{
|
||||||
|
if (bComp(SecondaryBuffer[GetIndex(x, y + 1)], dy) || bComp(SecondaryBuffer[GetIndex(x, y - 1)], dy))
|
||||||
|
workingBuffer[GetIndex(x, y)] = 0;
|
||||||
|
else
|
||||||
|
workingBuffer[GetIndex(x, y)] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
PrimarryBuffer[i] *= workingBuffer[i];
|
||||||
|
SecondaryBuffer[i] *= workingBuffer[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool bComp(int Val1, int Val2)
|
||||||
|
{
|
||||||
|
int v1 = Val1;
|
||||||
|
int v2 = Val2;
|
||||||
|
|
||||||
|
if (v1 < 0) v1 *= -1;
|
||||||
|
if (v2 < 0) v2 *= -1;
|
||||||
|
|
||||||
|
return v1 > v2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FastHoughTransformCircle(ImageRec DestImageData)
|
||||||
|
{
|
||||||
|
int slope2;
|
||||||
|
int dx;
|
||||||
|
int dy;
|
||||||
|
|
||||||
|
int iy = 0;
|
||||||
|
int ix = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
int MaxDi = (Width + Height) / 4;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
i = x + y * Width;
|
||||||
|
|
||||||
|
dx = PrimarryBuffer[i];
|
||||||
|
dy = SecondaryBuffer[i];
|
||||||
|
|
||||||
|
slope2 = (dx * dx) + (dy * dy);
|
||||||
|
|
||||||
|
if (slope2 > SlopeTrashould)
|
||||||
|
{
|
||||||
|
if (bComp(dy, dx))
|
||||||
|
{
|
||||||
|
for (ix = 0; ix < Width; ix++)
|
||||||
|
{
|
||||||
|
iy = (int)((ix - x) * dx / dy + y); //Create orthogonal line
|
||||||
|
if (iy >= 0 && iy < DestImageData.Height)
|
||||||
|
DestImageData.PrimarryBuffer[ix + iy * DestImageData.Width] += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (iy = 0; iy < Height; iy++)
|
||||||
|
{
|
||||||
|
ix = (int)((iy - y) * dy / dx + x); //Create orthogonal line
|
||||||
|
if (ix >= 0 && ix < DestImageData.Width)
|
||||||
|
DestImageData.PrimarryBuffer[ix + iy * DestImageData.Width] += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static private Double PointDist(IntPoint P1, IntPoint P2)
|
||||||
|
{
|
||||||
|
int dx = P1.X - P2.X;
|
||||||
|
int dy = P1.Y - P2.Y;
|
||||||
|
|
||||||
|
return Math.Sqrt(dx * dx + dy * dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
static private int IntPointDist(IntPoint P1, IntPoint P2)
|
||||||
|
{
|
||||||
|
int dx = P1.X - P2.X;
|
||||||
|
int dy = P1.Y - P2.Y;
|
||||||
|
|
||||||
|
return Isqrt(dx * dx + dy * dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FindNeighbors()
|
||||||
|
{
|
||||||
|
int dist;
|
||||||
|
int tmp1 = 0;
|
||||||
|
int tmp2 = 0;
|
||||||
|
int tmp3 = 0;
|
||||||
|
int tmp4 = 0;
|
||||||
|
bool mFlag;
|
||||||
|
|
||||||
|
for (int i = 0; i < PointCount; i++)
|
||||||
|
{
|
||||||
|
IntPoint pPoint = PointList[i];
|
||||||
|
|
||||||
|
for (int j = 0; j < PointCount; j++)
|
||||||
|
{
|
||||||
|
if (i != j)
|
||||||
|
{
|
||||||
|
mFlag = false;
|
||||||
|
|
||||||
|
dist = IntPointDist(pPoint, PointList[j]);
|
||||||
|
|
||||||
|
for (int k = 0; k < pPoint.Dists.Length; k++)
|
||||||
|
{
|
||||||
|
if (mFlag)
|
||||||
|
{
|
||||||
|
tmp3 = pPoint.Dists[k];
|
||||||
|
tmp4 = pPoint.Neighbors[k];
|
||||||
|
pPoint.Dists[k] = tmp1;
|
||||||
|
pPoint.Neighbors[k] = tmp2;
|
||||||
|
tmp1 = tmp3;
|
||||||
|
tmp2 = tmp4;
|
||||||
|
}
|
||||||
|
else if (dist < pPoint.Dists[k] || pPoint.Dists[k] == 0)
|
||||||
|
{
|
||||||
|
tmp1 = pPoint.Dists[k];
|
||||||
|
tmp2 = pPoint.Neighbors[k];
|
||||||
|
pPoint.Dists[k] = dist;
|
||||||
|
pPoint.Neighbors[k] = j;
|
||||||
|
mFlag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int j = 0; j < pPoint.Dists.Length; j++)
|
||||||
|
{
|
||||||
|
if (pPoint.Dists[j] * 1.2 < pPoint.Dists[2] || pPoint.Dists[j] / 1.2 > pPoint.Dists[2])
|
||||||
|
{
|
||||||
|
pPoint.Dists[j] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PatternPoint
|
||||||
|
{
|
||||||
|
public IntPoint[] Points = new IntPoint[7];
|
||||||
|
public double AverageDistance = 0;
|
||||||
|
|
||||||
|
public Double GetAngleTo(int index)
|
||||||
|
{
|
||||||
|
double ret = 0;
|
||||||
|
const double circ3 = Math.PI / 3;
|
||||||
|
int offsIndex = 0;
|
||||||
|
double angle = 0;
|
||||||
|
|
||||||
|
for (int i = 1; i < 7; i++)
|
||||||
|
{
|
||||||
|
angle = Math.Atan2(Points[i].X - Points[0].X, Points[i].Y - Points[0].Y);
|
||||||
|
|
||||||
|
|
||||||
|
if (angle >= 0 && angle < circ3) offsIndex = i;
|
||||||
|
|
||||||
|
if (angle < 0)
|
||||||
|
ret += circ3 - (Math.PI - angle) % circ3;
|
||||||
|
else
|
||||||
|
ret += angle % circ3;
|
||||||
|
|
||||||
|
//System.Diagnostics.Debug.WriteLine(angle + " " + ret + " " + (Points[i].X - Points[0].X) + " " + (Points[i].Y - Points[0].Y));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret / 6 + circ3 * (offsIndex - index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PatternPoint FindPattern()
|
||||||
|
{
|
||||||
|
PatternPoint ret = new PatternPoint();
|
||||||
|
|
||||||
|
for (int i = 0; i < PointCount; i++)
|
||||||
|
{
|
||||||
|
IntPoint cPoint = PointList[i];
|
||||||
|
int hindex = 1;
|
||||||
|
int k1 = 0;
|
||||||
|
Double Distance = 0;
|
||||||
|
|
||||||
|
while (k1 < cPoint.Dists.Length && cPoint.Dists[k1] == 0) k1++;
|
||||||
|
|
||||||
|
IntPoint sPoint = PointList[cPoint.Neighbors[k1]];
|
||||||
|
|
||||||
|
for (int j = 0; j < 6; j++)
|
||||||
|
{
|
||||||
|
for (int k2 = 0; k2 < cPoint.Dists.Length; k2++)
|
||||||
|
{
|
||||||
|
if (cPoint.Dists[k2] > 0)
|
||||||
|
{
|
||||||
|
for (int k3 = 0; k3 < sPoint.Dists.Length; k3++)
|
||||||
|
{
|
||||||
|
if (sPoint.Dists[k3] > 0 && (sPoint.Neighbors[k3] == cPoint.Neighbors[k2]))
|
||||||
|
{
|
||||||
|
IntPoint s2Point = PointList[cPoint.Neighbors[k2]];
|
||||||
|
|
||||||
|
int kp = (sPoint.X - cPoint.X) * (s2Point.Y - cPoint.Y) - (s2Point.X - cPoint.X) * (sPoint.Y - cPoint.Y);
|
||||||
|
|
||||||
|
if (kp > 0)
|
||||||
|
{
|
||||||
|
//System.Diagnostics.Debug.WriteLine(i + ": " + IntPointDist(cPoint, s2Point) + " -- " + IntPointDist(sPoint, s2Point) + " -- " + kp);
|
||||||
|
Distance += PointDist(cPoint, s2Point);
|
||||||
|
ret.Points[hindex] = sPoint;
|
||||||
|
hindex++;
|
||||||
|
sPoint = s2Point;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hindex > 6)
|
||||||
|
{
|
||||||
|
ret.AverageDistance = Distance / 6;
|
||||||
|
ret.Points[0] = cPoint;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetPatternData(PatternPoint Item)
|
||||||
|
{
|
||||||
|
int dist;
|
||||||
|
int dy = 0;
|
||||||
|
int dx = 0;
|
||||||
|
int iy = 0;
|
||||||
|
int ix = 0;
|
||||||
|
int slope2 = 0;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
const int bitCount = 4;
|
||||||
|
|
||||||
|
int SquareRadius = (int)Item.AverageDistance / 2;
|
||||||
|
|
||||||
|
for (int i = 0; i < Item.Points.Length; i++)
|
||||||
|
{
|
||||||
|
int CountSum = 0;
|
||||||
|
int[] LineBuffer = new int[bitCount];
|
||||||
|
bool lastBit = false;
|
||||||
|
|
||||||
|
for (int x = -SquareRadius; x < SquareRadius; x++)
|
||||||
|
{
|
||||||
|
ix = Item.Points[i].X + x;
|
||||||
|
|
||||||
|
for (int y = -SquareRadius; y < SquareRadius; y++)
|
||||||
|
{
|
||||||
|
iy = Item.Points[i].Y + y;
|
||||||
|
|
||||||
|
if (iy > 0 && ix > 0 && iy < Height - 1 && ix < Width - 1)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[GetIndex(ix, iy)];
|
||||||
|
dy = SecondaryBuffer[GetIndex(ix, iy)];
|
||||||
|
|
||||||
|
slope2 = (dx * dx) + (dy * dy);
|
||||||
|
|
||||||
|
if (slope2 > (256 * 256 * 16))
|
||||||
|
{
|
||||||
|
dist = Isqrt(x * x + y * y);
|
||||||
|
|
||||||
|
if (dist < SquareRadius)
|
||||||
|
{
|
||||||
|
int SumVal = (128 / (dist + 1));
|
||||||
|
LineBuffer[dist * bitCount / SquareRadius] += SumVal;
|
||||||
|
CountSum += SumVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CountSum /= bitCount * 2;
|
||||||
|
|
||||||
|
for (int j = 3; j >= 0; j--)
|
||||||
|
{
|
||||||
|
if (LineBuffer[j] > CountSum != lastBit)
|
||||||
|
{
|
||||||
|
ret |= (1 << (24 - i * 4 + j));
|
||||||
|
lastBit = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lastBit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CircleDiameterStat(ImageRec DestImageData, PatternPoint Item)
|
||||||
|
{
|
||||||
|
int dist;
|
||||||
|
int dy = 0;
|
||||||
|
int dx = 0;
|
||||||
|
int iy = 0;
|
||||||
|
int ix = 0;
|
||||||
|
int slope2 = 0;
|
||||||
|
int[] LineBuffer = new int[48];
|
||||||
|
|
||||||
|
int SquareRadius = (int)Item.AverageDistance / 2;
|
||||||
|
|
||||||
|
for (int i = 0; i < Item.Points.Length; i++)
|
||||||
|
{
|
||||||
|
int CountSum = 0;
|
||||||
|
|
||||||
|
for (int x = -SquareRadius; x < SquareRadius; x++)
|
||||||
|
{
|
||||||
|
ix = Item.Points[i].X + x;
|
||||||
|
|
||||||
|
for (int y = -SquareRadius; y < SquareRadius; y++)
|
||||||
|
{
|
||||||
|
iy = Item.Points[i].Y + y;
|
||||||
|
|
||||||
|
if (iy > 0 && ix > 0 && iy < Height - 1 && ix < Width - 1)
|
||||||
|
{
|
||||||
|
dx = PrimarryBuffer[GetIndex(ix, iy)];
|
||||||
|
dy = SecondaryBuffer[GetIndex(ix, iy)];
|
||||||
|
|
||||||
|
slope2 = (dx * dx) + (dy * dy);
|
||||||
|
|
||||||
|
if (slope2 > (256 * 256 * 16))
|
||||||
|
{
|
||||||
|
dist = Isqrt(x * x + y * y);
|
||||||
|
|
||||||
|
if (dist < SquareRadius)
|
||||||
|
{
|
||||||
|
DestImageData.PrimarryBuffer[DestImageData.GetIndex(dist * 16 / SquareRadius, i * 2)] += (128 / (dist + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void RelativeThreshold(double Value)
|
||||||
|
{
|
||||||
|
int maxVal;
|
||||||
|
int cval;
|
||||||
|
|
||||||
|
|
||||||
|
for (int y = 0; y < Height; y++)
|
||||||
|
{
|
||||||
|
maxVal = 0;
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
cval = PrimarryBuffer[GetIndex(x, y)];
|
||||||
|
|
||||||
|
if (cval > maxVal) maxVal = cval;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int x = 0; x < Width; x++)
|
||||||
|
{
|
||||||
|
cval = PrimarryBuffer[GetIndex(x, y)];
|
||||||
|
|
||||||
|
//PrimarryBuffer[GetIndex(x, y)] = (cval > maxVal * Value) ? 1 : 0;
|
||||||
|
PrimarryBuffer[GetIndex(x, y)] = cval * 256 / (maxVal + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] Get32BitArray()
|
||||||
|
{
|
||||||
|
//PrepareImageArray();
|
||||||
|
|
||||||
|
byte[] destArray = new byte[PixelCount * 4];
|
||||||
|
|
||||||
|
int pixVal;
|
||||||
|
|
||||||
|
for (int i = 0; i < PixelCount; i++)
|
||||||
|
{
|
||||||
|
pixVal = PrimarryBuffer[i];
|
||||||
|
if (pixVal > 255) pixVal = 255;
|
||||||
|
|
||||||
|
destArray[i * 4 + 0] = (byte)pixVal;
|
||||||
|
destArray[i * 4 + 1] = (byte)pixVal;
|
||||||
|
destArray[i * 4 + 2] = (byte)pixVal;
|
||||||
|
destArray[i * 4 + 3] = 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
return destArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
<Window x:Class="CameraPositionTracking.MainWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Title="MainWindow" Height="1469.05" Width="1289.985">
|
||||||
|
<Grid>
|
||||||
|
<Image x:Name="TestImage" HorizontalAlignment="Left" Height="182" Margin="39,10,0,0" VerticalAlignment="Top" Width="160"/>
|
||||||
|
<Image x:Name="OutPutImage" HorizontalAlignment="Left" Height="182" Margin="39,234,0,0" VerticalAlignment="Top" Width="160"/>
|
||||||
|
<Image x:Name="StattImage" HorizontalAlignment="Left" Height="272" Margin="355,10,0,0" VerticalAlignment="Top" Width="255" Stretch="Fill"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
|
@ -0,0 +1,165 @@
|
||||||
|
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 CameraPositionTracking
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für MainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
byte[] imageBuffer;
|
||||||
|
int imageWidth;
|
||||||
|
int imageHeight;
|
||||||
|
string filePath = "..\\..\\test\\WP_20141125_004.png";
|
||||||
|
double dpi = 96;
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine(Environment.CurrentDirectory);
|
||||||
|
|
||||||
|
FastLookUpTable PatternTable = new FastLookUpTable();
|
||||||
|
|
||||||
|
PatternTable.LoadFromFile("..\\..\\test\\output.dat");
|
||||||
|
|
||||||
|
ImageArrayFromFile(filePath, out imageBuffer, out imageWidth, out imageHeight);
|
||||||
|
|
||||||
|
ImageRec MyIR = new ImageRec(imageWidth, imageHeight);
|
||||||
|
ImageRec MyHT = new ImageRec(imageWidth, imageHeight);
|
||||||
|
ImageRec MyDi = new ImageRec(imageWidth, imageHeight);
|
||||||
|
|
||||||
|
|
||||||
|
//MyHT.LoopMode = true;
|
||||||
|
|
||||||
|
MyIR.SetImageData(imageBuffer, 1);
|
||||||
|
|
||||||
|
DateTime StartTime = DateTime.UtcNow;
|
||||||
|
|
||||||
|
|
||||||
|
MyIR.GausFilter();
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "GausFilter");
|
||||||
|
|
||||||
|
MyIR.Convolute();
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "Convolute");
|
||||||
|
|
||||||
|
MyIR.SuppressNonMaximum();
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "SuppressNonMaximum");
|
||||||
|
|
||||||
|
MyIR.FastHoughTransformCircle(MyDi);
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "HoughTransformCircle");
|
||||||
|
|
||||||
|
MyDi.GausFilter();
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "GausFilter");
|
||||||
|
|
||||||
|
MyDi.Singulate(16, 16, 10);
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "Singulate");
|
||||||
|
|
||||||
|
MyDi.FindNeighbors();
|
||||||
|
|
||||||
|
var PointTrip = MyDi.FindPattern();
|
||||||
|
|
||||||
|
|
||||||
|
/*for (int i = 0; i < 7; i++ )
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine(PointTrip.Points[i].X + "; " + PointTrip.Points[i].Y);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "FindHexPoint");
|
||||||
|
|
||||||
|
if (PointTrip != null)
|
||||||
|
{
|
||||||
|
var data = MyIR.GetPatternData(PointTrip);
|
||||||
|
|
||||||
|
PointTrip.GetAngleTo(0);
|
||||||
|
|
||||||
|
|
||||||
|
MyIR.CircleDiameterStat(MyDi, PointTrip);
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "GetPatternData");
|
||||||
|
PatternTable.Select(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine(PatternTable.X + "; " + PatternTable.Y + "; " + PatternTable.Rotation);
|
||||||
|
|
||||||
|
|
||||||
|
ElipsedTime(StartTime, "PatternTable.Select");
|
||||||
|
|
||||||
|
MyIR.CombineBuffers();
|
||||||
|
|
||||||
|
//MyDi.RelativeThreshold(0.2);
|
||||||
|
|
||||||
|
MyHT.SetImageData(imageBuffer, 1);
|
||||||
|
|
||||||
|
MyIR.NormelizeImage();
|
||||||
|
MyHT.NormelizeImage();
|
||||||
|
MyDi.NormelizeImage();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var bmp1 = BitmapSource.Create(MyHT.Width, MyHT.Height, dpi, dpi, PixelFormats.Bgra32, null, MyHT.Get32BitArray(), MyHT.Width * 4);
|
||||||
|
TestImage.Source = bmp1;
|
||||||
|
|
||||||
|
var bmp2 = BitmapSource.Create(MyIR.Width, MyIR.Height, dpi, dpi, PixelFormats.Bgra32, null, MyIR.Get32BitArray(), MyIR.Width * 4);
|
||||||
|
OutPutImage.Source = bmp2;
|
||||||
|
|
||||||
|
var bmp3 = BitmapSource.Create(MyDi.Width, MyDi.Height, dpi, dpi, PixelFormats.Bgra32, null, MyDi.Get32BitArray(), MyDi.Width * 4);
|
||||||
|
StattImage.Source = bmp3;
|
||||||
|
|
||||||
|
TestImage.Width = bmp1.Width;
|
||||||
|
TestImage.Height = bmp1.Height;
|
||||||
|
|
||||||
|
OutPutImage.Width = bmp2.Width;
|
||||||
|
OutPutImage.Height = bmp2.Height;
|
||||||
|
|
||||||
|
StattImage.Width = bmp3.Width;
|
||||||
|
StattImage.Height = bmp3.Height;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ElipsedTime(DateTime StartTime, string Lable)
|
||||||
|
{
|
||||||
|
double tdiff = (double)DateTime.UtcNow.Subtract(StartTime).Ticks / TimeSpan.TicksPerMillisecond;
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine(tdiff.ToString() + " " + Lable);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void ImageArrayFromFile(string FilePath, out byte[] dataBufferIn, out int Width, out int Height)
|
||||||
|
{
|
||||||
|
BitmapImage Bmp = new BitmapImage(new Uri(FilePath, UriKind.Relative));
|
||||||
|
|
||||||
|
Width = Bmp.PixelWidth;
|
||||||
|
Height = Bmp.PixelHeight;
|
||||||
|
|
||||||
|
int nStride = (Bmp.PixelWidth * Bmp.Format.BitsPerPixel+7) / 8;
|
||||||
|
|
||||||
|
|
||||||
|
dataBufferIn = new byte[Bmp.PixelHeight * nStride];
|
||||||
|
|
||||||
|
Bmp.CopyPixels(dataBufferIn, nStride, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die mit einer Assembly verknüpft sind.
|
||||||
|
[assembly: AssemblyTitle("CameraPositionTracking")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("CameraPositionTracking")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||||
|
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
|
||||||
|
//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
|
||||||
|
//in einer <PropertyGroup> fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
|
||||||
|
//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
|
||||||
|
//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
|
||||||
|
//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
|
||||||
|
|
||||||
|
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||||
|
|
||||||
|
|
||||||
|
[assembly: ThemeInfo(
|
||||||
|
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
|
||||||
|
//(wird verwendet, wenn eine Ressource auf der Seite
|
||||||
|
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
|
||||||
|
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
|
||||||
|
//(wird verwendet, wenn eine Ressource auf der Seite, in der Anwendung oder einem
|
||||||
|
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
|
||||||
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
CameraPositionTracking/CameraPositionTracking/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.34014
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code neu generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace CameraPositionTracking.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||||
|
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||||
|
[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>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </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("CameraPositionTracking.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
CameraPositionTracking/CameraPositionTracking/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.34014
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace CameraPositionTracking.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>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</assembly>
|
|
@ -0,0 +1,69 @@
|
||||||
|
#pragma checksum "..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8EA4B41207D3745493256FE495F58C5EA0E557FD"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace CameraPositionTracking {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// App
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : System.Windows.Application {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
|
||||||
|
#line 4 "..\..\App.xaml"
|
||||||
|
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application Entry Point.
|
||||||
|
/// </summary>
|
||||||
|
[System.STAThreadAttribute()]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public static void Main() {
|
||||||
|
CameraPositionTracking.App app = new CameraPositionTracking.App();
|
||||||
|
app.InitializeComponent();
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
#pragma checksum "..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8EA4B41207D3745493256FE495F58C5EA0E557FD"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace CameraPositionTracking {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// App
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : System.Windows.Application {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
|
||||||
|
#line 4 "..\..\App.xaml"
|
||||||
|
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application Entry Point.
|
||||||
|
/// </summary>
|
||||||
|
[System.STAThreadAttribute()]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public static void Main() {
|
||||||
|
CameraPositionTracking.App app = new CameraPositionTracking.App();
|
||||||
|
app.InitializeComponent();
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ee76295da199c0a182ba83d21b74053f43cb8726
|
|
@ -0,0 +1,15 @@
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\bin\Debug\CameraPositionTracking.exe.config
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\MainWindow.baml
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\MainWindow.g.cs
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\App.g.cs
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking_MarkupCompile.cache
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.g.resources
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.Properties.Resources.resources
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.csproj.GenerateResource.Cache
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\bin\Debug\CameraPositionTracking.exe
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\bin\Debug\CameraPositionTracking.pdb
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.exe
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking_Content.g.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.csprojAssemblyReference.cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\CameraPositionTracking.csproj.CoreCompileInputs.cache
|
|
@ -0,0 +1,13 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("imagerec%20-%20old.cs.txt")]
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("imagerec%20-%20old.cs.txt")]
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
CameraPositionTracking
|
||||||
|
|
||||||
|
|
||||||
|
winexe
|
||||||
|
C#
|
||||||
|
.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\
|
||||||
|
CameraPositionTracking
|
||||||
|
none
|
||||||
|
false
|
||||||
|
DEBUG;TRACE
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\App.xaml
|
||||||
|
11151548125
|
||||||
|
1-1614143533
|
||||||
|
71491234644
|
||||||
|
12-1401562060
|
||||||
|
MainWindow.xaml;
|
||||||
|
|
||||||
|
False
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
CameraPositionTracking
|
||||||
|
|
||||||
|
|
||||||
|
winexe
|
||||||
|
C#
|
||||||
|
.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\obj\Debug\
|
||||||
|
CameraPositionTracking
|
||||||
|
none
|
||||||
|
false
|
||||||
|
DEBUG;TRACE
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTracking\CameraPositionTracking\App.xaml
|
||||||
|
11151548125
|
||||||
|
1-1614143533
|
||||||
|
1173545664
|
||||||
|
12-1401562060
|
||||||
|
MainWindow.xaml;
|
||||||
|
|
||||||
|
False
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ED5161AEAD14491EA714923977EE9E809BFED722"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace CameraPositionTracking {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MainWindow
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
|
#line 6 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image TestImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 7 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image OutPutImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 8 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image StattImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
private bool _contentLoaded;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
if (_contentLoaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_contentLoaded = true;
|
||||||
|
System.Uri resourceLocater = new System.Uri("/CameraPositionTracking;component/mainwindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line 1 "..\..\MainWindow.xaml"
|
||||||
|
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||||
|
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||||
|
switch (connectionId)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
this.TestImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
case 2:
|
||||||
|
this.OutPutImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
case 3:
|
||||||
|
this.StattImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._contentLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "ED5161AEAD14491EA714923977EE9E809BFED722"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace CameraPositionTracking {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MainWindow
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
|
#line 6 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image TestImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 7 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image OutPutImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 8 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Image StattImage;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
private bool _contentLoaded;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
if (_contentLoaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_contentLoaded = true;
|
||||||
|
System.Uri resourceLocater = new System.Uri("/CameraPositionTracking;component/mainwindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line 1 "..\..\MainWindow.xaml"
|
||||||
|
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||||
|
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||||
|
switch (connectionId)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
this.TestImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
case 2:
|
||||||
|
this.OutPutImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
case 3:
|
||||||
|
this.StattImage = ((System.Windows.Controls.Image)(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._contentLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
After Width: | Height: | Size: 143 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 246 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 398 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 692 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 97 KiB |
|
@ -0,0 +1,15 @@
|
||||||
|
15,6254 GausFilter
|
||||||
|
156,2508 HoughTransformCircle
|
||||||
|
156,2508 NomelizeImage
|
||||||
|
156,2508 Fertig
|
||||||
|
|
||||||
|
156,3276
|
||||||
|
109,383
|
||||||
|
109,3737
|
||||||
|
125,0001
|
||||||
|
109,3801
|
||||||
|
|
||||||
|
31,2463 GausFilter
|
||||||
|
203,1235 HoughTransformCircle
|
||||||
|
203,1235 NomelizeImage
|
||||||
|
203,1235 Fertig
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.30501.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PositionPatternCreator", "PositionPatternCreator\PositionPatternCreator.csproj", "{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Application x:Class="PositionPatternCreator.App"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
StartupUri="MainWindow.xaml">
|
||||||
|
<Application.Resources>
|
||||||
|
|
||||||
|
</Application.Resources>
|
||||||
|
</Application>
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace PositionPatternCreator
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für "App.xaml"
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<Window x:Class="PositionPatternCreator.MainWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Title="MainWindow" Height="1021.2" Width="1116" Loaded="Window_Loaded">
|
||||||
|
<Grid Background="#FFD8D8D8">
|
||||||
|
<Canvas x:Name="DrawCanvas" HorizontalAlignment="Left" Height="848" Margin="10,10,0,0" VerticalAlignment="Top" Width="600"/>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
|
@ -0,0 +1,314 @@
|
||||||
|
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;
|
||||||
|
using System.Windows.Xps;
|
||||||
|
using System.Windows.Xps.Packaging;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace PositionPatternCreator
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für MainWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
static double mmw = 96 / 24.5;
|
||||||
|
static double ratio = 0.866025403784438;
|
||||||
|
static double MarkerStrokeSize = 5;
|
||||||
|
static double Dist = MarkerStrokeSize * 4.5 * 2;
|
||||||
|
|
||||||
|
bool swCount = true;
|
||||||
|
|
||||||
|
private struct DataListEntr
|
||||||
|
{
|
||||||
|
private int[] data;
|
||||||
|
private int centPositionX;
|
||||||
|
private int centPositionY;
|
||||||
|
private int rot;
|
||||||
|
|
||||||
|
public int GetData(int i)
|
||||||
|
{
|
||||||
|
return data[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetData(int i, int Data)
|
||||||
|
{
|
||||||
|
if (data == null) data = new int[7];
|
||||||
|
|
||||||
|
data[i] = Data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetArrayEntr(int[,] DataArray)
|
||||||
|
{
|
||||||
|
return DataArray[centPositionX, centPositionY];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetArrayEntr(ref int[,] DataArray, int Data)
|
||||||
|
{
|
||||||
|
DataArray[centPositionX, centPositionY] = Data;
|
||||||
|
//System.Diagnostics.Debug.WriteLine(centPositionX + " " + centPositionY + " -- > " + Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetPos(int PosX, int PosY)
|
||||||
|
{
|
||||||
|
centPositionX = PosX;
|
||||||
|
centPositionY = PosY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int X { get { return centPositionX; } }
|
||||||
|
public int Y { get { return centPositionY; } }
|
||||||
|
|
||||||
|
public int Rotation {
|
||||||
|
get { return rot; }
|
||||||
|
set { rot = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public int CompareTo(DataListEntr Entr)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
{
|
||||||
|
if (this.data[i] > Entr.data[i]) return 1;
|
||||||
|
if (this.data[i] < Entr.data[i]) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private double AddOffs(double xVal, int index)
|
||||||
|
{
|
||||||
|
if ((index & 1) > 0)
|
||||||
|
return xVal;
|
||||||
|
else
|
||||||
|
return xVal + Dist / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string containerName = @"C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\bin\Debug\output.xps";
|
||||||
|
string binListName = @"C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\bin\Debug\output.dat";
|
||||||
|
|
||||||
|
File.Delete(containerName);
|
||||||
|
|
||||||
|
/*LocalPrintServer ps = new LocalPrintServer();
|
||||||
|
PrintQueue pq = ps.DefaultPrintQueue;
|
||||||
|
XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(pq);
|
||||||
|
PrintTicket pt = pq.UserPrintTicket;
|
||||||
|
|
||||||
|
pt.PageOrientation = PageOrientation.Portrait;
|
||||||
|
PageMediaSize pageMediaSize = new PageMediaSize(DrawCanvas.ActualWidth, DrawCanvas.ActualHeight);
|
||||||
|
pt.PageMediaSize = pageMediaSize;
|
||||||
|
xpsdw.Write(DrawCanvas);*/
|
||||||
|
|
||||||
|
FixedPage fp = new FixedPage();
|
||||||
|
|
||||||
|
//Canvas fp = DrawCanvas;
|
||||||
|
|
||||||
|
fp.Background = new SolidColorBrush(Color.FromRgb(0xFF, 0xFF, 0xFF));
|
||||||
|
|
||||||
|
//Din A4
|
||||||
|
fp.Height = 297 * mmw;
|
||||||
|
fp.Width = 210 * mmw;
|
||||||
|
|
||||||
|
//Din A3
|
||||||
|
//fp.Height = 594 * mmw;
|
||||||
|
//fp.Width = 297 * mmw;
|
||||||
|
|
||||||
|
int sizex = (int)((fp.Width - 30) / Dist);
|
||||||
|
int sizey = (int)((fp.Height - 30) / Dist / ratio);
|
||||||
|
|
||||||
|
|
||||||
|
int[,] dat = new int[sizex+2, sizey+2];
|
||||||
|
|
||||||
|
int[,] xm = { { -1, -1, 0, 1, 0, -1 }, { -1, 0, 1, 0, -1, -1 }, { 0, 1, 0, -1, -1, -1 }, { 1, 0, -1, -1, -1, 0 }, { 0, -1, -1, -1, 0, 1 }, { -1, -1, -1, 0, 1, 0 } };
|
||||||
|
int[,] ym = { { 0, -1, -1, 0, 1, 1 }, { -1, -1, 0, 1, 1, 0 }, { -1, 0, 1, 1, 0, -1 }, { 0, 1, 1, 0, -1, -1 }, { 1, 1, 0, -1, -1, 0 }, { 1, 0, -1, -1, 0, 1 } };
|
||||||
|
|
||||||
|
List<DataListEntr> sList = new List<DataListEntr>();
|
||||||
|
|
||||||
|
int SymCount = 0;
|
||||||
|
int dubCount = 1;
|
||||||
|
|
||||||
|
Random rnd = new Random(SymCount);
|
||||||
|
|
||||||
|
for (int ix = 1; ix < sizex + 1; ix++)
|
||||||
|
{
|
||||||
|
for (int iy = 1; iy < sizey + 1; iy++)
|
||||||
|
{
|
||||||
|
dat[ix, iy] = (rnd.Next() & 0x7) | 0x8; // (rnd.Next() & 0x7) | 0x8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int lc = 0;
|
||||||
|
int mx = 0;
|
||||||
|
|
||||||
|
while (dubCount > 0)
|
||||||
|
{
|
||||||
|
lc++;
|
||||||
|
sList.Clear();
|
||||||
|
|
||||||
|
for (int ix = 1; ix < sizex + 1; ix++)
|
||||||
|
{
|
||||||
|
for (int iy = 1; iy < sizey + 1; iy++)
|
||||||
|
{
|
||||||
|
if (ix == 15 && iy == 4 && lc == 136)
|
||||||
|
{
|
||||||
|
iy = iy;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
{
|
||||||
|
DataListEntr sl = new DataListEntr();
|
||||||
|
|
||||||
|
sl.SetPos(ix, iy);
|
||||||
|
sl.SetData(0, dat[ix, iy]);
|
||||||
|
sl.Rotation = i;
|
||||||
|
|
||||||
|
bool nonNull = true;
|
||||||
|
|
||||||
|
for (int j = 0; j < 6; j++)
|
||||||
|
{
|
||||||
|
if (ym[j, i] != 0 && iy % 2 == 0)
|
||||||
|
mx = 1;
|
||||||
|
else
|
||||||
|
mx = 0;
|
||||||
|
|
||||||
|
int tmpd = dat[ix + xm[j, i] + mx, iy + ym[j, i]];
|
||||||
|
sl.SetData(j+1, tmpd);
|
||||||
|
if (tmpd == 0) nonNull = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nonNull) sList.Add(sl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sList.Sort(delegate(DataListEntr X, DataListEntr Y)
|
||||||
|
{
|
||||||
|
return X.CompareTo(Y);
|
||||||
|
});
|
||||||
|
|
||||||
|
dubCount = 0;
|
||||||
|
|
||||||
|
for (int i = 1; i < sList.Count; i++)
|
||||||
|
{
|
||||||
|
if (sList[i].CompareTo(sList[i - 1]) == 0)
|
||||||
|
{
|
||||||
|
//System.Diagnostics.Debug.WriteLine("XY: " + sList[i+1].X + " " + sList[i+1].Y);
|
||||||
|
dubCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dubCount > 0)
|
||||||
|
{
|
||||||
|
for (int i = 1; i < sList.Count; i++)
|
||||||
|
{
|
||||||
|
if (sList[i].CompareTo(sList[i - 1]) == 0)
|
||||||
|
{
|
||||||
|
sList[i].SetArrayEntr(ref dat, (rnd.Next() & 0x7) | 0x8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int iz = rnd.Next() % sList.Count;
|
||||||
|
|
||||||
|
sList[iz].SetArrayEntr(ref dat, (rnd.Next() & 0x7) | 0x8);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.WriteLine(dubCount +" " + lc);
|
||||||
|
}
|
||||||
|
|
||||||
|
sList.Sort(delegate(DataListEntr X, DataListEntr Y)
|
||||||
|
{
|
||||||
|
return X.CompareTo(Y);
|
||||||
|
});
|
||||||
|
|
||||||
|
var ListOutFile = File.OpenWrite(binListName);
|
||||||
|
|
||||||
|
byte[] wBytes = new byte[sList.Count * 9];
|
||||||
|
|
||||||
|
for (int i = 0; i < sList.Count; i++)
|
||||||
|
{
|
||||||
|
int i2 = i * 9;
|
||||||
|
|
||||||
|
int xpos = (int)((sList[i].X * Dist + AddOffs(0, sList[i].Y)) / mmw * 10); //in 1/10 mm
|
||||||
|
int ypos = (int)(sList[i].Y * Dist * ratio / mmw) * 10; //in 1/10 mm
|
||||||
|
|
||||||
|
wBytes[i2 + 0] = (byte)(sList[i].GetData(0));
|
||||||
|
wBytes[i2 + 1] = (byte)((sList[i].GetData(1) << 4) | sList[i].GetData(2));
|
||||||
|
wBytes[i2 + 2] = (byte)((sList[i].GetData(3) << 4) | sList[i].GetData(4));
|
||||||
|
wBytes[i2 + 3] = (byte)((sList[i].GetData(5) << 4) | sList[i].GetData(6));
|
||||||
|
wBytes[i2 + 4] = (byte)sList[i].Rotation;
|
||||||
|
wBytes[i2 + 5] = (byte)(xpos >> 8);
|
||||||
|
wBytes[i2 + 6] = (byte)xpos;
|
||||||
|
wBytes[i2 + 7] = (byte)(ypos >> 8);
|
||||||
|
wBytes[i2 + 8] = (byte)ypos;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ListOutFile.Write(wBytes, 0, wBytes.Length);
|
||||||
|
|
||||||
|
ListOutFile.Close();
|
||||||
|
|
||||||
|
|
||||||
|
XpsDocument xpsDoc = new XpsDocument(containerName, FileAccess.ReadWrite);
|
||||||
|
|
||||||
|
for (int iy = 1; iy < sizey; iy++)
|
||||||
|
{
|
||||||
|
for (int ix = 1; ix < sizex; ix++)
|
||||||
|
{
|
||||||
|
int data = dat[ix, iy];
|
||||||
|
|
||||||
|
for (int n = 0; n < 4; n++)
|
||||||
|
{
|
||||||
|
bool bit = ((data >> n) & 1) == 1;
|
||||||
|
|
||||||
|
if (bit) fp.Children.Add(GetCircle(ix * Dist + AddOffs(12, iy), iy * Dist * ratio + 20, MarkerStrokeSize * (n + 1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
//fp.Children.Add(GetCircle(ix, iy, MarkerStrokeSize * 5));
|
||||||
|
|
||||||
|
SymCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
XpsDocumentWriter xpsdw = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
|
||||||
|
|
||||||
|
|
||||||
|
xpsdw.Write(fp);
|
||||||
|
|
||||||
|
xpsDoc.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Ellipse GetCircle(double xPosition, double yPosition, double Radius)
|
||||||
|
{
|
||||||
|
Ellipse el = new Ellipse();
|
||||||
|
el.Margin = new Thickness(xPosition - Radius, yPosition - Radius, 0, 0);
|
||||||
|
el.Height = 2 * Radius;
|
||||||
|
el.Width = 2 * Radius;
|
||||||
|
el.StrokeThickness = MarkerStrokeSize * 1.1;
|
||||||
|
el.Stroke = new SolidColorBrush(Colors.Black);
|
||||||
|
if (Radius <= MarkerStrokeSize) el.Fill = new SolidColorBrush(Colors.Black);
|
||||||
|
return el;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.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>{3CB899A6-6FCD-4154-9EF0-DA79F4FE2D84}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>PositionPatternCreator</RootNamespace>
|
||||||
|
<AssemblyName>PositionPatternCreator</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="ReachFramework" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Printing" />
|
||||||
|
<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.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>
|
||||||
|
<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>
|
||||||
|
</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="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<AppDesigner Include="Properties\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<!-- 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>
|
|
@ -0,0 +1,55 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
// die mit einer Assembly verknüpft sind.
|
||||||
|
[assembly: AssemblyTitle("PositionPatternCreator")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("PositionPatternCreator")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||||
|
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||||
|
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
|
||||||
|
//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei
|
||||||
|
//in einer <PropertyGroup> fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
|
||||||
|
//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
|
||||||
|
//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
|
||||||
|
//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
|
||||||
|
|
||||||
|
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||||
|
|
||||||
|
|
||||||
|
[assembly: ThemeInfo(
|
||||||
|
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
|
||||||
|
//(wird verwendet, wenn eine Ressource auf der Seite
|
||||||
|
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
|
||||||
|
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
|
||||||
|
//(wird verwendet, wenn eine Ressource auf der Seite, in der Anwendung oder einem
|
||||||
|
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
|
||||||
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
//
|
||||||
|
// Hauptversion
|
||||||
|
// Nebenversion
|
||||||
|
// Buildnummer
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
CameraPositionTrackingCreatorHex/PositionPatternCreator/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.34014
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code neu generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PositionPatternCreator.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
|
||||||
|
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
|
||||||
|
[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>
|
||||||
|
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
/// </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("PositionPatternCreator.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
CameraPositionTrackingCreatorHex/PositionPatternCreator/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.34014
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace PositionPatternCreator.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>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</assembly>
|
|
@ -0,0 +1 @@
|
||||||
|
<FixedDocument xmlns="http://schemas.microsoft.com/xps/2005/06"><PageContent Source="Pages/1.fpage" /></FixedDocument>
|
|
@ -0,0 +1 @@
|
||||||
|
<FixedDocumentSequence xmlns="http://schemas.microsoft.com/xps/2005/06"><DocumentReference Source="Documents/1/FixedDocument.fdoc" /></FixedDocumentSequence>
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="fdseq" ContentType="application/vnd.ms-package.xps-fixeddocumentsequence+xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="fdoc" ContentType="application/vnd.ms-package.xps-fixeddocument+xml" /><Default Extension="fpage" ContentType="application/vnd.ms-package.xps-fixedpage+xml" /></Types>
|
|
@ -0,0 +1,69 @@
|
||||||
|
#pragma checksum "..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F5973FCA2489C4BE9AE40E38CF8FF929EFD87745"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PositionPatternCreator {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// App
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : System.Windows.Application {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
|
||||||
|
#line 4 "..\..\App.xaml"
|
||||||
|
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application Entry Point.
|
||||||
|
/// </summary>
|
||||||
|
[System.STAThreadAttribute()]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public static void Main() {
|
||||||
|
PositionPatternCreator.App app = new PositionPatternCreator.App();
|
||||||
|
app.InitializeComponent();
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
#pragma checksum "..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F5973FCA2489C4BE9AE40E38CF8FF929EFD87745"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PositionPatternCreator {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// App
|
||||||
|
/// </summary>
|
||||||
|
public partial class App : System.Windows.Application {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
|
||||||
|
#line 4 "..\..\App.xaml"
|
||||||
|
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Application Entry Point.
|
||||||
|
/// </summary>
|
||||||
|
[System.STAThreadAttribute()]
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public static void Main() {
|
||||||
|
PositionPatternCreator.App app = new PositionPatternCreator.App();
|
||||||
|
app.InitializeComponent();
|
||||||
|
app.Run();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C93BD4E343EBE56175076D929CAF92E2CA510879"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PositionPatternCreator {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MainWindow
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
|
#line 6 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Canvas DrawCanvas;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
private bool _contentLoaded;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
if (_contentLoaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_contentLoaded = true;
|
||||||
|
System.Uri resourceLocater = new System.Uri("/PositionPatternCreator;component/mainwindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line 1 "..\..\MainWindow.xaml"
|
||||||
|
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||||
|
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||||
|
switch (connectionId)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
|
||||||
|
#line 4 "..\..\MainWindow.xaml"
|
||||||
|
((PositionPatternCreator.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
|
case 2:
|
||||||
|
this.DrawCanvas = ((System.Windows.Controls.Canvas)(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._contentLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "C93BD4E343EBE56175076D929CAF92E2CA510879"
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Automation;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Ink;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Markup;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
using System.Windows.Media.Effects;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Media.Media3D;
|
||||||
|
using System.Windows.Media.TextFormatting;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Shell;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PositionPatternCreator {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MainWindow
|
||||||
|
/// </summary>
|
||||||
|
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||||
|
|
||||||
|
|
||||||
|
#line 6 "..\..\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.Canvas DrawCanvas;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
private bool _contentLoaded;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InitializeComponent
|
||||||
|
/// </summary>
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
public void InitializeComponent() {
|
||||||
|
if (_contentLoaded) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_contentLoaded = true;
|
||||||
|
System.Uri resourceLocater = new System.Uri("/PositionPatternCreator;component/mainwindow.xaml", System.UriKind.Relative);
|
||||||
|
|
||||||
|
#line 1 "..\..\MainWindow.xaml"
|
||||||
|
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||||
|
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
|
||||||
|
switch (connectionId)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
|
||||||
|
#line 4 "..\..\MainWindow.xaml"
|
||||||
|
((PositionPatternCreator.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
|
case 2:
|
||||||
|
this.DrawCanvas = ((System.Windows.Controls.Canvas)(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._contentLoaded = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
7d770c538b04deb1042752352f52f1f5c4a1cba0
|
|
@ -0,0 +1,40 @@
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe.config
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.csprojResolveAssemblyReference.cache
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\MainWindow.baml
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\MainWindow.g.cs
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\App.g.cs
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator_MarkupCompile.cache
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.g.resources
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.Properties.Resources.resources
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.csproj.GenerateResource.Cache
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\bin\Debug\PositionPatternCreator.pdb
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.exe
|
||||||
|
c:\users\nicolas\documents\visual studio 2013\Projects\PositionPatternCreator\PositionPatternCreator\obj\Debug\PositionPatternCreator.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe.config
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.exe
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.csprojResolveAssemblyReference.cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\MainWindow.baml
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\MainWindow.g.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\App.g.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator_MarkupCompile.cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.g.resources
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.Properties.Resources.resources
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\PositionPatternCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.csproj.GenerateResource.Cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe.config
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.exe
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.exe
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\bin\Debug\PositionPatternCreator.pdb
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\MainWindow.baml
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\MainWindow.g.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\App.g.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator_MarkupCompile.cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.g.resources
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.Properties.Resources.resources
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.csproj.GenerateResource.Cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.csprojAssemblyReference.cache
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\PositionPatternCreator.csproj.CoreCompileInputs.cache
|
|
@ -0,0 +1,20 @@
|
||||||
|
PositionPatternCreator
|
||||||
|
|
||||||
|
|
||||||
|
winexe
|
||||||
|
C#
|
||||||
|
.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\
|
||||||
|
PositionPatternCreator
|
||||||
|
none
|
||||||
|
false
|
||||||
|
DEBUG;TRACE
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\App.xaml
|
||||||
|
11151548125
|
||||||
|
|
||||||
|
5-2017746502
|
||||||
|
141178008217
|
||||||
|
MainWindow.xaml;
|
||||||
|
|
||||||
|
False
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
PositionPatternCreator
|
||||||
|
|
||||||
|
|
||||||
|
winexe
|
||||||
|
C#
|
||||||
|
.cs
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\obj\Debug\
|
||||||
|
PositionPatternCreator
|
||||||
|
none
|
||||||
|
false
|
||||||
|
DEBUG;TRACE
|
||||||
|
C:\Users\Nicolas\Documents\Visual Studio 2013\Projects\CameraPositionTrackingCreatorHex\PositionPatternCreator\App.xaml
|
||||||
|
11151548125
|
||||||
|
|
||||||
|
9859531814
|
||||||
|
141178008217
|
||||||
|
MainWindow.xaml;
|
||||||
|
|
||||||
|
False
|
||||||
|
|