StereoFramework Troubleshooting

Hi everyone. I’m currently trying to run the StereoFramework application in QGIS with a set of stereo paired images. When executing the application I’m currently facing the following error:

2022-10-25 10:23:10 (FATAL) StereoFramework: Caught std::exception during application execution: (InvalidSRDescriptionException) FromEPSG(4326)

I’ve tried changing the input map projection CRS but haven’t had any luck. Has anyone else encountered this error? Any help would be appreciated!

Any help would be appreciated!

Dear @bryan,

Thank you for using OTB, and sorry for the errors you encounter.

Could you give us some more information?

  • What version of OTB are you using?
  • What is the full log provided by GDAL?
  • What is the result of gdalinfo <your input images> ?

Best regards. Julien :slight_smile:

I’ve tried using both the most recent Orfeo Toolbox docker container as well as the OTB plugin with QGIS. I am able to sucesfully run the StereoFramework module in the docker container but the output is an all-black tiff. When I run the OTB plugin in QGIS I get the error noted in my first post.

Here’s the output log:

Algorithm ‘StereoFramework’ starting…

Input parameters:

{ ‘input.il’ : [‘C:/Users/plab/Downloads/11171-a_Canada/050093288010_01/050093288010_01_P002_MUL/22JUN21162730-M2AS_R1C2-050093288010_01_P002.TIF’,‘C:/Users/plab/Downloads/11171-a_Canada/050093288010_01/050093288010_01_P001_MUL/22JUN21162835-M2AS_R1C2-050093288010_01_P001.TIF’], ‘input.co’ : ‘’, ‘input.channel’ : 1, ‘elev.dem’ : ‘’, ‘elev.geoid’ : ‘’, ‘elev.default’ : 0, ‘output.res’ : 1, ‘output.nodata’ : -32768, ‘output.fusionmethod’ : ‘max’, ‘output.out’ : ‘TEMPORARY_OUTPUT’, ‘output.mode’ : ‘fit’, ‘map’ : ‘wgs’, ‘stereorect.fwdgridstep’ : 16, ‘stereorect.invgridssrate’ : 10, ‘bm.metric’ : ‘ssdmean’, ‘bm.radius’ : 2, ‘bm.minhoffset’ : -20, ‘bm.maxhoffset’ : 20, ‘postproc.bij’ : True, ‘postproc.med’ : False, ‘postproc.metrict’ : 0.6, ‘mask.left’ : None, ‘mask.right’ : None, ‘mask.variancet’ : 50, ‘outputpixeltype’ : 5 }

ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db

2022-11-02 08:13:49 (INFO): Loading metadata from official product

2022-11-02 08:13:49 (INFO): Loading metadata from official product

2022-11-02 08:13:49 (INFO) StereoFramework: Default RAM limit for OTB is 256 MB

2022-11-02 08:13:49 (INFO) StereoFramework: GDAL maximum cache size is 1624 MB

2022-11-02 08:13:49 (INFO) StereoFramework: OTB will use at most 8 threads

2022-11-02 08:13:49 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 0 meters

2022-11-02 08:13:49 (INFO) StereoFramework: 1 Stereo couples will be processed

2022-11-02 08:13:49 (FATAL) StereoFramework: Caught std::exception during application execution: (InvalidSRDescriptionException) FromEPSG(4326)

Execution completed in 0.41 seconds

Results:

{‘output.out’: ‘C:/Users/plab/AppData/Local/Temp/processing_ktZUVc/0fd1920c1f2d40a48d14e0623f4f112f/output_out.tif’}

Loading resulting layers

The following layers were not correctly generated.
• C:/Users/plab/AppData/Local/Temp/processing_ktZUVc/0fd1920c1f2d40a48d14e0623f4f112f/output_out.tif
You can check the ‘Log Messages Panel’ in QGIS main window to find more information about the execution of the algorithm.

