MATLAB Answers

how to code a threshold push button by taking value from user in edit text box & using that value push button perform thresholding?

1 view (last 30 days)
Abhishek Ghai
Abhishek Ghai on 11 Jul 2016
Answered: Image Analyst on 11 Jul 2016
i want to do the same by gui. a 'edit text' where i can enter number as a input an push button of threshold takes that value & performing threshold operation according to that value. and then show processed image on my 2 axes as i hv 2 axes in mygui.

  0 Comments

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 11 Jul 2016
In your pushbutton callback, have this:
thresholdValue = str2double(handles.edit1.Value);
binaryImage = yourImage < thresholdValue;
axes(handles.axes1);
imshow(binaryImage);
axes(handles.axes2);
imshow(binaryImage);

  0 Comments

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!