public Projection(PXCMSession session, PXCMCapture.Device device, PXCMImage.ImageInfo dinfo)
        {
            //: start ros serial node:
//            rosPublisher.start("192.168.0.10");

            /* Create the projection instance */
            projection = device.CreateProjection();

            height = dinfo.height;
            width = dinfo.width;
            numOfPixels = dinfo.width * dinfo.height;
            UInt16 invalid_value = device.QueryDepthLowConfidenceValue();
            obj_detector = new managed_obj_detector.ObjDetector(dinfo.width, dinfo.height, invalid_value);
            coords = new PXCMPoint3DF32[numOfPixels];
            rgb_ir_d_xyz_points = new managed_obj_detector.RgbIrDXyzPoint[numOfPixels];
        }
        public Projection(PXCMSession session, PXCMCapture.Device device, PXCMImage.ImageInfo dinfo)
        {
            //: start ros serial node:
//            rosPublisher.start("192.168.0.10");

            /* Create the projection instance */
            projection = device.CreateProjection();

            height      = dinfo.height;
            width       = dinfo.width;
            numOfPixels = dinfo.width * dinfo.height;
            UInt16 invalid_value = device.QueryDepthLowConfidenceValue();

            obj_detector        = new managed_obj_detector.ObjDetector(dinfo.width, dinfo.height, invalid_value);
            coords              = new PXCMPoint3DF32[numOfPixels];
            rgb_ir_d_xyz_points = new managed_obj_detector.RgbIrDXyzPoint[numOfPixels];
        }
 public void Dispose()
 {
     if (rosPublisher != null)
     {
         rosPublisher.Dispose();
         rosPublisher = null;
     }
     if (projection != null)
     {
         projection.Dispose();
         projection = null;
     }
     if (obj_detector != null)
     {
         obj_detector.Dispose();
         obj_detector = null;
     }
 }
 public void Dispose()
 {
     if (rosPublisher != null)
     {
         rosPublisher.Dispose();
         rosPublisher = null;
     }
     if (projection != null)
     {
         projection.Dispose();
         projection = null;
     }
     if (obj_detector != null)
     {
         obj_detector.Dispose();
         obj_detector = null;
     }
 }