Problem with the handling of some ROIs extracted from Pleiades products
Mantis Issue 991, reported by cpalmann, assigned to jmichel, created: 2014-12-08
Tried to follow MVD2 tutorial. Encountered some difficulties in doing so. Here is the report of what seems to be the most fundamental bug.
General idea : 1) take different pleiades product (PXS XS and P) 2) extract ROIs with ExtractROI app 3) open small images with MVD2, and try to navigate inside the images.
Most of the time, MVD2 seems to manage reading the small images, but can't display them and/or simply crash.
ROI were extracted on Ubuntu12.04-64bits-Release (for CS : Dora). App didn't mention any problem (except for PMS image from Melbourne : probably another bug to report). Anyway, MVD1 is able to display and navigate all the images, while MVD2 can't.
Only roi-stras-xs.tif seems to be well handled... but rest of the tutorial is still hard to accomplish even with this image.
Steps to reproduce:
See "general idea" (description).
For my CS colleagues:
Product locations:
- Melbourne:
PXS: /media/otbnas/cpalmann/MONTE2/FCGC600031061/IMG_PHR1A_PMS-N_001/IMG_PHR1A_PMS-N_201202250025599_ORT_PRG_FC_5855-001_R1C1.JP2
XS: /media/otbnas/cpalmann/MONTE2/Pleiades_Primary_Product_Bundle/FCGC600031035/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2
- Strasbourg
PXS: /media/otbnas/cpalmann/MONTE2/STRASBOURG_PLEIADES_PMS_20120814/FCGC600039280/IMG_PHR1A_PMS_001/IMG_PHR1A_PMS_201208141029334_SEN_617151101-001_R1C1.JP2
- Rennes
Panchro: /media/otbnas/cpalmann/MONTE2/[FCGC600026630]\ Rennes/IMG_PHR1A_P_001/IMG_PHR1A_P_201210041126153_SEN_589440101-001_R1C1.JP2
XS: /media/otbnas/cpalmann/MONTE2/[FCGC600026630]\ Rennes/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201210041126153_SEN_589440101-002_R1C1.JP2
Corresponding ROIs:
-
Melbourne phr_pxs_melbourne.tif phr_xs_melbourne.tif
-
Strasbourg roi-stras-xs.tif roi-stras-xs-2.tif
-
Rennes roi-rennes-p.tif roi-rennes-p-2.tif roi-rennes-ms.tif roi-rennes-ms-2.tif
In directories : /otbnas/cpalmann/MONTE2/Melbourne /otbnas/cpalmann/MONTE2/Rennes/ /otbnas/cpalmann/MONTE2/Rennes/
Additional information:
Here are some commands that can help in reproducing the ROIs : (Note : exactly those used during tests)
MELBOURNE
PXS
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/FCGC600031061/IMG_PHR1A_PMS-N_001/IMG_PHR1A_PMS-N_201202250025599_ORT_PRG_FC_5855-001_R1C1.JP2" -out ~/Desktop/ROIs/phr_pxs_melbourne.tif uint16 -startx 18432 -starty 4096 -sizex 4096 -sizey 4096
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/FCGC600031061/IMG_PHR1A_PMS-N_001/IMG_PHR1A_PMS-N_201202250025599_ORT_PRG_FC_5855-001_R1C1.JP2" -out ~/Desktop/ROIs/segmentation_small_xt_phr.tif uint16 -startx 11848 -starty 11426 -sizex 1024 -sizey 1024
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/FCGC600031061/IMG_PHR1A_PMS-N_001/IMG_PHR1A_PMS-N_201202250025599_ORT_PRG_FC_5855-001_R1C1.JP2" -out ~/Desktop/ROIs/segmentation_large_xt_phr.tif uint16 -startx 10240 -starty 10240 -sizex 4096 -sizey 4096
XS
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/Pleiades_Primary_Product_Bundle/FCGC600031035/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2" -out ~/Desktop/ROIs/phr_xs_melbourne.tif uint16 -startx 4096 -starty 2048 -sizex 4096 -sizey 4096
STRASBOURG
PXS
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/STRASBOURG_PLEIADES_PMS_20120814/FCGC600039280/IMG_PHR1A_PMS_001/IMG_PHR1A_PMS_201208141029334_SEN_617151101-001_R1C1.JP2" -out ~/Desktop/ROIs/roi-stras-xs.tif float -startx 0 -starty 0 -sizex 4096 -sizey 4096
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/STRASBOURG_PLEIADES_PMS_20120814/FCGC600039280/IMG_PHR1A_PMS_001/IMG_PHR1A_PMS_201208141029334_SEN_617151101-001_R1C1.JP2" -out ~/Desktop/ROIs/roi-stras-xs-2.tif float -startx 10000 -starty 10000 -sizex 4096 -sizey 4096
RENNES
PAN
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/[FCGC600026630] Rennes/IMG_PHR1A_P_001/IMG_PHR1A_P_201210041126153_SEN_589440101-001_R1C1.JP2" -out ~/Desktop/ROIs/roi-rennes-p.tif float -startx 0 -starty 0 -sizex 4096 -sizey 4096
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/[FCGC600026630] Rennes/IMG_PHR1A_P_001/IMG_PHR1A_P_201210041126153_SEN_589440101-001_R1C1.JP2" -out ~/Desktop/ROIs/roi-rennes-p-2.tif float -startx 10000 -starty 10000 -sizex 4096 -sizey 4096
XS
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/[FCGC600026630] Rennes/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201210041126153_SEN_589440101-002_R1C1.JP2" -out ~/Desktop/ROIs/roi-rennes-ms.tif float -startx 0 -starty 0 -sizex 4096 -sizey 4096
bin/otbApplicationLauncherCommandLine ExtractROI bin/ -in "/media/otbnas/cpalmann/MONTE2/[FCGC600026630] Rennes/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201210041126153_SEN_589440101-002_R1C1.JP2" -out ~/Desktop/ROIs/roi-rennes-ms-2.tif uint16 -startx 2000 -starty 2000 -sizex 4096 -sizey 4096
2014-12-09 09:59 - cpalmann: MVD2 : 0.8 Installer 32 bits
2014-12-09 11:09 - salbert: Made two quick tests : loaded ROI extracted images phr_pxs_melbourne.tif and phr_xs_melbourne.tif with Debug version of Monteverdi2 (head revision in mercurial repository).
Import of phr_pxs_melbourne.tif worked fine.
Import of phr_xs_melbourne.tif showed a black image-view:
- there are OSSIM traces while importing;
- when trying to navigate through the image, an exception was raised in the Qt event loop.
Short log:
WARNING ossimRpcModel::lineSampleHeightToWorld:
Max number of iterations reached in ground point solution. Results are inaccurate.
WARNG> Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.
terminate called after throwing an instance of 'std::runtime_error'
what(): Accuracy loss when converting double (nan) to string.
This exception is raised when converting double values to QString values cause a loss of accuracy (so that when converting back is not bijective) in function ToQString<>() from Code/Common/Core/mvdAlgorithm.h . This function is mainly used:
- while serializing the histogram into a text file;
- when storing double values in the dataset-descriptor.
2014-12-09 11:45 - salbert: Added assert( !isnan( vald ) ) in ToQString< double () (Core/mvdAlgorithm.h). Assertion fails when DatasetDescriptor::UpdateViewContext() DatasetModel::OnRoiChanged() with nan center point.
Climbing back the callstack up to QuicklookViewManipulator::MousePressEvent() reveals the otb::GlViewSettings::ScreenToViewportTransform() function returns nan center point.
2014-12-10 11:11 - gpasero: Problem related to a bad geom file created by ExtractROI. The broken geom file and the good one are attached. It looks like a locale problem (mismatch between ',' and '.' character to encode double values), however it has not been reproduced yet.
2015-04-17 09:43 - jmichel: Can we close the issue?