Main Content


Image model object from image object



imgmodel = getimagemodel(himage) returns the image model object associated with image himage. If himage does not have an associated image model object, then getimagemodel creates one.


collapse all

Read an image into the workspace.

h = imshow('bag.png');

Retrieve the image model associated with this image.

imgmodel = getimagemodel(h)
imgmodel =
IMAGEMODEL object accessing an image with these properties:

       ClassType: 'uint8'
    DisplayRange: [0 255]
     ImageHeight: 250
       ImageType: 'intensity'
      ImageWidth: 189
    MinIntensity: 0
    MaxIntensity: 255


Input Arguments

collapse all

Target image, specified as a handle or array of handles to image objects.

Output Arguments

collapse all

Image model, returned as an imagemodel object. If himage is an array of handles to image objects, then imgmodel is an array of image models.

Version History

Introduced before R2006a