Here is the gdalinfo:
(‘Driver: GTiff/GeoTIFF\n’
‘Files: 22JUN21162730-M2AS_R1C2-050093288010_01_P002.TIF\n’
‘Size is 820, 4096\n’
‘Coordinate System is:\n’
‘PROJCRS[“WGS 84 / UTM zone 17N”,\n’
’ BASEGEOGCRS[“WGS 84”,\n’
’ DATUM[“World Geodetic System 1984”,\n’
’ ELLIPSOID[“WGS 84”,6378137,298.257223563,\n’
’ LENGTHUNIT[“metre”,1]]],\n’
’ PRIMEM[“Greenwich”,0,\n’
’ ANGLEUNIT[“degree”,0.0174532925199433]],\n’
’ ID[“EPSG”,4326]],\n’
’ CONVERSION[“UTM zone 17N”,\n’
’ METHOD[“Transverse Mercator”,\n’
’ ID[“EPSG”,9807]],\n’
’ PARAMETER[“Latitude of natural origin”,0,\n’
’ ANGLEUNIT[“degree”,0.0174532925199433],\n’
’ ID[“EPSG”,8801]],\n’
’ PARAMETER[“Longitude of natural origin”,-81,\n’
’ ANGLEUNIT[“degree”,0.0174532925199433],\n’
’ ID[“EPSG”,8802]],\n’
’ PARAMETER[“Scale factor at natural origin”,0.9996,\n’
’ SCALEUNIT[“unity”,1],\n’
’ ID[“EPSG”,8805]],\n’
’ PARAMETER[“False easting”,500000,\n’
’ LENGTHUNIT[“metre”,1],\n’
’ ID[“EPSG”,8806]],\n’
’ PARAMETER[“False northing”,0,\n’
’ LENGTHUNIT[“metre”,1],\n’
’ ID[“EPSG”,8807]]],\n’
’ CS[Cartesian,2],\n’
’ AXIS[“(E)”,east,\n’
’ ORDER[1],\n’
’ LENGTHUNIT[“metre”,1]],\n’
’ AXIS[“(N)”,north,\n’
’ ORDER[2],\n’
’ LENGTHUNIT[“metre”,1]],\n’
’ USAGE[\n’
’ SCOPE[“unknown”],\n’
’ AREA[“World - N hemisphere - 84°W to 78°W - by country”],\n’
’ BBOX[0,-84,84,-78]],\n’
’ ID[“EPSG”,32617]]\n’
‘Data axis to CRS axis mapping: 1,2\n’
‘Origin = (714968.000000000000000,4939810.000000000000000)\n’
‘Pixel Size = (2.000000000000000,-2.000000000000000)\n’
‘Metadata:\n’
’ AREA_OR_POINT=Area\n’
’ TIFFTAG_COPYRIGHT=(C) COPYRIGHT 2022 DigitalGlobe, Inc., Longmont CO USA ’
‘80503\n’
’ TIFFTAG_DATETIME=2022:10:25 23:21:05\n’
’ TIFFTAG_IMAGEDESCRIPTION={\n’
’ bandList = \n’
’ [\n’
’ 2;\n’
’ 3;\n’
’ 4;\n’
’ 5;\n’
’ ]\n’
‘}\n’
’ TIFFTAG_MAXSAMPLEVALUE=2047\n’
’ TIFFTAG_MINSAMPLEVALUE=0\n’
‘Image Structure Metadata:\n’
’ INTERLEAVE=BAND\n’
‘Corner Coordinates:\n’
‘Upper Left ( 714968.000, 4939810.000) ( 78d17'32.12"W, 44d34'46.31"N)\n’
‘Lower Left ( 714968.000, 4931618.000) ( 78d17'44.42"W, 44d30'21.11"N)\n’
‘Upper Right ( 716608.000, 4939810.000) ( 78d16'17.84"W, 44d34'44.54"N)\n’
‘Lower Right ( 716608.000, 4931618.000) ( 78d16'30.23"W, 44d30'19.34"N)\n’
‘Center ( 715788.000, 4935714.000) ( 78d17' 1.16"W, 44d32'32.83"N)\n’
‘Band 1 Block=820x639 Type=UInt16, ColorInterp=Red\n’
‘Band 2 Block=820x639 Type=UInt16, ColorInterp=Green\n’
‘Band 3 Block=820x639 Type=UInt16, ColorInterp=Blue\n’
‘Band 4 Block=820x639 Type=UInt16, ColorInterp=Undefined\n’)

Also, here is the log output when running in the docker container:

2022-11-01 21:41:01 (INFO): Loading metadata from official product
2022-11-01 21:41:01 (INFO): Loading metadata from official product
2022-11-01 21:41:01 (INFO) StereoFramework: Default RAM limit for OTB is 256 MB
2022-11-01 21:41:01 (INFO) StereoFramework: GDAL maximum cache size is 1271 MB
2022-11-01 21:41:01 (INFO) StereoFramework: OTB will use at most 8 threads
2022-11-01 21:41:01 (INFO) StereoFramework: Elevation management: setting default height above ellipsoid to 200 meters
2022-11-01 21:41:01 (INFO) StereoFramework: 1 Stereo couples will be processed
2022-11-01 21:41:01 (INFO) StereoFramework: Processing stereo couple 0 (images index 0 and 1)
2022-11-01 21:41:01 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-11-01 21:41:01 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
Computing epipolar grids…: 100% [] (0s)
2022-11-01 21:41:01 (INFO) StereoFramework: Minimum disparity : -0
2022-11-01 21:41:01 (INFO) StereoFramework: Maximum disparity : 0
Inverting left displacement field …: 100% [
] (0s)
2022-11-01 21:41:01 (INFO) StereoFramework: Using robust SSD Metric for BlockMatching.
2022-11-01 21:41:01 (INFO) StereoFramework: Using reverse block-matching to filter incoherent disparity values.
2022-11-01 21:41:01 (INFO) StereoFramework: Default elevation set for Min/Max elevation : 200
2022-11-01 21:41:01 (INFO) StereoFramework: Minimum elevation found : 200
2022-11-01 21:41:01 (INFO) StereoFramework: Maximum elevation found : 200
2022-11-01 21:41:01 (INFO) StereoFramework: Disparity mask formula : (hdisp > -0) and (hdisp < 0) and (mask>0) ? 255 : 0
2022-11-01 21:41:01 (INFO) StereoFramework: Output DSM parameters are estimated from sensor input data.
2022-11-01 21:41:01 (INFO) StereoFramework: Output DSM projection reference:
GEOGCS[“WGS 84”,DATUM[“WGS_1984”,SPHEROID[“WGS 84”,6378137,298.257223563,AUTHORITY[“EPSG”,“7030”]],AUTHORITY[“EPSG”,“6326”]],PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,“8901”]],UNIT[“degree”,0.0174532925199433,AUTHORITY[“EPSG”,“9122”]],AXIS[“Latitude”,NORTH],AXIS[“Longitude”,EAST],AUTHORITY[“EPSG”,“4326”]]
2022-11-01 21:41:01 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
2022-11-01 21:41:01 (INFO): Estimated memory for full processing: 32.6772MB (avail.: 256 MB), optimal image partitioning: 1 blocks
2022-11-01 21:41:01 (INFO): File /root/dem.tif will be written in 1 blocks of 763x3302 pixels
2022-11-01 21:41:01 (WARNING): The SensorTransform factory could not find a compatible Sensor Transform
Writing /root/dem.tif…: 100% [**************************************************] (0s)

After some further research, I believe that my stereo paired images are ortho-rectified per this thread: Orthorectification WorldView-3 Error - #3 by gis123.

I attempted to read the images in with “$&skipcarto=true” but the output from the StereoFramework module is still an all-black tif.

Any suggestions would be appreciated!