daily pastebin goal
69%
SHARE
TWEET

removeNoise

lamiastella Jun 1st, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (int y = 0; y < xyzMap.rows; y++) {
  2.         for (int x = 0; x < xyzMap.cols; x++) {
  3.             if (ampMap.data != nullptr) {
  4.                 if (xyzMap.at<cv::Vec3f>(y, x)[2] > 0.9f ||
  5.                     ampMap.at<float>(y, x) < CONFIDENCE_THRESHHOLD) {
  6.                     xyzMap.at<cv::Vec3f>(y, x)[0] = 0;
  7.                     xyzMap.at<cv::Vec3f>(y, x)[1] = 0;
  8.                     xyzMap.at<cv::Vec3f>(y, x)[2] = 0;
  9.                 }
  10.             }
  11.             else {
  12.                 if (xyzMap.at<cv::Vec3f>(y, x)[2] > 0.9f)
  13.                 {
  14.                     xyzMap.at<cv::Vec3f>(y, x)[0] = 0;
  15.                     xyzMap.at<cv::Vec3f>(y, x)[1] = 0;
  16.                     xyzMap.at<cv::Vec3f>(y, x)[2] = 0;
  17.                 }
  18.             }
  19.         }
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top