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

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

?? shapeletsurf.m

?? MATLAB Functions for Multiple View Geometry
?? M
字號:
% SHAPELETSURF - reconstructs surface from surface normals using shapelets
%
% Function reconstructs an estimate of a surface from its surface normals by
% correlating the surface normals with that those of a bank of shapelet
% basis functions. The correlation results are summed to produce the
% reconstruction.  The sumation of shapelet basis functions results in an
% implicit integration of the surface while enforcing surface continuity.
%
% Note that the reconstruction is only valid up to a scale factor. However
% the reconstruction process is very robust to noise and to missing data
% values.  Reconstructions (up to positive/negative shape ambiguity) are
% possible where there is an ambiguity of pi in tilt values.  Low quality
% reconstructions are also possible with just slant, or just tilt data
% alone.
% 
%
% Usage:
%  recsurf = shapletsurf(slant, tilt, nscales, minradius, mult, opt)
%                                       6        1        2
% Arguments:
%            slant     - 2D array of surface slant values across image.
%            tilt      - 2D array of surface tilt values.
%            nscales   - number of shapelet scales to use.
%            minsigma  - sigma of smallest scale Gaussian shapelet.
%            mult      - scaling factor between successive shapelets.
%
%   opt can be the string:
%           'slanttilt' - reconstruct using both slant and tilt (default).
%           'tiltamb'   - reconstruct assuming tilt ambiguity of pi.
%           'slant'     - reconstruct with slant only.
%           'tilt'      - reconstruct with tilt only.
%  
% Returns:
%           recsurf     - reconstructed surface.
%
% Remember when viewing the surface you should use 
%   >> axis ij 
% So that the surface corresponds to the image slant and tilt axes
%
% References:
%
% Peter Kovesi, "Surface Normals to Surfaces via Shapelets"
% Proceedings Australia-Japan Advanced Workshop on Computer Vision
% Adelaide, 9-11 September 2003
%
% Peter Kovesi, "Shapelets Correlated with Surface Normals Produce
% Surfaces". Technical Report 03-003, October 2003.
% http://www.csse.uwa.edu.au/~pk/research/pkpapers/shapelets-03-002.pdf

% Copyright (c) 2003-2005 Peter Kovesi
% School of Computer Science & Software Engineering
% The University of Western Australia
% http://www.csse.uwa.edu.au/
% 
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, subject to the following conditions:
% 
% The above copyright notice and this permission notice shall be included in 
% all copies or substantial portions of the Software.
%
% The Software is provided "as is", without warranty of any kind.

% July      2003 - Original version.
% September 2003 - Correction to reconstruction with tilt ambiguity.
% October   2003 - Changed to use Gaussian shapelets.
% February  2004 - Convolutions done via fft for speed.
% March     2004 - Padding of slant and tilt data to accommodate large filters.

