BrCo
Marine/Ocean
- Nov 16, 2006
- 11
Hello all,
I am just beginning with Matlab programming, and I would really appreciate your help in creating the following program:
1. first I need to import a text file with 1024x1024 integer numbers (representing pixel intensities in an image), and put this in a matrix.
2. for each number (=pixel) in the matrix, I need to compare that number to its 8 nighbours (the number above it, below it, to its left etc.) and determine which of the 8 neighbors has the highest value.
3. compute the angle from each number to its highest-value neighbor (for example, if the highest-value neighbor is the one above the number, then the angle is 0 degrees. The number below is 180 degrees, the number to the left is 270 degrees, etc.)
Thanks a lot in advance!
I am just beginning with Matlab programming, and I would really appreciate your help in creating the following program:
1. first I need to import a text file with 1024x1024 integer numbers (representing pixel intensities in an image), and put this in a matrix.
2. for each number (=pixel) in the matrix, I need to compare that number to its 8 nighbours (the number above it, below it, to its left etc.) and determine which of the 8 neighbors has the highest value.
3. compute the angle from each number to its highest-value neighbor (for example, if the highest-value neighbor is the one above the number, then the angle is 0 degrees. The number below is 180 degrees, the number to the left is 270 degrees, etc.)
Thanks a lot in advance!