From: JohnMC on
"JohnMC " <nirmathink(a)gmail.com> wrote in message <h7l00j$ci9$1(a)fred.mathworks.com>...
> I need to implement an algorithm on a 10*10 image, and i will reshape the image matrix to a 100*1 array before calculation.
> The problem is i also need to use the neighboring info. for each node in the matrix during calculation, like: calculating some weighting factor of one pixel based on the value of its 4 closest neighbors.
> I have two questions:
> 1. Is there a function I can use to detect the neighboring index, while the boundary and corner situation is also considered ?
> 2. Is there any way to keep the neighboring information after I reshape the image matrix into a 1-D array for further calculation?
> Thanks.

I hope I made myself clear. The most important question to me is that: I want to reshape an image into 1D array and keep the neighbouring information for each element of that 1D array. I will use the neighbouring information for calculation and restore the revised image.
Thanks a lot !

 | 
Pages: 1
Prev: Delay between two signals
Next: complex numbers?