3D Construction of Retinal Image: P. Ratpunpairoj, Pikul, W. Kongprawechnon
3D Construction of Retinal Image: P. Ratpunpairoj, Pikul, W. Kongprawechnon
3D Construction of Retinal Image: P. Ratpunpairoj, Pikul, W. Kongprawechnon
(1)
2.1. Fixed Window Cross-Correlation Method
Figure 2. The corresponding window in left and right images .
The technique to determine the position of a pattern in a 2D image is zero mean normalize
cross-correlation. Let f(x,y) is the intensity of the left image at position (x,y), t is the template at
the right image that be shifted by (m,n). The size of the pattern is limited by a small correlation
window. The cross-correlation value is calculated from Equation (2) [3].
(2)
The corresponding position of the pattern is equal to (m
max
,n
max
) at the maximum value of
ZNCC.
2.2. Adaptive Window Cross-Correlation Method
At the edge of the object, the fixed correlation window that covers multiple depth values
(Figure 3b), fails to find the correct depth value [4]. Therefore, the adaptive correlation window
technique adapts the shape of the window to fit for one depth values as shown in Figure 3c.
With adaptive window, depth values estimation is more precise.
Figure 3. (a) 3D model. (b) fixed window. (c) adaptive window.
The algorithm takes 3 steps to compute the depth values. First, the algorithm finds the
cross-correlation value (ZNCC) from all possible sizes of fixed correlation window for .
Second, the algorithm finds the suitable size and center location of the correlation window
which gives the maximum value of ZNCC. The depth value is the distance between searching
point and the point that corresponding to maximum ZNCC value. If the maximum ZNCC value
is less than 0.8, the algorithm interests only the largest correlation window. Finally the
algorithm uses median filter to reduce a noise.
2.3. Graph-Cut Method
This method consist of two sub processed. First, the algorithm finds the best ZNCC value from
every shape of correlation window at each disparity value. Second, graph cut is use to find the
optimum depth image.
Lets G=<V,E> be a graph with nodes V and edges E. There are 2 special nodes: S, source and
T, sink. Each edge in graph between nodes (u,v) is assigned a nonnegative cost c(u,v). Figure 4
shows an example of graph G.
Figure 4. A graph G.
A cut is a partitioning of the nodes into two sets, S and T with the minimum cost. The cost of cut
is the sum of cost that is cut. (Ford & Fulkerson Theorem, 1956) prove that minimum cut is
equivalent to the maximum flow problem. (Ford & Fulkerson, 1962) has developed an
algorithm to solve maximum flow problem. Lets (u,v) be a flow in a graph G. The residual
graph G
r
is constructed by:
Figure 5. Maximum Flow Algorithm.
Labeling the graph in 3D constructing, the energy function is assigned to the cut, (3). The graph
has k labels which are the k possible of depth values. N is the set of neighbor pairs {p,q}. D
p
represents the cost of matching at node p, which is ZNCC value. I
p
and I
q
are the intensity of the
pixels. K is a constant satisfying constraint (3) [5]. is a constant that control the importance of
the smooth term. Higher value of gives a smoother depth image.
(3)
where,
|
(4)
Figure 6. The example of the minimum cut.
3. Results
The input for this algorithm is stereo pair of 1000x1000 fundus images. as shown in Figure 7. It
is converted to gray images before the next step. The algorithms are performed by MATLAB
programming.
Figure 7. (a) The fundus images from the left view. (b) The fundus images from the right view.
3.1. Fixed Window Cross-Correlation
Figure 8 shows the depth images from gray stereo pair with different correlation window sizes,
15x15, 20x20, 30x30 and 40x40 pixels. The approximately time consumption of this method is
1 minute per sample.
Figure 8. (a) window size=15x15, (b) window size=20x20, (c) window size=30x30, (d) window size=40x40.
3.2. Adaptive Window Cross-Correlation
In this method, there are 3 possible sizes of fixed correlation window, 15x15, 20x20 and 30x30
pixels. Figure 9 shows the result of this method before median filter. By adding median filter,
20x20 pixels the result is shown in Figure 9. The approximately time consumption of this
method is 10 minutes per sample.
Figure 9. (a) depth image, (b) is the size of window for each pixel (black is 15x15, gray is 20x20, white is
30x30).
Figure 10. The result after median filter. (a) depth image. (b) 3D model from this method.
3.3. Graph-Cut
The input image is resized from 1000x1000 to 100x100 in this method, due to the time
consumption of the algorithm. The parameter k is set to 15, higher value than the maximum
disparity value is unnecessary. K is set in (5). Two value of (0.1,0.5) are tested to show the
important of smooth term.
(5)
Figure 11 and Figure 12 shows the result of graph cut method with equal to 0.1 and 0.5,
correspondingly. The approximately time consumption of this method (=0.1,0.5) is 60 hours
per sample.
Figure 11. The result from graph-cut method (=0.1). (a) depth image. (b) 3D model from this method.
Figure 12. The result from graph-cut method (=0.5). (a) depth image. (b) 3D model from this method.
4. Conclusion
From graph-cut method zeros value of means the smooth term is neglected. Therefore the
result of graph cut method when =0 is equal to the result from adaptive window method
without low pass filter. When is increasing, noise is reduce, result look smoother. If is too
high, the result could be distorted.
The result of cup-disc segmentation from ophthalmologist is shown in Figure 13. From this
example, the result from graph cut method (=0.1) is corresponding with the result from
traditional method, shown in Figure 14.
Figure 13. The result from ophthalmologist: big circle is disc area, small circle is cup area.
Figure 14. The result in different view from graph cut method with cup and disc from traditional method.
Blue circle is disc area. Green circle is cup area.
To choose appropriate value of the result should be compared to the reference ground truth,
which can be taken by Spectroscopic Optical Coherence Tomography.
References
[1] H. Abe, Y. Kitazawa, Y. Kuwayama, M. Shirakashi, S. Shirato, H. Tanihara, G. Tomita,
and T. Yamamoto. Guidelines for Glaucoma. Japan Glaucoma Society, 2 edn., 2006.
[2] W. Ruengkitpinyo, T. Kondo, W. Kongprawechnon. An Image Segmentation Method for
Glaucoma Detection using the CDR. Sirindhorn International Institute of Technology
Thammasat University, Thailand, 2013.
[3] S. Patil, J. S. Nadar, J. Gada, S. Motghare, S. S Nair. Comparision of Various Stereo
Vision Cost Aggregation Methods. IJEIT, 2013.
[4] T.Kanade, M. Okutomi, A stereo matching algorithm with adaptive window: Theory and
experiment IEEE International Conference on Robotics and Automation, Sacramento. CA,
USA, 1991.
[5] A. Zureiki, M. Devy and R. Chatila, Stereo Matching and Graph Cuts, University of
Toulouse, France, ISBN 978-953-7619-22-0, 2008.