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

📄 rotate_image.m

📁 推箱子游戏,这是用matlab语言编写的源程序
💻 M
字号:
% rotate image
close all
figure('position',[232 41 560 637]);
a1=axes('position',[0.1,0.2,0.8,0.7]);
A=imread('File0363.jpg');
% \copyright:zjliu
% Author's email: zjliu2001@163.com
Aa=A(1100:1600,600:1000,:); % cut away trashy part of image
clear A;
I1=imshow(Aa);
Ma=5; % the default value of the maximum angle
ww=uicontrol(gcf,'style','slider','unit','normalized',...
    'position',[0.14,0.07,0.8,0.04],'value',0.5,...
    'SliderStep',[0.01,0.01],'callback',...
    ['a=get(ww,''value'')*Ma;iA=imrotate(Aa,-a,''bilinear'');',...
        'set(I1,''CData'',iA);']);
uicontrol(gcf,'style','text','unit','normalized',...
    'position',[0.12,0.12,0.55,0.04],...
    'string','Please select the maximum angle:',...
    'fontsize',16,'fontname','times new roman',...
    'BackgroundColor',[0.8,0.8,0.8]);
An=[5,10,20,30,40,50,60,70,80,90];
po1=uicontrol(gcf,'style','popupmenu','unit','normalized',...
    'position',[0.68,0.12,0.08,0.04],...
    'string','5|10|20|30|40|50|60|70|80|90',...
    'value',1,'callback',...
    ['n=get(po1,''value'');Ma=An(n);',...
        'set(I1,''CData'',iA);']);

⌨️ 快捷键说明

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