How to use multiple popup menu in a GUI?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a picture that i want to split it .i wrote below code.
for example if i want to split picture into 5X3 just i should put X=5 and y=3 in that. but i want to do that by GUI.
i created two pop-up menu for selecting number of rows(1-10) and column(1-10) in GUI, but i don't know how can i manage this code whit two pop-up menu in GUI? TQ
%if
%end
clear
rgbImage=imread('C:\safa\flower1.jpg');
x=7;y=8;
[rows columns numberOfColorBands] = size(rgbImage);
interval1=floor(columns/y);
interval2=floor(rows/x);
for i=0:y-1
val1(i+1)=1+(i*interval1);
end
for j=0:x-1
val2(j+1)=1+(j*interval2);
end
val1(1,end)=val1(1,end)-1;
val2(1,end)=val2(1,end)-1;
kk=0;
for jj=1:x
for ii=1:y
kk=kk+1;
q(:,:,:,kk)=imcrop(rgbImage, [val1(ii) val2(jj) interval1 interval2]);
end
end
for jjj=1:x*y
subplot(x,y,jjj)
imshow(q(:,:,:,jjj))
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!