function recsurf = shapeletsurf(varargin)
    
    [slant, tilt, nscales, minsigma, mult, opt] = checkargs(varargin(:));
    
    if strcmp(opt,'tiltamb')  % If we have an ambiguity of pi in the tilt 
        tilt = tilt*2;        % work with doubled angles.
    end

    [rows,cols] = size(slant);

    % Check size of largest filter and, if necessary, pad slant and tilt
    % data with zeros so that the largest filter can be accommodated.
    % If this is not done wraparound in the convolutions via the FFT produce
    % artifacts in the reconstruction.
    % Treat max size as +- 3 sigma
    maxsize = ceil(6*minsigma*mult^(nscales-1)); 
    paddingapplied = 0;

    if rows < maxsize | cols < maxsize  % padding needed
      paddingapplied = 1;
      rowpad = max(0,round(maxsize-rows));
      colpad = max(0,round(maxsize-cols));
      fprintf('Warning: To accommodate the largest filter size the\n');
      fprintf('slant and tilt data is being padded from %dx%d to %dx%d \n', ...
                      rows,cols, rows+rowpad, cols+colpad);

      slant = [slant zeros(rows, colpad)
               zeros(rowpad, cols+colpad)];
      tilt  = [tilt  zeros(rows, colpad)
               zeros(rowpad, cols+colpad)];
      origrows = rows; origcols = cols;    % Remember original size.
      [rows,cols] = size(slant);           % Update current size.
    end
    
    % Precompute some values for speed of execution.  Note that because we
    % generally want to use shapelets at quite large scales relative to the
    % size of the image correlations are done in the frequency domain for
    % speed. (Note that in the code below the conjugate of the fft is used
    % because we want the correlation, not convolution.)
    surfgrad = tan(slant);  SURFGRAD= fft2(surfgrad);
    sintilt = sin(tilt);    SINTILT = fft2(sintilt);
    costilt = cos(tilt);    COSTILT = fft2(costilt);
    SURFGRADSINTILT = fft2(surfgrad.*sintilt);  
    SURFGRADCOSTILT = fft2(surfgrad.*costilt);
    
    for s = 1:nscales
        fprintf('scale %d out of %d\r',s,nscales);
        
        % Use a Gaussian filter shape as the shapelet basis function
        % as the phase distortion in the reconstruction should be zero.
        f = gaussianf(minsigma*mult^(s-1), rows, cols);

        [fdx,fdy] = gradient(f);                  % filter gradients
        [fslant,ftilt] = grad2slanttilt(fdx,fdy); % filter slants and tilts
        
        if strcmp(opt,'tiltamb')
            ftilt = ftilt*2;
        end    
        
        % Now perform the correlations (via the fft) as required depending
        % on the options selected. 
        sinftilt = sin(ftilt);   
        cosftilt = cos(ftilt);   
        filtgrad = tan(fslant);   
        
        filtgradsintilt = filtgrad.*sinftilt;
        filtgradcostilt = filtgrad.*cosftilt;
        
        if strcmp(opt,'slanttilt')     % both slant and tilt data available
            FILTGRADSINTILT = fft2(filtgrad.*sinftilt);
            FILTGRADCOSTILT = fft2(filtgrad.*cosftilt);
            fim{s} = real(ifft2(conj(FILTGRADCOSTILT) .* SURFGRADCOSTILT)) + ...
                     real(ifft2(conj(FILTGRADSINTILT) .* SURFGRADSINTILT));
            
        elseif strcmp(opt,'tiltamb')   % assume tilt ambiguity of pi
            FILTGRADSINTILT = fft2(filtgrad.*sinftilt);
            FILTGRADCOSTILT = fft2(filtgrad.*cosftilt);
            FILTGRAD = fft2(filtgrad);
            fim{s} = (real(ifft2(conj(FILTGRADCOSTILT) .* SURFGRADCOSTILT)) + ...
                      real(ifft2(conj(FILTGRADSINTILT) .* SURFGRADSINTILT)) + ...
                      real(ifft2(conj(FILTGRAD) .* SURFGRAD)))/2;    
            
        elseif strcmp(opt,'tilt');     % tilt only reconstruction
            SINFTILT = fft2(sinftilt);
            COSFTILT = fft2(cosftilt);
            fim{s} = real(ifft2(conj(COSFTILT) .* COSTILT)) + ...
                     real(ifft2(conj(SINFTILT) .* SINTILT));      
            
        elseif strcmp(opt,'slant');    % just use slant and ignore tilt
            FILTGRAD = fft2(filtgrad);
            fim{s} = real(ifft2(conj(FILTGRAD) .* SURFGRAD));  
        end
        
    end
    fprintf('\n');
    
    % Reconstruct by adding filtered outputs
    
    recsurf = zeros(size(slant));
    for s = 1:nscales
        recsurf = recsurf + fim{s};
    end


    if paddingapplied  % result is padded - extract the bit we want.
	recsurf = recsurf(1:origrows, 1:origcols);
    end
    
%-------------------------------------------------------------------------
% Function to generate a Gaussian filter for use as a shapelet.
% Usage:
%      f = gaussian(sigma, rows, cols)
%
% Arguments:
%      sigma      - standard deviation of Gaussian
%      rows, cols - size of filter to create

