NRSDKApiForUnity
Classes
RecordNRPhotoCapture

Inherits IDisposable.

Classes

struct  PhotoCaptureResult
 

Public Types

enum  CaptureResultType { Success = 0 , UnknownError = 1 , TimeOutError = 2 }
 

Public Member Functions

void Dispose ()
 
IntPtr GetUnsafePointerToVideoDeviceController ()
 
void StartPhotoModeAsync (CameraParameters setupParams, OnPhotoModeStartedCallback onPhotoModeStartedCallback, bool autoAdaptBlendMode=false)
 
void StopPhotoModeAsync (OnPhotoModeStoppedCallback onPhotoModeStoppedCallback)
 
void TakePhotoAsync (string filename, PhotoCaptureFileOutputFormat fileOutputFormat, OnCapturedToDiskCallback onCapturedPhotoToDiskCallback)
 
void TakePhotoAsync (OnCapturedToMemoryCallback onCapturedPhotoToMemoryCallback)
 
delegate void OnCaptureResourceCreatedCallback (NRPhotoCapture captureObject)
 
delegate void OnPhotoModeStartedCallback (PhotoCaptureResult result)
 
delegate void OnPhotoModeStoppedCallback (PhotoCaptureResult result)
 
delegate void OnCapturedToDiskCallback (PhotoCaptureResult result)
 
delegate void OnCapturedToMemoryCallback (PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame)
 

Static Public Member Functions

static void CreateAsync (bool showHolograms, OnCaptureResourceCreatedCallback onCreatedCallback)
 

Properties

static IEnumerable< Resolution > SupportedResolutions [get]
 
Texture? PreviewTexture [get]
 

Detailed Description

A nr photo capture.

Member Enumeration Documentation

◆ CaptureResultType

Contains the result of the capture request.

Enumerator
Success 

Specifies that the desired operation was successful.

UnknownError 

Specifies that an unknown error occurred.


TimeOutError 

Get rgb camera data timeout.


Member Function Documentation

◆ CreateAsync()

static void NRKernal.Record.NRPhotoCapture.CreateAsync ( bool  showHolograms,
OnCaptureResourceCreatedCallback  onCreatedCallback 
)
static

Creates an asynchronous.

Parameters
showHologramsTrue to show, false to hide the holograms.
onCreatedCallbackThe on created callback.

◆ GetUnsafePointerToVideoDeviceController()

IntPtr NRKernal.Record.NRPhotoCapture.GetUnsafePointerToVideoDeviceController ( )

Provides a COM pointer to the native IVideoDeviceController. A native COM pointer to the IVideoDeviceController.

Returns
The unsafe pointer to video device controller.

◆ OnCapturedToDiskCallback()

delegate void NRKernal.Record.NRPhotoCapture.OnCapturedToDiskCallback ( PhotoCaptureResult  result)

Called when a photo has been saved to the file system.

Parameters
resultIndicates whether or not the photo was successfully saved to the file system.

◆ OnCapturedToMemoryCallback()

delegate void NRKernal.Record.NRPhotoCapture.OnCapturedToMemoryCallback ( PhotoCaptureResult  result,
PhotoCaptureFrame  photoCaptureFrame 
)

Called when a photo has been captured to memory.

Parameters
resultIndicates whether or not the photo was successfully captured to memory.
photoCaptureFrameContains the target texture.If available, the spatial information will be accessible through this structure as well.

◆ OnCaptureResourceCreatedCallback()

delegate void NRKernal.Record.NRPhotoCapture.OnCaptureResourceCreatedCallback ( NRPhotoCapture  captureObject)

Called when a PhotoCapture resource has been created.

Parameters
captureObjectThe PhotoCapture instance.

◆ OnPhotoModeStartedCallback()

delegate void NRKernal.Record.NRPhotoCapture.OnPhotoModeStartedCallback ( PhotoCaptureResult  result)

Called when photo mode has been started.

Parameters
resultIndicates whether or not photo mode was successfully activated.

◆ OnPhotoModeStoppedCallback()

delegate void NRKernal.Record.NRPhotoCapture.OnPhotoModeStoppedCallback ( PhotoCaptureResult  result)

Called when photo mode has been stopped.

Parameters
resultIndicates whether or not photo mode was successfully deactivated.

◆ StartPhotoModeAsync()

void NRKernal.Record.NRPhotoCapture.StartPhotoModeAsync ( CameraParameters  setupParams,
OnPhotoModeStartedCallback  onPhotoModeStartedCallback,
bool  autoAdaptBlendMode = false 
)

Starts photo mode asynchronous.

Parameters
setupParamsOptions for controlling the setup.
onPhotoModeStartedCallbackThe on photo mode started callback.
autoAdaptBlendModeAuto adaption for BlendMode based on supported feature on current device.

◆ StopPhotoModeAsync()

void NRKernal.Record.NRPhotoCapture.StopPhotoModeAsync ( OnPhotoModeStoppedCallback  onPhotoModeStoppedCallback)

Stops photo mode asynchronous.

Parameters
onPhotoModeStoppedCallbackThe on photo mode stopped callback.

◆ TakePhotoAsync() [1/2]

void NRKernal.Record.NRPhotoCapture.TakePhotoAsync ( OnCapturedToMemoryCallback  onCapturedPhotoToMemoryCallback)

Take photo asynchronous.

Parameters
onCapturedPhotoToMemoryCallbackThe on captured photo memory callback.

◆ TakePhotoAsync() [2/2]

void NRKernal.Record.NRPhotoCapture.TakePhotoAsync ( string  filename,
PhotoCaptureFileOutputFormat  fileOutputFormat,
OnCapturedToDiskCallback  onCapturedPhotoToDiskCallback 
)

Take photo asynchronous.

Parameters
filenameFilename of the file.
fileOutputFormatThe file output format.
onCapturedPhotoToDiskCallbackThe on captured photo disk callback.

Property Documentation

◆ PreviewTexture

Texture? NRKernal.Record.NRPhotoCapture.PreviewTexture
get

Gets the preview texture.

The preview texture.

◆ SupportedResolutions

IEnumerable<Resolution> NRKernal.Record.NRPhotoCapture.SupportedResolutions
staticget

A list of all the supported device resolutions for taking pictures.

The supported resolutions.