FUNCTION REFERENCE

imref2d

Spatial referencing object for a 2-D image (value class).

Spatial referencing object for a 2-D image (value class).

Syntax

R = imref2d(imageSize)

Syntax

R = imref2d(imageSize, xWorldLimits, yWorldLimits)

Syntax

R = imref2d(imageSize, pixelExtentInWorldX, pixelExtentInWorldY)

imageSize is [rows cols]; a third element (as from size of an RGB image) is accepted and dropped. Pixel (r, c) is centred at intrinsic coordinates (c, r), so XIntrinsicLimits is [0.5 cols+0.5] and YIntrinsicLimits [0.5 rows+0.5]. The default world limits equal the intrinsic limits; with pixel extents dx and dy they are dx*[0.5 cols+0.5] and dy*[0.5 rows+0.5]. Properties: XWorldLimits, YWorldLimits, ImageSize, PixelExtentInWorldX/Y (= diff of the limits / cols or rows), ImageExtentInWorldX/Y (= diff of the limits), XIntrinsicLimits, YIntrinsicLimits. XWorldLimits, YWorldLimits and ImageSize can be set (R.XWorldLimits = [0 10] gives the variable a changed copy); setting ImageSize keeps the world limits, so the pixel extents change. Methods: worldToIntrinsic, intrinsicToWorld, worldToSubscript, contains, sizesMatch. imref2d() uses imageSize [2 2].

Example

R = imref2d([480 640]); R.XWorldLimits   % [0.5 640.5]

Example

R = imref2d([2 3], [0 6], [0 4]); R.PixelExtentInWorldX   % 2

Example

R = imref2d([2 3], 2, 4); R.YWorldLimits   % [2 10]

Differences from MATLAB: imref3d and the image-only forms of other functions (imshow(I, R), ...) are not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.