function f = gaussianf(sigma, rows, cols)

    [x,y] = meshgrid( [1:cols]-(fix(cols/2)+1), [1:rows]-(fix(rows/2)+1));
    r = sqrt(x.^2 + y.^2);
    f = fftshift(exp(-r.^2/(2*sigma^2)));

%--------------------------------------------------------------------------
% Function to check argument values and set defaults

function [slant, tilt, nscales, minradius, mult, opt] = checkargs(arg);
    
    if length(arg)<5 
        error('too few arguments');
    elseif length(arg)>6
        error('too many arguments');
    end
    
    slant     = arg{1};
    tilt      = arg{2};
    nscales   = arg{3};
    minradius = arg{4};
    mult      = arg{5};
    
    if length(arg) == 5
        opt = 'slanttilt'; % Default is to assume both slant and tilt values
                           % are valid.
    else
        opt = arg{6};
    end
    
    if ~all(size(slant)==size(tilt))
        error('slant and tilt matrices must match');
    end
    
    if nscales < 1
        error('number of scales must be 1 or greater');
    end
    
    if minradius < .1
        error('minimum radius of shapelet must be greater than .1');
    end
    
    if mult < 1
        error('scaling factor between successive filters should be greater than 1');
    end
    


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费不卡视频| 宅男噜噜噜66一区二区66| 久久综合成人精品亚洲另类欧美| av亚洲精华国产精华精华| 福利电影一区二区| 99re这里只有精品视频首页| 成人高清视频免费观看| 99riav久久精品riav| 91麻豆国产自产在线观看| 成人免费观看男女羞羞视频| 精品亚洲成a人| 成人午夜av电影| 欧美情侣在线播放| 欧美va亚洲va| 亚洲欧美日韩一区二区| 午夜伦欧美伦电影理论片| 日韩av午夜在线观看| 国产精品18久久久久| 色婷婷久久久久swag精品| 91精品1区2区| 26uuu色噜噜精品一区| 亚洲激情网站免费观看| 一个色在线综合| 国产成人av自拍| 日本韩国精品在线| 久久久精品蜜桃| 日韩激情视频网站| 亚洲成av人片在线观看无码| 99久久久国产精品免费蜜臀| 久久成人免费日本黄色| 亚洲精品乱码久久久久久黑人| 欧美成人vr18sexvr| 欧美精品色一区二区三区| 成人午夜又粗又硬又大| 欧美一区二区三区在| 亚洲视频在线观看三级| a美女胸又www黄视频久久| 日韩欧美国产三级电影视频| 一区二区高清在线| 9i在线看片成人免费| 国产精品美女www爽爽爽| 精品一区二区成人精品| 日韩一区二区免费高清| 日韩精品亚洲一区二区三区免费| 色香蕉成人二区免费| 一区二区三区av电影 | 国产麻豆一精品一av一免费| 精品免费国产一区二区三区四区| 三级不卡在线观看| 久久久综合九色合综国产精品| 激情成人综合网| 亚洲欧洲美洲综合色网| 色欧美片视频在线观看| 五月婷婷综合在线| 久久久久国产免费免费| 一本色道a无线码一区v| 日本视频免费一区| 中文乱码免费一区二区| 欧美中文字幕久久| 国产综合久久久久久久久久久久| 久久人人爽爽爽人久久久| 99国产精品一区| 欧美国产国产综合| 99精品热视频| 精品一区二区免费在线观看| 国产精品久久免费看| 精品视频一区三区九区| 久草在线在线精品观看| 亚洲欧美色图小说| 99久久免费精品| 亚洲色图欧洲色图| 99久久综合国产精品| 久久久久久97三级| 粉嫩一区二区三区在线看 | 欧美三级乱人伦电影| 一区二区激情视频| 亚洲欧美日本韩国| 久久久久久久久久久久久女国产乱| 91在线观看地址| 成人a区在线观看| 国产精品亚洲午夜一区二区三区| 首页综合国产亚洲丝袜| 中文字幕日韩精品一区| 中文字幕不卡在线观看| 中文天堂在线一区| ...av二区三区久久精品| 久久久亚洲精品石原莉奈| 久久久久亚洲蜜桃| 久久精品视频在线免费观看 | 亚洲欧洲www| 亚洲资源在线观看| 一区二区三区精品视频| 伊人开心综合网| 日韩精品一级二级 | 日韩精品中文字幕一区二区三区| 欧美日韩激情在线| gogogo免费视频观看亚洲一| 日本不卡的三区四区五区| 久久国内精品自在自线400部| 蜜桃av一区二区三区| 国产成人免费视频一区| 成人免费观看男女羞羞视频| 99久久国产综合色|国产精品| 在线免费亚洲电影| 欧美成人a视频| 亚洲婷婷综合久久一本伊一区| 亚洲欧美电影一区二区| 奇米色一区二区三区四区| 成人动漫av在线| 欧美一区二区三区在线观看视频| 337p亚洲精品色噜噜狠狠| 97se亚洲国产综合自在线观| 精品一区二区三区在线观看| 亚洲在线一区二区三区| 亚洲欧洲色图综合| 自拍视频在线观看一区二区| 国产亚洲精品精华液| 日韩美女在线视频| 日韩精品色哟哟| 欧美亚洲愉拍一区二区| 国产精品欧美综合在线| 狠狠色丁香久久婷婷综合_中 | 久久免费午夜影院| 日韩专区中文字幕一区二区| av激情亚洲男人天堂| 久久久久久久久久久久久夜| 日韩精彩视频在线观看| 欧美精品自拍偷拍动漫精品| 一区二区在线电影| 欧美专区在线观看一区| 亚洲精品视频自拍| 色8久久精品久久久久久蜜| 国产精品福利av| 在线看国产日韩| 欧美国产激情一区二区三区蜜月| 亚洲黄色av一区| 欧美在线观看视频在线| 日韩精品免费专区| 日韩美女一区二区三区四区| 国产精品一区二区久激情瑜伽| 欧美电影免费观看高清完整版在 | 在线成人免费观看| 免费人成网站在线观看欧美高清| 日韩午夜在线观看| 高清久久久久久| 亚洲国产日韩a在线播放| 日韩一区二区在线观看视频播放| 欧美aa在线视频| 欧美肥妇free| 日韩 欧美一区二区三区| 91片在线免费观看| 国产目拍亚洲精品99久久精品 | 亚洲高清免费观看高清完整版在线观看| 激情综合色播激情啊| 欧美久久久久久久久久 | 成人午夜视频在线| 天涯成人国产亚洲精品一区av| 日韩精品一区二区三区视频 | 国产精品素人一区二区| 欧美日本高清视频在线观看| 国产在线日韩欧美| 日本不卡1234视频| 亚洲综合色婷婷| 亚洲久本草在线中文字幕| 精品免费国产二区三区| 欧美性xxxxx极品少妇| 成人av动漫网站| 国产成人福利片| 丁香激情综合国产| 国内外成人在线| 久久精品国产久精国产| 亚洲亚洲精品在线观看| 亚洲欧美日韩在线| 欧美国产1区2区| 欧美一区二区视频网站| 欧美亚洲免费在线一区| 在线欧美一区二区| 欧美午夜影院一区| 在线免费不卡电影| 一本大道综合伊人精品热热| 成人动漫一区二区| jlzzjlzz亚洲女人18| 成人免费视频视频| 成人美女在线视频| 本田岬高潮一区二区三区| 粉嫩av一区二区三区| 91在线视频播放地址| 欧美综合亚洲图片综合区| 欧美另类变人与禽xxxxx| 日韩欧美亚洲一区二区| 欧美精品1区2区| 国产午夜亚洲精品理论片色戒| 久久久久国产精品麻豆ai换脸| 国产肉丝袜一区二区| 亚洲精品你懂的| 九九热在线视频观看这里只有精品| 久久精品国产秦先生| 天堂成人国产精品一区| 亚洲精品国产品国语在线app| 国产亚洲精品福利|