duangsuse::Echo
716 subscribers
4.25K photos
130 videos
583 files
6.47K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
Forwarded from dnaugsuz
本群有没有大佬知道 OpenCV 怎么做 keyframe extraction 🌚
Forwarded from dnaugsuz
This media is not supported in your browser
VIEW IN TELEGRAM
Forwarded from dnaugsuz
我想做精确的字幕时轴提取,但加上 bandpass filter 后 keyframe 还是那副德性,不能精准提取到整个 subtitle 的 duration,往往不是 start 晚了就是 end 早了
GitHub 上居然没能抄到什么代码
#linux #sysadmin 已升级! sudo dnf update
Forwarded from 层叠 - The Cascading
中国著名的科技企业华为疑似将浏览器端 IDE 开源项目 code-server 贴牌发布,称其为「华为云CloudIDE」,并使用误导性用词(「源于华为云的全栈技术实力」)意图使用户认为此产品由华为研发。

#华而不实

src: https://mp.weixin.qq.com/s/K1XEWZFASspMpNppaM2g_A
seealso: https://www.zhihu.com/question/383168806
seealso: https://github.com/cdr/code-server
https://github.com/Rachel030219/STFW.info/blob/master/av-bv/index.html
设计亮点:

<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="A tool to help convert AV to / from BV codes, avoiding bilibili's ">
<meta name="author" content="Rachel030219">

还有主要控件
<div class="mdui-valign" style="height: 90vh;">
<div class="mdui-container">
<div class="mdui-row mdui-valign">
<div class="mdui-textfield mdui-textfield-floating-label mdui-center mdui-col-sm-6 mdui-col-xs-12 mdui-col-md-4">
<i class="mdui-icon material-icons">sync</i>
<label class="mdui-textfield-label" id="convert-label">Input AV/BV code(like av10492):</label>
<input class="mdui-textfield-input" id="convert-input"></input>
</div>
</div>
<div class="mdui-row mdui-valign mdui-center" style="visibility: hidden;" id="output">
<p class="mdui-col-xs-5 mdui-col-offset-xs-3" id="output-text" style="text-align: center;"></p>
<button class="mdui-btn mdui-btn-raised mdui-color-theme-accent mdui-col-xs-1" id="output-copy" onclick="copy()" disabled>Copy</button>
</div>
</div>
</div>
verticalLayout(align(V_CENTER), height(900.vh)) {
row(align(V_CENTER)) { col(textInput) }
row(align(V_CENTER)) { col(textOutput); col(btnCopy) }
}
🤔 ^不好的表达方式
outputButton.setAttribute("disabled", true)
outputButton.removeAttribute("disabled")

function copy(text) {
var ta = document.createElement("textarea");
//document.body.append(ta);
ta.value = text;
ta.select();
document.execCommand("copy");
//document.body.removeChild(ta);
mdui.snackbar({ message: "Copied" })
}
test.srt
1.7 KB
不使用 smooth 处理效果看起来不错,至少 end time 现在是对的了
./timeline_ops.py merge frames/timeline_SomethingNew.mp4.txt 0.25
./timeline_ops.py to-lrc 29.97 srt
这里有两张图,上面一张是带 smooth filter 的,下面一张是不带的,新特性 (--use-sharp)
不对,是我搞错了,还以为两者比较起来略微有点不一样呢,其实是误差
我的程序时序写得有问题,实际上没区别才对
上面是 --use-sharp 版本的,下面是 smooth 版本的,在实际输出中可以发现 sharp 版找到的峰值更多,但也更精细,配合 --chunk-size 的调整应该就可以做时轴提取了
不用 smooth 处理的版本虽然要多做很多次 OCR 速度更慢,但提取的时间线也更精确
test.srt
1.7 KB
效果比较好,生成命令:./extract_subtitles.py -crop '(617,955)(685,32)' --crop-debug -filter-code '~cvInGrayRange(it, 0xbf,0xff)' --draw-plot --use-sharp --chunk-size 1000 SomethingNew.mp4
./timeline_ops.py merge frames/timeline_SomethingNew.mp4.txt 0.25|./timeline_ops.py to-lrc 29.97 srt> mux.srt
从这个小细节都可以看出 --use-sharp 多进行了多少次 OCR