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.
% 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 LinuxKategorien
Mehr zu DICOM Format finden Sie in Help Center und MATLAB Answers
Tags
Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.0.0 |
