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
This media is not supported in your browser
VIEW IN TELEGRAM
新算法利用 peakutils.baseline 和 peakutil.indexes,总体来看很不行,总是漏掉关键帧(漏得非常严重,更别说精确判定歌词显现/消失了),还不如原 smooth+argrelextrma 算法

新算法在 diff 确定上是 grayscale + subtract + countNonZero ,统计上是 smooth+argrelextrama+subtract(it, 1)
老算法是所有通道的 absdiff sum ,统计上是 peakutils.baseline 和 peakutils.indexes

in solveFrameDiffernces:
postprocess = lambda mat: grayscale(self.postprocessUMat(self.cropUMat(mat, crop)))


diff = cv2.subtract(curr_frame, prev_frame)
#vs. diff = cv2.absdiff(curr_frame, prev_frame)

yield Frame(index, curr_frame, cv2.countNonZero(diff) )


in solveValidFrames:
diffs = array(frame_diffs)
base = peak.baseline(diffs, 2)
indices = peak.indexes(diffs-base, 0.9, min_dist=1)
return (base, map(frames.__getitem__, indices))
#tech #dev #statement 🤔 关于这个 ParserKt 有没有创新嘛……
其实作为一个整体来看,ParserKt 的确是创新的(但换到每一个具体的技术来看,其实也没什么新东西),当然对于所有同类库来讲,它们也是有自己的“私货”。
比如 ParserKt 的 read/show,其实就是 unparsing,再比如 ParserKt 的 one-pass,其实所有 pure 的 parser combinator 都是 one-pass 的(而且不得不说,在类似字符串组合的情况下这类 parserc 的定义会更好看)
ParserKt 作为一个解析组合子,本身在算法上也没什么亮点(因为许多解析组合子的亮点都不在算法,而在于它们的便利性,少许利用 codegen/macro/inline 的解析组合子才更倾向算法)
包括现在的可变 Pattern 以及 LayoutPattern/InfixPattern,其实也都是运用不那么广泛的组合而已,本质上没太大更新。

想想看 Kotlin 其实也是这样的,multiplatform 早就不是什么新概念了(Haskell 和 Scala 都有官方 JS 后端,C 都有 WebAssembly)
只能说是 Kotlin 加了许多私货,不是什么新东西,只不过其它老东西都没它那么好用而已……
#PL https://github.com/samshadwell/TrumpScript#mission
The is and are keywords are used both to check for equality, and for assignment. To use for assignment, say something like Trump is great or Democrats are dumb. To use to check for equality, do the same but append a ?. For example, you may need to ask yourself Trump is "the best"? (although we all know that would evaluate to fact anyway)
每次我看到这幅图(没经过统计的 pixel absdiff channels sum)就觉得来气,看起来这么简单的事情居然不能精确做到…… 🤔
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)
不对,是我搞错了,还以为两者比较起来略微有点不一样呢,其实是误差
我的程序时序写得有问题,实际上没区别才对