This gives an example of doing host-side WLS filtering using the rectified_right
and depth
stream from DepthAI Gen2 API.
Run
./install_dependencies.sh
./main.py
If you see the following when running main.py
:
Traceback (most recent call last):
File "/Users/leeroy/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'
This means that opencv-contrib-python
is missing (or needs to be reinstalled) on your machine. Please install it using python3 -m pip install opencv-contrib-python
and then re-run ./main.py
: