public void SearchForObject(PXCMCapture.Sample sample, managed_obj_detector.ProcessParams processParams)
 {
     //////if (processParams.qualityEstimationMethod == managed_obj_detector.QualityEstimationMethod.DepthChange)
     //////{
     //////    this.computePixelQualityFromDepth(sample.depth);
     //////}
     //////else if (processParams.qualityEstimationMethod == managed_obj_detector.QualityEstimationMethod.DepthClusters)
     //////{
     //////    this.depthToScan(sample.depth);
     //////    this.computePixelQualityFromDepthClusters(sample.depth, processParams);
     //////}
     //////else if (processParams.qualityEstimationMethod == managed_obj_detector.QualityEstimationMethod.ColorClusters)
     //////{
     this.computePixelQualityFromClusters(sample, processParams);
     //////}
     //////else
     //////{
     //////    this.depthToScan(sample.depth);
     //////    this.computePixelQualityFromNormals(processParams);
     //////}
 }
 private void computePixelQualityFromClusters(PXCMCapture.Sample sample, managed_obj_detector.ProcessParams processParams)
 {
     this.loadRgbIrDXyzPoints(sample);
     obj_detector.clusterize(this.rgb_ir_d_xyz_points, processParams);
     if (rosPublisher.isStarted() && obj_detector.GotTarget)
         rosPublisher.publishPose(obj_detector.TargetXyz.x, obj_detector.TargetXyz.y, obj_detector.TargetXyz.z);
 }
 private void computePixelQualityFromDepthClusters(PXCMImage depthImage, managed_obj_detector.ProcessParams processParams)
 {
     //////UInt16[] pixelDepths = getUInt16Depths(depthImage);
     //////if (pixelDepths != null) //minDepth < maxDepth)
     //////{
     //////    obj_detector.computePixelQualityFromDepthClusters(pixelDepths, this.invalid_value, pixelQuality, processParams.depthClustersParams);
     //////    if (rosPublisher.isStarted() && obj_detector.GotTarget)
     //////        rosPublisher.publishPose(obj_detector.TargetXyz.x / 1000.0, obj_detector.TargetXyz.y / 1000.0, obj_detector.TargetXyz.z / 1000.0);
     //////}
     //////else
     //////    setAllNan();
 }