Hi everyone,
I have matrix R in which each element is integer of range [0 7]. I want to calculate the count of neighbor, let say for pixel value 0 how many times it has the neighbor 1, 2, …, 7. every pixel has eight neighbors, for example
[n1 n2 n3 n4 x n5 n6 n7 n8]
where pixel x have eight neighbors. As a resultant I think we will have an other matrix of 8 x 8, or we can say 8 histograms as we have eight possible values in given matrix R.
I hope I have explained what I want 🙁
Best Answer