# A Novel Complete-Surface-Finding Algorithm for Online Surface Scanning with Limited View Sensors

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

Algorithm 1 Flood Fill algorithm on the plane. |

1: FFA on the plane |

2: Begin at Pixel P_{1} |

3: Open-List = {P_{1}}; |

4: Points-Found = {}; |

5: while |Open-List| > 0: do |

6: P_{a} = Open-List.back() |

7: Points-Found.insert(P_{a}); |

8: Open-List.delete(P_{a}); |

9: for direction ∈ {′UP′, ′DOWN′, ′LEFT′, ′RIGHT′} do |

10: P_{b} = P_{a} + direction |

11: if P_{b} is new point AND not boundary point then |

12: Open-List.insert(P_{b}); |

13: end if |

14: end for |

15: end while |

## 2. Method

Algorithm 2 Pseudo-code for the novel CSFA. |

1: Input: Maximum expected curvature ĸ, step-size d, and maximum Cartesian reach ∆X, |

2: Octree = GenerateWorkSpace(ĸ, d, ∆X), |

3: Operator moves sensor to surface, |

4: GetData() →surface position and normal vector P1, N1, |

5: Open-List = {P_{1}} |

6: Points-Found = {} |

7: while |Open-List| > 0 do |

8: P_{a} = Open-List.back() |

9: Open-List.delete(P_{a}) |

10: if 0 < |J_{a}^{Ω} {= InverseKin(P_{a})}| then |

11: Move to J_{a} = min_{motion} J_{a}^{Ω} |

12: GetData() → P_{a}, N_{a}, data |

13: if !data.empty() then |

14: Sensor.z_{direction} → N_{a}, |

15: GetUTdata(), |

16: Octree.insert(P_{a}) |

17: GramSchmidt(N_{a}) → {′UP′, ′DOWN′, ′LEFT′, ′RIGHT′} |

18: for direction ∈ {′UP′, ′DOWN′, ′LEFT′, ′RIGHT′} do |

19: P_{b} = P_{a} + direction |

20: if P_{b} ∉ Octree then |

21: Open-List.insert(P_{b}); |

22: end if |

23: end for |

24: end if |

25: end if |

26: end while |

## 3. Robotic Path Planning

## 4. Results

## 5. Experimental Results

