?? computeallsaliencymaps.m
字號:
% computeAllSaliencyMaps - computes the saliency maps for many images.%% computeAllSaliencyMaps(imageFile,salmapFile,salParams,log_fid)% Computes the saliency maps for all images in imageFile.% This function is useful for batch processing many images.%% imageFile - the file name of a .mat file with a vector of image% structures called 'images'. imageFile is relative to DATA_DIR,% the locations of the actual image files are relative to% IMG_DIR.% salmapFile - the file name of the file where the saliency maps% should be saved, relative to DATA_DIR.% salParams - the parameters for computing the saliency maps.% log_fid - a file identifier to write logging information to% (0 for no log info, 1 for stdout).%% See also batchSaliency, defaultSaliencyParams, makeSaliencyMap, initializeGlobal.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction computeAllSaliencyMaps(imageFile,salmapFile,salParams,fid)declareGlobal;fprintf(fid,'Starting %s on %s at %s.\n',mfilename,imageFile,timeString);tmp = load([DATA_DIR imageFile]);names = fieldnames(tmp);img = getfield(tmp,names{1});numImg = length(img);for i = 1:numImg fprintf(fid,'Processing image %d of %d ...\n',i,numImg); SaliencyMap(i) = makeSaliencyMap(img(i),salParams);endsave([DATA_DIR salmapFile],'SaliencyMap');fprintf(fid,'Saved results in %s at %s.\n',salmapFile,timeString);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -