1. hdr.txt (for vga, 其他改图像大小), width: 640, height: 480 * 1.5
P5
640
720
255
2. vga_2_pgm.sh (500 frame)
#! /bin/sh
i=0
split -b 460800 -d -a 3 file_path
while [ "$((i < 10))" = "1" ]
do
cat hdr.txt x00$i > p00$i.pgm
echo $((i++))
done
while [ "$((i < 100))" = "1" ]
do
cat hdr.txt x0$i > p0$i.pgm
echo $((i++))
done
while [ "$((i < 500))" = "1" ]
do
cat hdr.txt x$i > p$i.pgm
echo $((i++))
done