public void GetMeasurements(ScapeSession.ARImage image) { ScapeNative.citf_setYChannelPtr(this.scapeClient, image.YPixelBuffer, image.Width, image.Height); ScapeNative.citf_setCameraIntrinsics(this.scapeClient, image.XFocalLength, image.YFocalLength, image.XPrincipalPoint, image.YPrincipalPoint); ScapeNative.citf_getMeasurements(this.scapeClient); }
private void ProcessImage(AsyncCameraImageConversionStatus status, XRCameraImageConversionParams conversionParams, NativeArray <byte> imageBuffer) { if (status != AsyncCameraImageConversionStatus.Ready) { // attempt to call getMeasurements with empty image will compel SDK core to report error // triggering session to request another ScapeNative.citf_setYChannelPtr(this.scapeClient, IntPtr.Zero, 0, 0); ScapeNative.citf_getMeasurements(this.scapeClient); return; } CopyImageBuffer(imageBuffer); ScapeNative.citf_setYChannelPtr(this.scapeClient, imagePtr, ScapeImgWidth, ScapeImgHeight); ScapeNative.citf_getMeasurements(this.scapeClient); ScapeLogging.LogDebug("citf_getMeasurements() " + (Time.time - requestTime)); }