This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name B站学习机 | Bilibili+Youtube字幕全文阅读 | coursera-like subtitles fulltext reader | |
// @namespace https://gist.github.com/KnIfER/9e43ffa31c3b9831a500edf35595c1dc | |
// @version 4 | |
// @description 在线字幕阅读或下载,B站油管秒变cousera! - Read & learn subtitles full text online! | |
// @author KnIfER | |
// @match https://*.bilibili.com/video/* | |
// @match https://*.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com | |
// @license MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name B站学习机 | Bilibili+Youtube字幕全文阅读 | coursera-like subtitles fulltext reader | |
// @namespace https://gist.github.com/KnIfER/9e43ffa31c3b9831a500edf35595c1dc | |
// @version 4 | |
// @description 在线字幕阅读或下载,B站油管秒变cousera! - Read & learn subtitles full text online! | |
// @author KnIfER | |
// @match https://*.bilibili.com/video/* | |
// @match https://*.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com | |
// @license MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Some surveillance camera has 2 modes, RGB and Infrared. However, | |
the some frames under infrared mode is not completely "gray", they | |
are still 3 channels and value of three channels are not equal. | |
This function accepts image read by opencv(3-d numpy.ndarray), and | |
method ('rgb' or 'hsv'). 'rgb': consider 'gray' means r==g==b of | |
one pixel, smaller difference means geayer. 'hsv': consider gray | |
image is almost black in saturation channel. | |
''' | |
import cv2 |