现在的位置: 首页 > 综合 > 正文

YUV420视频序列转化为单帧PGM灰度图像脚本

2013年04月19日 ⁄ 综合 ⁄ 共 333字 ⁄ 字号 评论关闭

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

【上篇】
【下篇】

抱歉!评论已关闭.