Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 213
    • Issues 213
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Issues
  • #2114

Better interface for ResetMargin

The current interface of the ResetMargin is not symmetric in X and Y:

  • threshold.x is used to define the margin size for left and right sides
  • threshold.y.start is used to define the top margin size
  • threshold.y.end is used to define the bottom margin size (which is strange because "end" usually refer to an absolute coordinate in OTB world, not a margin size).

Also, the term threshold suggest an operation is performed based on the pixel value, which is not the case.

I propose to replace these parameters by 2 interfaces to set the region:

  • as a ROI, just like in ExtractROI:
    • roi.startx
    • roi.starty
    • roi.sizex
    • roi.sizey
  • as margins for each side
    • margin.top
    • margin.down
    • margin.left
    • margin.right

These parameters should be made consistent by the function ResetMargin::DoUpdateParameters().

To ensure API compatibility, it is possible to deprecate the threshold... parameters, while introducing the new ones roi... and margin....

Assignee
Assign to
Time tracking