[中] 防抖取景对每个角点重复求逆矩阵

Open Beginner friendly
#16 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
numpy, python

Research direction

Open windows/birdlock/core/video_stabilization.py and read FrameXform (lines 33-39) to find every place prewarp is set, then see how unmap() and source_quad() call it. Add a prewarp_inv computed once per frame and reuse it in unmap(), checking the compose_plan() shrink/bisect loop at lines 332-354 still produces identical quads. Done means the profiler shows no np.linalg.inv inside unmap() and the stabilization output is unchanged.

Written by the indexing model from the issue text.

Description

位置:windows/birdlock/core/video_stabilization.py:33-39、:332-354

现象:FrameXform.unmap() 每次调用都执行 np.linalg.inv(self.prewarp),source_quad() 一次调用 4 次 unmap();compose_plan() 的 fits() 每帧最坏约 20 次收缩试探加 16 次二分,每次都走 source_quad()。3000 帧素材约为数十万次 3×3 求逆,是拖动取景滑块时的主要卡顿来源之一。

复现:导入 3000 帧序列,拖动取景滑块并用 profiler 采样。

建议:给 FrameXform 增加 prewarp_inv 字段或在每帧开始时算一次,unmap() 复用。

来源:2026-11-15 全仓只读审计,PR #7 未包含此项。 未在 Windows 实机复现,复现路径由代码审计推得。

Dominant language
Swift
Stars
2
Forks
2
Avg merge
2d 53m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cyandee/BirdLock

All issues in cyandee/BirdLock

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.