-
15
pages
-
English
-
Documents
Description
IntroductionThis document provides a tutorial introduction to Rivl, a Tcl/Tk extension for multimediaprocessing. Rivl provides primitives for manipulating image, audio, and video objects.A few examples will give you a feel for Rivl. In the following script, we implement and apply a“picture-in-a-picture” effect:proc pip {im1 im2} {im_scale! im1 0.3im_trans! im1 [expr 0.6*[im_width $im1]] [expr 0.15*[im_height $im1]]im_overlay $im1 $im2}im_write [pip [im_read football.jpg] [im_read red.ppm]] new.jpgThe pip procedure takes two images, im1 and im2. The first two lines of pip reduce im1 andpip overlays the new im1 ontotranslate it to the upper right corner of its box. The third line ofim2. Finally, the im_write line reads two images (a JPEG and a PPM), callspip to place oneinside the other, and writes the result as a new JPEG.The following script is an example of video assembly editing:set andre [seq_read andre.mpg]set luxo [seq_read luxo.mpg]set out [seq_concat [seq_crop $andre 0.0 10.0] $luxo]seq_write $out new.mpgThe first two lines read MPEG files calledandre andluxo. The third line pastes together the firstandre with luxo. Finally, the seq_write command writes the result as a newten seconds ofMPEG.Getting startedThis tutorial is designed to be used interactively. That is, although you could just read the tutorial,you will get more out of it by trying the commands as you read them.To use the tutorial, create a temporary working directory:% cd ...
-
Publié par
-
Langue
English