calculating the values from neighbouring values
Show older comments
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 Comments
Matt J
on 30 Sep 2012
This is not clear (at least not to me).
One thing that is particularly confusing is that your angle intervals overlap, so it is not clear what values a neighbour should be assigned: e.g., the angle interval to be assigned value zero (0 degrees to 180 degrees) and the interval to be assigned two (45 degrees to 225 degrees) overlap.
Also, it is not clear what "comparison" these values lead to. Once a neighbour is assigned one of these values, what comparison noperation is done with the center value?
kash
on 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.
kash
on 1 Oct 2012
Answers (0)
Categories
Find more on Image Filtering and Enhancement in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!