## 3 Results  
### Three-Dimensional Reconstruction System Construction  
The proposed focus evaluation function is applied to the real defocused image sequence collected in the experiment, and three-dimensional reconstruction is performed. Usually, the three-dimensional morphology of the real object is not known, so it is difficult to compare the reconstruction results. This paper uses two methods to analyze the reconstruction results. One is to conduct a subjective comparative analysis to verify the effectiveness and practicality of the algorithm; the other is to use a more accurate line laser profiler to scan the depth of the object surface, compare the scanning results with the reconstructed depth, and use the profiler scanning depth as a reference to calculate the reconstruction accuracy of the algorithm in terms of depth. Based on the built image acquisition system, multiple groups of defocused images of different objects are taken, and resistors, capacitor grooves, and coin surfaces are taken, respectively. A group of real defocused image sequences are collected, which are 30 frames of resistor images with different focusing degrees, and the single resolution is 1280 \(\times\) 1024; as shown in Figure 8 (set 1) and Figure 9 (set 2), several frames of defocused images in the collection are shown. Figure 8: Image sequence acquired for depth of field analysis. A set of 30 defocused images captured by adjusting the sample position along the optical axis. Each image corresponds to a different focal plane, enabling the reconstruction of the full-focus image and extraction of 3D morphology through focus evaluation algorithms. Figure 7: DOF imaging equipment setup. Photograph of the experimental setup used for depth of field (DOF) imaging under microscopic conditions. The system integrates a precision displacement stage, an industrial microscope, and a CCD camera to capture defocused image sequences for 3D morphology reconstruction. The configuration enables high-resolution imaging across varying focal planes to overcome the limitations of shallow DOF. Using the proposed focus evaluation algorithm, the entire defocus image sequence is traversed. In all defocus images, for each pixel, the point with the largest focus evaluation value is selected, that is, the clearest point. This point is considered to be the best focus state at that position. This point is selected as a point in the full focus image, and all the selected best focus points are combined to form a full focus image. In this full focus image, each pixel is the clearest point selected from the original image sequence, so every detail of the entire image looks clear. Figure 10a shows the all-in-focus image obtained by focus stacking, while Figure 10b presents the pseudo-colored depth map representing the 3D morphology of the ablation crater. In order to more accurately compare the reconstruction results, the pressing groove is selected as the object, and the cross-sectional view of the reconstruction result at the pixel in a certain direction (vertical 1500) is selected from the reconstructed depth map, and multiple data points are selected from it to obtain the depth of the groove. The depth map and cross-sectional depth of the reconstruction result are shown in Figure 11.  
Similarly, Figure 11 shows the reconstruction results of test set 2. Therefore, the proposed microscopic 3D reconstruction method based on defocused images achieved a reconstruction accuracy of 81.3%, as determined by comparing the measured groove depth (0.3267 mm) to the reference value obtained from a high-precision profilometer. This result demonstrates the feasibility and effectiveness of the proposed method for microscale surface morphology reconstruction. Figure 10: Reconstruction of ablative topography. (**a**) All-in-focus image obtained by stacking the defocused image sequence using focus evaluation. (**b**) Pseudo-colored depth map showing the 3D morphology of the ablation crater. Figure 9: Image sequence.