function kj1_KeyPressFcn(hObject, eventdata, handles)
hm=uicontrol(gcf,'style','popupmenu',...
'string','上下翻转|左右翻转|任意角度翻转',...
'position',[250 20 50 20],'KeyPressFcn');
set(hm,'value',1)
v=get(hm,'string');
switch v,
case 1
axes(handles.axes2);
x=(handles.img)
if isrgb(handles.img)
for k=1:3
y(:,:,k)=flipud(x(:,:,k));
end
imshow(y)
else
x=(handles.img);
y=flipud(x);
imshow(y);
end
case 2
axes(handles.axes2);
if isrgb(handles.img)
x=(handles.img);
for k=1:3
y(:,:,k)=fliplr(x(:,:,k));
end
imshow(y)
else
x=(handles.img);
y=fliplr(x);
imshow(y);
end
case 3
axes(handles.axes2);
prompt={'输入参数1:'};
defans={'30'};
p=inputdlg(prompt,'输入参数',1,defans);
p1=str2num(p{1});
y=imrotate(handles.img,p1);
imshow(y);
end;
set(hm,'KeyPressFcn',handles.axes2)
set(gca,'position',[0.2 0.2 0.6 0.6])
title('弹出式菜单的使用')