Skip to content

四号程序员

Keep It Simple and Stupid

  • Home
  • 读过的书
  • 从0到1实战微服务架构(第2版)

检查音频长度,转化为秒

Leave a reply

AUDIO_FILE="./music.ogg"
AUDIO_DURATION=$(ffprobe -i $AUDIO_FILE -show_format -v quiet | sed -n 's/duration=//p')
AUDIO_DURATION=$(echo ${AUDIO_DURATION%.*})

最后一个行是去掉小数点,如果不用可以不去。[......]

继续阅读

This entry was posted in Linux and tagged ffmpeg, ffprobe, 检测音频长度 on 2023-04-28 by coder4.

用opencv检查是否为白纸

Leave a reply

def check_blank_image(file):
img = cv2.imread(file)
if img is None:
return False
# grary
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# threshold to two value image
ret,thresh = cv2.threshold(img, 150, 255,cv2.THRESH_BINARY)[......]

继续阅读

This entry was posted in opencv and tagged opencv, 白纸 on 2023-04-27 by coder4.

opencv拼接图片和切分图片

Leave a reply

1 左右拼接(height要求一样)
import cv2
from google.colab.patches import cv2_imshow

img_left = cv2.imread("./left.jpg")
img_right = cv2.imread("./right.jpg")

img = cv2.hconcat([img_left, img_right])
cv2.imwrite("merge.jpg", img)
2 垂直拼接(width要求一样)
i[......]

继续阅读

This entry was posted in opencv and tagged opencv, 切分, 图片, 拼接 on 2023-04-24 by coder4.

vscode支持C工程的多文件编译

Leave a reply

默认只支持单文件,修改.vscode/tasks.json中的
"args": [
"-fdiagnostics-color=always",
"-g",
"${workspaceFolder}/**.c",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"[......]

继续阅读

This entry was posted in C && C++ and tagged C, vscode, 多文件, 编译 on 2023-03-24 by coder4.

轻量级状态机COLA

Leave a reply

https://cloud.tencent.com/developer/article/2014553

https://github.com/alibaba/COLA[......]

继续阅读

This entry was posted in 计算机技术 and tagged cola, 状态机 on 2023-03-24 by coder4.

Post navigation

← Older posts
Newer posts →

Categories

  • Android
  • C && C++
  • Go
  • iOS
  • Java
  • Linux
  • Mac
  • NLP
  • opencv
  • Perl
  • PHP
  • Python
  • RPC
  • Ruby
  • Visual C++ && C#
  • Windows
  • Wordpress
  • 前端技术
  • 大数据技术
  • 心情随笔
  • 搜索技术
  • 数据库技术
  • 未分类
  • 机器学习
  • 笔面题
  • 算法&数据结构
  • 网络&网络模拟
  • 计算机技术
  • 设计

Tags

  • Android
  • C
  • CentOS
  • c语言
  • Debian
  • docker
  • go
  • gtk
  • Hadoop
  • Hive
  • ios
  • Java && J2EE
  • Java && J2EE
  • Java核心技术
  • KVM
  • Linux
  • MySQL
  • nginx
  • Oracle
  • PHP
  • Python
  • Python Essential Reference
  • shell
  • socket
  • Ubuntu
  • VC
  • windows
  • 严蔚敏
  • 中文
  • 乱码
  • 卷2
  • 字符串
  • 安装
  • 实现
  • 排序
  • 教程
  • 数据结构
  • 核心技术
  • 算法
  • 算法技术手册
  • 编译
  • 读书笔记
  • 递归
  • 配置
  • 重读
Proudly powered by WordPress