Filter löschen
Filter löschen

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

6 Ansichten (letzte 30 Tage)
nadia naji
nadia naji am 19 Apr. 2021
Beantwortet: Image Analyst am 19 Apr. 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 Kommentare
Jonas
Jonas am 19 Apr. 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 am 19 Apr. 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...

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 19 Apr. 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 am 19 Apr. 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

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by