Closed AndreAhmed closed 2 years ago
I can't do ANY operation on depth_image_zed, coloning or doing anything is Impossible. What's the point of using OpenCV then ?
Use zed.retrieveMeasure(DEPTH) instead of retrieveImage if you want a 32bits matrix.
@obraun-sl I already did that, the image is flickering and I only had access to the data only using cloning.
zed.retrieveMeasure(depth_image_zed, MEASURE::DEPTH, MEM::CPU, new_image_size);
cv::Mat proce = depth_image_ocv.clone();
double min;
double max;
cv::minMaxIdx(proce, &min, &max);
cv::Mat adjMap;
// Histogram Equalization
float scale = 255 / (max - min);
proce.convertTo(adjMap, CV_8UC1, scale, -min * scale);
// this is great. It converts your grayscale image into a tone-mapped one,
// much more pleasing for the eye
// function is found in contrib module, so include contrib.hpp
// and link accordingly
cv::Mat falseColorsMap;
applyColorMap(adjMap, falseColorsMap, cv::COLORMAP_AUTUMN);
cv::imshow("Out", falseColorsMap);
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
Hi, I would like to do some image processing on the depth image, and the function
zed.retrieveImage changes the format of the cv::mat to U8_C4 which I don't want
Mat depth_image_zed(new_width, new_height, MAT_TYPE::F32_C1); cv::Mat depth_image_ocv = slMat2cvMat(depth_image_zed); zed.retrieveImage(depth_image_zed, VIEW::DEPTH, MEM::CPU, new_image_size);