32 |
|
|
33 |
# Create a movie. |
# Create a movie. |
34 |
mov = Movie() |
mov = Movie() |
35 |
|
#lst = [] |
36 |
|
|
37 |
# Read in one file one after another and render the object. |
# Read in one file one after another and render the object. |
38 |
for i in range(938, 949): |
for i in range(938, 949): |
42 |
s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \ |
s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \ |
43 |
IMAGE_NAME + "%06d.jpg") % i) |
IMAGE_NAME + "%06d.jpg") % i) |
44 |
|
|
45 |
# Generate the movie from the rendered images. |
#lst.append(IMAGE_NAME + "%06d.jpg" % i) |
46 |
mov.makeMovie(input_directory = PYVISI_EXAMPLE_IMAGES_PATH, |
|
47 |
|
# Images (first and last inclusive) from which the movie is to be generated. |
48 |
|
mov.imageRange(input_directory = PYVISI_EXAMPLE_IMAGES_PATH, |
49 |
first_image = IMAGE_NAME + "000938.jpg", |
first_image = IMAGE_NAME + "000938.jpg", |
50 |
last_image = IMAGE_NAME + "000948.jpg", |
last_image = IMAGE_NAME + "000948.jpg") |
51 |
movie = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg")) |
|
52 |
|
# Alternatively, a list of images can be specified. |
53 |
|
#mov.imageList(input_directory = PYVISI_EXAMPLE_IMAGES_PATH, image_list = lst) |
54 |
|
|
55 |
|
# Generate the movie. |
56 |
|
mov.makeMovie(os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg")) |
57 |
|
|