• 投稿

【东方】Bad Apple!!,但每帧只绘制一个新矩形

1.7万
21
2026-01-20 11:18:42
613
12
182
24
https://youtu.be/V9KJpbzNvKw?si=d7JKWW-s2xS2VLrq 作者:chronondecay Another weekend coding project. For each frame, draw the single rectangle which makes the image most similar to the current frame in L1 norm. This is done by solving the maximum subarray sum problem (using Kadane's algorithm). Feel free to pause the video at any point and press the . and , keys to watch the rectangles being drawn frame by frame. Notice how the algorithm performs best when there is little movement, so that it has time to refine the shapes, but does poorly when there are more moving parts (most obviously during the yin-yang spin, and also right before and right after when the screen splits in two vertically). 又一个周末编程项目。对于每一帧,绘制一个矩形,使图像在 L1 范数下与当前帧最相似。这是通过解决最大子数组和问题(使用 Kadane 算法)来实现的。 您可以随时暂停视频,并按 . 和 , 键逐帧观看矩形的绘制过程。请注意,当运动较少时,算法表现最佳,以便有时间细化形状;但当运动部件较多时(最明显地发生在阴阳旋转期间,以及屏幕垂直分成两半之前和之后),算法表现较差。 授权转载
粉丝群:719519818(入群答案Astra1) 邮箱:yorihime0721@outlook.com
客服
顶部
赛事库 课堂 2021拜年纪