Git Product home page Git Product logo

Comments (5)

WASCHMASCHINE avatar WASCHMASCHINE commented on July 30, 2024

Hey,
refer to the OpenCV sample if you have any doubts for the 1st part.
https://github.com/stereolabs/zed-opencv/blob/master/src/main.cpp
I think you code is correct, why don't you test it yourself? Maybe scale the tmp_cv because it has values between 0 and 20+ and it should be between 0 and 1 for cv::imshow.

Second part is not related to ZED, but OpenCV.

from zed-sdk.

adujardin avatar adujardin commented on July 30, 2024

Hi,
Depending on what you want to do, but purely for visualizing the depth map you should use retrieveImage(depthIm, sl::VIEW_DEPTH). It will output a normalized (i.e. scaled) 8-bit 4C depth image. Please note that your cv::Mat should be a CV_8UC4 in that case.
Your code seems correct otherwise.

Edit: VIEW_DEPTH is actually a 4 channels image

from zed-sdk.

pratikborhade1 avatar pratikborhade1 commented on July 30, 2024

@WASCHMASCHINE @adujardin thanks for your replies. Is there a way to save these images in a video or as images ? well as it seems the videoWriter doesnt support 32 bits in a single channel and when I saved images with openEXR format, they were only 640bits in size which doesn't make sense. Also, I couldn't open the images with the tool IrfanView which supports openEXR format. @adujardin yes I could visualize the data, but that's not what I want. I need the 32bit depth data.

from zed-sdk.

bpinaya avatar bpinaya commented on July 30, 2024

Hi there, any idea why the error: error: no matching function for call to ‘sl::Camera::retrieveMeasure is failing? This is for the deep sensing example.
/home/bpinaya/Documents/gitrepos/zed-examples/depth sensing/src/main.cpp: In function ‘void run()’: /home/bpinaya/Documents/gitrepos/zed-examples/depth sensing/src/main.cpp:108:85: error: no matching function for call to ‘sl::Camera::retrieveMeasure(sl::Mat&, sl::MEASURE, sl::MEM, int&, int&)’ zed.retrieveMeasure(point_cloud, MEASURE_XYZRGBA, MEM_GPU, width, height); ^ In file included from /home/bpinaya/Documents/gitrepos/zed-examples/depth sensing/src/main.cpp:32:0: /usr/local/zed/include/sl/Camera.hpp:641:20: note: candidate: sl::ERROR_CODE sl::Camera::retrieveMeasure(sl::Mat&, sl::MEASURE, sl::MEM) ERROR_CODE retrieveMeasure(Mat &mat, MEASURE measure = MEASURE_DEPTH, MEM type = MEM_CPU); ^ /usr/local/zed/include/sl/Camera.hpp:641:20: note: candidate expects 3 arguments, 5 provided CMakeFiles/ZED_Depth_Sensing.dir/build.make:86: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/src/main.o' failed make[2]: *** [CMakeFiles/ZED_Depth_Sensing.dir/src/main.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Depth_Sensing.dir/all' failed make[1]: *** [CMakeFiles/ZED_Depth_Sensing.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

from zed-sdk.

adujardin avatar adujardin commented on July 30, 2024

Hi @bpinaya,
You should update your ZED SDK to 2.1
You're probably using 2.0 and the size option with the retrieve functions was introduced later.

from zed-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.