Crop a sub-window from an image

Version 1.0.0.0 (1,38 KB) von Rui Zhao
Solve the problem of build-in imcrop function when the rectangle location exceeds the boundary.
283 Downloads
Aktualisiert 30. Nov 2012

Lizenz anzeigen

% solve the boundary problem when cropping RECT in IM
% RES = subwin(IM, RECT)
%
% INPUT
% IM: input image
% RECT: specific rectangle with coordinates (x, y, w, h)
%
% OUTPUT
% RES: cropped subwindow
%
% EXAMPLE
% im = imread('test.png');
% imshow(subwin(im, [-10, -10, 100, 100]));
%

Zitieren als

Rui Zhao (2026). Crop a sub-window from an image (https://de.mathworks.com/matlabcentral/fileexchange/39244-crop-a-sub-window-from-an-image), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2009b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und MATLAB Answers
Version Veröffentlicht Versionshinweise
1.0.0.0