The depth image that I get is very noisy. Anyway to improve it or am I doing something wrong. I use the simplest script with metaout depth as commands
Depth Image
Hi Anand ,
Thanks for the report. So you could try our host-side WLS-filtering example:
https://github.com/luxonis/depthai-experiments/blob/master/wls-filter/README.md
In Gen1 (and soon in Gen2) you can also change the median kernel size, and the disparity confidence. https://docs.luxonis.com/en/latest/pages/api/#Device.create_pipeline
Valid median kernels are 0 (no median), 3, 5, and 7. Where square kernels are used. And the disparity confidence has a slider on the Gen1 example. Running python3 depthai_demo.py -s depth
will pull up a window with a slider for disparity confidence.
Later we will also support onboard bilateral filtering (see here), which will further help depth quality. And neural-assisted disparity depth will come after that (see here).
Thoughts?
Thanks,
Brandon
Hi Anand,
Back in the depthai directory, make sure the requirements are installed for it (python3 install_requirements.py
) and then run:
python3 depthai_demo.py -s disparity_color
Here is running it on my OAK-D:
So on the opencv-contrib-python, sometimes the issue could be the install location, and which Python you are using.
I suspect a system Python is being used instead of a user Python, and opencv-contrib-python
was installed along the Python that is not being used.
Which OS are you using?
Thanks,
Brandon
Yes, that is correct. It is strange that the opencv-contrib-python bit did not work than for WLS. As I too am on effectively the same mac install.
It still gives the same error?
Hi,
If that can help, on my Mac system (10.15.7) I was having this following problem when running the depthai-experiments/wls-filter:
Traceback (most recent call last):
File "/Volumes/Misc/DepthAI/depthai-experiments/wls-filter/./main.py", line 52, in <module>
wls_filter = cv2.ximgproc.createDisparityWLSFilterGeneric(lr_check)
AttributeError: module 'cv2.cv2' has no attribute 'ximgproc'
I fixed it by uninstalling opencv with: pip uninstall opencv-contrib-python opencv-python
and re-installing the dependencies with: ./install_dependencies.sh
Then depthai-experiments/wls-filter ran just fine