Code covered by the BSD License  

Highlights from
Anisotropic Diffusion (Perona & Malik)

4.5

4.5 | 16 ratings Rate this file 185 Downloads (last 30 days) File Size: 8.01 KB File ID: #14995

Anisotropic Diffusion (Perona & Malik)

by Daniel Lopes

 

14 May 2007 (Updated 16 May 2007)

A set of filters that perform 1D, 2D and 3D conventional anisotropic diffusion (gray scale data).

| Watch this File

File Information
Description

Anisotropic diffusion is a powerful image enhancer and restorer based on the PDE of heat transfer.

The implementation details are described in "P. Perona and J. Malik, Scale-Space and Edge Detection Using Anisotropic Diffusion, IEEE Transactions on Pattern Analysis and Machine Intelligence, 12(7):629-639, July 1990" and in "G. Grieg, O. Kubler, R. Kikinis, and F. A. Jolesz, Nonlinear Anisotropic Filtering of MRI Data, IEEE Transactions on Medical Imaging, 11(2):221-232, June 1992".

The algorithm was implemented to perform upon 1D, 2D and 3D gray-scale signals.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (20)
22 May 2007 David Gavilan

Is this really anisotropic? In file anisodiff2D.m there's an example using s = phantom(512) + randn(512); ad1 = anisodiff2D(s,15,1/7,30,2); Now try with a simple gaussian: hG = fspecial('gaussian',31,3); ad2 = imfilter(s,hG,'conv','symmetric'); Compare ad1 and ad2 and tell me if there's any difference.

22 May 2007 Daniel Lopes

Anisotropic diffusion is known to:
- smooth the signal;
- preserve strong edges;
- enhance the contrast of edges.

Contrary to spatially filtering the signal with a Gaussian, anisotropic diffusion doesn't smooth across the edges.

A recommend the following procedures to clarify your doubt relatively to the anisotropic implementation:

- run the example of anisodiff1D(.) [the visual effect of anisotropic filtering is more evident when applied to a 1D signal]

- instead of using a Gaussian with a small sigma try a higher one, e.g.,
hG = fspecial('gaussian',31,9); % sigma = 9;
Who will see that even if you increase the number of diffusion iterations the edges will prevail, contrary to the smoothing provided by the Gaussian filter.

Another advice: try reading and understanding the code with greater attention before rating it. The references to the articles aren´t there for nothing you now! :P

20 Aug 2007 Bruno Carozza

Thanks, works perferctly!

20 Sep 2007 jianfei ge

Thanks!

02 Jan 2008 ivan scardanzan

Anisotropic Diffusion
see also on matlabcentral :
File Id: 3710 Average rating: 4.62
Size: 142 KB # of reviews: 26
Submitted: 2003-07-10 Downloads: 6020
Subscribers: 8
Keywords: NonLinear Diffusion, Anisotropic Diffusion, Coherence-Enhancing Diffus

11 Feb 2008 albert j.  
09 Apr 2008 Daniel Mark

Thank you very much for this excellent code.

13 May 2008 Andrew Rein

Thanks for the code! it is very clearly written. For the 2D case in your code it is defined dx,dy and dd. What's the purpose of this? I didn't see it in the paper (have only read Perona). Also delta (lambda in the paper) suggest up to 1/4. Is it because you're using extra neighbours for the implementation?

02 Jun 2008 Daniel San Martin Pascal Filho

Daniel meu chará, você me quebrou um galhão com essa implementação. Obrigado.

04 Aug 2008 Mohammad Ali Balafar

Thanks for your code. it is very clear and useful.

07 Oct 2008 Solaree Shi

Thanks for it!

28 Nov 2009 Forrester Cole  
28 Nov 2009 Forrester Cole

Nice work. Though I think the examples could be a bit more helpful. For example, setting KAPPA = 0.2 or so, rather than KAPPA = 30, in the examples would show the anisotropic behavior more clearly. It took me a while to figure out that I needed to bring KAPPA way down from 30 before I saw results similar to Fig. 11 in the Perona and Malik paper.

04 Feb 2010 Joshua Groves

Thanks for this. I translated your code and created a Python version that I will hopefully be using for image analysis.

08 Mar 2010 Nitin Kumar

Thanks for sharing

06 Apr 2010 matlab user

thank you !

one question is that I can't duplicate the fig 3 in
G. Grieg, O. Kubler, R. Kikinis, and F. A. Jolesz, Nonlinear Anisotropic Filtering of MRI Data, IEEE Transactions on Medical Imaging, 11(2):221-232, June 1992".

the fig 3 show iterative edge sharpening, but my simulation gives me reverse result... can anyone give me a sample code for results similar to fig 3?

thank you in advance.

16 Mar 2011 Anand Muglikar

This is an awesome file that I used for driving out the noise in blood-slides and preserving the cell boundaries to detect malaria parasite.

18 Apr 2011 Faraz

Many thanks, but it gives me a blur image of a mamogram instead of enchancing the contrast?
can you/anyone comment y?

17 Jun 2011 Xianming Liu

Many thanks. That's just what I want.

12 Jul 2011 Tripp

Very useful and powerful filter

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
filtering Daniel Lopes 22 Oct 2008 09:12:45
filtering Caio Frizzone 09 Jan 2009 11:17:02
perona Cristina McIntire 05 Feb 2009 13:38:44
diffusion Cristina McIntire 05 Feb 2009 13:38:44
anisotropic Cristina McIntire 05 Feb 2009 13:38:44
malik Cristina McIntire 05 Feb 2009 13:38:44
scalespace Cristina McIntire 05 Feb 2009 13:38:44
filtering Cristina McIntire 05 Feb 2009 13:38:44
grayscale Cristina McIntire 05 Feb 2009 13:38:44
filtering Jianglin MA 07 Apr 2009 05:49:48
anisotropic Jianglin MA 07 Apr 2009 05:49:58
anisotropic Stephan 05 May 2009 10:33:20
anisotropic Salman Masoumi 12 Jul 2009 11:03:36
anisotropic Igor Solovey 12 May 2010 11:22:19
anisotropic Aris 11 Jun 2010 11:04:25
anisotropic siavash mirahmadi 20 Jun 2010 12:20:37
anisotropic mops zaki 27 Sep 2010 15:27:27
diffusion Arun Babu 16 Nov 2010 03:01:16
perona Ariel 20 Mar 2011 07:15:35
diffusion Ariel 20 Mar 2011 07:15:41
anisotropic Ariel 20 Mar 2011 07:15:48
malik Ariel 20 Mar 2011 07:15:54
anisotropic Arnold Arnold 06 May 2011 04:56:40
anisotropic yuan da 12 Jun 2011 21:34:31
anisotropic Daniel Lopes 11 Jul 2011 10:12:22
diffusion Daniel Lopes 11 Jul 2011 10:12:29
anisotropic Avner Atias 13 Jul 2011 04:23:37
anisotropic XiaoFeixia 23 Jul 2011 07:18:21

Contact us at files@mathworks.com