My project title is Retinal vessel segmentation, I have completed two steps.
First step is construct direction map.
[0 0 0 1 0 0 0;
0 0 0 1 0 0 0;
0 0 0 1 0 0 0;
0 0 0 1 0 0 0;
0 0 0 1 0 0 0;
0 0 0 1 0 0 0;
0 0 0 1 0 0 0 ]
This is one of the mask (T_d)(there are 12 masks like this). Green channel of a image is taken for the process.
T_di is centered on each pixel p of G and the following parameters are measured:
The arithmetic mean, Adi(p), of the gray-levels of pixels of G included by T_di and aligned along di.
The arithmetic mean, NAdi(p), of the gray-levels of all pixels of G included by T_di and non aligned along di.
The difference, diffi(p) = Adi(p)- NAdi(p) Once all inspections have been accomplished, to assign the direc- tion to each pixel p of G the following parameters are computed, for k = 1,2, … , 12:
m(p) = mink {diffk(p)}
M(p) = maxk {diffk(p)}
This process is for identify the direction of a pixel. If M(p) > 0.25×(12-m(p)), the pixel p is considered as tentatively belonging to a vessel and is assigned in DM the value i representing the direction di at which diffi (p) has the highest value. Otherwise, no direction is considered as the most reliable one for p. The pixel is interpreted as belonging to the background and is assigned in DM the value 0.
Second step is edit direction map
i want to create a matrix Aux from DM as follows
Aux pixels are set to the gray-level 255 before performing the process for any given direction. The value 255,white, is chosen since it identifies the gray-level of pixels certainly belonging to the background. During the ith inspection, only and all the pixels of DM with value in the range [i -2, i + 2] are copied onto Aux, where are assigned value 0. In fact, the pixels currently copied onto Aux were (tentatively) interpreted as vessel pixels during the construction of DM, and it is then reasonable to assign to themthe gray-level 0, black,which is definitely a value for foreground pixels.
Condition checking is we remark that for any i (i = 1,2, … , 12), i + 1and i + 2 are computed modulo 12; as for i -1and i - 2, if these values result to be ≤0 they are increased by 12, so as to avoid copying in Aux pixels with i = 0, which does not correspond to a valid direction for foreground pixels. Again using AUX i created Direction map same as the first step.
My problem is i got output for both the steps, but in edited direction map pixels are scattered very much. I attached the figure file.
Can anyone help me to explain how to tune that pixels?