After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749260 - disparity: Add a "max-disparity" property
disparity: Add a "max-disparity" property
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-12 11:20 UTC by ji0130.jung
Modified: 2018-11-03 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add a "max-disparity" property (3.64 KB, patch)
2015-05-12 11:20 UTC, ji0130.jung
none Details | Review
left image (278.96 KB, image/png)
2015-06-08 06:47 UTC, ji0130.jung
  Details
right image (271.36 KB, image/png)
2015-06-08 06:48 UTC, ji0130.jung
  Details
add a "max-disparity" property (4.12 KB, patch)
2015-08-10 02:58 UTC, ji0130.jung
none Details | Review

Description ji0130.jung 2015-05-12 11:20:17 UTC
Created attachment 303253 [details] [review]
add a "max-disparity" property

The disparity element based on OpenCV is used for calculating disparities between two input images, but the current element only supports inputs whose maximum disparity is smaller than 16/32/64. (This fixed value depends on the algorithm type)

For supporting high-resolution images with larger disparity, I added a new property, "max-disparity". It can control a disparity size the element handles.

You can check it using the following command.

gst-launch-1.0 multifilesrc location=../L0000000000.png ! pngdec ! videoconvert ! video/x-raw,colorimetry="1:1:0:0" ! disp0.sink_right multifilesrc location=../R0000000000.png ! pngdec ! videoconvert ! video/x-raw,colorimetry="1:1:0:0" ! disp0.sink_left disparity max-disparity=64 name=disp0 method=sbm disp0.src ! videoconvert ! xvimagesink sync=false

2d1ac47a57d7e72c125975353c9e9dac691f50b6
Comment 1 ji0130.jung 2015-06-08 06:47:55 UTC
Created attachment 304749 [details]
left image

from http://www.cvlibs.net/datasets/kitti/
Comment 2 ji0130.jung 2015-06-08 06:48:21 UTC
Created attachment 304750 [details]
right image

from http://www.cvlibs.net/datasets/kitti/
Comment 3 ji0130.jung 2015-07-21 23:40:15 UTC
can anybody review this?
Comment 4 Thiago Sousa Santos 2015-07-27 14:42:54 UTC
Review of attachment 303253 [details] [review]:

Please submit a patch with git-format patch format, this patch has no author or commit message information.

::: ext/opencv/gstdisparity.cpp
@@ +152,2 @@
 #define DEFAULT_METHOD METHOD_SGBM
+#define DEFAULT_MAX_DISPARITY 16

What is the drawback for the algorithms that had a default of 32/64 when they receive 16 now?

Perhaps having -1 as an 'auto' and keeping the old values for these cases would prevent breaking applications relying on this?
Comment 5 ji0130.jung 2015-08-10 02:56:25 UTC
Many disparity candidates significantly decrease algorithm' speed and accuracy.
For the best performance, we need to set the proper maximum disparity value, and this value depends on camera resolution, focal length, and position.

I modified the patch so that the element uses the original value (16/32/64) when the max-disparity property is -1. 

Please check it again.
Comment 6 ji0130.jung 2015-08-10 02:58:01 UTC
Created attachment 308990 [details] [review]
add a "max-disparity" property

modified patch so that the element uses the original value when the max-disparity property is -1.
Comment 7 GStreamer system administrator 2018-11-03 13:35:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/253.