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??
Show older comments
Answers (1)
Image Analyst
on 22 Nov 2015
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 Comments
Shimaa Baset
on 22 Nov 2015
Image Analyst
on 22 Nov 2015
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.
Shimaa Baset
on 24 Nov 2015
Shimaa Baset
on 24 Nov 2015
alaa adel
on 25 Nov 2015
Shimaa what you did As it still doesn't work with me !
Categories
Find more on Modeling in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!