-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum disparity has to be 128 #4
Comments
This is limited to 128 because of some specific optimizations, basically, each thread computed 4 disparity values, so, 128/4 = 32. Therefore, we only need 32 threads (1 warp) doing computation, so, we can use: SIMD instructions, warp shuffle, etc... This is possible to change, I think (I'm not sure) it should not be difficult to change it to 256 by using uint64_t instead of uint32_t and chaging some code. However, I don't have time to do this now, if you can do it, I could help you if you have any questions. |
Any updates @arrfou90 ? |
Disparity 256 would be very helpful for long baseline stereo camera to detect near objects. |
I just give a try that latest code could support MAX_DISPARITY 256, but the disparity view of very near object don't look great, the ground also may have many noise, does the sgm algorithm is sensitive to the light condition when image captured? |
@dhernandez0 I look into the code and find that if change cost_t from uint32_t to uint64_t, I have to change several inline functions in the util.h as they are written with 32bit asm, if there are any other tips that I should pay attention to? thanks |
Hi @yaobaishen You should change the way memory is read from d_transform1 and d_transform0. Right now, we use a 32 threads for each pixel, each thread then computes the 4 disparities. You should change the code to make each thread compute 8 disparities. For example, right now we read a uint32_t from the cost cube which is the vector of 4 costs that correspond to the thread: Line 153 in 6356323
|
@dhernandez0 Thanks for advice! |
@dhernandez0 During implement the code I encounter another problem, as my current knowledge, CUDA doesn't support 64bit asm operation regarding to the code you paste above, so I just read twice, for example: |
您好,请问你有把最大视差值超过128的功能完成吗?如果完成,不知道方不方便分享一下,新手,不会改,只能求助您帮助啦。 |
您好,请问你有把最大视差值超过128的功能完成吗?如果完成,不知道方不方便分享一下,新手,不会改,只能求助您帮助啦。
|
hi, thanks for the clarify. |
收到了 。
|
Hello Daniel,
I want to increase the disparity level to more than 256. But I assume this a limitation (I guess it is the GPU memory size limitation), Is that possible to increase the disparity level even with low image resolution.
Thanks in advance
Arrfou
The text was updated successfully, but these errors were encountered: