In a modern world of cloud computing and virtual reality experiences, see how Mixed Reality from Microsoft intersects with the real world while connected to various cloud services in Azure. Learn how you can get started with HoloLens and the all-new Windows Mixed Reality immersive headsets, while leveraging reusable skills in C#, Visual Studio, Azure, and Cognitive Services.
11. Augmented Reality Mixed Reality Virtual Reality
Augments the real world with helpful information
Blends holograms with your real world
Can transport you to a virtual world
Replaces the real world
39. Capture
Image
via
HoloLens
/// <summary>
/// Begin process of Image Capturing and send To Azure Computer Vision service.
/// </summary>
private void ExecuteImageCaptureAndAnalysis()
{
// Set the camera resolution to be the highest possible
Resolution cameraResolution = PhotoCapture.SupportedResolutions.OrderByDescending
((res) => res.width * res.height).First();
Texture2D targetTexture = new Texture2D(cameraResolution.width, cameraResolution.height);
// Begin capture process, set the image format
PhotoCapture.CreateAsync(false, delegate (PhotoCapture captureObject)
{
photoCaptureObject = captureObject;
CameraParameters c = new CameraParameters();
c.hologramOpacity = 0.0f;
c.cameraResolutionWidth = targetTexture.width;
c.cameraResolutionHeight = targetTexture.height;
c.pixelFormat = CapturePixelFormat.BGRA32;
// Capture the image from the camera and save it in the App internal folder
captureObject.StartPhotoModeAsync(c, delegate (PhotoCapture.PhotoCaptureResult result)
{
string filename = string.Format(@"CapturedImage{0}.jpg", tapsCount);
string filePath = Path.Combine(Application.persistentDataPath, filename);
VisionManager.instance.imagePath = filePath;
photoCaptureObject.TakePhotoAsync
(filePath, PhotoCaptureFileOutputFormat.JPG, OnCapturedPhotoToDisk);
});
});
}