i have edittext box and also checkbox.user can set the value of noise density from 0.1-1.0.what i want to do is, user can key in the value in edittext and after that press the checkbox,so that the noise will add to the image.How to do this?please help me
function chkSaltPepper_Callback(hObject, eventdata, handles)x = get(handles.TxtNoiseDensity,'String');d = get(handles.TxtNoiseDensity,'Value');if isempty(x)errordlg('Error:Please enter noise density');elsenoiseImage = imnoise(noiseImage,'salt & pepper',d);function TxtNoiseDensity_Callback(hObject, eventdata, handles) input = str2double(get(hObject,'String'));if isnan(input)errordlg('You must enter a numeric value','Invalid Input','modal')uicontrol(hObject)returnelsedisplay(input);end
Best Answer