| 1. Initialization |
| 1.1 Get the whole depth map image from the output of shape from shading procedure; |
| 1.2 Obtaining the range image by filling the value of each pixel, which is associated with the |
| current processing cell by depth data; |
| 1.3 Compute an estimate of the noise variance at each pixel; |
| 1.4 Computing mean curvature and Gaussian curvature through separable convolution; |
| 1.5 Computing the surface type label image and find all connected components of each surface |
| type label image, sort it to get histogram distribution; |
| 1.6 Extracted seed region through erosion (contraction) operation. |
| 2. Iterative variable order surface fitting |
| 2.1 Perform surface fit from the lowest order, if it is OK using RMS error and region test; |
| 2.2 Then goto 3; |
| 2.3 Else increase the order and fit again; |
| 2.4 if order >4, then return. |
| 3. Region Growing |
| 3.1 Find the new region consisting of compatible connected neighboring pixels. |