⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resizem.m

📁 The pattern recognition matlab toolbox
💻 M
字号:
%RESIZEM Mapping for resizing object images in datasets and datafiles
%(outdated, rplaced by im_resize)
%
%  B = RESIZEM(A,SIZE,METHOD)
%  B = A*RESIZEM([],SIZE,METHOD)
%
% INPUT
%  A       Dataset or datafile
%  SIZE    Desired size
%  METHOD  Method, see IMRESIZE
%
% OUTPUT
%  B       Dataset or datafile
%
% DESCRIPTION
% The objects stored as images in the dataset or datafile A are resized
% using the IMRESIZE command. Default METHOD is 'nearest' (nearest neighbor
% interpolation. In SIZE the desired output size has to be stored. Note
% that for proper use in PRTools third size parameter of multi-band images,
% e.g. 3 for RGB images, has to be supplied. 
%
% SEE ALSO
% MAPPINGS, DATASETS, DATAFILES, IM2OBJ, DATA2IM 

% Copyright: R.P.W. Duin, r.p.w.duin@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands

function b = resizem(a,imsize,method)

if nargin < 3 | isempty(method)
  method = 'nearest';
end

if isempty(a)
  b = mapping(mfilename,'fixed',{imsize,method});
  b = setname(b,'image resize');
  b = setsize_out(b,imsize);
  return
end

isvaldfile(a,0);
if isdataset(a)
  isobjim(a);
end
b = filtm(a,'imresize',{imsize(1:2),method},imsize);
  


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -