how to find mean absolute deviation image?

I want to display mean absolute deviation image from a given input jpg Image. MAD is an energy measure that represents regularity of texture.

Respuestas (2)

Guillaume
Guillaume el 20 de Feb. de 2018
I don't see what's difficult about that. Assuming an greyscale image:
mad = mean(abs(yourimage(:) - mean(yourimage(:))))
Image Analyst
Image Analyst el 20 de Feb. de 2018
Cast to double, subtract, then get the mean:
mad = mean2(abs(double(image1) - double(image2)));
mad is a scalar. If you want the IMAGE then don't use mean2():
mad = abs(double(image1) - double(image2));
You need to cast to double so that you don't clip to zero if they're unsigned integer images.

5 comentarios

Khushal Gumgaonkar
Khushal Gumgaonkar el 21 de Feb. de 2018
Hi, I have single Image and I want to display MAD of that. In that case what is your image1 and image2.
Thanks and Regards Khushal
Guillaume
Guillaume el 21 de Feb. de 2018
Perhaps you need to give a more formal definition of what the mean absolute deviation is for you.
I've given you an answer that follows this definition for the mean absolute deviation around the mean. This assumes a single image and gives you a scalar.
Image Analyst uses a different definition that requires two different images and gives you either a scalar or an image.
Khushal Gumgaonkar
Khushal Gumgaonkar el 22 de Feb. de 2018
actually I am doing brain tumour segmentation and MAD is one of the feature. I have applied SWT(Stationary Wavelet Transform) and ordered filtering. Now I want to calculate MAD and display MAD image. Now please tell me which is image1 and image2. Thanks and Regards Khushal
Guillaume
Guillaume el 22 de Feb. de 2018
I'll repeat:
give a formal definition of what the mean absolute deviation is for you
Image Analyst's answer computes the mean of the absolute deviation between two images
My answer computes the mean absolute deviation around the mean of a single image
What you want, an image from a single image, does not appear to match either definition.
Image Analyst
Image Analyst el 22 de Feb. de 2018
I agree with Guillaume. Explain EXACTLY what an "MAD image" is.

Iniciar sesión para comentar.

Preguntada:

el 20 de Feb. de 2018

Comentada:

el 22 de Feb. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by