public void GetMetaData(IRMetaData irMD) { using (IMarshaler marsh = irMD.GetMarshaler(true)) { OpenNIImporter.xnGetIRMetaData(this.InternalObject, marsh.Native); } }
public void GetMetaData(IRMetaData irMD) { using (IMarshaler marsh = irMD.GetMarshaler(true)) { SafeNativeMethods.xnGetIRMetaData(this.InternalObject, marsh.Native); } }
private unsafe void ReaderThread() { IRMetaData irMD = new IRMetaData(); while (this.shouldRun) { try { this.context.WaitOneUpdateAll(this.ir); } catch (Exception) { } this.ir.GetMetaData(irMD); MapData <ushort> irMap = this.ir.GetIRMap(); if (isRoiSet == false) { defaultWidth = irMap.XRes; defaultHeight = irMap.YRes; } int w = irMap.XRes; int h = irMap.YRes; lock (this) { int stride = w * 2; if (stride % 2 != 0) { stride += (2 - (stride % 2)); } if (roi.Size.Width != 0) { Emgu.CV.Image <Gray, UInt16> tmp = new Emgu.CV.Image <Gray, UInt16>(irMap.XRes, irMap.YRes, stride, ir.GetIRMapPtr()); tmp.ROI = new Rectangle(roi.X, roi.Y, roi.Width, roi.Height); grayImage = tmp.Copy(); } else { grayImage = new Emgu.CV.Image <Gray, UInt16>(w, h, stride, ir.GetIRMapPtr()); } } if (FrameCaptureComplete != null) { FrameCaptureComplete(); } } }
private unsafe void ReaderThread() { IRMetaData irMD = new IRMetaData(); while (this.shouldRun) { try { this.context.WaitOneUpdateAll(this.ir); } catch (Exception) { } this.ir.GetMetaData(irMD); MapData<ushort> irMap = this.ir.GetIRMap(); if(isRoiSet == false) { defaultWidth = irMap.XRes; defaultHeight = irMap.YRes; } int w = irMap.XRes; int h = irMap.YRes; lock (this) { int stride = w*2; if (stride%2 != 0) stride += (2 - (stride%2)); if(roi.Size.Width != 0) { Emgu.CV.Image<Gray, UInt16> tmp = new Emgu.CV.Image<Gray, UInt16>(irMap.XRes, irMap.YRes, stride, ir.GetIRMapPtr()); tmp.ROI = new Rectangle(roi.X, roi.Y, roi.Width, roi.Height); grayImage = tmp.Copy(); } else { grayImage = new Emgu.CV.Image<Gray, UInt16>(w, h, stride, ir.GetIRMapPtr()); } } if (FrameCaptureComplete != null) FrameCaptureComplete(); } }
public IRMetaData GetMetaData() { IRMetaData irMD = new IRMetaData(); GetMetaData(irMD); return irMD; }
public void SetData(IRMetaData irMD) { SetData(irMD, irMD.FrameID, irMD.Timestamp); }
public void SetData(IRMetaData irMD, Int32 frameID, Int64 timestamp) { SetData(frameID, timestamp, irMD.DataSize, irMD.IRMapPtr); }