Image Processing Toolbox | ![]() ![]() |
Texture Mapping
When you use the imshow
command, MATLAB displays the image in a two-dimensional view. However, it is also possible to map an image onto a parametric surface, such as a sphere, or below a surface plot. The warp
function creates these displays by texture mapping the image. Texture mapping is a process that maps an image onto a surface grid using interpolation.
This example texture maps an image of a test pattern onto a cylinder.
Figure 3-5: An Image Texture Mapped onto a Cylinder
The image may not map onto the surface in the way that you had expected. One way to modify the way the texture map appears is to change the settings of the Xdir
, Ydir
, and Zdir
properties. For more information, see Changing Axis Direction in the MATLAB Graphics documentation.
For more information about texture mapping, see the reference entry for the warp
function.
![]() | Zooming In or Out from the Command Line | Printing Images | ![]() |