Ask Your Question
0

Filtering Disparity Map

asked 2019-03-10 21:54:56 -0600

WannabeEngr gravatar image

updated 2019-03-11 02:26:13 -0600

LBerger gravatar image

Any ideas on how to filter out these fluctuations? because it is messing up my generated disparity value, and I can't integrate my distance estimation algorithm.

My pre-processing was jus convert the input image into grayscale, and I only adjust WLS filter in its lambda & Sigma.

Any ideas on how to filter my depth map?? image description

edit retag flag offensive close merge delete

Comments

i might have no idea, but can you show, how you use the WLS filtering ? (maybe there's something more to tweak !)

berak gravatar imageberak ( 2019-03-11 02:22:38 -0600 )edit

WLS FILTER Parameters

lmbda = 70000
sigma = 2.0

wls_filter = cv2.ximgproc.createDisparityWLSFilter(matcher_left=stereo)
wls_filter.setLambda(lmbda)
wls_filter.setSigmaColor(sigma)

...

Using the WLS filter

filteredImg= wls_filter.filter(dispR,grayL,None,dispL)
filteredImg = cv2.normalize(src=filteredImg, dst=filteredImg, beta=0, alpha=255, norm_type=cv2.NORM_MINMAX);
filteredImg = np.uint8(filteredImg)
cv2.imshow('filteredImg', filteredImg)
WannabeEngr gravatar imageWannabeEngr ( 2019-03-14 01:30:08 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-03-11 10:17:38 -0600

HYPEREGO gravatar image

updated 2019-03-11 10:55:29 -0600

The first question is: it have to be real-time or not? The usual steps are left-right consistency check (it help you in refine occlusion) and apply a filter. You can try one of the proposed filters in OpenCV, generally a bilateral filter do the trick (convert the depth map to a disparity map!). Better things can be the use of a Guided filter (that is pretty easy to implement) and usually achieve good result even in real time application.

edit flag offensive delete link more

Comments

Yes, it is in real time and I want to make it mobile, my project is to aid the blind through stereo vision & these fluctuations gives me a hard time. Okay i will try bilateral filter. Thanks!

WannabeEngr gravatar imageWannabeEngr ( 2019-03-14 01:27:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-03-10 21:54:56 -0600

Seen: 2,069 times

Last updated: Mar 11 '19