calculating the values from neighbouring values
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have a 3x3 matix
A=[1 2 3
4 5 6
7 8 9 ]
in this taking centre pixel value i need to find 8 values for example,assuming
neighbouring values 6is at 0degree to 5
3 is at 45 degree
2 is at 90 degree
1 is at 135 degree
4 is at 180deg
7 ia at 225 deg
8 ia at 270
9 is at 315degree
now i want to compare centre pixel with each neighbour values and if centre pixel values are in direction
0 and 180 i need the valus as 0
45 and 225 values is 2
90 and 270 values is 3
135 and 315 values is 4
so starting fron o degree i need values as
0 2 3 4 0 2 3 4
please help
4 commentaires
Jan
le 1 Oct 2012
Modifié(e) : Jan
le 1 Oct 2012
@kash: Please post what you have tried so far and ask for specific problems. The linked picture is not really clear also. E.g. there is a large vertical bar operator, which is not explained and which transforms 6 and 9.2 to 1, 6 and 8.9 to 1, but 6 and 1.4 to 2. Of course I can invest more time to guess what you want to achieve, but it would be more efficicient, if you explain the problem clearly and try to solve your problems by your own as far as possible.
Réponses (0)
Voir également
Catégories
En savoir plus sur Detection 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!