how to calculate different value between two pixel intensity

Hi,
I'm trying to calculate different value between two pixel intensity.
My input image is an iris image of size 601x77. The pixel-to-pixel evaluation has been done to find the individual pixel intensity. What I want to know is,
-how to calculate different value between pixel intensity of central pixel with its 8 neighboring pixel.
Let say the central pixel with its 8 neighboring pixel is like this:
X - central pixel
D1, V1, D2, H1, D3, V2, D4, H2 are its 8 neighboring pixel.
So I want to calculate different value between pixel intensity X and pixel intensity of its 8 neighboring pixel, one by one, starting from 1st direction followed by 2nd direction until 4th direction. In other word, it start with (X-D1) and the last one will be (X-H2)
This process will be repeated for each pixel in iris image, starting from upper left column to upper right column, row by row.
The output for each pixel intensity is expected to have 8 values correspond to 8 neighboring pixels.
Please help me. Thanks in advance.

Respuestas (0)

Etiquetas

Preguntada:

el 20 de Mzo. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by