GNOME Bugzilla – Bug 789655
dewarp does not seem to work with fisheye video
Last modified: 2018-01-18 21:57:33 UTC
The following command does not seem to work; gst-launch-1.0 videotestsrc ! fisheye ! dewarp ! videoconvert ! autovideosink Any help in getting this working would be appreciated. Thanks.
This pipeline works fine here with gst 1.12.3 on Linux. What is the error you're getting?
No error. Dewarp does not seem to dewarp the fisheye stream.
Ah. I'm not familiar with this element but it seems that the default outer-radius and inner-radius property values make it work in pass-through mode. Have you tried to change those properties?
Yes :) I've pulled out a few hairs trying all possible combination of parameters. No luck.
Another example: gst-launch-1.0 videotestsrc ! fisheye ! dewarp display-mode=single-panorama interpolation-method=nearest x-center=0.5 y-center=0.5 outer-radius=0.5 inner-radius=0.0 ! videoconvert ! autovideosink
The problem here is that 'fisheye' and 'dewarp' have 2 completely different definitions of fisheye, and 'dewarp' is not even attempting to do the inverse of the 'fisheye' distortion operation. AIUI, dewarp takes a downward looking fisheye camera view and unwraps it radially to generate a 360 panorama of the scene. As it happens, I was looking at this too the other day and realising we don't seem to have an element that does the inverse distortion of the 'fisheye' element.
I have a submitted new opencv elements to calibrate and undistort cameras. It is basically an adaption of https://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html to GStreamer. It has options to handle fisheye but I did not use or test those. The submission is here: https://bugzilla.gnome.org/show_bug.cgi?id=789075
Sounds like the dewarp element is working as intended, and the bug reporter is looking for an element that we don't have yet, but there is bug #789075 for that aiui.