This file contains hidden or 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
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) |
This file contains hidden or 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
#!/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}" |
This file contains hidden or 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
#!/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.' |