Created
March 17, 2015 22:52
-
-
Save faisal-w/b545d9960bff1949c2d2 to your computer and use it in GitHub Desktop.
Computer Vision lab activities 1.1 - Filtering (Conv)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; close all; | |
%Read a PGM file | |
%pgm_1 = pgmread('shaftim.pgm'); | |
pgm_1 = imread('coins.png'); | |
%Viewing a PGM file as an image | |
my_disp(pgm_1) | |
% Create a averaging filter | |
h = ones(5,5) / 25; | |
%Applying filter | |
I2 = imfilter(pgm_1,h,'conv'); | |
figure,imshow(I2),title('Filtered'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment