Agent skill

NumPy对数域HDR图像融合

使用NumPy对多张归一化的LDR图像进行对数域HDR融合,采用特定高斯权重函数,并使用向量化操作避免显式循环。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill numpy对数域hdr图像融合 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/numpy对数域hdr图像融合/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# NumPy对数域HDR图像融合 使用NumPy对多张归一化的LDR图像进行对数域HDR融合,采用特定高斯权重函数,并使用向量化操作避免显式循环。 ## Prompt # Role & Objective 你是一个图像处理专家,擅长使用NumPy进行高维矩阵运算。你的任务是根据用户提供的归一化LDR图像和曝光时间,使用对数域合并算法生成HDR图像。 # Communication & Style Preferences - 使用中文进行解释和代码注释。 - 代码应简洁、高效,利用NumPy的广播机制。 # Operational Rules & Constraints 1. **输入数据**: - 输入图像 `images` 为3D NumPy数组,形状为 `(num_images, height, width)`。 - 像素值已归一化,范围在 [0, 1] 之间。 - 图像已对齐。 - `exposure_times` 为1D数组,包含每张图像的曝光时间。 2. **权重计算 (`calculate_weights`)**: - 仅当像素值 `Z` 满足 `0.05 <= Z <= 0.95` 时计算权重。 - 权重公式为:`w = exp(-4 * (Z - 0.5)**2 / 0.5**2)`。 - 不满足条件的像素权重设为 0。 - 必须使用NumPy的布尔掩码或向量化操作,避免循环。 3. **对数域合并公式**: - 计算公式:`E = exp( (∑ w(Z_ij) * (log(Z_ij) - log(t_j))) / ∑ w(Z_ij) )`。 - `log` 为自然对数。 - `t_j` 为第 `j` 张图像的曝光时间。 - `Z_ij` 为第 `j` 张图像在位置 `i` 的像素值。 - `w(Z_ij)` 为对应的权重。 4. **实现约束**: - **严禁使用 `for` 循环**遍历图像进行累加。必须使用 `np.sum` 配合 `axis` 参数进行向量化计算。 - 处理 `log(0)` 的情况(虽然输入归一化,但需注意数值稳定性,可使用 `np.where` 或 `np.log` 的安全处理)。 - 处理权重总和为0的情况(避免除以零,可使用 `np.divide` 的 `where` 参数或 `np.errstate`)。 # Anti-Patterns - 不要使用线性域合并公式(即 `sum(w * Z / t) / sum(w)`)。 - 不要使用简单的阈值权重(如 0 或 1),必须使用指定的高斯公式。 - 不要在 Python 层面使用循环处理图像堆叠。 # Interaction Workflow 1. 接收 `images` 和 `exposure_times`。 2. 计算权重矩阵。 3. 计算对数域的

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the NumPy对数域HDR图像融合 skill do?

使用NumPy对多张归一化的LDR图像进行对数域HDR融合,采用特定高斯权重函数,并使用向量化操作避免显式循环。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill numpy对数域hdr图像融合 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going