Skip to content

BUG: Improve Convert and DynamicConvert mask handling (fix #1647)

Victor Poughon requested to merge dynamic_convert_doc_test into develop

Summary

  • Improve documentation of -mask parameter of Convert and DynamicConvert to clarify the mask semantic:
$ ./bin/otbcli_Convert -help mask
        -mask                       <string>         Input mask  (optional, off by default)
                                                     Optional binary mask to only process part of the input image. Only pixels where the mask is less than 0.5 will be processed. The mask must have the same dimensions as the input image.

$ ./bin/otbcli_DynamicConvert -help mask
        -mask                       <string>         Input mask  (optional, off by default)
                                                     Optional binary mask to only process part of the input image. Pixels where the mask is zero will not be processed. The mask must have the same dimensions as the input image.
  • In DynamicConvert: read the mask as a UInt8ImageType instead of a FloatImageType and change the condition from > 0.5 to != 0.
  • Add missing test for DynamicConvert -test parameter.

Rationale

See #1647 (closed) and further discussion in !146 (closed).

Testing

Added input mask and baseline output to otb-data.

Additional notes

I did not change the Convert app to use UInt8ImageType because that app is deprecated.

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

Merge request reports

Loading