Skip to content

Instantly share code, notes, and snippets.

View activeguild's full-sized avatar
🐷
On vacation

j1ngzoue activeguild

🐷
On vacation
View GitHub Profile
import cv2
import numpy as np
# 画像を読み込む
image = cv2.imread("test.png")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# 特徴点を検出
corners = cv2.goodFeaturesToTrack(gray, maxCorners=100, qualityLevel=0.01, minDistance=10)
corners = np.int0(corners)
#!/bin/bash
function watch_desktop() {
fswatch -e ".*" -i ".mov" ~/Desktop | while read filePath; do
if [ -f "${filePath}" ]; then
if [ -f "${filePath/.mov/.gif}" ]; then
echo 'exists.'
else
echo 'not exists.'
ffmpeg -i "$filePath" -r 30 -vf scale=680:-1 "${filePath/mov/gif}"
#!/opt/homebrew/bin/fish
function watch_desktop
fswatch -e ".*" -i ".mov" ~/Desktop | while read filePath;
set replacedFilePath (string replace .mov .gif $filePath)
if test -e $filePath
if test -e $replacedFilePath
echo 'exists.'
else
echo 'not exists.'