## 6. Discussion

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Callieri, M.; Fasano, A.; Impoco, G.; Cignoni, P.; Scopigno, R.; Parrini, G.; Biagini, G. RoboScan: An automatic system for accurate and unattended 3D scanning. In Proceedings of the 2nd International Symposium on 3D Data Processing, Visualization and Transmission, Thessaloniki, Greece, 6–9 September 2004. [Google Scholar]
- Kriegel, S.; Rink, C.; Bodenmüller, T.; Suppa, M. Efficient next-best-scan planning for autonomous 3D surface reconstruction of unknown objects. J. Real-Time Image Process.
**2013**, 10, 611–631. [Google Scholar] [CrossRef] - Uyanik, C.; Secil, S.; Ozkan, M.; Dutagaci, H.; Turgut, K.; Parlaktuna, O. SPGS: A New Method for Autonomous 3D Reconstruction of Unknown Objects by an Industrial Robot. In Towards Autonomous Robotic Systems; Giuliani, M., Assaf, T., Giannaccini, M.E., Eds.; Springer International Publishing: Cham, Switzerland, 2018; pp. 15–27. [Google Scholar]
- Almadhoun, R.; Abduldayem, A.; Taha, T.; Seneviratne, L.; Zweiri, Y. Guided Next Best View for 3D Reconstruction of Large Complex Structures. Remote Sens.
**2019**, 11, 2440. [Google Scholar] [CrossRef] [Green Version] - Khan, A.; Mineo, C.; Dobie, G.; Macleod, C.; Pierce, G. Vision guided robotic inspection for parts in manufacturing and remanufacturing industry. J. Remanuf.
**2021**, 11, 49–70. [Google Scholar] [CrossRef] - Kopáčik, A.; Erdélyi, J.; Kyrinovič, P. Coordinate Measuring Systems and Machines. In Engineering Surveys for Industry; Springer International Publishing: Cham, Switzerland, 2020; pp. 121–141. [Google Scholar] [CrossRef]
- Lu, K.; Wang, W.; Wu, Y.; Wei, Y.; Chen, Z. An Adaptive Sampling Approach for Digitizing Unknown Free-form Surfaces based on Advanced Path Detecting. Procedia CIRP
**2013**, 10, 216–223. [Google Scholar] [CrossRef] [Green Version] - He, X.M.; He, J.F.; Wu, M.P.; Zhang, R.; Ji, X.G. Reverse Engineering of Free-Form Surface Based on the Closed-Loop Theory. Sci. World J.
**2015**, 2015, 903624. [Google Scholar] [CrossRef] [PubMed] - Zhang, Y.; Chen, K.; Guo, P.; Li, F.; Zhu, J.; Zhu, L.M. Profile tracking for multi-axis ultrasonic inspection of model-unknown free-form surfaces based on energy concentration. Measurement
**2021**, 172, 108867. [Google Scholar] [CrossRef] - Zhou, Z.; Zhang, Y.; Tang, K. Sweep scan path planning for efficient freeform surface inspection on five-axis CMM. Comput.-Aided Des.
**2016**, 77, 1–17. [Google Scholar] [CrossRef] - Guo, D.; Jiang, G.; Wu, Y.; Cheng, J. Automatic Ultrasonic Testing for Components with Complex Surfaces. In DEStech Transactions on Engineering and Technology Research; DEStech Publishing Inc.: Lancaster, PA, USA, 2017. [Google Scholar]
- Morozov, M.; Pierce, S.; MacLeod, C.; Mineo, C.; Summan, R. Off-line scan path planning for robotic NDT. Measurement
**2018**, 122, 284–290. [Google Scholar] [CrossRef] - MS Windows Developer FloodFill Function. Available online: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-floodfill (accessed on 19 March 2021).
- Bhargava, N.; Trivedi, P.; Toshniwal, A.; Swarnkar, H. Iterative Region Merging and Object Retrieval Method Using Mean Shift Segmentation and Flood Fill Algorithm. In Proceedings of the 2013 Third International Conference on Advances in Computing and Communications, Mumbai, India, 18–19 January 2013; pp. 157–160. [Google Scholar] [CrossRef]
- Chu, P.; Cho, S.; Park, Y.; Cho, K. Fast point cloud segmentation based on flood-fill algorithm. In Proceedings of the 2017 IEEE International Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI), Daegu, Korea, 16–18 November 2017; pp. 656–659. [Google Scholar]
- Lee, T.; Lim, S.; Lee, S.; An, S.; Oh, S. Indoor mapping using planes extracted from noisy RGB-D sensors. In Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura, Algarve, Portugal, 7–12 October 2012; pp. 1727–1733. [Google Scholar] [CrossRef]
- He, Y.; Hu, T.; Zeng, D. Scan-flood Fill(SCAFF): An Efficient Automatic Precise Region Filling Algorithm for Complicated Regions. arXiv
**2019**, arXiv:1906.03366. [Google Scholar] - Chen, K.; Xi, J.; Yu, Y. Fast quality-guided phase unwrapping algorithm for 3D profilometry based on object image edge detection. In Proceedings of the 2012 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, Providence, RI, USA, 16–21 June 2012; pp. 64–69. [Google Scholar] [CrossRef]
- Li, Y.; Cui, X.; Wang, H.; Zhao, M.; Ding, H. Comparison of phase unwrapping algorithms for topography reconstruction based on digital speckle pattern interferometry. In AOPC 2017: Optical Spectroscopy and Imaging; Society of Photo-Optical Instrumentation Engineers (SPIE) Conference, Series; Yu, J., Wang, Z., Hang, W., Zhao, B., Hou, X., Xie, M., Shimura, T., Eds.; SPIE: Bellingham, DC, USA, 2017; Volume 10461, pp. 450–461. [Google Scholar] [CrossRef]
- Li, Q.; Bao, C.; Zhao, J.; Jiang, Z. A New Fast Quality-Guided Flood-Fill Phase Unwrapping Algorithm. J. Phys. Conf. Ser.
**2018**, 1069, 012182. [Google Scholar] [CrossRef] - Chen, K.; Xi, J.; Yu, Y.; Chicharo, J. Fast quality-guided flood-fill phase unwrapping algorithm for three-dimensional fringe pattern profilometry. In SPIE/COS Photonics Asia; SPIE: Bellingham, DC, USA, 2010. [Google Scholar]
- Zmudzinski, L. Rough Mereology Based CFill Algorithm for Robotic Path Planning (short paper). In Proceedings of the 28th International Workshop on Concurrency, Specification and Programming, Olsztyn, Poland, 24–26 September 2019; Ropiak, K., Polkowski, L., Artiemjew, P., Eds.; CEUR Workshop Proceedings; CEUR-WS.org; University of Warmia and Mazury: Olsztyn, Poland, 2019; Volume 2571. [Google Scholar]
- Elshamarka, I.; Saman, A. Design and Implementation of a Robot for Maze-Solving using Flood-Fill Algorithm. Int. J. Comput. Appl.
**2012**, 56, 8–13. [Google Scholar] [CrossRef] - Kibler, S.; Raskovic, D. Coordinated multi-robot exploration of a building for search and rescue situations. In Proceedings of the 2012 44th Southeastern Symposium on System Theory (SSST), Jacksonville, FL, USA, 11–13 March 2012; pp. 159–163. [Google Scholar] [CrossRef]
- Tjiharjadi, S.; Setiawan, E. Design and Implementation of a Path Finding Robot Using Flood Fill Algorithm. Int. J. Mech. Eng. Robot. Res.
**2016**, 5, 180–185. [Google Scholar] [CrossRef] - Tjiharjadi, S.; Wijaya, M.; Setiawan, E. Optimization Maze Robot Using A* and Flood Fill Algorithm. Int. J. Mech. Eng. Robot. Res.
**2017**, 6, 366–372. [Google Scholar] [CrossRef] - Ranade, S.; Manivannan, P.V. Quadcopter Obstacle Avoidance and Path Planning Using Flood Fill Method. In Proceedings of the 2019 2nd International Conference on Intelligent Autonomous Systems (ICoIAS), Singapore, Singapore, 28 February–2 March 2019; pp. 166–170. [Google Scholar] [CrossRef]
- Kalisiak, M.; van de Panne, M. RRT-blossom: RRT with a local flood-fill behavior. In Proceedings of the ICRA 2006 IEEE International Conference on Robotics and Automation, Orlando, FL, USA, 15–19 May 2006; pp. 1237–1242. [Google Scholar] [CrossRef]
- Guo, J.; Lin, Y.; Su, K.; Li, B. Motion Planning of Multiple Pattern Formation for Mobile Robots. Appl. Mech. Mater.
**2013**, 284–287, 1877–1882. [Google Scholar] [CrossRef] - Cheney, W.; Kincaid, D. Linear Algebra: Theory and Applications; G—Reference, Information and Interdisciplinary Subjects Series; Jones & Bartlett Learning: Burlington, MA, USA, 2012. [Google Scholar]
- Meagher, D. Octree Generation: Analysis and Manipulation; Defense Technical Information Center: Fort Belvoir, VA, USA, 1982. [Google Scholar]
- Chase, H. Fundamental Forms of Surfaces and the Gauss-Bonnet Theorem. 2012. Available online: https://math.uchicago.edu/~may/REU2012/REUPapers/Chase.pdf (accessed on 1 September 2021).
- Kotani, M.; Naito, H.; Omori, T. A discrete surface theory. Comput. Aided Geom. Des.
**2017**, 58, 24–54. [Google Scholar] [CrossRef] - Simaan, N.; Shoham, M. Singularity analysis of a class of composite serial in-parallel robots. IEEE Trans. Robot. Autom.
**2001**, 17, 301–311. [Google Scholar] [CrossRef] - Simon Perreault’s C++ Octree Implementation. Available online: https://nomis80.org/code/octree.html (accessed on 19 March 2021).

**Figure 3.**The one-step process enabled by the CSFA removes the necessity of accurate digital-twins and world-frame calibration, or lengthy robotic jogging procedures.

**Figure 4.**Demonstration of rasterizing a curved aerofoil component. The robotic path is traced in yellow, demonstrating the raster-like path obtained. (

**a**) Sampling distance: 3 mm. (

**b**) Sampling distance: 10 mm.

**Figure 5.**The scan initially misses sections of the pipe due to the shape’s cross-sectional hole.The missed points are picked up at the end of the scan as there is memory of surface-positions to check. Points found are marked in blue, the robotic path traced in yellow. (

**a**) Initial scan-pass. (

**b**) End-of-scan.

**Figure 6.**A complex flat plate holed with differently sized voids. The robotic path in yellow backtracks to allow for full surface discovery, shown by blue crosses, in the presence of surface-discontinuities.

**Figure 7.**Points discovered while simulating a scan on a bowl and sphere of radius 150 mm with a sampling distance of 3 mm. (

**a**) Concave shape sampling. (

**b**) Sphere sampling.

**Figure 8.**Sampling on a concave shape. The robotic path, that can form irregular patterns without a preferred direction, is shown in yellow. Discovered points on the bowl are shown as blue crosses.

**Figure 9.**Sub optimal horizontal rasterization of a concave surface. Yellow trace lines demonstrate costly re-arrangement procedures to discover all the points shown in blue.

