当前位置:   article > 正文

opencv深度图可视化

opencv深度图可视化
  1. #include <iostream>
  2. #include <fstream>
  3. #include <sstream>
  4. #include <opencv2/dnn.hpp>
  5. #include <opencv2/imgproc.hpp>
  6. #include <opencv2/highgui.hpp>
  7. #include <opencv2/features2d.hpp>
  8. #include <opencv2/calib3d.hpp>
  9. #include <opencv2/xfeatures2d.hpp>
  10. #include "opencv2/photo/photo.hpp"
  11. int a;
  12. int b;
  13. int c;
  14. int d;
  15. using namespace std;
  16. using namespace cv;
  17. using namespace dnn;
  18. int main(int argc, char** argv)
  19. {
  20. Mat src = imread("D:/test3/5_depth.png");
  21. src.convertTo(src, CV_32F);
  22. Mat im_color,dst;
  23. double min;
  24. double max;
  25. cv::minMaxIdx(src, &min, &max);
  26. convertScaleAbs(src, dst, 255 / max);
  27. applyColorMap(dst, im_color, COLORMAP_RAINBOW);
  28. imshow("伪色图",im_color);
  29. waitKey(0);
  30. return 0;
  31. }

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/888048
推荐阅读
相关标签
  

闽ICP备14008679号