Comments (5)
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.
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.
@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.
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.
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)
- not existed subdirectory caused cmake parsing error HOT 1
- Inconsistency between distance values and units HOT 2
- SVO playback in jetson nano ORIN is not working HOT 1
- BODY_FORMAT.BODY_70 HOT 1
- Random camera image freeze HOT 1
- camera streaming python sample is not working
- DEPTH_NEURAL often gives missing disparity for not so near objects HOT 2
- fusion.camera_to_geo has unexpected behavior HOT 1
- ZedX Jetson Orin Nano Recording and Playback Broken HOT 3
- Point cloud distortion HOT 2
- sl::Camera::close() doesn't free up memory (ZED_SDK 4.1) HOT 1
- When I did the first application it gave me an error HOT 1
- Point cloud status unstable switching between ok and Error When using ZED 2i HOT 2
- `Camera.getSensorsData` returns invalid data in `SensorsData` HOT 2
- ERROR: Invaliad svo file detected. This svo file appears to be corrupted or improperly formatted... HOT 1
- automatic_region_of_interest.py failed: AttributeError HOT 1
- build error in "depth sensing/automatic region of interest/cpp" HOT 1
- The best way to operate and record synchronized left, right streams without ZED sdk
- get_python_api.py installs numpy v2 which give ValueError due to binary incompatibility HOT 3
- Add Fedora Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zed-sdk.