{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.imatest.com/schema/25-1/straylight-results-mask-image-processing",
  "title": "Stray Light Mask Results: Image Processing",
  "description": "Information about the mask of the light source via the image processing method.",
  "type": "object",
  "properties": {
    "type": {
      "description": "The type of mask result.",
      "type": "string",
      "const": "Image Processing"
    },
    "mask_file": {
      "description": "The mask file(s) generated during the analysis.",
      "$ref": "https://www.imatest.com/schema/25-1/common-filename-md5-array"
    },
    "channel": {
      "description": "The channel used to produce the mask.",
      "type": "string"
    },
    "source_in_fov": {
      "description": "True if the light source was determined to be in the FOV.",
      "type": "boolean"
    },
    "source_pixel_count": {
      "description": "The number of pixels that were masked out.",
      "type": "integer"
    },
    "connected_component_count": {
      "description": "The number of connected components for the masked-out light source(s).",
      "type": "integer"
    },
    "x_centroid_px": {
      "description": "The x-value of the centroid of the mask.",
      "$ref": "https://www.imatest.com/schema/25-1/common-number"
    },
    "y_centroid_px": {
      "description": "The y-value of the centroid of the mask.",
      "$ref": "https://www.imatest.com/schema/25-1/common-number"
    },
    "threshold_DN": {
      "description": "The threshold for masking in digital numbers.",
      "type": "number"
    },
    "exit_condition": {
      "description": "The condition for completing the masking method.",
      "type": "string",
      "enum": [
        "Invalid Threshold",
        "Multiple regions found",
        "All regions are too small",
        "Threshold less than minimum source level",
        "No regions found",
        "Single region found",
        "Picking the largest region",
        "Picking the smallest region",
        "Unknown"
      ]
    }
  },
  "required": [
    "type",
    "mask_file",
    "channel",
    "source_in_fov",
    "source_pixel_count",
    "connected_component_count",
    "threshold_DN",
    "exit_condition"
  ],
  "unevaluatedProperties": false
}