Crop a sub-window from an image

版本 1.0.0.0 (1.4 KB) 作者: Rui Zhao
Solve the problem of build-in imcrop function when the rectangle location exceeds the boundary.
282.0 次下载
更新时间 2012/11/30

查看许可证

% 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]));
%

引用格式

Rui Zhao (2024). Crop a sub-window from an image (https://www.mathworks.com/matlabcentral/fileexchange/39244-crop-a-sub-window-from-an-image), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 DICOM Format 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0