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

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

?? rotateimage.m

?? Rotates an image by the angle degrees in the % CCW direction. Degrees may be any number. % The funct
?? M
字號:
%%  Image_Rotated = RotateImage(Image, degrees)%%  Rotates an image by the angle degrees in the %  CCW direction.  Degrees may be any number.  %  The function will put degrees in the range 0 %  to 360 degrees and then into a range of -45 to 45%  degrees after performing elementary 90 degree rotations.%%  The rotation performed is the 3 Pass Separable rotation%  using FFT-based methods to perform the skews.  Aliased spectral %  components are masked after EACH skew using the MaskImage function.%%  Normal Rotation%%  |x'| = | cos(a) -sin(a) ||x|%  |y'|   | sin(a)  cos(a) ||y|%%  3 Pass Rotation%%  |x'| = | 1  -tan(a/2) || 1       0 || 1  -tan(a/2) ||x|%  |y'|   | 0     1      || sin(a)  1 || 0     1      ||y|%%  This function pads images during the rotation process.  Images %  can be non-square, but odd dimensions will cause incorrect padding%  Therefore an error is returned, if a dimension is odd.%%  Dimensions need not be powers of 2 and will not necessarily be padded%  to a power of 2.  The Matlab fft functions are capable of non-power of 2%  transforms.%%  Note: The results often display some Gibbs ringing.%%  Example:%%  load mri%  img = double( squeeze(D(:,:,1,16)) );%  img_rot = real( RotateImage(img,45) );%  figure;%  subplot(1,2,1); imagesc(img,[0 88]); axis image; %  subplot(1,2,2); imagesc(img_rot,[0 88]); axis image;%%************************************************************************%*                    (c) Copyright 1998				                *%*                  Biomathematics Resource 			       	        *%*                      Mayo Foundation                              	*%************************************************************************%% 11/22/98  Implemented by Edward Brian Welch, edwardbrianwelch@yahoo.com%function[Image] = RotateImage(Image, degrees)% NOTE:% This function is partially vectorized (only single loops, % no double loops) to gain some benefit in speed.  The tradeoff % is that more memory is required to hold the large matrices.% It would be possible to completely vectorize certain parts % of the mfile, but that would require large amounts of memory% and would also make the code less readable.[xdim ydim] = size(Image);if mod(xdim,2)==1 | mod(ydim,2)==1,   error('RotateImage() can only rotate images with even dimensions.');end% Determine type of image to returnif isreal(Image),   real_flag = 1;else   real_flag = 0;end% Put degrees into the range [0,360]while degrees<0,   degrees = degrees + 360;endwhile degrees>360,   degrees = degrees - 360;end% Count number of elementary 90 degree rotations% to put rotation into range [-45,45]count=0;while degrees>45,   degrees = degrees - 90;   count = count + 1;endImage = rot90(Image, count);% Calculate Trigonometric Values% Not Necessary in Matlab implementation to Negate degrees % so that CCW rotations are positivetheta = (degrees/360)*2*pi;sin_theta = sin(theta);negtan_thetadiv2 = -tan(theta/2);%---------------------------% FIRST SKEW% |x1| = | 1  -tan(a/2) ||x|% |y1| = | 0     1      ||y|%---------------------------% Pad image rows to double the row sizeImage2 = zeros(2*xdim,ydim);Image2( (xdim/2+1):(xdim/2+xdim),:)=Image;% Forward FFT image rowsImage2 = fft(Image2, 2*xdim, 1);% Calculate image's center coordinatesxno = (2*xdim-1)/2;yno = (ydim-1)/2;% Prepare to use the Fourier Shift Theorem% f(x-deltax) <=> exp(-j*2*pi*deltax*k/N)*F(k)% Initialize constant part of the exponent% expression.  The skew is row dependent.cons1 = (-2.0*pi/(2*xdim))*negtan_thetadiv2;% Calculate k values (Nyquist is at x=xno)k_array = zeros((2*xdim),1);for x=1:(2*xdim),          if (x-1)<=xno,         k_array(x) = (x-1);      else         k_array(x) = (x-1-2*xdim);      endendfor y=1:ydim,   % Skew dependent part of expression	cons2 = cons1 * (y-1-yno);      % Calculate the angles   angle_array = cons2*k_array;      % Rotate the complex numbers by those angles   sin_ang = sin(angle_array);   cos_ang = cos(angle_array);   newr = real(Image2(:,y)).*cos_ang - imag(Image2(:,y)).*sin_ang;   newi = real(Image2(:,y)).*sin_ang + imag(Image2(:,y)).*cos_ang;   Image2(:,y) = newr + newi*i;end%---------------------------% SECOND SKEW% |x2| = | 1       0 ||x1|% |y2| = | sin(a)  1 ||y1|%---------------------------% Pad the image columns in hybrid spaceImage22 = zeros(2*xdim, 2*ydim);Image22(:,(ydim/2+1):(ydim/2+ydim) )=Image2;% Perform a Forward FFT on the image columnsImage22 = fft(Image22, 2*ydim, 2);% Mask aliased components from SKEW 1Image22 = fftshift(Image22);Image22 = MaskImage( Image22, 1, 0, negtan_thetadiv2, 1);Image22 = fftshift(Image22);%  Inverse FFT the image rowsImage22 = ifft(Image22, 2*xdim, 1);% Calculate image's center coordinatesxno = (2*xdim-1)/2;yno = (2*ydim-1)/2;% Initialize constant part of the exponent% expression.  The skew is column dependent.cons1 = (-2.0*pi/(2*ydim))*sin_theta;% Calculate k values (Nyquist is at y=yno)k_array = zeros(1,(2*ydim));for y=1:(2*ydim),      if (y-1)<=yno,      k_array(y) = (y-1);   else      k_array(y) = (y-1-2*ydim);   endendfor x=1:(2*xdim),     % Skew dependent part of expression   cons2 = cons1 * (x-1-xno);      % Calculate the angles   angle_array = cons2*k_array;      % Rotate the complex numbers by those angles   sin_ang = sin(angle_array);   cos_ang = cos(angle_array);   newr = real(Image22(x,:)).*cos_ang - imag(Image22(x,:)).*sin_ang;   newi = real(Image22(x,:)).*sin_ang + imag(Image22(x,:)).*cos_ang;   Image22(x,:) = newr + newi*i;end%---------------------------% THIRD SKEW% |x3| = | 1  -tan(a/2) ||x2|% |y3| = | 0     1      ||y2|%---------------------------% Forward FFT image rowsImage22 = fft(Image22, 2*xdim, 1);% Mask aliased components from SKEW 2Image22 = fftshift(Image22);Image22 = MaskImage( Image22, 1, sin_theta, 0,  1);Image22 = fftshift(Image22);% Inverse FFT the image columnsImage22 = ifft(Image22, 2*ydim, 2);% Crop image columnsImage2 = Image22(:,(ydim/2+1):(ydim/2+ydim) );% Calculate image's center coordinatesxno = (2*xdim-1)/2;yno = (ydim-1)/2;% Initialize constant part of the exponent% expression.  The skew is row dependent.cons1 = (-2.0*pi/(2*xdim))*negtan_thetadiv2;% Calculate k values (Nyquist is at x=xno)k_array = zeros((2*xdim),1);for x=1:(2*xdim),            if (x-1)<=xno,         k_array(x) = (x-1);      else         k_array(x) = (x-1-2*xdim);      endendfor y=1:ydim,   % Skew dependent part of expression	cons2 = cons1 * (y-1-yno);      % Calculate the angles   angle_array = cons2*k_array;      % Rotate the complex numbers by those angles   sin_ang = sin(angle_array);   cos_ang = cos(angle_array);   newr = real(Image2(:,y)).*cos_ang - imag(Image2(:,y)).*sin_ang;   newi = real(Image2(:,y)).*sin_ang + imag(Image2(:,y)).*cos_ang;   Image2(:,y) = newr + newi*i;end% Forward FFT the image columnsImage2 = fft(Image2, ydim, 2);% Mask aliased components from SKEW 3% The /2.0 factor is there because columns have been cropped in halfImage2 = fftshift(Image2);Image2 = MaskImage( Image2, 1, 0, negtan_thetadiv2/2.0, 1);Image2 = fftshift(Image2);% Inverse 2D FFT the imageImage2 = ifft2(Image2);% Crop the rows to obtain final resultImage = Image2( (xdim/2+1):(xdim/2+xdim),:) ;% Return a Real image if original Image was Realif real_flag==1,   Image = real(Image);end%%  Image_Masked = MaskImage(Image, a, b, c, d)%%  Masks an image according to the (x,y) coordinate%  transform matrix:  |x'| = | a  b | * |x|%                     |y'|   | c  d |   |y|%%  (x,y) positions that become (x',y') outside the boundary%  of the original image will be set to 0.%%  The masking is softened at the edges by a convolution.%%%************************************************************************%*                    (c) Copyright 1998				                *%*                  Biomathematics Resource 			       	        *%*                      Mayo Foundation                              	*%************************************************************************%% 11/22/98  Implemented by Edward Brian Welch, edwardbrianwelch@yahoo.com%function[Image] = MaskImage(Image, a, b, c, d)% NOTE:% This function is highly vectorized (no loops)% to gain some benefit in speed.  The tradeoff is that % more memory is required to hold the large matrices[xdim ydim] = size(Image);% Calculate center of the imagexno = (xdim-1)/2;yno = (ydim-1)/2;x_values = 1:1:xdim;x_values = x_values - 1 - xno;x_mat = repmat(x_values',1,ydim);y_values = 1:1:ydim;y_values = y_values - 1 - yno;y_mat = repmat(y_values,xdim,1);% Calculate new x values for this column    new_x_mat = a*x_mat + b*y_mat;% Calculate new y values for this columnnew_y_mat = c*x_mat + d*y_mat;% Points whos x or y position is greater than% absolute value of xno or yno respectively% should be masked (set to zero).new_x_mat = abs(new_x_mat) - xno;new_y_mat = abs(new_y_mat) - yno;% Only valid points will have a non-zero value after % the operation belownew_x_mat = sign(new_x_mat)-1;new_y_mat = sign(new_y_mat)-1;% ANDing the matrices shows good pointsmask = new_x_mat & new_y_mat;% Soften mask edgesNx=ceil(xdim*.2);Ny=ceil(ydim*.2);mask = conv2(mask,ones(Nx,Ny)/(Nx*Ny),'same');Image = Image.*mask;          

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜一区二区三区| 看国产成人h片视频| 日韩精品欧美精品| 成人午夜av影视| 在线91免费看| 亚洲精品高清在线观看| 久久精品国产色蜜蜜麻豆| 色88888久久久久久影院按摩| 精品久久久久av影院| 亚洲午夜三级在线| 91免费小视频| 国产精品午夜免费| 国产剧情一区在线| 欧美不卡激情三级在线观看| 亚洲一区二区在线播放相泽| 不卡电影一区二区三区| 久久天堂av综合合色蜜桃网| 日韩成人免费看| 欧美性猛片aaaaaaa做受| 国产精品福利影院| 国产99久久久国产精品潘金网站| 69久久夜色精品国产69蝌蚪网| 玉足女爽爽91| 91蝌蚪porny| 中文字幕精品一区| 国产.欧美.日韩| 久久久久久久久久久久久夜| 蜜桃久久av一区| 日韩精品一区二区三区视频播放| 午夜视频一区二区三区| 欧美日韩日日夜夜| 日韩中文字幕一区二区三区| 宅男噜噜噜66一区二区66| 婷婷综合五月天| 91麻豆精品国产91久久久久久久久| 亚洲成年人网站在线观看| 欧美三级中文字幕| 日韩av网站在线观看| 91精品国产综合久久久久久久| 青青草国产精品97视觉盛宴| 欧美一区二区不卡视频| 老司机午夜精品| 久久久久久久久久久久电影| 丁香激情综合五月| 亚洲色图第一区| 欧美三级日韩三级| 免费成人性网站| 久久精品一区蜜桃臀影院| 丰满少妇在线播放bd日韩电影| 亚洲国产精品国自产拍av| 99久久久无码国产精品| 亚洲一区二区在线观看视频| 欧美一级日韩免费不卡| 精品一区二区三区的国产在线播放| 久久久久久久久久久电影| 成年人网站91| 日韩在线卡一卡二| 精品久久国产字幕高潮| 成人理论电影网| 亚洲123区在线观看| 欧美电视剧免费全集观看| 丁香亚洲综合激情啪啪综合| 依依成人综合视频| 精品久久久久久无| 91丨porny丨国产入口| 日韩在线a电影| 国产精品理论片在线观看| 欧美午夜电影在线播放| 韩国成人精品a∨在线观看| 中文字幕日韩一区| 7777精品伊人久久久大香线蕉超级流畅 | 日韩电影在线免费| 国产欧美精品在线观看| 精品视频在线看| 懂色av中文一区二区三区| 亚洲超碰精品一区二区| 国产香蕉久久精品综合网| 欧美色网一区二区| 成熟亚洲日本毛茸茸凸凹| 爽好多水快深点欧美视频| 国产精品丝袜在线| 欧美大白屁股肥臀xxxxxx| 色综合久久综合网| 国产乱色国产精品免费视频| 亚洲一区电影777| 欧美国产成人在线| 日韩一区二区在线观看视频 | 91美女在线观看| 国内精品伊人久久久久av影院| 一二三四社区欧美黄| 中文字幕av一区二区三区高| 欧美一区二区成人| 欧美日韩激情在线| 日本黄色一区二区| 99久久免费精品| 国产1区2区3区精品美女| 精品制服美女久久| 日本vs亚洲vs韩国一区三区 | 欧美精品一区二区三区四区 | 久久综合色天天久久综合图片| 欧美三区在线观看| 欧美午夜片在线看| 色综合天天性综合| 99国产欧美久久久精品| 国产一区久久久| 黑人精品欧美一区二区蜜桃| 日韩电影在线观看一区| 日本成人在线电影网| 亚洲妇女屁股眼交7| 一区二区国产盗摄色噜噜| 中文字幕一区在线观看| 成人免费一区二区三区视频 | 成人性生交大片免费看中文| 精品亚洲欧美一区| 久久99深爱久久99精品| 九九国产精品视频| 精品在线免费观看| 国产在线精品一区二区三区不卡 | 精品国产乱码久久久久久闺蜜 | 免费在线观看视频一区| 日本最新不卡在线| 久久国产剧场电影| 精品无人码麻豆乱码1区2区| 国产乱子伦视频一区二区三区| 国产一区二区成人久久免费影院 | 国产亚洲欧洲一区高清在线观看| 精品国产乱码久久久久久久| 国产亚洲1区2区3区| 国产精品乱码久久久久久| 国产精品久久久久久久久动漫| 国产精品久久久久久久久久免费看| 国产精品福利影院| 亚洲综合激情另类小说区| 日本中文字幕一区| 国产麻豆成人精品| 91亚洲精品一区二区乱码| 欧美亚州韩日在线看免费版国语版| 欧美亚洲国产一区二区三区va | 久久免费国产精品| 国产精品视频yy9299一区| 亚洲精品高清视频在线观看| 日韩精品一级中文字幕精品视频免费观看| 日本亚洲最大的色成网站www| 久久99国产精品麻豆| 成人午夜av在线| 欧美日韩中文字幕一区二区| 欧美成人精品福利| 专区另类欧美日韩| 日韩中文字幕一区二区三区| 国产精品99久久久久久宅男| 91搞黄在线观看| 欧美精品一区二区三区蜜桃视频 | 成人少妇影院yyyy| 欧美人妇做爰xxxⅹ性高电影| 精品国产91久久久久久久妲己| 欧美激情一区二区三区全黄| 亚洲图片自拍偷拍| 国产成人精品一区二| 欧美日韩综合色| 国产精品亲子伦对白| 天天综合网 天天综合色| 国产91在线观看| 日韩一区二区三区观看| 亚洲欧美另类久久久精品| 另类中文字幕网| 欧美性xxxxxxxx| 国产精品情趣视频| 久久国产精品第一页| 欧美三级日韩三级| 中文字幕中文字幕一区| 久久99日本精品| 欧美日韩精品一区二区三区四区| 国产精品免费久久久久| 美腿丝袜在线亚洲一区 | 91麻豆精品国产无毒不卡在线观看| 国产欧美综合色| 美国十次了思思久久精品导航| 在线欧美日韩国产| 国产精品国产馆在线真实露脸 | 精品免费国产二区三区 | 综合久久国产九一剧情麻豆| 九九久久精品视频 | 欧美视频一区二| 椎名由奈av一区二区三区| 国产成人精品免费一区二区| 欧美va亚洲va| 日韩1区2区3区| 欧美剧情片在线观看| 亚洲韩国精品一区| 欧美中文字幕一区二区三区亚洲| 国产精品国产三级国产普通话蜜臀 | 日韩欧美你懂的| 日本最新不卡在线| 欧美一二三区在线观看| 亚洲成a人在线观看| 欧美日韩国产首页| 调教+趴+乳夹+国产+精品| 欧美日韩免费观看一区二区三区| 樱桃国产成人精品视频| 在线亚洲一区二区|