remicres / otbtf

Deep learning with otb (mirror of https://forgemia.inra.fr/remi.cresson/otbtf)
Apache License 2.0
159 stars 39 forks source link

Shift center of sampled patches with even size #56

Closed remicres closed 2 years ago

remicres commented 3 years ago

The PatchesExtraction extracts patches centered on the points of vec (input vector data). Points coordinates are used to retrieve the pixel of which the center is the nearest (OTB/ITK convention: pixel coordinates=center pixel), and then the patch is extracted using this central pixel. This is practical for odd sized patches. But for even sized patches, it could be more convenient to use the point as the physical center of the patch.

That could help when dealing with multiple sources of different resolutions, and the reference source is the one with the coarsest resolution.

remicres commented 2 years ago

fixed in 3.0 rc1