how do I classify image based on smoothness and high frequency?

12 visualizaciones (últimos 30 días)
nadia naji
nadia naji el 19 de Abr. de 2021
Respondida: Image Analyst el 19 de Abr. de 2021
Hello,
I have some blocks of image and I need to find out the block is smooth or is full of edge, but I really do not know how I can do this. could you please help me with this issue or introduce me to a link or tutorial for this? does matlab have any function for this? thank you.
  3 comentarios
Jonas
Jonas el 19 de Abr. de 2021
oh my bad, you are right. i answered faster than i had to think ;). i delete the comments for better readability
Bjorn Gustavsson
Bjorn Gustavsson el 19 de Abr. de 2021
@Jonas: Nah, no need to, it is a worthwhile suggestion. There are more steps towards a complete answer to this question, my suggestion is a "better step" - but more steps might be necessary - std of the laplacian, entropy of the laplacian etc...

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 19 de Abr. de 2021
nadia, you forgot to post the image. We don't know what it looks like, or how big the blocks are relative to the total image size. Please post the image in your original post.
In the meantime, I suggest you try sdtfilt() and take the mean and see if that works for you.
sdImage = stdfilt(grayImage, true(5));
smoothnessMetric = mean2(sdImage)
If it doesn't work well for you, then we can discuss other metrics, after we see the image(s).

Bjorn Gustavsson
Bjorn Gustavsson el 19 de Abr. de 2021
For measure of smoothness I'd go with something like this:
d2I = del2(I); % laplacian of your image (grayscale, double).
From there we could do many calculations of the statistics of the second-derivative-variations:
avg_d2I = mean(d2I(:));
avg_d2I2 = mean(d2I(:).^2);
std_d2I = std(d2I(:));
mad_d2I = mad(d2I(:));
Just to mention a couple. You have to judge what values correspond to smooth and non-smooth in your data. You could also look at the gradients instead of the laplacian, but you can to doodle with that in the same way as I've sketched here...
HTH

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by