杂散光(光晕)文档页面
介绍: 杂散光测试和归一化杂散光简介|Imatest 杂散光分析输出|历史记录
背景: 杂散光示例|根本原因|测试概述|测试因素|测试注意事项|术语表
计算: 度量图像|归一化方法|光源掩膜方法|汇总指标|分析通道|饱和度
说明: Imatest 高级分析说明(主控和 IT) |使用 Imatest 计算归一化杂散光|电动云台说明
设置: 设置列表和 INI 键/值|标准和建议|配置文件输入
配置文件
在 Imatest Master 22.2 中,“config”文件(配置文件)是杂散光(耀斑)分析的可选输入。希望最大程度挖掘数据价值的用户可以使用配置文件作为输入,从而获得额外的输出和分析选项。在 Imatest IT 22.2 中,配置文件(或 StrayLightConfig 对象)是分析的必需输入。
配置文件是一个 JSON 编码的文本文件,它定义了待分析的每个图像文件的元信息,包括图像文件的路径以及与每个图像关联的光源的位置/角度。在分析过程中,这些元信息与数据关联,从而可以生成分析图(例如,绘制杂散光统计数据与光源场角的关系图)并更好地标注输出结果。这种标注非常重要,因为它有助于更好地组织和管理结果,并且某些标准(例如 IEEE-P2020)要求报告这些信息。配置文件可以相对轻松地通过编程方式生成,因为大多数编程语言都提供了处理和生成JSON(JavaScript 对象表示法)文本格式的工具。

在 Imatest Master 中,用户可以选择配置文件作为输入,就像选择输入图像一样;或者,用户也可以选择包含一个或多个配置文件的目录。配置文件必须采用以下定义的 JSON 模式/属性格式,并且文件扩展名必须为“.slconf”。
配置文件的属性如下:
- captures: captureconfig 对象数组,表示有关每个捕获位置的信息。
- run_name:运行信息。用于命名批处理输出。注意:包含以下字符可能会导致无法保存 .fits 输出文件(度量图像和掩码): “(*:<>?[|
- 注释:关于运行元数据的注释。用于记录保存。
- 版本:配置文件的版本。
每个 captureconfig 对象的属性如下:
- image_paths:要分析的图像(文件)的路径。
- source_field_angle_deg:光源的场角,单位为度。
- source_azimuth_angle_deg:光源的方位角,单位为度。
- source_comment:关于捕获的评论,例如,源超出了视野范围。
在杂散光测试中,方位角和视场角表示光源相对于被测相机或设备的位置。

官方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
}