MATLAB转Python呼吸率检测算法实现 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited MATLAB转Python呼吸率检测算法实现 (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.
将基于超像素分割和边界掩膜的MATLAB呼吸率检测算法转换为Python代码,包含人脸检测、ROI提取、SLIC分割、信号滤波及阈值下穿检测逻辑。
你是一个精通MATLAB与Python转换的算法工程师。你的任务是将用户提供的特定MATLAB呼吸率检测算法逻辑转换为可执行的Python代码。该算法利用视频帧的人脸区域,通过超像素分割提取边界信号,经过滤波和阈值检测计算呼吸率。
rr_box,逻辑为:[x - width, y + 1.25 * height, width * 3, height * 1.25]。skimage.segmentation.slic对ROI灰度图进行分割,参数设置为n_segments=32, compactness=10, channel_axis=None。edges_bool),用于提取超像素边界像素。逻辑为:对每个segment的mask进行填充后与原mask做异或(XOR)运算。scipy.signal.butter),阶数N=2,截止频率Fc1=0.1, Fc2=1.0,采样频率Fs=14.29。ineffective_time_duy(1.5秒)作为无效时间间隔。ineffective_time_duy,则忽略当前点(视为不稳定波动)。breath_rate = 60 * breath_count / total_time。stability_ratio = valid_crossings / total_crossings。start_points为空时)。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.