StereoFramework Segfault/Stuck

Context

Using the example StereoFramework code with a different .tif file in the official Docker container causes either a segfault or the program to get stuck.

Configuration setup

My system: Windows10
Version of the OTB: 8.1
I installed the OTB with: The official Docker image from Docker Hub

Description of my issue

I’ve managed to get StereoFramework to work for the example data in Python using the official Docker image and the example code on this page: StereoFramework — Orfeo ToolBox 8.1.0 documentation

However, when I try to use my own stereo pair data, which is a 790MB file, it won’t work. Using the settings provided causes a segfault:

root@42c57e981716:~# python3 test.py
2022-11-02 12:23:47 (INFO): Loading metadata from official product
2022-11-02 12:23:47 (INFO): Loading metadata from official product
2022-11-02 12:23:47 (INFO) StereoFramework: Default RAM limit for OTB is 256 MB
2022-11-02 12:23:47 (INFO) StereoFramework: GDAL maximum cache size is 1271 MB
2022-11-02 12:23:47 (INFO) StereoFramework: OTB will use at most 8 threads
2022-11-02 12:23:47 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 200 meters
2022-11-02 12:23:47 (INFO) StereoFramework: 1 Stereo couples will be processed
2022-11-02 12:23:47 (INFO) StereoFramework: Processing stereo couple 0 (images index 0 and 1)
2022-11-02 12:23:47 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-11-02 12:23:47 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
Computing epipolar grids…: 100% [**************************************************] (2s)
2022-11-02 12:23:50 (INFO) StereoFramework: Minimum disparity : -0
2022-11-02 12:23:50 (INFO) StereoFramework: Maximum disparity : 0
Segmentation fault

If I make the “stereorect.fwdgridstep” setting much larger, 64 rather than 8 for example, there is no segfault but the program gets stuck at this stage (it’s been over 2 hours now):

root@42c57e981716:~# python3 test.py
2022-11-02 12:24:05 (INFO): Loading metadata from official product
2022-11-02 12:24:05 (INFO): Loading metadata from official product
2022-11-02 12:24:05 (INFO) StereoFramework: Default RAM limit for OTB is 256 MB
2022-11-02 12:24:05 (INFO) StereoFramework: GDAL maximum cache size is 1271 MB
2022-11-02 12:24:05 (INFO) StereoFramework: OTB will use at most 8 threads
2022-11-02 12:24:05 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 200 meters
2022-11-02 12:24:05 (INFO) StereoFramework: 1 Stereo couples will be processed
2022-11-02 12:24:05 (INFO) StereoFramework: Processing stereo couple 0 (images index 0 and 1)
2022-11-02 12:24:05 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-11-02 12:24:05 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
Computing epipolar grids…: 100% [**************************************************] (0s)
2022-11-02 12:24:06 (INFO) StereoFramework: Minimum disparity : -0
2022-11-02 12:24:06 (INFO) StereoFramework: Maximum disparity : 0

I’m not sure if the warning about Sensor Transforms is relevant, but it doesn’t show up when using the example code. Also, for some reason the memory usage in Docker is over 20GB even though the file is only 790MB.

EDIT:

Taking a small section of the images using otbcli_ExtractROI and using that as a source file, the script executed successfully. However, the output was a nonsense .tif file which had invalid values and won’t display in QGIS:

image

The images look like a valid stereopair, so I’m not sure what’s going wrong. Perhaps it’s related to this warning?

2022-11-02 12:24:05 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform

The images come from WorldView-2 which is supposed to be supported?