Code covered by the BSD License  

Highlights from
Diffusion Distance

Be the first to rate this file! 12 Downloads (last 30 days) File Size: 1.71 KB File ID: #19839

Diffusion Distance

by Matthew Foster

 

07 May 2008 (Updated 07 May 2008)

Calculate the diffusion distance between histograms

| Watch this File

File Information
Description

DIFFUSION_DISTANCE calculate the diffusion distance between matrices
dist = diffusion_distance(im1, im2, [sig, dim], threshold, pad_type])
[dist, iter] = diffusion_distance(im1, im2) compute the diffusion distance
between im1 and im2 (histograms).

Optionally returns the number of iterations. This number will be limited by
the size of the histograms, and the threshold value, which can be set
manually, or will take the value 1e-4.

The padding method used by the filtering stages can be set using the 4th
argument, and defaults to circular. For available options, see help imfilter.

Reference:
Diffusion Distance for Histogram Comparison
Ling and Okada, Proc. CVPR, 2006

Example:
% Calculate the diffusion distance between two
% matrices of random integers.
a = round(10.*rand(10));
b = round(10.*rand(10));
dist = diffusion_distance(a, b);

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Jun 2011 WurmD

the check "all(size(dist) >= size(kernel))"
prevents the comparison of vectors.

To be able to compare vectors with this distance, i've changed it to:
"~isscalar(dist)"

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
image analysis Matthew Foster 22 Oct 2008 10:00:16
histogram Matthew Foster 22 Oct 2008 10:00:16
distance Matthew Foster 22 Oct 2008 10:00:16
nonlinear diffusion Matthew Foster 22 Oct 2008 10:00:16
filtering Matthew Foster 22 Oct 2008 10:00:16
distance geng 28 Jul 2011 22:09:55
filtering geng 28 Jul 2011 22:09:58
histogram geng 28 Jul 2011 22:10:01
image analysis geng 28 Jul 2011 22:10:04

Contact us at files@mathworks.com