ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solution: There's no inherent limit of 128 in the openCV stereo matching code on the maximum value for min_disparity or disparity_range. It's just a hardcoded maximum in stereo_image_proc. To increase these limits, make the following code change in stereo_image_proc/cfg/Disparity.cfg and recompile stereo_image_proc.

Index: stereo_image_proc/cfg/Disparity.cfg

--- stereo_image_proc/cfg/Disparity.cfg (revision 1867) +++ stereo_image_proc/cfg/Disparity.cfg (working copy) @@ -15,7 +15,7 @@

# disparity block matching correlation parameters gen.add("correlation_window_size", int_t, 0, "SAD correlation window width, pixels", 15, 5, 255) -gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -128, 128) +gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -1024, 1024) gen.add("disparity_range", int_t, 0, "Number of disparities to search, pixels", 64, 32, 128) # TODO What about trySmallerWindows?

Index: stereo_image_proc/cfg/Disparity.cfgc

Solution: There's no inherent limit of 128 in the openCV stereo matching code on the maximum value for min_disparity or disparity_range. It's just a hardcoded maximum in stereo_image_proc. To increase these limits, make the following code change in stereo_image_proc/cfg/Disparity.cfg and recompile stereo_image_proc.stereo_image_proc. Disparity_range must always be an increment of 16 (probably the same for min_disparity, but not sure).

Index: stereo_image_proc/cfg/Disparity.cfg

--- stereo_image_proc/cfg/Disparity.cfg (revision 1867) +++ stereo_image_proc/cfg/Disparity.cfg (working copy) @@ -15,7 +15,7 @@

# disparity block matching correlation parameters gen.add("correlation_window_size", int_t, 0, "SAD correlation window width, pixels", 15, 5, 255) -gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -128, 128) +gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -1024, 1024) gen.add("disparity_range", int_t, 0, "Number of disparities to search, pixels", 64, 32, 128) # TODO What about trySmallerWindows?

Index: stereo_image_proc/cfg/Disparity.cfgc

Solution: There's no inherent limit of 128 in the openCV stereo matching code on the maximum value for min_disparity or disparity_range. It's just a hardcoded hard-coded maximum in stereo_image_proc. To increase these limits, make the following code change in stereo_image_proc/cfg/Disparity.cfg and recompile stereo_image_proc. Disparity_range must always be an increment of 16 (probably the same for min_disparity, but not sure).sure). In the following code, all we did was change the range of min_disparity to [-1024, 1024].

Index: stereo_image_proc/cfg/Disparity.cfg

--- stereo_image_proc/cfg/Disparity.cfg (revision 1867) +++ stereo_image_proc/cfg/Disparity.cfg (working copy) @@ -15,7 +15,7 @@

# disparity block matching correlation parameters gen.add("correlation_window_size", int_t, 0, "SAD correlation window width, pixels", 15, 5, 255) -gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -128, 128) +gen.add("min_disparity", int_t, 0, "Disparity to begin search at, pixels (may be negative)", 0, -1024, 1024) gen.add("disparity_range", int_t, 0, "Number of disparities disparities

to search, pixels", 64, 32, 128) # TODO What about trySmallerWindows?

Index: stereo_image_proc/cfg/Disparity.cfgc128)

Solution: There's no inherent limit of 128 in the openCV stereo matching code on the maximum value for min_disparity or disparity_range. It's just a hard-coded maximum in stereo_image_proc.

To increase these limits, make the following code change in stereo_image_proc/cfg/Disparity.cfg and recompile stereo_image_proc. Disparity_range must always be an increment of 16 (probably the same for min_disparity, but not sure). sure).

In the following code, all we did was change the range of min_disparity to [-1024, 1024].

Index:

Index: stereo_image_proc/cfg/Disparity.cfg

+++ stereo_image_proc/cfg/Disparity.cfg (working copy)
+gen.add("min_disparity",  int_t, 0, "Disparity to begin
begin search at, pixels (may be negative)", 0, -1024, 1024)
 gen.add("disparity_range",  int_t, 0, "Number of disparities

disparities to search, pixels", 64, 32, 128)

128)