How can I apply high and low-pass filters to .jpeg images?

3 views (last 30 days)
Hello,
I am attempting to apply high and low-pass filters to a series of jpeg images (yielding blurred and line-drawing versions of the source image). Ideally, I would be able to specify the sensitivity threshold in terms of cycles per degree (the edge function in matlab, for example, has a "threshold" parameter between 0 and 1 but I'm not sure how this maps onto c/d).
What is the correct syntax to achieve these filtered images?
Thanks,
Venkat
  2 Comments
Venkat
Venkat on 17 Aug 2012
Is it possible (using fspecial and imfilter) to adjust the sensitivity threshold of the filter (i.e., how many edges are detected / neglected by the high-pass filter or how "blurry" the low-pass filtered version appears)?
Thanks!
Venkat
Image Analyst
Image Analyst on 18 Aug 2012
Yes, the window width and the threshold control that.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 16 Aug 2012
Have you tried imfilter?
kernel = [-1 -1 -1; -1 8 -1; -1 -1 -1]; % Lapacian high pass.
filteredImage = imfilter(grayImage, kernel);
  2 Comments
irvin rynning
irvin rynning on 6 Oct 2014
But that gives negative values for the image in color How can I correct this?
Image Analyst
Image Analyst on 6 Oct 2014
What's wrong with negative numbers? You can still use an image that has positive and negative values.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!