opencv深度图可视化



#include <iostream>

#include <fstream>
#include <sstream>

#include <opencv2/dnn.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/calib3d.hpp>
#include <opencv2/xfeatures2d.hpp>
#include "opencv2/photo/photo.hpp"


int a;
int b;
int c;
int d;

using namespace std;
using namespace cv;
using namespace dnn;




int main(int argc, char** argv)
{
	Mat src = imread("D:/test3/5_depth.png");
	src.convertTo(src, CV_32F);
	Mat im_color,dst;
	double min;
	double max;
	cv::minMaxIdx(src, &min, &max);
	convertScaleAbs(src, dst, 255 / max);
	applyColorMap(dst, im_color, COLORMAP_RAINBOW);

	imshow("伪色图",im_color);
	waitKey(0);

	return 0;
}

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页