apply prewitt filter to image

Sun Mar 27, 2011 8:32 pm

prewitt is one of the well known edge detection filters .it is similar to sobel.It is a first derivative filter.here is a MATLAB example :

Code:

    clc
;
   
    
%% create a new figure to show the image . 
    newImg 
= imread('Water lilies.jpg');
    figure(1);
    %% convert RGB to gray scale.
    grayImage= rgb2gray(newImg)
    imshow(grayImage);
    figure(2);
    %% apply prewitt filter.
    afterFilter = edge(grayImage,'prewitt')
    imshow(afterFilter);
 



Attachments
1.GIF
1.GIF (37.94 KiB) Viewed 11302 times

  Related Posts  to : apply prewitt filter to image
 apply mean filter to image     -  
 apply robert filter to image     -  
 apply sobel filter to image     -  
 apply laplacian filter to image     -  
 Median filter to image     -  
 Image Custom Filter In Java     -  
 Image Noise Filter in Java     -  
 applying wiener filter to image     -  
 Applying canny filter to image     -  
 rank order filter effects on image     -  

Topic Tags

Matlab Image