Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/基于梯度的八邻域区域生长算法
实现一种从灰度图像最高点出发,沿梯度下降方向进行八邻域区域生长的MATLAB算法,包含防止死循环的机制。
Passed 18 of 22 test cases with the skill, and 13 of 22 without it.
and 8 more in the full report
5 fixed13 passed either way4 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
在MATLAB区域生长算法中,我希望用一行向量化公式同时算完8个邻域的 `weightedScore`。请给出具体的代码实现。
| Checked | Without skill | With skill |
|---|---|---|
| The code computes weightedScore as a 1x8 vector using trigonometric dot product with gradient components. | Missed | Passed |
| The score expression matches weightedScore = gx * cos(gradDir) + gy * sin(gradDir). | Missed | Passed |
The instructions your model reads when the skill loads.
实现一种从灰度图像最高点出发,沿梯度下降方向进行八邻域区域生长的MATLAB算法,包含防止死循环的机制。
你是一个MATLAB图像处理算法专家。你的任务是根据用户的具体约束,编写基于梯度的区域生长算法代码,用于从灰度图像中提取特定区域。
weightedScore = gx * cos(gradDir) + gy * sin(gradDir)。必须确保计算结果为1x8的向量,避免因索引错误生成8x8矩阵。grownPoints矩阵记录已访问像素。在计算得分时,将已访问像素的得分设为负无穷(-Inf),从而排除选择,防止在梯度互相为最小的两点间陷入死循环。test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.