<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">

Exported from Notepad++
clc; clear all; close all; a=imread('cameraman.tif'); [m n]=size(a); w=(1/9)*ones(3,3); %lpf_mask w1=[1 1 1;1 -8 1;1 1 1 ]; %hpf_mask b=conv2(double(a),double(w)); c=conv2(double(a),double(w1)); figure,imshow(a); title('Original Image'); figure,imshow(uint8(b)); title('LPF Image'); figure,imshow(uint8(c)); title('HPF Image');