Virtual Reality Toolbox    
vrfigure/capture

Create an RGB image from a virtual reality figure

Syntax

Description

image_capture = capture(vrfigure_object) captures a virtual reality figure into a TruColor RGB image that can be displayed by the image command.

Example

Create a vrworld object. At the MATLAB command prompt, type

myworld = vrworld('vrmount.wrl')

The vrworld object myworld is associated with the virtual world vrmount.wrl.

Next, open the virtual world using the vrworld object. You must open the virtual world before you can view it. At the MATLAB command prompt, type

open(myworld)

You can now view the virtual world in the Virtual Reality Toolbox viewer by typing

f = vrfigure(myworld)

Your viewer opens and displays the virtual scene. Next, create an RGB image by typing

image_capture = capture(f);

Lastly, view the image

image(image_capture)

The scene from the viewer window is displayed in a MATLAB figure window.

See also

vrfigure


  vrfigure vrfigure/close