亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sfrmat2.m

?? sfrmat is a Matlab function that provides a spatial frequency response* (SFR) from a digital image f
?? M
字號:
function [status, dat, fitme, esf] = sfrmat2(io, a, del);%  sfrmat2:  Slanted-edge and color mis-registration analysis%  [status, dat, fitme, esf] = sfrmat2(io, a, del);%       From a selected edge area of an image, the program computes%       the ISO slanted edge MTF. Input file can be single or%       three-record file. Format can be JPEG or TIF. The image is %       displayed and a region of interest (ROI) can be chosen, or%       the entire field will be selected by not moving the mouse%       when defining an ROI. Either a vertical or horizontal edge%       feature can be selected. %  Input arguments:%       io (optional) integer [1-4] controls computation, and %       reporting of output%       a (optional) an nxm or nxmx3 array of data     (used with io=4)%       del (optional) sampling interval in mm or dpi  (used with io=4)%          If dx < 1 it is assumes to be sampling pitch in mm%          If io = 4 (see below, no GUI) and del is not specified,%          it is set%          equal to 1, so frequency is given in cy/pixel.%  Returns: %       status = 0 if normal execution%       dat = computed sfr data in 2 (freq, sfr) or 5 columns.%       fitme = coefficients for the linear equations for the fit to%               edge locations for each color-record%       esf   = supersampled edge spread function vector%  Usage:%       %       sfrmat2(0) = ISO Plugin type output (no color registration,%                     single luminance SFR), with prompts for I/O %       sfrmat2(1) = ISO output + edge location(s)%%       sfrmat2  %       sfrmat2(2) = (default) R,G,B,Lum SFRs + edge location(s)%%       sfrmat2(3) = only edge location(s)%       [status, dat, fitme] = sfrmat2(4, array, a, del) %                  returns SFRs and edge locations to the variables%                  [[status, dat, fitme] without plotting or other%                  output. Input 'array' is an nxm or nxmx3 array of%                  data. No Graphical User Interface (GUI) is used with%                  this option.%  Needs: ahamming, cent, centroid, clipping, deriv1, findedge,%         getoecf, getroi, inbox1, inbox3, inputdlg, project, results,%         rotatev, splash, isarray% %  Author: Peter Burns, peter.burns@kodak.com%          12 August 2003%  Copyright (c) International Imaging Industry Association%******************************************************************status = 0;defpath = path;            % save original pathhome = pwd;                % add current directory to path                   addpath([home]);name =    'sfrmat';version = '2.1';when =    '12 AUGUST 2003';%close all;          %close all figure window before starting (disabled)% Suppresses interpreting of e.g. filenames set(0, 'DefaultTextInterpreter', 'none'); pflag = 0;if nargin==0; io = 2;   % default optionelseif nargin>3; disp('Incorrect number or arguments. There should be 0-3'); status = 1; return;if nargin<3 del = 1;endelseif io<0; disp('Bad input arguments, first argument, io, must be  1, 2, 3, 4'); status = 1; return;elseif io>4;  %% disp('Bad input arguments, first argument, io, must be  1, 2, 3, 4'); status = 1; return;elseif io==4; if nargin<2; disp('Bad input arguments, if io=4 must you must supply (second argument) data'); status = 1; return; end;end;%% if io ~= 4;  swin = splash(name, version, when);  % Select file name for reading  % edit the next line to change the default path for input file selection  def ='*.*'; [filename, pathname] = uigetfile(def,'Select input data file (JPEG, TIF, BMP, HDF, PCX, XWD)'); close(swin); if (filename==0)  disp('No file selected. To try again type: > sfrmat2');  status = 1;  return; end; filename=[pathname,filename]; readstat = 0; % Check for common extensions for JPEG, TIFF images.  % This may not be needed since IMREAD does this sort of guessing temp = filename(length(filename)-2:length(filename));   %last 3 characters                             if           temp=='iff'          fmt = 'tif';       elseif temp=='IFF'          fmt = 'tif';       elseif temp =='TIF'          fmt = 'tif';       elseif temp =='tif'          fmt = temp;       elseif temp=='JPG'          fmt='jpg';       elseif temp=='PEG'          fmt='jpg';       elseif temp=='jpg'          fmt=temp;       elseif temp=='peg'          fmt='jpg';       elseif temp=='bmp'          fmt=temp;       elseif temp=='BMP'          fmt='bmp';       elseif temp=='hdf'          fmt=temp;       elseif temp=='HDF'          fmt='hdf';       elseif temp=='pcx'          fmt=temp;       elseif temp=='PCX'          fmt='pcx';       elseif temp=='xwd'          fmt=temp;       elseif temp=='XWD'          fmt='xwd';       else        disp(' ');        disp(' ********  WARNING: Unknown file format  **************');         disp(' sfrmat programme looks for extensions: tif, tiff, jpeg');        disp(' jpg, bmp, hdf, pcx, xwd, TIF, TIFF, JPEG, JPG, BMP, ...');        disp(' Matlab function IMREAD will infer format and attempt to');        disp(' read. If this fails, type "help imread" for info. on ');        disp(' supported formats.');        readstat = 1;       return; end; if readstat ==0;  atemp = imread(filename, fmt);   else;  atemp = imread(filename); end;[nlin npix ncol] = size(atemp); % input sampling and luminance weights if ncol==1;	 del = inbox1; else [del, weight] = inbox3;  end;cname = class(atemp);if cname(1:5) == 'uint1';   % uint16 smax = 2^16-1;elseif cname(1:5) == 'uint8'; smax = 255;else smax = 1e10;end[a, roi] = getroi(atemp);               % extract Region of interestclear atemp                             % *******************************[nlow, nhigh, cstatus] = clipping(a, 0, smax, 0.005);if cstatus ~=1;  disp('Fraction low data'); disp(nlow); disp('Fraction high data'); disp(nhigh);end;oename = 0;[oename, oepath] = uigetfile([pathname,'*.*'],['Select OECF data file, ',num2str(ncol),' record(s)']);if oename==0; disp(' No OECF transformation chosen'); oename='none'; else;  [a, oestatus] = getoecf(a, oepath, oename);   % Transforms a using OECF LUT from file chosen if oestatus ~=0;  disp('');  disp('*  Number of data colors does not match OECF LUT file,');  disp('*  Care to try again?');  [oename, oepath] = uigetfile([oepath,'*.*'],'Select other OECF data file or CANCEL');   if oename==0;   disp(' No OECF transformation chosen');   oename='none';   else;   %oename = [oepath,oename];	   [a, oestatus] = getOECF(a, oepath, oename);   % Transforms a using OECF LUT from file chosen   if oestatus ~=0;    status = 1;    return;   end;  end; end;end;else;                     % when io = 4  a= double(a);%                  % default sampling and color weights if del > 1  del = 25.4/del;  % Assume input was in DPI convert to pitch in mm end;  weight = [0.3            0.6            0.1];end; [nlin npix ncol] = size(a);% Form luminance record using the weight vector for red, green and blueif ncol ==3; lum = zeros(nlin, npix); for i=1:nlin; for j=1:npix; lum(i,j) = weight(1,1)*a(i,j,1)+weight(2,1)*a(i,j,2)+weight(3,1)*a(i,j,3); end; end;  cc = zeros(nlin, npix, 4);  for i=1:nlin;  for j=1:npix;   cc(i,j,:) = [ a(i, j, 1), a(i, j, 2), a(i, j, 3), lum(i,j)];  end;  end;  a = cc;  clear cc;  clear lum;  ncol = 4; end;% rotate horizontal edge so it is vertical [a, nlin, npix, rflag] = rotatev(a);loc = zeros(ncol, nlin);fil1 = [0.5 -0.5];fil2 = [0.5 0 -0.5];% Need 'positive' edge for good centroid calculation tleft  = sum(sum(a(:,      1:5,  1),2)); tright = sum(sum(a(:, npix-5:npix,1),2));  if tleft>tright;   fil1 = [-0.5 0.5];   fil2 = [-0.5 0 0.5];  end% Test for low contrast edge; test = abs( (tleft-tright)/(tleft+tright) ); if test < 0.2;  disp(' ** WARNING: Edge contrast is less that 20%, this can');  disp('             lead to high error in the SFR measurement.'); end; fitme = zeros(ncol, 2);slout = zeros(ncol, 1);% smoothing window for first part of edge location estimation - %  to used on each line of ROI win1 = ahamming(npix, (npix+1)/2);    % Symmetric windowfor color=1:ncol;                      % Loop for each color % pname = ' ';  if ncol~=1;   pname =[' Red '           'Green'           'Blue '           ' Lum '];  end;%% c = deriv1(a(:,:,color), nlin, npix, fil1);% compute centroid for derivative array for each line in ROI. NOTE WINDOW array 'win' for n=1:nlin  loc(color, n) = centroid( c(n, 1:npix )'.*win1) - 0.5;   % -0.5 shift for FIR phase end;% clear c fitme(color,:) = findedge(loc(color,:), nlin); place = zeros(nlin,1); for n=1:nlin;  place(n) = fitme(color,2) + fitme(color,1)*n;  win2 = ahamming(npix, place(n)); loc(color, n) = centroid( c(n, 1:npix )'.*win2) -0.5; end; fitme(color,:) = findedge(loc(color,:), nlin); fitme(color,:); % used previously to list fit equations%%end;                               % End of loop for each colordisp('  ');summary{1} = [' ']; % initializeif io > 0; ncolout = ncol;                   % output edge location listing if ncol == 4;  ncolout = ncol - 1; end midloc = zeros(ncolout,1); summary{1} = ['Edge location, slope']; % initialize for i=1:ncolout;  slout(i) = - 1./fitme(i,1);      % slope is as normally defined in image coods.  if rflag==1,                     % positive flag it ROI was rotated   slout(i) =  - fitme(i,1);  end;% evaluate equation(s) at the middle line as edge location   midloc(i) = fitme(i,2) + fitme(i,1)*((nlin-1)/2);  summary{i+1} = [midloc(i), slout(i)]; enddisp('Edge location(s) and slopes = ' ), disp( [midloc(1:ncolout), slout(1:ncolout)]);  if ncol>2;  summary{1} = ['Edge location, slope, misregistration (second record, G, is reference)'];  misreg = zeros(ncolout,1);  for i=1:ncolout;   misreg(i) = midloc(i) - midloc(2);   summary{i+1}=[midloc(i), slout(i), misreg(i)];  end; disp('Misregistration, with green as reference (R, G, B, Lum) = '); for i = 1:ncolout  fprintf('%10.4f\n', misreg(i)); end; endend                            % end of check if io > 0% Full linear fit is available as variable fitme. Note that the fit is for% the projection onto the X-axis,%       x = fitme(color, 1) y + fitme(color, 2)% so the slope is the inverse of the one that you may expect% *********************************** Stop before sfr calculations hereif io ==3; dat = 0;                      % avoids error message return;end;%%nbin = 4;nn =   floor(npix *nbin);mtf =  zeros(nn, ncol);nn2 =  nn/2 + 1;%%freq = zeros(nn, 1);for n=1:nn;  freq(n) = nbin*(n-1)/(del*nn);end;freqlim = 1; % limits plotted sfr to 0- 1 cy/pxel freqlim = 2 for all datann2out = round(nn2*freqlim/2);nfreq = n/(2*del*nn);    % half-sampling frequencywin = ahamming(nbin*npix,(nbin*npix+1)/2);      % centered Hamming window%%% **************                      Large SFR loop for each color recordesf = zeros(nn,ncol);for color=1:ncol% project and bin data in 4x sampled array [point, pstatusp] = project(a(:,:,color), loc(color, 1), fitme(color,1), nbin); esf(:,color) = point;  % compute first derivative via FIR (1x3) filter fil  c = deriv1(point', 1, nn, fil2);  c = c'; mid = centroid(c);  temp = cent(c, round(mid));              % shift array so it is centered  c = temp;  clear temp;% apply window (symmetric Hamming) c = win.*c;% Transform, scale %% temp = abs(fft(c, nn)); mtf(1:nn2, color) = temp(1:nn2)/temp(1);%% end;dat = zeros(nn2out, ncol+1);for i=1:nn2; dat(i,:) = [freq(i), mtf(i,:)];end;if io ==4;          returnend% Plot SFRs on same axesif ncol >1;  sym{1} = [];   sym{1} = '--r';  sym{2} = '-g';  sym{3} = '-.b';  sym{4} = '*k';  ttext = [filename,' r = - -  g = -  b = -.-  lum = *']; else;  ttext = filename;  sym{1} = 'k';endscreen = get(0, 'ScreenSize'); defpos = get(0, 'DefaultFigurePosition'); set(0, 'DefaultFigurePosition', [15 25 0.6*screen(3) 0.4*screen(4)]);    if del==1;   funit =  'cy/pixel';else funit = 'cy/mm';end; plot( freq( 1:nn2out), mtf(1:nn2out, 1), sym{1}); hold on;  title(ttext);  xlabel(['     Frequency, ', funit]);  ylabel('SFR');  if ncol>1;   for n = 2:ncol;   plot( freq( 1:nn2out), mtf(1:nn2out, n), sym{n});  end;end;line([nfreq ,nfreq],[.05,0]),text(.95*nfreq,+.08,'half-sampling'), hold off;zoom on;defname = [pathname,'*.*'];   [outfile,outpath]=uiputfile(defname,'File name to save results');   foutfile=[outpath,outfile];   if size(foutfile)==[1,2],      if foutfile==[0,0],         disp('Saving results: Cancelled')         return;      end;      else;    results(dat, filename, roi, oename, summary, foutfile);   end;% Clean up% Reset figure position and size  set(0, 'DefaultFigurePosition', defpos);% Reset text interpretation  set(0, 'DefaultTextInterpreter', 'tex')  path(defpath);             % Restore path to previous list  cd([home]);                % Return to working directory disp(' * sfrmat2 finished  *');return;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲av在线| 亚洲一区在线观看网站| 中文字幕一区二区三区在线观看| 中文字幕一区二区三区视频| 亚洲成人高清在线| 国产一区二区三区四| 欧美综合一区二区| 久久综合五月天婷婷伊人| 亚洲区小说区图片区qvod| 精品一区二区综合| 色综合久久久久综合| 精品精品国产高清一毛片一天堂| 亚洲老妇xxxxxx| 国产一区二区美女| 在线播放中文字幕一区| 国产精品你懂的在线| 另类小说图片综合网| 91网站视频在线观看| 久久精品男人天堂av| 视频一区二区三区中文字幕| 色综合久久天天| 中文字幕的久久| 久久 天天综合| 91精品欧美久久久久久动漫| 亚洲日本va午夜在线电影| 国内精品不卡在线| 91精品国产综合久久久久久| 亚洲自拍都市欧美小说| 91在线观看成人| 三级在线观看一区二区| 懂色av一区二区夜夜嗨| 欧美成人女星排行榜| 日日夜夜一区二区| 欧美偷拍一区二区| 亚洲欧美一区二区视频| 成人听书哪个软件好| 久久精品夜色噜噜亚洲a∨| 日本欧美在线看| 7777精品伊人久久久大香线蕉超级流畅| 1000部国产精品成人观看| 成人午夜电影小说| 中文字幕va一区二区三区| 国产盗摄视频一区二区三区| 国产欧美日韩三区| 国产精品亚洲综合一区在线观看| 精品久久一区二区| 国产综合色在线视频区| 国产亚洲综合在线| 风流少妇一区二区| 国产精品伦一区| 91免费在线视频观看| 亚洲一区二区三区四区在线免费观看 | 精品久久久久久久人人人人传媒 | 亚洲一区二区黄色| 欧美在线观看视频一区二区| 亚洲综合网站在线观看| 欧美性色aⅴ视频一区日韩精品| 亚洲成av人影院| 欧美一级免费大片| 激情av综合网| 国产精品美女久久久久aⅴ国产馆| 99久久精品免费看| 亚洲精品免费在线观看| 欧美日韩在线免费视频| 麻豆精品新av中文字幕| 国产亚洲欧美一级| 97精品久久久久中文字幕| 一区二区三区欧美日| 欧美一区二区私人影院日本| 国产老妇另类xxxxx| 国产精品久久免费看| 欧美色网一区二区| 美女诱惑一区二区| 欧美国产禁国产网站cc| 91黄色激情网站| 国产资源在线一区| 中文字幕精品综合| 欧美日韩在线播放| 国产伦精一区二区三区| 亚洲久草在线视频| 26uuu色噜噜精品一区二区| 91麻豆国产福利精品| 日本aⅴ亚洲精品中文乱码| 中文字幕免费一区| 欧美久久久久久久久| 国产麻豆精品一区二区| 亚洲午夜精品一区二区三区他趣| 精品久久久久久综合日本欧美| 99国内精品久久| 免费视频最近日韩| 亚洲免费在线观看视频| 精品国产一区久久| 精品视频资源站| 99精品视频免费在线观看| 麻豆专区一区二区三区四区五区| 亚洲精品视频一区二区| 久久精品在这里| 91精品国产色综合久久ai换脸 | 色诱视频网站一区| 久久国产精品区| 亚洲成人1区2区| 亚洲美女视频一区| 国产欧美1区2区3区| 欧美一区二区三区男人的天堂| 色综合天天在线| 国产高清一区日本| 蜜臀a∨国产成人精品| 亚洲一区在线观看视频| 亚洲欧美中日韩| 亚洲欧洲精品成人久久奇米网| 久久久99久久| 精品va天堂亚洲国产| 日韩一级高清毛片| 欧美美女直播网站| 在线免费亚洲电影| 97se亚洲国产综合自在线不卡| 国产高清久久久久| 国产精品自在欧美一区| 看电影不卡的网站| 日韩影院在线观看| 石原莉奈在线亚洲二区| 婷婷开心久久网| 青娱乐精品视频| 青青青爽久久午夜综合久久午夜| 亚洲第一主播视频| 天堂午夜影视日韩欧美一区二区| 亚洲大尺度视频在线观看| 一区二区三区美女| 一区二区三区不卡视频| 亚洲最大成人网4388xx| 亚洲国产精品一区二区久久恐怖片 | 日韩视频免费观看高清完整版| 这里是久久伊人| 日韩精品一区二区三区四区| 久久综合久久综合亚洲| 国产亚洲精品中文字幕| 国产精品沙发午睡系列990531| 国产欧美视频一区二区三区| 国产精品成人一区二区三区夜夜夜| 国产精品第四页| 亚洲一区中文日韩| 天堂精品中文字幕在线| 久久国产精品一区二区| 国产成人亚洲综合色影视| 大尺度一区二区| 在线免费观看日本一区| 91麻豆精品国产91久久久久久| 日韩欧美精品在线| 国产拍揄自揄精品视频麻豆| 亚洲精品国产一区二区精华液 | 午夜欧美大尺度福利影院在线看| 丝袜亚洲精品中文字幕一区| 九一久久久久久| 91视频在线观看免费| 欧美日韩国产精品成人| 久久婷婷一区二区三区| 亚洲人成伊人成综合网小说| 日韩高清一级片| 丁香婷婷综合网| 3751色影院一区二区三区| 国产女人aaa级久久久级| 亚洲一区二区三区四区五区黄| 久久国产精品99精品国产| 成人av网站免费| 欧美一区二区在线观看| 国产精品国产三级国产普通话99| 婷婷六月综合网| 成a人片亚洲日本久久| 欧美一级xxx| **网站欧美大片在线观看| 蜜桃久久久久久久| 99久久精品免费看国产 | 爽好久久久欧美精品| 国产69精品久久久久毛片| 一本色道久久综合狠狠躁的推荐| 日韩一卡二卡三卡四卡| 国产精品电影院| 国产精品66部| 欧美日韩精品一区二区三区四区 | 在线综合+亚洲+欧美中文字幕| 国产精品另类一区| 亚洲va欧美va国产va天堂影院| 成人国产电影网| 精品国产伦一区二区三区观看体验| 一区二区三区在线免费观看| 国产黄色91视频| 日韩欧美国产综合| 夜夜爽夜夜爽精品视频| 国产精品综合视频| 精品久久五月天| 日本不卡免费在线视频| 欧美中文字幕久久| 亚洲人成亚洲人成在线观看图片| 精品一区二区三区免费观看| 欧美剧情片在线观看| 一区二区三区高清在线| 91网站最新网址| 中文字幕一区在线观看| 国产91丝袜在线播放| 久久久美女艺术照精彩视频福利播放|