Skip to content
Permalink
Browse files

Windows 10 Version 1709 - May 2018 Update

  • Loading branch information...
oldnewthing committed May 3, 2018
1 parent f6ad9bc commit de1bb527ec0327b767397d4c1a74a797356f4357
Showing with 6,554 additions and 461 deletions.
  1. +8 −6 README.md
  2. +0 −19 Samples/360VideoPlayback/cpp/Common/DeviceResources.cpp
  3. +0 −19 Samples/360VideoPlayback/cs/Common/DeviceResources.cs
  4. +2 −1 Samples/360VideoPlayback/cs/ms.fxcompile.targets
  5. +3 −2 Samples/Advertising/README.md
  6. +10 −0 Samples/Advertising/cpp/Advertising.vcxproj
  7. +3 −0 Samples/Advertising/cpp/Advertising.vcxproj.filters
  8. +4 −0 Samples/Advertising/cpp/packages.config
  9. +2 −1 Samples/Advertising/cs/project.json
  10. +8 −8 Samples/Advertising/js/Advertising.jsproj
  11. +3 −8 Samples/Advertising/js/Advertising.sln
  12. +4 −0 Samples/Advertising/js/packages.config
  13. +1 −1 Samples/BackgroundActivation/cs/Package.appxmanifest
  14. +1 −1 Samples/BackgroundTask/cs/BackgroundTask/Package.appxmanifest
  15. +1 −1 Samples/BluetoothRfcommChat/cs/Package.appxmanifest
  16. +1 −1 Samples/CameraGetPreviewFrame/cpp/Package.appxmanifest
  17. +1 −1 Samples/CameraGetPreviewFrame/cs/Package.appxmanifest
  18. +71 −0 Samples/CameraStreamCoordinateMapper/README.md
  19. +207 −0 Samples/CameraStreamCoordinateMapper/cpp/App.cpp
  20. +61 −0 Samples/CameraStreamCoordinateMapper/cpp/App.h
  21. +43 −0 Samples/CameraStreamCoordinateMapper/cpp/CameraStreamCoordinateMapper.sln
  22. +322 −0 Samples/CameraStreamCoordinateMapper/cpp/CameraStreamCoordinateMapper.vcxproj
  23. +131 −0 Samples/CameraStreamCoordinateMapper/cpp/CameraStreamCoordinateMapper.vcxproj.filters
  24. +262 −0 Samples/CameraStreamCoordinateMapper/cpp/CameraStreamCoordinateMapperMain.cpp
  25. +69 −0 Samples/CameraStreamCoordinateMapper/cpp/CameraStreamCoordinateMapperMain.h
  26. +715 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/DeviceResources.cpp
  27. +113 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/DeviceResources.h
  28. +301 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/DirectXHelper.cpp
  29. +168 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/DirectXHelper.h
  30. +172 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/GraphicsCamera.cpp
  31. +50 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/GraphicsCamera.h
  32. +192 −0 Samples/CameraStreamCoordinateMapper/cpp/Common/StepTimer.h
  33. +462 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/CameraCoordinateMapper.cpp
  34. +99 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/CameraCoordinateMapper.h
  35. +158 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/CameraStreamProcessor.cpp
  36. +76 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/CameraStreamProcessor.h
  37. +373 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/GpuCoordinateMapper.cpp
  38. +134 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/GpuCoordinateMapper.h
  39. +170 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/QuadRenderer.cpp
  40. +50 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/QuadRenderer.h
  41. +55 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/ShaderStructures.h
  42. +194 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/CameraIntrinsicsHelpers.hlsl
  43. +64 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/QuadPixelShader.hlsl
  44. +49 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/QuadVertexShader.hlsl
  45. +24 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/RasterizeDepthMeshPS.hlsl
  46. +148 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/RasterizeDepthMeshVS.hlsl
  47. +43 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/VisualizeDepthMeshPS.hlsl
  48. +152 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/Shaders/VisualizeDepthMeshVS.hlsl
  49. +131 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/TextRenderer.cpp
  50. +45 −0 Samples/CameraStreamCoordinateMapper/cpp/Content/TextRenderer.h
  51. +31 −0 Samples/CameraStreamCoordinateMapper/cpp/Package.appxmanifest
  52. +12 −0 Samples/CameraStreamCoordinateMapper/cpp/pch.cpp
  53. +42 −0 Samples/CameraStreamCoordinateMapper/cpp/pch.h
  54. +4 −3 Samples/CameraVideoStabilization/cpp/MainPage.xaml.cpp
  55. +1 −1 Samples/D2DGradientMesh/cpp/Package.appxmanifest
  56. +1 −1 Samples/DWriteColorGlyph/cpp/Package.appxmanifest
  57. +1 −1 Samples/Geolocation/cpp/GeolocationCPP/Package.appxmanifest
  58. +1 −1 Samples/Geolocation/cs/GeolocationCS/Package.appxmanifest
  59. +5 −1 Samples/IoT-GPIO/cpp/Package.appxmanifest
  60. +5 −1 Samples/IoT-GPIO/cs/Package.appxmanifest
  61. +6 −2 Samples/IoT-GPIO/js/package.appxmanifest
  62. +5 −1 Samples/IoT-I2C/cpp/Package.appxmanifest
  63. +5 −1 Samples/IoT-I2C/cs/Package.appxmanifest
  64. +6 −2 Samples/IoT-I2C/js/package.appxmanifest
  65. +6 −2 Samples/IoT-SPI/cpp/Package.appxmanifest
  66. +5 −1 Samples/IoT-SPI/cs/Package.appxmanifest
  67. +6 −2 Samples/IoT-SPI/js/package.appxmanifest
  68. +1 −1 Samples/KeyCredentialManager/cpp/SignIn.xaml
  69. +117 −100 Samples/KeyCredentialManager/cpp/SignIn.xaml.cpp
  70. +8 −8 Samples/KeyCredentialManager/cpp/SignIn.xaml.h
  71. +1 −1 Samples/KeyCredentialManager/cs/SignIn.xaml
  72. +35 −36 Samples/KeyCredentialManager/cs/SignIn.xaml.cs
  73. +9 −9 Samples/Logging/cpp/Logging.vcxproj
  74. +3 −3 Samples/Logging/cpp/Logging.vcxproj.filters
  75. +3 −1 Samples/Logging/cpp/Scenario2.xaml.cpp
  76. +4 −1 Samples/Logging/cpp/Scenario3.xaml.cpp
  77. +1 −2 Samples/Logging/cs/FileLoggingSessionScenario.cs
  78. +6 −3 Samples/Logging/cs/Logging.csproj
  79. +1 −1 Samples/Logging/cs/LoggingChannelScenario.cs
  80. +1 −1 Samples/Logging/cs/LoggingScenarioEventArgs.cs
  81. +1 −2 Samples/Logging/cs/LoggingSessionScenario.cs
  82. +0 −1 Samples/Logging/cs/SampleConfiguration.cs
  83. +0 −75 Samples/Logging/cs/Scenario1.xaml
  84. +1 −2 Samples/Logging/cs/Scenario1.xaml.cs
  85. +0 −42 Samples/Logging/cs/Scenario2.xaml
  86. +6 −5 Samples/Logging/cs/Scenario2.xaml.cs
  87. +0 −42 Samples/Logging/cs/Scenario3.xaml
  88. +7 −8 Samples/Logging/cs/Scenario3.xaml.cs
  89. 0 Samples/Logging/{cpp → shared}/Scenario1.xaml
  90. 0 Samples/Logging/{cpp → shared}/Scenario2.xaml
  91. 0 Samples/Logging/{cpp → shared}/Scenario3.xaml
  92. +7 −15 Samples/Nfc/NfcHceBackgroundTask/NfcHceBackgroundTask.vcxproj
  93. +1 −1 Samples/Notifications/cs/Notifications/Notifications.csproj
  94. +14 −0 Samples/SimpleInk/cpp/Scenario9.xaml.cpp
  95. +1 −0 Samples/SimpleInk/cpp/Scenario9.xaml.h
  96. +14 −0 Samples/SimpleInk/cs/Scenario9.xaml.cs
  97. +48 −0 Samples/UserActivity/README.md
  98. +29 −0 Samples/UserActivity/cs/Assets/UserActivityCard.json
  99. +58 −0 Samples/UserActivity/cs/Package.appxmanifest
  100. +82 −0 Samples/UserActivity/cs/SampleConfiguration.cs
  101. +37 −0 Samples/UserActivity/cs/Scenario1_BasicUserActivity.xaml
  102. +71 −0 Samples/UserActivity/cs/Scenario1_BasicUserActivity.xaml.cs
  103. +39 −0 Samples/UserActivity/cs/Scenario2_AdvancedUserActivity.xaml
  104. +86 −0 Samples/UserActivity/cs/Scenario2_AdvancedUserActivity.xaml.cs
  105. +39 −0 Samples/UserActivity/cs/Scenario3_AdaptiveCard.xaml
  106. +77 −0 Samples/UserActivity/cs/Scenario3_AdaptiveCard.xaml.cs
  107. +193 −0 Samples/UserActivity/cs/UserActivity.csproj
  108. +43 −0 Samples/UserActivity/cs/UserActivity.sln
  109. +1 −1 Samples/XamlListView/cs/MainPage.xaml
  110. +1 −1 Samples/XamlListView/cs/MainPage.xaml.cs
  111. +1 −1 Samples/XamlListView/cs/Samples/MasterDetailSelection/MasterDetailSelection.xaml
  112. +1 −1 Samples/XamlListView/cs/Samples/MasterDetailSelection/MasterDetailSelection.xaml.cs
  113. +1 −1 Samples/XamlListView/cs/Samples/RestoreScrollPositionSample/RestoreScrollPositionSample.xaml
  114. +1 −1 Samples/XamlListView/cs/Samples/RestoreScrollPositionSample/RestoreScrollPositionSample.xaml.cs
  115. +1 −1 Samples/XamlListView/cs/Samples/SimpleGridViewSample/SimpleGridViewSample.xaml
  116. +1 −1 Samples/XamlListView/cs/Samples/SimpleGridViewSample/SimpleGridViewSample.xaml.cs
  117. +1 −1 Samples/XamlListView/cs/Samples/SimpleListViewSample/SimpleListViewSample.xaml
  118. +1 −1 Samples/XamlListView/cs/Samples/SimpleListViewSample/SimpleListViewSample.xaml.cs
  119. +1 −1 Samples/XamlListView/cs/Samples/TapOnTheEdge/TapOnTheEdgeSample.xaml
  120. +1 −1 Samples/XamlListView/cs/Samples/TapOnTheEdge/TapOnTheEdgeSample.xaml.cs
@@ -93,35 +93,36 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
</tr>
<tr>
<td><a href="Samples/CameraResolution">Camera resolution</a></td>
<td><a href="Samples/CameraStreamCoordinateMapper">Camera stream coordinate mapper</a></td>
<td><a href="Samples/CameraStreamCorrelation">Camera stream correlation</a></td>
<td><a href="Samples/LiveDash">DASH streaming</a></td>
</tr>
<tr>
<td><a href="Samples/LiveDash">DASH streaming</a></td>
<td><a href="Samples/D2DPhotoAdjustment">Direct2D photo adjustment</a></td>
<td><a href="Samples/MediaEditing">Media editing</a></td>
<td><a href="Samples/MediaImport">Media import</a></td>
</tr>
<tr>
<td><a href="Samples/MediaImport">Media import</a></td>
<td><a href="Samples/XamlCustomMediaTransportControls">Media transport controls</a></td>
<td><a href="Samples/MIDI">MIDI</a></td>
<td><a href="Samples/Playlists">Playlists</a></td>
</tr>
<tr>
<td><a href="Samples/Playlists">Playlists</a></td>
<td><a href="Samples/PlayReady">PlayReady</a></td>
<td><a href="Samples/CameraOpenCV">Processing frames with OpenCV</a></td>
<td><a href="Samples/SimpleImaging">Simple imaging</a></td>
</tr>
<tr>
<td><a href="Samples/SimpleImaging">Simple imaging</a></td>
<td><a href="Samples/SpatialSound">Spatial audio</a></td>
<td><a href="Samples/SystemMediaTransportControls">System media transport controls</a></td>
<td><a href="Samples/MediaTranscoding">Transcoding media</a></td>
</tr>
<tr>
<td><a href="Samples/MediaTranscoding">Transcoding media</a></td>
<td><a href="Samples/VideoPlayback">Video playback</a></td>
<td><a href="Samples/VideoPlaybackSynchronization">Video playback synchronization</a></td>
<td><a href="Samples/CameraVideoStabilization">Video stabilization</a></td>
</tr>
<tr>
<td><a href="Samples/CameraVideoStabilization">Video stabilization</a></td>
<td><a href="Samples/WindowsAudioSession">Windows audio session (WASAPI)</a></td>
</tr>
</table>
@@ -284,6 +285,7 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
<tr>
<td><a href="Samples/ShareSource">Sharing content source app</a></td>
<td><a href="Samples/ShareTarget">Sharing content target app</a></td>
<td><a href="Samples/UserActivity">User activities</a></td>
</tr>
</table>

@@ -361,25 +361,6 @@ void DX::DeviceResources::Present(HolographicFrame^ frame)
// holographic frame predictions.
HolographicFramePresentResult presentResult = frame->PresentUsingCurrentPrediction();

HolographicFramePrediction^ prediction = frame->CurrentPrediction;
UseHolographicCameraResources<void>([this, prediction](std::map<UINT32, std::unique_ptr<CameraResources>>& cameraResourceMap)
{
for (auto cameraPose : prediction->CameraPoses)
{
// This represents the device-based resources for a HolographicCamera.
DX::CameraResources* pCameraResources = cameraResourceMap[cameraPose->HolographicCamera->Id].get();

// Discard the contents of the render target.
// This is a valid operation only when the existing contents will be
// entirely overwritten. If dirty or scroll rects are used, this call
// should be removed.
m_d3dContext->DiscardView(pCameraResources->GetBackBufferRenderTargetView());

// Discard the contents of the depth stencil.
m_d3dContext->DiscardView(pCameraResources->GetDepthStencilView());
}
});

// The PresentUsingCurrentPrediction API will detect when the graphics device
// changes or becomes invalid. When this happens, it is considered a Direct3D
// device lost scenario.
@@ -363,25 +363,6 @@ public void Present(ref HolographicFrame frame)
HolographicFramePresentWaitBehavior.WaitForFrameToFinish
);

HolographicFramePrediction prediction = frame.CurrentPrediction;
UseHolographicCameraResources((Dictionary<uint, CameraResources> cameraResourcesDictionary) =>
{
foreach (var cameraPose in prediction.CameraPoses)
{
// This represents the device-based resources for a HolographicCamera.
CameraResources cameraResources = cameraResourcesDictionary[cameraPose.HolographicCamera.Id];

// Discard the contents of the render target.
// This is a valid operation only when the existing contents will be
// entirely overwritten. If dirty or scroll rects are used, this call
// should be removed.
d3dContext.DiscardView(cameraResources.BackBufferRenderTargetView);

// Discard the contents of the depth stencil.
d3dContext.DiscardView(cameraResources.DepthStencilView);
}
});

// The PresentUsingCurrentPrediction API will detect when the graphics device
// changes or becomes invalid. When this happens, it is considered a Direct3D
// device lost scenario.
@@ -154,7 +154,8 @@
</ItemGroup>

<PropertyGroup>
<FXCPath>$(MSBuildProgramFiles32)\Windows Kits\10\bin\x86</FXCPath>
<FXCPath Condition="Exists('$(MSBuildProgramFiles32)\Windows Kits\10\bin\$(TargetPlatformVersion)\x86\fxc.exe')">$(MSBuildProgramFiles32)\Windows Kits\10\bin\$(TargetPlatformVersion)\x86</FXCPath>
<FXCPath Condition="'$(FXCPath)' == ''">$(MSBuildProgramFiles32)\Windows Kits\10\bin\x86</FXCPath>
</PropertyGroup>

<Message Text="Using 'fxc.exe' from '$(FXCPath)'." />
@@ -22,8 +22,9 @@ Specifically, this sample shows how to:

## Prerequisites

