Quantcast

Documentation Center

  • Trial Software
  • Product Updates

worldToIntrinsic

Class: imref3d

Convert from world to intrinsic coordinates

Syntax

[xIntrinsic,yIntrinsic,zIntrinsic] = worldToIntrinsic(R,xWorld,yWorld,zWorld)

Description

[xIntrinsic,yIntrinsic,zIntrinsic] = worldToIntrinsic(R,xWorld,yWorld,zWorld) maps point locations from the world system (xWorld, yWorld, zWorld) to the intrinsic system (xIntrinsic, yIntrinsic, zIntrinsic) based on the relationship defined by the spatial referencing object R. If the input includes values that fall outside the limits of the image in the world system, the worldToIntrinsic method extrapolates worldX, worldY, and worldZ outside the bounds of the image in the intrinsic system.

Input Arguments

R

Spatial referencing object, imref3d, associated with an image.

xWorld

Coordinates along the X dimension in world system, specified as a numeric scalar or vector

yWorld

Coordinates along the Y dimension in world system, specified as a numeric scalar or vector

zWorld

Coordinates along the Z dimension in world system, specified as a numeric scalar or vector

Output Arguments

xIntrinsic

Coordinates in X dimension in intrinsic system, returned as a numeric scalar or vector.

yIntrinsic

Coordinates in Y dimension in intrinsic system, returned as a numeric scalar or vector.

zIntrinsic

Coordinates in Z dimension in intrinsic system, returned as a numeric scalar or vector.

Examples

expand all

Illustrate the world to intrinsic method

Read an image.

I = imread('peppers.png');

Create an imref3d object associated with the image.

R = imref3d(size(I))
R = 

 imref3d

  Properties:
           XWorldLimits: [0.5000 512.5000]
           YWorldLimits: [0.5000 384.5000]
           ZWorldLimits: [0.5000 3.5000]
              ImageSize: [384 512 3]
    PixelExtentInWorldX: 1
    PixelExtentInWorldY: 1
    PixelExtentInWorldZ: 1
    ImageExtentInWorldX: 512
    ImageExtentInWorldY: 384
    ImageExtentInWorldZ: 3
       XIntrinsicLimits: [0.5000 512.5000]
       YIntrinsicLimits: [0.5000 384.5000]
       ZIntrinsicLimits: [0.5000 3.5000]

Convert coordinates from world to intrinsic. In this example, world coordinates align with intrinsic coordinates.

 [x y z] = worldToIntrinsic(R,5,5,3)
x =

     5

y =

     5

z =

     3
Was this topic helpful?