## 1 Introduction  
The aerospace manufacturing industry belongs to the field of high-end equipment manufacturing and requires a large number of high-tech technologies as technical support [1]. Among them, the precise and efficient assembly of largescale composite board parts is a representative technical difficulty in the aircraft assembly process [2]. Such parts typically exhibit complex curved surface structures, and their assembly requires extensive drilling and riveeting operations [3]. It is worth noting that the depth of the rivet hole is different from the original design. This is because preparation processes such as bending, bonding, and solidification of the composite board parts cannot be controlled to perfection, resulting in mismatch in shape and thickness [4]. Therefore, it is especially necessary to adaptively adjust the length of the rivet, according to the actual size of the hole [5]. In other words, the automatic drilling and riveting manipulator first needs to measure the current hole depth, and then select a rivet with appropriate length for riveting operations. However, there is currently no equipment that can automatically measure the depth of through holes. At present, the riveting of large composite board parts still relies on manual operations, which include hole depth measurement, rivet selection, and riveting [6]. It is worth noting that largescale aerospace composite parts often have thousands of holes that need to be riveted [7]. Manual riveting consumes a lot of manpower, is inefficient, and is prone to human error [8]. Therefore, there is the urgent need for a method or apparatus that will enable on-machine automatic measurement of through-hole depth, offering vital technical support to automatic drilling and riveting of largescale composite board parts. In-depth research on hole parameter measurement can be roughly divided into the following categories:  
(i) Detection and recognition of hole position and hole shape. [PERSON] et al. [9] proposed a hole detection method based on machine vision to test the cooling holes of fan blades in aero engines. They developed a testing system based on machine vision and laser detection that guarantees the quality of porous components. The system recognizes the appearance of measured parts to detect pore size and distance between adjacent holes on parts. It can recognize the bottom of holes using a laser detection system. The purpose of the system is to detect the distance between holes and the diameter of holes, but not the depth of the holes. [PERSON] et al. [10] studied the identification and positioning of threaded holes. In order to realize automatic assembly in the field of automotive manufacturing, they designed a set of automatic identification and positioning system for thread holes. This method adopts machine vision, auxiliary light-emitting diode (LED), and auxiliary positioning laser generator to identify the threaded hole and get its three dimensions (3D) coordinates. The purpose is to identify the location of the hole without measuring its specific parameters. [PERSON] et al. [11] specialized in the study of non-destructive testing of holes in honeycomb sandwich panels. The whole panel was thermally imaged and image analyzed in order to obtain the position and shape information of the hole on the honeycomb sandwich panel. The hole extracted in this study is mainly a position parameter, and the integrity of the hole, but does not involve the extraction of hole depth parameters. (ii) Hole quality inspection. [PERSON] et al. [12] focused on the field of deep hole measurement. Aimed at holes with a large depth-to-diameter ratio, they proposed an internal structure detection method based on micro vision. Charge-coupled device (CCD) sensors and endoscopes are used to capture images of the hole structure and components, extract the curve from the image, and then detect the quality of the hole structure. This research realizes quality inspection of the inner connector of the micro hole, and provides a method for its detection.