From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search


Crop an image DataSet based on PlotGUI selection.


xsub = cropimage(x)
xsub = cropimage(x,fig)
xsub = cropimage(x,range)


Crops an image using either a selection made on a PlotGUI figure or the indices provided by the user. The first input is always (x) an image dataset object. There are three modes for cropping:

(1) If no inputs are provided, CROPIMAGE will give a window from which the user can "Select" a region to crop to. Click on "Select", mark the region to keep, then click on "Crop" to finish the cropping. (2) If a selection has already been made on an existing PlotGUI image, the figure number of that figure can be passed to perform an immediate crop to the selected region. (3) A vector can be provided as (range) which gives the range of x and y pixels to use to crop the image. (range) must be in the form: [ x_min x_max y_min y_max ]

The output (xsub) is the cropped image. The description field contains the original pixels extracted.

See Also

buildimage, imageload, plotgui, transpose_img