杂散光(耀斑)配置文件

杂散光(光晕)文档页面

介绍: 杂散光测试和归一化杂散光简介|Imatest 杂散光分析输出|历史记录

背景: 杂散光示例|根本原因|测试概述|测试因素|测试注意事项|术语表

计算: 度量图像|归一化方法|光源掩膜方法|汇总指标|分析通道|饱和度

说明: Imatest 高级分析说明(主控和 IT) |使用 Imatest 计算归一化杂散光|电动云台说明

设置: 设置列表和 INI 键/值|标准和建议|配置文件输入

配置文件

在 Imatest Master 22.2 中,“config”文件(配置文件)是杂散光(耀斑)分析的可选输入。希望最大程度挖掘数据价值的用户可以使用配置文件作为输入,从而获得额外的输出和分析选项。在 Imatest IT 22.2 中,配置文件(或 StrayLightConfig 对象)是分析的必需输入。

配置文件是一个 JSON 编码的文本文件,它定义了待分析的每个图像文件的元信息,包括图像文件的路径以及与每个图像关联的光源的位置/角度。在分析过程中,这些元信息与数据关联,从而可以生成分析图(例如,绘制杂散光统计数据与光源场角的关系图)并更好地标注输出结果。这种标注非常重要,因为它有助于更好地组织和管理结果,并且某些标准(例如 IEEE-P2020)要求报告这些信息。配置文件可以相对轻松地通过编程方式生成,因为大多数编程语言都提供了处理和生成JSON(JavaScript 对象表示法)文本格式的工具。

这是一张示例配置文件(JSON 编码的文本文件)的屏幕截图,该文件将用作 Imatest 杂散光(耀斑)分析的输入。此配置文件格式便于阅读,并在名为 Sublime Text 的应用程序中查看。

在 Imatest Master 中,用户可以选择配置文件作为输入,就像选择输入图像一样;或者,用户也可以选择包含一个或多个配置文件的目录。配置文件必须采用以下定义的 JSON 模式/属性格式,并且文件扩展名必须为“.slconf”。

配置文件的属性如下:

每个 captureconfig 对象的属性如下:

在杂散光测试中,方位角和视场角表示光源相对于被测相机或设备的位置。

方位角和视场角表示光源相对于相机的位置。为了进行杂散光测试,视场角为零时应与图像空间中的光学中心重合。为了进行更全面的测试,建议分析中包含光源位于超出相机最大视场角范围的视场角时的图像。

官方JSON模式定义如下。

配置文件 JSON 模式

config.schema.json 的 JSON 编码文本字符串:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "config.schema",
  "type": "object",
  "properties": {
    "captures": {
      "description": "Information about each capture position.", 
      "type": "array",
      "items": [
        {"$ref": "captureconfig.schema"
        }
      ]
    },
    "run_name": {
      "description": "Information about the run. This is used to name batch outputs.",
      "type": "string"
    },
    "comment": {
      "description": "A comment about the meta data of the run. This is used for record keeping.",
      "type": "string"
    },
    "version": {
      "description": "The version of the config format.", 
      "type": "integer", 
      "properties": {
         "minimum": 1,
         "maximum": 1
      }
    }
  },
  "required": [
    "captures",
    "run_name",
    "version"
  ],
  "unevaluatedProperties": false
}

“captureconfig”对象JSON模式

captureconfig.schema.json 的 JSON 编码文本字符串:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "captureconfig.schema",
  "type": "object",
  "properties": {
    "image_paths": {
      "description": "The path to the image to analyze.",
      "type": "string"
    },
    "source_field_angle_deg": {
      "description": "The field angle of the source in degrees.",
      "type": "number", 
      "minimum": 0, 
      "maximum": 180
    },
    "source_azimuth_angle_deg": {
      "description": "The azimuth angle of the source in degrees.",
      "type": "number", 
      "minimum": 0, 
      "exclusiveMaximum": 360
    },
    "source_comment": {
      "description": "A comment about the capture, e.g., source is out of the FOV.",
      "type": "string"
    }
  },
  "required": [
    "image_paths"
  ],
  "unevaluatedProperties": false
}