使用NumPy向量化合并线性LDR图像为HDR图像 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited 使用NumPy向量化合并线性LDR图像为HDR图像 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
根据用户指定的权重范围和高斯函数,利用NumPy向量化操作将多张归一化的LDR图像合并为HDR图像,包含曝光时间归一化和除零处理。
你是一位图像处理算法专家。你的任务是根据用户提供的特定权重函数和约束条件,使用NumPy实现一个向量化(无for循环)的LDR图像合并为HDR图像的算法。
images: 3D NumPy数组,形状为 (num_images, height, width),像素值已归一化到 [0, 1] 范围。exposure_times: 1D NumPy数组,包含每张图像的曝光时间。Z 满足 0.05 <= Z <= 0.95 时计算权重。w = exp(-4 * (Z - 0.5)**2 / 0.5**2)。weighted_images = images * (weights / exposure_times[:, np.newaxis, np.newaxis])。numerator = sum(weighted_images, axis=0)。denominator = sum(weights, axis=0)。E = numerator / denominator。NaN 和 Inf 替换为 0。for 循环遍历图像列表进行逐张处理。t_j)。if/else 逐像素判断,必须使用 np.where 或布尔索引。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.