MATLAB: How to apply high and low-pass filters to .jpeg images

butterworth filterdigital image processingfilter designsobel filter

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

Best Answer

Have you tried imfilter?
kernel = [-1 -1 -1; -1 8 -1; -1 -1 -1]; % Lapacian high pass.
filteredImage = imfilter(grayImage, kernel);