Finding areas of data based on value threshold and contiguous size, both height and length.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I would like to find the indices of this matrix where values are >3 and are larger than 3 x 5 in size. I have tried using the Image Processing Toolbox and binaryVector...
Any help much appreciated.
A = [2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5;
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5;
2.5 2.5 3.5 3.5 3.5 3.5 3.5 3.5 2.5 2.5 2.5 2.5;
2.5 2.5 3.5 3.5 3.5 3.5 3.5 3.5 2.5 2.5 2.5 2.5;
2.5 2.5 3.5 3.5 3.5 3.5 3.5 3.5 2.5 2.5 2.5 2.5;
2.5 2.5 3.5 3.5 3.5 3.5 3.5 3.5 2.5 2.5 2.5 2.5;
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5;
2.5 3.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5;
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 3.5 3.5 2.5;
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 3.5 3.5 2.5;
2.5 2.5 3.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5;
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5]
0 commentaires
Réponses (1)
Jan
le 23 Avr 2021
Start with:
B = (A > 3);
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 1 0 0 0 0
0 0 1 1 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 0 1 1 0
0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
Now mention, what you have tried with the image processing tooolbox and which problems occurred.
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!