This sample requires the [Microsoft Advertising SDK Libraries for XAML or JavaScript](http://go.microsoft.com/fwlink/?LinkID=619694).
[Download it here](http://go.microsoft.com/fwlink/p/?LinkId=518026).
This sample requires the [Microsoft Advertising SDK Libraries for XAML or JavaScript](http://go.microsoft.com/fwlink/?LinkID=619694),
which is obtained via NuGet package,
or you can [download it here](http://go.microsoft.com/fwlink/p/?LinkId=518026).
It also requires the [internet client capability](https://msdn.microsoft.com/library/windows/apps/mt270968#general-use_capabilities) to be added to the manifest.

When you incorporate this sample into your own app,
@@ -222,7 +222,17 @@
<ItemGroup>
<SDKReference Include="Microsoft.Advertising.Xaml, Version=10.0" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\Microsoft.Advertising.XAML.10.1705.16001\build\Microsoft.Advertising.XAML.targets" Condition="Exists('packages\Microsoft.Advertising.XAML.10.1705.16001\build\Microsoft.Advertising.XAML.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Advertising.XAML.10.1705.16001\build\Microsoft.Advertising.XAML.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Advertising.XAML.10.1705.16001\build\Microsoft.Advertising.XAML.targets'))" />
</Target>
</Project>
@@ -65,4 +65,7 @@
<Filter>Assets</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Advertising.XAML" version="10.1705.16001" targetFramework="native" />
</packages>
@@ -1,9 +1,10 @@
{
"dependencies": {
"Microsoft.Advertising.XAML": "10.1705.16001",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
"uap10.0.16299": {}
},
"runtimes": {
"win10-arm": {},
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
@@ -17,10 +13,6 @@
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
@@ -127,12 +119,20 @@
<Content Include="..\..\..\SharedContent\js\sample-utils\scenario-select.html">
<Link>sample-utils\scenario-select.html</Link>
</Content>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.Advertising.JavaScript, Version=10.0" />
<SDKReference Include="Microsoft.VCLibs, Version=14.0" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
<Import Project="packages\Microsoft.Advertising.JS.10.1705.16001\build\Microsoft.Advertising.JS.targets" Condition="Exists('packages\Microsoft.Advertising.JS.10.1705.16001\build\Microsoft.Advertising.JS.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Advertising.JS.10.1705.16001\build\Microsoft.Advertising.JS.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Advertising.JS.10.1705.16001\build\Microsoft.Advertising.JS.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below then uncomment
that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -7,19 +7,14 @@ Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "Advertising", "Advertising.
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|ARM.ActiveCfg = Debug|ARM
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|ARM.Build.0 = Debug|ARM
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|ARM.Deploy.0 = Debug|ARM
@@ -29,9 +24,6 @@ Global
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|x86.ActiveCfg = Debug|x86
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|x86.Build.0 = Debug|x86
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Debug|x86.Deploy.0 = Debug|x86
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|Any CPU.Build.0 = Release|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|Any CPU.Deploy.0 = Release|Any CPU
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|ARM.ActiveCfg = Release|ARM
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|ARM.Build.0 = Release|ARM
{8DDA8DD7-9CB3-51AE-8B7C-0B871449EB8D}.Release|ARM.Deploy.0 = Release|ARM
@@ -45,4 +37,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D2744A49-435A-4262-9369-233CAC016A5C}
EndGlobalSection
EndGlobal
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Advertising.JS" version="10.1705.16001" targetFramework="uap10.0.16299" />
</packages>
@@ -38,7 +38,7 @@
Square44x44Logo="Assets\SmallTile-sdk.png"
Description="Background Activation C# Sample"
BackgroundColor="#00b2f0">
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\smalltile-Windows-sdk.png" />
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\smalltile-sdk.png" />
<uap:SplashScreen Image="Assets\Splash-sdk.png" />
<uap:DefaultTile Wide310x150Logo="Assets\tile-sdk.png" >
<uap:ShowNameOnTiles>
@@ -38,7 +38,7 @@
Square44x44Logo="Assets\SmallTile-sdk.png"
Description="Background Tasks C# Sample"
BackgroundColor="#00b2f0">
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\smalltile-Windows-sdk.png" />
<uap:LockScreen Notification="badgeAndTileText" BadgeLogo="Assets\smalltile-sdk.png" />
<uap:SplashScreen Image="Assets\Splash-sdk.png" />
<uap:DefaultTile Wide310x150Logo="Assets\tile-sdk.png" >
<uap:ShowNameOnTiles>
@@ -38,7 +38,7 @@
</Extensions>
<uap:VisualElements
DisplayName="Bluetooth Rfcomm Chat C# Sample"
Square150x150Logo="Assets\StoreLogo-sdk.png"
Square150x150Logo="Assets\SquareTile-sdk.png"
Square44x44Logo="Assets\SmallTile-sdk.png"
Description="Bluetooth Rfcomm Chat C# Sample"
BackgroundColor="#00b2f0">
@@ -16,7 +16,7 @@
<Properties>
<DisplayName>CameraGetPreviewFrame</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>

<Dependencies>
@@ -16,7 +16,7 @@
<Properties>
<DisplayName>CameraGetPreviewFrame</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>

<Dependencies>
@@ -0,0 +1,71 @@
<!---
category: AudioVideoAndCamera
samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=870775
--->

# Camera stream coordinate mapper sample

Shows how to use spatially correlated color and depth cameras and the depth frames to map image pixels from one camera to another using [CameraIntrinsics](https://docs.microsoft.com/uwp/api/windows.media.devices.core.cameraintrinsics) and [SpatialCoordinateSystem](https://docs.microsoft.com/uwp/api/windows.perception.spatial.spatialcoordinatesystem) using DirectX and shaders for real time applications.

> **Note:** This sample is part of a large collection of UWP feature samples.
> If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
This sample demonstrates how to:

- Find cameras which support color and depth formats.
- Create MediaFrameReaders to read frames from multiple sources concurrently.
- Map depth camera's pixels onto a correlated color camera using DirectX shaders.

### Correlation of multiple capture sources

This sample is intended to demonstrate how to map entire images from one camera to another using depth information from the depth camera, [CameraIntrinsics](https://docs.microsoft.com/uwp/api/windows.media.devices.core.cameraintrinsics), and [SpatialCoordinateSystem](https://docs.microsoft.com/uwp/api/windows.perception.spatial.spatialcoordinatesystem). This is similar to the functionality of the [DepthCorrelatedCoordinateMapper](https://docs.microsoft.com/uwp/api/windows.media.devices.core.depthcorrelatedcoordinatemapper) except this sample is designed for processing an entire image using DirectX and shaders. The [DepthCorrelatedCoordinateMapper](https://docs.microsoft.com/uwp/api/windows.media.devices.core.depthcorrelatedcoordinatemapper) has a member function "MapPoints" which will map an array of pixels from one camera to another using the depth data for correlation, but was not performant on lower-end hardware for a full image of pixels. The performance of the Gpu algorithm in this sample, running on an Xbox One running as a UWP app is < 2ms per frame. Using a desktop PC with a GTX 1060 resulted in < 0.25ms per frame.

There are multiple ways to interpret the result of the image mapping. This sample demonstrates how to visualize the resulting data as a 3D point cloud from different perspectives. This sample also demonstrates how to project the correlated 3D data back onto one of the cameras to correlate the results in 2D (i.e. use the depth data to discard pixels that are too far away from the camera).

**Note** The Windows universal samples for Windows 10 require Visual Studio 2017 Update 2 and Windows SDK version 15063 or above to build.

To obtain information about Windows 10 development, go to the [Windows Dev Center](https://dev.windows.com).

## See also

### Samples

* [CameraFrames](/Samples/CameraFrames)
* [CameraStreamCorrelation](/Samples/CameraStreamCorrelation)

### Reference

* [Windows.Media.Capture.Frames namespace](https://docs.microsoft.com/uwp/api/windows.media.capture.frames)
* [Windows.Media.Devices.Core.CameraIntrinsics](https://docs.microsoft.com/uwp/api/windows.media.devices.core.cameraintrinsics)
* [Windows.Perception.Spatial.SpatialCoordinateSystem](https://docs.microsoft.com/uwp/api/windows.perception.spatial.spatialcoordinatesystem)

## System requirements

**Client:** Windows 10 build 15063

**Camera:** Correlated color and depth camera (e.g. Kinect V2 sensor)

## Build the sample

1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with
the sample you want to build.
2. Start Microsoft Visual Studio 2017 and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the
subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or
JavaScript). Double-click the Visual Studio Solution (.sln) file.
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.

## Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and
run it.

### Deploying and running the sample

- To debug the sample and then run it, follow the steps listed above to connect your
developer-unlocked Microsoft HoloLens, then press F5 or select **Debug** \> **Start Debugging**.
To run the sample without debugging, press Ctrl+F5 or select **Debug** \> **Start Without Debugging**.

0 comments on commit de1bb52

Please sign in to comment.
You can’t perform that action at this time.