Skip to main content

Posts

Showing posts from October, 2011

YEH JO HALKA SA SASROOR HAL

Homography

Homograhy Python code to calc Homograpy matrix from each 4 points of source and destination. # 4つの点からホモグラフィ行列(平面射影変換行列)を求める http://www.gistlog.org/gist/887734 See the link, great example of ImageMagick , how 4 point perspective distortion works. http://www.imagemagick.org/Usage/distorts/#perspective Any destination points are calculated by next. x' = Hx (x : source, x' : dest, H : homography) x' x s * ( y' ) = H ( y ) 1 1

A simple example of creating mpeg from image using ffmpeg.( and creating gif animation using ImageMagick )

# Create source images by ImageMagick. convert -size 100x100 xc: +noise Random random01.png convert random01.png -virtual-pixel tile -blur 0x1 -auto-level random02.png convert random01.png -virtual-pixel tile -blur 0x3 -auto-level random03.png convert random01.png -virtual-pixel tile -blur 0x5 -auto-level random04.png convert random01.png -virtual-pixel tile -blur 0x10 -auto-level random05.png convert random01.png -virtual-pixel tile -blur 0x20 -auto-level random06.png # to mpeg. ffmpeg -i random%02d.png out.mpg # to gif animation. convert -delay 10 -loop 0 random*.png random_animation.gif # ref. ffmpeg静止画→動画作成苦戦しまくりAdd Star http://d.hatena.ne.jp/reuni/20080131/1201771541 http://www.imagemagick.org/Usage/