what is a code for push button of filter type by selecting its type from popmenu having various filters like low pass, high pass,median etc.?

2 views (last 30 days)
also mention the code for low pass filter, high pass filter & median filter.

Answers (1)

Image Analyst
Image Analyst on 12 Jul 2016
Get the index of the item that was selected in your popup control from your pushbutton callback function like this:
selectedItemNumber = handles.popup1.Value;
Then use that index number however you want.
  4 Comments
Image Analyst
Image Analyst on 12 Jul 2016
Abhishek, the string property is a list of all the items in the listbox - a cell array of words or sentences. The value property is the index number of the item that they have showing in the popup. For example it the second item is the one that is showing, handles.popupmenu.Value will be 2.
For low pass and high pass filters, you can use conv2() or imfilter. A low pass filter would be like ones(9) or whatever. A high pass filter would have a positive central value surrounded by negative values such that the total sum sums to zero.
For median filtering, you can use medfilt2().

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!