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
#!/bin/zsh | |
len=30 | |
x="" | |
for i in *.mp4 | |
do | |
x="$x $i -mix $len -mixer luma " | |
done | |
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k" |
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
#include <opencv/cv.h> | |
#include <opencv2/core/core.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <iostream> | |
using namespace cv; | |
using namespace std; | |
int main( int argc, char** argv ) | |
{ |
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
#!/bin/zsh | |
mkdir -p {frames,ftop,fbottom,final}; | |
ffmpeg -i IMG_7197.mov -r 25 -qscale:v 2 frames/%05d.jpg ; | |
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' '); | |
C_H=540 | |
H=1280 |
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
#!/bin/zsh | |
mkdir -p {frames,final}; | |
ffmpeg -i 03.mp4 -r 25 -qscale:v 2 frames/%05d.jpg ; | |
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' '); | |
W=720 |
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
#!/bin/zsh | |
len=30 | |
x="" | |
for i in *.mp4 | |
do | |
x="$x $i -mix $len -mixer luma " | |
done | |
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k" |
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
#!/bin/bash | |
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width | |
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height | |
if [[ $W > $H ]]; then | |
NW=$H; | |
else | |
NW=$W; |
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
#!/bin/bash | |
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width | |
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height | |
if [[ $W > $H ]]; then | |
NW=$H; | |
else | |
NW=$W; |
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
#!/bin/bash | |
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width | |
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height | |
if [[ $W > $H ]]; then | |
NW=$H; | |
else | |
NW=$W; |
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
#!/bin/bash | |
W=`identify ./img.jpg | cut -f 3 -d " " | sed s/x.*//` #width | |
H=`identify ./img.jpg | cut -f 3 -d " " | sed s/.*x//` #height | |
convert -size ${W}x${H} xc:black -fill white -stroke black -draw "path 'M +780+1000 +2075+1054 +2431+3115 +80+2865" mask.png | |
convert img.jpg mask.png -alpha off -compose CopyOpacity -composite final.png |
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
sudo add-apt-repository ppa:mc3man/trusty-media; | |
sudo apt-get update; | |
sudo apt-get install -y software-properties-common curl wget git libprotobuf-dev protobuf-compiler man; | |
sudo apt-get install ffmpeg; | |
luarocks install loadcaffe && luarocks install image && luarocks install nn; | |
luarocks install torch && \ | |
luarocks install cutorch && \ | |
luarocks install cunn && \ | |
luarocks install sys; |