#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;
}