what is MAD of an image? on which basis it calculated the difference between images?

8 views (last 30 days)
Can anybody please explain MAD of an image caculated on which basis? how it calculate mad on pixels?

Answers (2)

Bjorn Gustavsson
Bjorn Gustavsson on 28 Feb 2014
I have a statistics toolbox function MAD that calculates either the mean or median absolute deviation. That is:
MEAN(ABS(X-MEAN(X))
or
MEDIAN(ABS(X-MEAN(X))
Can't be bothered to read more of the help for MAD, so cant tell you how it handles matrices, but if it works on columns and you want the MAD of the entire 2-D image use the ":" operator:
MAD(X(:))
HTH,

Image Analyst
Image Analyst on 28 Feb 2014
I have a demo for computing the MAD image. I use it to find outliers and replace them, thus repairing a noisy image. I'll upload it later this morning once I get to my other computer. I don't use the Stats Toolbox - I just use the median function and nlfilter() from the Image Processing Toolbox to filter each pixel based on a local neighborhood. Basically MAD is a method for finding outliers, so I found the outliers (noise) and replaced them with good pixels (from the median filtered image).
  3 Comments
Bjorn Gustavsson
Bjorn Gustavsson on 28 Feb 2014
Well, it is also an alternative to standard deviation for measuring spread of data with long tails in the distribution around the mean/centre.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!