remicres / otbtf

Deep learning with otb (mirror of https://forgemia.inra.fr/orfeo-toolbox/otbtf)
Apache License 2.0
161 stars 39 forks source link

FIX: force negative y-spacing (closes #66) #67

Closed remicres closed 2 years ago

remicres commented 3 years ago

Closes #66

OTBTF assumes that the output image origin is the top-left corner, hence the physical pixel spacing in x dimension must be >0 and the physical pixel spacing in y dimension must be <0. If those are not fulfilled (as it can be the case with images without CRS and maybe in some SAR products), the TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex of itk::image, for instance, will result in a wrong pixel<-->physical coordinates conversion.

remicres commented 3 years ago

To test this branch:

cd /src/otb/otb/Modules/Remote
sudo rm -rf otbtf
sudo git clone -b 66-fix_bug_nogeo_or_nonnegyspacing https://github.com/remicres/otbtf.git
cd /src/otb/build/OTB/build/
sudo make install -j6
remicres commented 2 years ago

fixed in 3.0 rc1