Skip to content

Latest commit

 

History

History
 
 

gen2-wls-filter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

中文文档

Host-Side WLS Filtering

Background

This gives an example of doing host-side WLS filtering using the rectified_right and depth stream from DepthAI Gen2 API.

Example of running on OAK-D: image

How to Run

Run

./install_dependencies.sh
./main.py

Troubleshooting:

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:

image