Virtual Reality Toolbox | ![]() ![]() |
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
You can now view the virtual world in the Virtual Reality Toolbox viewer by typing
Your viewer opens and displays the virtual scene. Next, create an RGB image by typing
The scene from the viewer window is displayed in a MATLAB figure window.
See also
![]() | vrfigure | vrfigure/close | ![]() |