Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
otb
otb
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 273
    • Issues 273
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 8
    • Merge Requests 8
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Main Repositories
  • otbotb
  • Merge Requests
  • !714

Merged
Opened May 25, 2020 by Julien Osman@julienosmanDeveloper

BUG: #2046 Add an epsilon margin to compute the m_ReachableOutputRegion

  • Overview 0
  • Commits 2
  • Pipelines 4
  • Changes 6

Summary

The application Superimpose crashed with a segmentation fault during resampling. Investigation revealed that the interpolated index was out of image bounds. The application uses the PHR mode and resamples the XS image with a otb::GridResampleImageFilter. This filter doesn't check explicitly that input indexes are in the input buffered region. It uses a m_ReachableOutputRegion to crop the output region processed. The problem appears because an output pixel is right on the border of the input image extent, and when someone uses a nearest neighbor interpolator, this one converts the continuous index to an out-of-bound index.

The solution was to introduce an epsilon margin to compute the m_ReachableOutputRegion.

Rationale

Closes #2046 (closed)

Implementation Details

Classes and files

otbGridResampleImageFilter: Add new attribute m_InterpolationMargin with corresponding get/set. Set it's default value to 0.0. Use it in processing.

Applications

Superimpose: Set the margin to 1e-9 when using nearest neighbor interpolation.

Tests

Added a new test for the Superimpose application with PHR images and nearest neighbor interpolation.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Assignee
Assign to
Reviewer
Request review from
7.2.0
Milestone
7.2.0
Assign milestone
Time tracking
Reference: orfeotoolbox/otb!714
Source branch: 2046-superimpose-crash

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.