I have 2 images and i choose one from popup menu then i choose the type of noise from another popup menu to make it on the choosen image how??

Antworten (1)

You could make the image global in the first callback, or you could call getimage() in the noise callback. In the callback for the popup about noise, get the value and apply the noise you want:
theImage = getimage(handles.axesImage);
noiseSelection = get(handles.popNoise, 'Value');
switch noiseSelection
case 1
noisyImage = imnoise(theImage, ......);
case 2
noisyImage = imnoise(.....); % noise type 2
end
imshow(noisyImage);

5 Kommentare

popNoise would be whatever you called the popup menu control in GUIDE. For example you might call it popup1 or popupmenu1 or popNoise, or whatever.
Value is the property that tells you what item the user has selected and is showing in the popup menu. For example if they chose the third item in the list, the value would be 3.
I do that but it doesnot run What is the problem??
Shimaa what you did As it still doesn't work with me !

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 22 Nov. 2015

Kommentiert:

am 25 Nov. 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by