DepthImage - julian-steiner/Waveshare-Stereo-Camera GitHub Wiki
Depth Map
The basic functions like saving, loading and showing are identical to the ones of the StereoImage
Depth Maps get saved directly to the location provided unlike the StereoImages and are loaded from this exact location
Converting a StereoImage to a depthMap
waveshare::StereoImage image;
// Somehow acquiring a stereoImage
waveshare::DepthImage depthMap = waveshare::DepthImage::computeFromStereoImage(image);
Visualizing a depthMap
Depth maps can not be viewed right out of the box they have to be visualized first
depthMap.visualize();
Coloring a depthMap
By default depthMaps are black and white but you can change the color scheme
To do this the opencv colormaps are used
Images have to be visualized in order to do this step!
depthMap.colorize(cv::ColormapTypes::COLORMAP_JET);