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

📄 util_view_img_files.m

📁 Standard model object recognition matlab code
💻 M
字号:
function util_view_img_files (filepath, varargin)% FUNCTION util_view_img_files (filepath, varargin)%% Look at all '.mat' images in filepath.% varargin{1} = 'mat' (default), 'pgm', or other image formats.if length(varargin) > 0  img_format = varargin{1};else  img_format = 'mat';endif ~exist(filepath,'dir')  error([filepath ' does not exist.']);endD = dir([filepath '/*' img_format]);if length(D) > 0  show_in_this_dir (filepath, img_format);endfunction show_in_this_dir (filepath, image_format)colormap gray;D = dir([filepath '/*' image_format]);for i = 1:length(D)  fn = [filepath '/' D(i).name];  if image_format == 'mat'    if ~strcmp(D(i).name, 'stim_size.mat')      load(fn, 'r');    else      r = 0;    end    clim = [-1 1];  else    r = imread(fn);    r = double(r)/255;    clim = [0 1];  end  disp([filepath '/' D(i).name]);  imagesc(r, clim);  axis image; drawnow;  pause(0.5);  % or do it in a montage, assuming all the images are of the  % same size.  %img_all(:,:,1,i) = r;end%montage (img_all);

⌨️ 快捷键说明

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