Crop a sub-window from an image

Solve the problem of build-in imcrop function when the rectangle location exceeds the boundary.

Sie verfolgen jetzt diese Einreichung

% 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 .

Kategorien

Mehr zu DICOM Format finden Sie in Help Center und MATLAB Answers

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.0.0.0