Hello,
I have to questions about the SemiGlobalMatching node.
I use this node on a Tx2 with 512x256 images where the min-max disparity is about 4-8.
I need this node to work as faster as possible and I tried to achieve better performances changing the min max disparity range.
- Changing max disparity
At first I used minDisparity = 0 and maxDisparity = 64 and the node was executed (in average) in 20 ms
Then I changed maxDisparity to 32 and the execution time was reduced to 10-12 ms
I tried also maxDisparity 16 and the execution time was reduced by an half (it became 6 ms)
But when i set maxDisparity to 8 the execution time increased to 20 ms
Why this kernel is not so well optimized? Is there a way to reduce execution time changing other parameters?
- Changing min disparity
But as long as I modify the value of minDisparity, Visionworks tells me
min_disparity and max_disparity are too big or too small for the provided image size, min_disparity = 4, max_disparity = 8, width = 512
I tried also with different values of maxDisparity and the problem still remains. It seems Visionworks doesn’t like a minDisparity != 0. Is it possibile? Anyone managed to get this work?
Thank you in advace
SGBM document is located at VisionWorks API > Samples and Demos > Demo Applications > Stereo Matching Demo App
Minimum value is 0:
min_disparity
max_disparity
Parameter: [integer value greater or equal to zero and less or equal to 256]
Description: Minimum and maximum disparity values. Defaults are 0 and
1 Maximum disparity must be divisible by 4.
There are two parameter you can try:
[i]sad
Parameter: [odd integer greater than or equal to zero and less than or equal to 31]
Description: The size of the SAD window. Default is 5.
-t, --type
Parameter: hl, ll, pyr
Description: Specifies the stereo pipeline implementation type.
Usage:
–type=hl chooses the implementation via high-level API
–type=ll chooses the implementation via low-level API
–type=pyr chooses the implementation via low-level API organized in a pyramidal scheme
[/i]
Thank you for your reply.
I’ve seen that the default value of min_disparity is 0, but I tryed also with min_disparity = 4.
This value satisfies all the requirements descripted in the documentation: it is between 0 and 256, it is divisible by 4 and it is less or equal to max_disparity (I set max_disparity = 16)
But visionworks always says:
min_disparity and max_disparity are too big or too small for the provided image size, min_disparity = 4, max_disparity = 16, width = 512
Am I doing something wrong? or there is a bug?
Then, for the sad value, I am using a window of 3 pixel. I don’t want to put this value to 1, otherwise the stereo block matching will become a stereo pixel matching.
I studied the example and (for the moment) I compared the hl and the ll type. But I don’t find any difference in performances. They take the same execution time.
In addition, I tried min_disparity = 4 in both cases, and both of them gave the same error I reported before (in particular, in ll the error is given from nvxComputeModifiedCostBTNode)
I just tried also pyr type, but I found it much slower than the other two methods.
Hi,
We will check this issue.
Do you modify from the VisionWorks stereo matching sample?
Thanks.