Uploaded image for project: '1D Redmine '
  1. 1D Redmine
  2. REDMINE1D-868

[RM-9625] remove isolated pixels

    XMLWordPrintable

    Details

    • Type: Task
    • Status: In Progress (View Workflow)
    • Priority: Normal
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Created on 2025-03-21 10:21:48 by Didier Vibert. % Done: 100

      implement an opening (i.e. dilatation of the erosion) or a single erosion of the mask (the mask elements are true for valid samples) after applying the filters.

      TODO:

      • add a check that the wavelengths are regularly sampled (this check is already implemented in C++ CSpectrumSpectralAxis for log lambda sampling)
      • insert this morphological modification of the mask in the python code @Spectrum.init@, just after applying the mask and before checking the wavelength.
      • add some parameters (in the filter section ?) to activate either opening | erosion | nothing, and the kernel size.

      if in the filters section, it could be a dedicated filter to put at the end of the list:
      <pre>
      "key": "OPENING", # or "EROSION"
      "instruction": "",
      "value": 1 # number of neighboring pixels to consider: ie kernel = [1,1,1] for value 1, [1,1,1,1,1] for value 2 etc...
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              r2j.migrate Redmine-Jira Migtation
              Reporter:
              r2j.migrate Redmine-Jira Migtation
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: