Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
%function varargout = figcrop(varargin)
% jdc 20-feb-03
%PURPOSE:
% FIGCROP crops a surface image (e.g. generated by SURF or MESH) to
% a specified rectangle. Alternately displays the input image and waits for
% you to specify the crop rectangle with the mouse, or crops to an
% input-defined rectangle.
% Requires GETRECT.M (in Images toolbox)
%INPUT:
% FigCrop - operates on current surface object in current figure
% Figcrop(matrix) - operates on a specified matrix
% Figcrop(matrix,map) - operates on a matrix with a specified colormap
% Figcrop(matrix,rectangle) - operates on a matrix with specified crop rectangle
% Figcrop(matrix,colormap,rectangle) - matrix with specified colormap & rectangle
%
% Figcrop(handle) - operates on object specified by handle
% (handle can be to a figure, axes, or surface object)
% Figcrop(handle,map) - handle with specified colormap
% Figcrop(handle,rectangle) - ... handle with specified crop rectangle
% Figcrop(handle,colormap,rectangle) - handle with specified colormap & rectangle
%
% Crop rectangle not specified: click & drag left mouse button to define region of
% interest: use the right mouse button to enforce a
% square region of interest.
% Crop rectangle specified: region of interest taken as interior of defined rectangle
%
%OUTPUT:
% [B,RECT] = FIGCROP(...) - output is cropped matrix plus rectangle
% [X,Y,B,RECT] = FIGCROP(...) - as above, plus Xdata and Ydata from source object
%
% B - trimmed output matrix
% RECT - 4-element vector with the form [XMIN YMIN WIDTH HEIGHT], in spatial coordinates.
% X - Xdata from the input matrix
% Y - Ydata from the input matrix
%CLASS SUPPORT:
% The input matrix can be of class uint8, uint16, or double.
% The output image B is of the same class as the input image.
% RECT is always of class double.
%
%EXAMPLES
% assuming 128x128 matrix PLATHONE in memory,
%#1) [cropped,rect] = figcrop(plathone);
%#2) [plathonecropped,rectangle] = figcrop(plathone,[20 30 40 50]);
%
% See also IMCROP
Cita come
J. Cogdell (2026). FigCrop (https://it.mathworks.com/matlabcentral/fileexchange/3045-figcrop), MATLAB Central File Exchange. Recuperato .
Informazioni generali
- Versione 1.0.0.0 (27,8 KB)
-
Nessuna licenza
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
| Versione | Pubblicato | Note della release | Action |
|---|---|---|---|
| 1.0.0.0 |