**Figure 10.**Points in bold display the extent of discovery with no over-sampling regime. Sampling rate: 1 mm, radius of bowl: 150 mm.

**Figure 11.**The tri-laser holder, attached to the UR10e flange. The design with rotational symmetry around axis 6 of the robot minimised the footprint of the tool.

**Figure 12.**Automatic online profiling and scanning of an object with non-smooth shape. After a new point is found, the UT probe is applied to collect data. (

**a**) Non-smooth shape created from arranged plates. (

**b**) Resultant point cloud collected by the tri-laser and projected to the World-Frame using the live Joint-position of the robot.

**Figure 13.**Point Cloud of a complex doubly-curved surface profiled in real time, aligned to the CAD model in post-processing.

**Figure 14.**Automatic online single-pass profiling of a surface. (

**a**) Initial non-contact surface discovery and profiling with the tri-laser. (

**b**) Subsequent application of the Conformable-Wedge coupled UT device.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Poole, A.; Sutcliffe, M.; Pierce, G.; Gachagan, A.
A Novel Complete-Surface-Finding Algorithm for Online Surface Scanning with Limited View Sensors. *Sensors* **2021**, *21*, 7692.
https://doi.org/10.3390/s21227692

**AMA Style**

Poole A, Sutcliffe M, Pierce G, Gachagan A.
A Novel Complete-Surface-Finding Algorithm for Online Surface Scanning with Limited View Sensors. *Sensors*. 2021; 21(22):7692.
https://doi.org/10.3390/s21227692

**Chicago/Turabian Style**

Poole, Alastair, Mark Sutcliffe, Gareth Pierce, and Anthony Gachagan.
2021. "A Novel Complete-Surface-Finding Algorithm for Online Surface Scanning with Limited View Sensors" *Sensors* 21, no. 22: 7692.
https://doi.org/10.3390/s21227692