High-precision laser power scale transfer based on shape detection

Abstract. A laser power scale transfer technique was developed based on shape detection; using this technique, detectors can be precisely centered on laser beams, thereby significantly reducing measurement errors introduced by detector nonuniformities and misalignments. A modified imaging scheme was designed and embedded in the scale transfer setup, and the effective resolution was proven to be better than 100  μm, compatible for incident lasers with diameters under 15 mm. For different types of detectors, absolute positioning was realized using objective algorithms with repeatability errors of 7 to 13  μm, which is an improvement of over 30 times the limitation of human-vision-based positioning. Correspondingly, the relative measurement error caused by detector non-uniformity for a typical calibration was reduced by a factor of 19–40 in the scale transfer process. The proposed technique thus has the potential for detector-based optical metrological applications that are influenced by geometric accuracy.


Introduction
Laser power detectors with high accuracies are widely needed in sensing, communications, medicine, and other industrial and scientific fields involving lasers. Meanwhile, owing to the definition of the candela, laser power detectors also provide traceability to the SI system for solar irradiance, detector-based photometry, and spectral radiometry. [1][2][3] Given the significance of laser power metrology, many national metrology institutes around the world have established their own detector-based laser power scales. 4,5 Laser power scales are expected to be transferrable among labs to realize comparisons between different primary standards or calibrations for general instruments, thus to maintain the value systems traceable and reliable.
During the power scale transfer process, detector nonuniformities combined with misalignments constitute one of the factors that can decrease the precision of the scale considerably. However, because nonuniformities are stubborn defects that exist extensively among various types of detectors (e.g., photodiode, 6 pyroelectric, 7 thermopile, 8 and cryogenic 4 ), one promising method to suppress errors is by precisely controlling the relative location of the detector's active area with respect to that of the incident laser.
Most measurements methods generally locate detectors visually, which may cause subjective variations in the positioning results for each operation, especially under different operators. According to the publication of the National Institute of Standards and Technology (NIST) on calibration services, 4 the alignment precision for a laser detector is typically around 1 mm with the help of a ruler, whereas it be further reduced to 0.2 to 0.5 mm with the help of a crosshair or fiber coupler adaptor. Under such conditions, for different detectors operated under different laser wavelengths and ranges, the relative errors could range from 0.01% to more than 2% and may correspond to a 10% to 200% proportion compared with the remaining uncertainty components. [6][7][8][9][10][11][12][13][14][15][16][17][18][19][20] Some researchers have measured detector uniformity by 2D scans and introduced the concept of the "apparent aperture" for more strict characterizations of the detector edges and centers. 4,9 However, because the apparent aperture is determined by the detector's uncertain responsivity and is affected by the scan-laser diameter, it has little consistency with the detector's geometric appearance. This indicates that the relative coordinates of the scanning results may be lost when detectors are transferred amongst independent platforms. Moreover, 2D scans may require additional operation times, especially in the case of thermal detectors, thus limiting their operations in most applications.
In geometrical metrology, machine-vision techniques have been successfully adopted as standard methods in recent times for the measurement of area, curvature. However, for geometric influences in optical metrology, such techniques have not garnered much attention; moreover, there are very few reports on objectively locating the active area of a laser detector with explicit geometric coordinates during laser measurements. In this work, we demonstrate a new approach based on shape detection that attempts to further improve laser power metrology.
2 Imaging Scheme and Shape Detection Algorithms for Power Scale Transfer Process

Imaging Scheme Modified for Laser Detectors
The typical imaging system used in machine-vision-based applications cannot be directly applied to laser detectors; this is because in the detector comparison process, the laser beam is supposed to be incident on the detector at a 90 deg orientation, which would be in conflict with the position of the camera. Imaging lasers from off-center positions is also negated, because for detectors with deep input ports, the active area may be partly blocked, resulting in locating failure, as shown in Fig. 1(a). For these reasons, a modified imaging scheme was designed for specific application to laser power measurement, and its diagram is shown in Fig. 1(b). The imaging structure contains a reflector placed at 45 deg along the main optical axis, with a 45 deg oblique via a hole at its center. On the one hand, the reflector allows the laser beam to pass through and be vertically incident on the detector's active area. On the other hand, it allows imaging along the detector's axis to avoid center separation. Given that the via hole on the reflector blocks a part of the image beam, to maintain the complete field of view (FOV), we use lenses with large effective apertures. While the effective aperture angles of the lenses are larger than the solid angles of the blocked area, most of the image beam would still converge on the CMOS chip of the camera. The FOV that is partly shadowed by the small effective aperture angle is shown in Fig. 1(c) as a contrast. This imaging scheme provides a noninvasive method suitable for most laser detector comparison applications. Additional setups to reduce measurement errors, such as power stabilization and beam shaping, can also be easily coordinated with this imaging scheme. The detailed experimental setup is described in Sec. 3.

Algorithms for Shape Detection
Before performing shape detection, the images are preprocessed. The images are first binarized, and connected component labeling is then applied to find the contiguous regions. 21 In a binary image, a four-connected region composed of a center pixel ðx i ; y i Þ and its adjacent pixels can be determined as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 1 ; 1 1 6 ; 6 6 8 Equation (1) is used to determine the pixels in the four-connected regions. The symbols "∪" and "∩" represent general logic operations, and P indicates the value of a pixel. In a binary image, the pixels only have values of "0" or "1," so logical operations can be directly applied to the pixels. When used in a programming language, these operations may have different forms (such as "k", "&&" in Matlab and C). Once all the pixels are traversed and the connected regions are found, thresholds are set to remove very small regions and obtain the target area. This process is supported by light from a ring illuminator set in the light path, which enhances the contrast of the target area.
Commonly, the geometric center of a detector is selected to coincide with that of the laser beam. The center of a laser beam is easy to locate because its brightness is several orders of magnitude higher than that of the background. The center of the laser point is calculated using the centroid of the target area, with the pixels weighted by their gray values. In the case of the laser power detectors, considering that most input ports are either rectangular or round, shape detection methods are used to distinguish the target area. These methods are introduced in Secs. 2.2.1 and 2.2.2.

Shape Detection for Rectangular Detector
For detectors with rectangular shapes, the minimum bounding rectangle method was used to approximate the ideal boundary. This method is fast and works well even when the boundary has flaws. The main idea of this method is to find a rectangle that tightly encloses the target area. For this purpose, an upright minimum bounding rectangle can be acquired along the image axis by sorting the coordinates of the pixels in the target connected region. However, because the detector may not be parallel to the image axis, the bounding rectangle may need to be rotated to achieve a tight enclosure. To increase the speed of calculation, the scan will not traverse the entire range (0 − π∕2) but only specific discrete angles (θ 1 ; θ 2 ; : : : θ i ) derived from the boundary of the connected region. The angle θ i is determined as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 2 ; 1 1 6 ; 2 9 9 where ðx i ; y i Þ and ðx iþ1 ; y iþ1 Þ are adjacent points on the convex hull of the target boundary. The rotation matrix is then obtained as E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 3 ; 1 1 6 ; 2 3 0 cos θ i sin θ i − sin θ i cos θ i : When multiplied with the rotation matrix, the coordinates of the convex hull are rotated successively by (θ 1 ; θ 2 ; : : : θ i ). Finally, by sorting the coordinates of all the rotated convex hulls, the bounding rectangle with the smallest area enclosing the convex hull is selected as the ideal boundary of the detector. The center of the area is then acquired.

Shape Detection for Round Detector
For round detectors, the circle Hough transform (CHT) method is applied. 21 The CHT allows finding circles in a target area and works well for defective circles or even arcs. Consider a target circle i, which is approximately the ideal boundary of a round detector. The points ðx i ; y i Þ on In the ða; b; rÞ coordinate system, Eq. (4) represents a conical surface with its vertex at ðx i ; y i ; 0Þ, as shown in Fig. 2. It is clear that for any point ðx; yÞ in the original two-dimensional (2D) space, there will be a corresponding conical surface in the 3D coordinate system. However, with respect to the points on circle i, the corresponding conical surfaces all intersect at a single point ða i ; b i ; r i Þ in the 3D coordinate system. Given this feature, a circle can be found if an accumulator is established in the ða; b; rÞ space. For every point ðx; yÞ on the target circle, the weights of the points on the corresponding conical surface are added to the accumulator. After traversing all the pixels in the 2D image, the corresponding point ða i ; b i ; r i Þ in the 3D space with the maximum weight represents the target circle. Here, ða i ; b i Þ is the center of the circle, and r i is its radius. Thus, the center of the circular detector as well as its boundary can be obtained.

Experimental Setup for Implementing the Proposed Approach
The experimental apparatus used in this work has all the modified vision components integrated into the detector calibration device, as shown in Fig. 3. The vision part mainly consists of the  prime lens (50-mm focal length, F1.4 maximum aperture, HC5005A, Chiopt Optotech), the CMOS (1", 2048 × 2048 pixels, Flir Systems) and the ring illuminator. The laser beam on the main optical path passes through a Glan-Taylor prism and a power stabilizer to achieve a power stability of <0.1%. The attenuator and aperture along the main optical path are used to adjust the power level and geometric form of the laser beam. Then, the fixed-diameter power-stabilized laser beam passes through via hole of the reflector, then the ring illuminator, thereafter being incident on the detector for value scale transfer. It is worthy to note that to minimize the blocking angle of the via-hole, the ideal position of via hole should be set overlapping with the imaging aperture diaphragm, such that the prime lens needs to be placed as near as the reflector. The transfer detectors, which commonly include reference detectors and under-test detectors, are mounted on a 2D motion-controlled translation stage. Once the detectors are imaged, programed algorithms are used to locate the center of the detectors and the laser point, then send the coordinates to the 2D translation stage, ensure that the detector centers accurately coincide with the laser points, so as to complete automatic positioning of the detectors during the scale transfer process. The procedures can be processed for more than one round to further reduce the misalignment introduced by imaging distortion.

Resolution Test of the Modified Imaging System
Imaging resolution is one of the key parameters of any vision system and directly limits the precision of the detector position. Based on the object-image relationship, the complete object field is a 75 × 75 mm 2 square area that is composed of 2048 × 2048 pixels. Therefore, each pixel corresponds to an area of ∼37 × 37μm 2 in the object field. Considering the extra aberrations from the lens, imperfect reflector, and via-hole blocking, the effective spatial resolution may be lower.
To determine the upper limit of the imaging resolution of our apparatus, we placed an optical resolution test board at the reference detector surface and used a complete reflector (without via holes) for imaging. The test board was illuminated by a homogeneous backlight, and the lens was focused on the front surface of the board. A complete image of the board is shown in Fig. 4(a). The region labeled "20" is magnified and presented in Fig. 4(c), in which 20 black stripes can be clearly distinguished per 2 mm, while the stripes labeled "40" are blurry, as shown in Fig. 4(b). These image results indicate an effective resolution of ≤100 μm, which is in accordance with the speculation of the object-image relationship.

Effect of Via-Hole Blocking
Although the imaging scheme proposed here guarantees a complete FOV, via hole that allows lasers through still blocks a part of the image beam. A via hole of larger diameter renders the system suitable for more laser applications but will also reduce image quality. To quantitatively determine the effect of the via hole on image quality, we processed reflectors with via holes of diameters 0, 3, 7, 12, and 15 mm; then, we installed and tested the contrast ratios of the stripes labeled as "20." In the experiment, the contrast ratio C is calculated as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 5 ; 1 1 6 ; 4 0 3 where G max and G min represent the grayscale values of the dark and light stripes, respectively.
The grayscale values were acquired from the CMOS sensor, and the test results are presented in Fig. 5. The contrast ratio monotonously decreases from 45% to 6% as the via-hole diameter increases from 0 to 15 mm. From this pattern, we note that the stripes can still be distinguished with the 15 mm via hole. This proves that our apparatus is fully capable of vision functions for detector recognition and positioning. The redundancy for 100-μm resolution guarantees the robustness of the imaging system.

Positioning Repeatability for Rectangular Detector
To maintain generality, we selected a commonly used commercial detector in optical labs as the experimental sample. The device has a square window for laser power detection. By adjusting the lens focal length and illumination, the original image of the detector was clearly captured with sharp and clean edges, as shown in Fig. 6(a). Then, the image is preprocessed on programming software (algorithms introduced in Sec. 2.2 are programmed and executed on Matlab). By setting the appropriate thresholds for the grayscale values and pixel amounts for the connected region, the target connected region that represents the active area of the detector is obtained, as labeled in blue in Fig. 6(b). Then, we applied the minimum bounding rectangle described in Sec. 2.2.1 and acquire its center, and these results are shown in Fig. 6(c). The images in Fig. 6 are 2048 × 2048 pixel arrays. The red asterisk in Fig. 6(c)   To examine the reliability of this positioning process, we tested and analyzed the positioning repeatability of the system. Although the edges of the square are represented by integer coordinates, the center, which is calculated using the edge points can be fractional and surpass the pixel resolution limit. In fact, we can set the datatype of the coordinates as double-precision variables in the calculation program, which would allow 16 significant digits for the results. However, this does not represent real precision. The valid precision is a composite result of image resolution, algorithm, control accuracies of the translation stages, real-time changes in the dynamic image, noisy point, and other interference.
In our experiment, the translation stages have a controlling precision of 5 μm, which sets the upper limit of the positioning precision. The repeatability tests were performed as follows. The spacing of each step was set to 100 μm. Each time the detector is shifted, we perform the imaging and recognition processes and record the center coordinates. The procedure was repeated 28 times in total. The acquired coordinates along the matching direction are plotted against the stepped distance, as shown in Fig. 7.
The x axis represents the stage movement, the 28 steps corresponds to a detector displacement of 2.8 mm. The y axis represents the detector movement scaled by pixels. From the graph, we can see that the coordinates of the recognized center (denoted as blue dots) increase monotonously and smoothly with stage movement. To evaluate the positioning repeatability quantitatively, we subtracted the coordinates using their ideal references (obtained by the leastsquares fitting method, shown in Fig. 7 as the black line); these results are denoted as red dots.  The maximum deviation is thus within 0.7 pixels, corresponding to a distance of 26 μm in the image space. The standard deviation is estimated using the range method as follows: E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 6 ; 1 1 6 ; 7 1 1 sðΔxÞ ¼ ðΔx max − Δx min Þ∕C; (6) where C is the range coefficient (according to the sample size, C 28 ≈ 4), and the estimated standard deviation is 7 μm. The experiment thus demonstrates that the positioning system is reliable. The positioning repeatability can also exceed pixel resolution and surpass the limits of visual alignment. However, this resolution has to be in accordance with the limitations of the translation stage.

Positioning Repeatability for Round Detector
For most laser power detectors, the input ports are either rectangular or round. To inspect the practicality of the proposed method, experiments were also performed for a round detector using the algorithm described in Sec. 2.2.2, and the coordinates of the center points were successfully acquired. The original image, its four major connected regions, and recognized center are displayed in Figs We verified the positioning repeatability of our apparatus for round detectors as well. With spacing steps of 100 μm, a displacement distance of 1.5 mm was traversed along the motor stage, and the centering program was executed for 16 times. The positioning results of the round detector are shown in Fig. 9.
The detector displacement shows a stable and uniform increment along the motor axis, similar to the positioning results of the rectangular detector. Specifically, in the 1.5-mm displacement range, the maximum deviation is within 1.2 pixels, corresponding to a distance of 46 μm in the image space. With a range coefficient of C 16 ≈ 3.5, the standard deviation was estimated to be 13 μm. These repeatability results prove that the proposed positioning system is compatible with different detector shapes, and the positioning reliability is of the order of 10 μm.

Comparison with Conventional Methods and Discussion
In this section, we analyze the amount of additional error from positioning precision. For the axisymmetric probability of uniformity, the experiments focus on a single axis of the detectors. Power-stabilized beams with a diameter of 1 mm and wavelengths of 532 and 980 nm were applied to the detectors. Both detectors were moved horizontally for 4 mm with 100-μm steps. Owing to detector nonuniformities, the response currents generated by the photodiode detector were not constant in the active area. These currents are recorded at every step, normalized, and then plotted against the detector displacement, as shown in Fig. 10. In the 4-mm range, the response current of the Si detector monotonously decreased by 0.8% (peak-to-peak), and for the Ge detector, this relative deviation was a maximum of 1.6% (peak-topeak). The uniformities of both detectors are among the average levels for conventional commercial photodiodes. The red areas in Figs. 10(a) and 10(b) show the repeatability ranges of the positioning operations along the x axis. In Sec. 1, we described the typical alignment limitations for arbitrary laser detectors, 4 which are 1 mm with the help of a ruler and 0.2 to 0.5 mm with the help of a crosshair or fiber coupler adaptor. To further testify the alignment precision by human vision, alignment experiments were conducted in our laboratory with five technicians. The maximum difference based on their observations is 1 mm at 409 nm and 0.8 mm at 635 nm in the vertical direction, which is generally consistent with the data from NIST and common experience. Within the AE0.5-mm visual-alignment range, the light-blue areas represent the corresponding maximum measured deviations, which are 0.19% and 1.2% for the Si and Ge detectors, respectively. For the AE100 μm aperture-alignment range, the corresponding errors were 0.06% and 0.3%, respectively. With respect to the machine-vision system, with positioning precisions of AE13 and AE7 μm, the corresponding measured errors further decreased to 0.01% and 0.03%, respectively.
For typical calibration of the aforementioned detectors, the uncertainty component of detector alignment (u DA ) is combined with the standard uncertainty of the calibrated response (u CR ) and other uncertainty components (u O ): E Q -T A R G E T ; t e m p : i n t r a l i n k -; e 0 0 7 ; 1 1 6 ; 9 0 u CR ¼  The u O is determined by a series of factors, including the reference standard, ammeter, power stabilized and beam shaped laser, lab temperature, humidity, and pressure. Given that the typical value of u O can be generally controlled to under 0.1% by specific means, 4 the corresponding u CR is then reduced by factors of two for the Si detector and 12 for the Ge detector. These results indicate that for detectors with relatively poor uniformities, such as Ge or InGaAs detectors with small active areas, or thermopile detectors with higher power ranges, or photodiode detectors spanning wide spectral ranges, our method shows a significant advantage over the conventional method based on human vision. For finely selected Si detectors with excellent uniformities, if the detectors are used with high-accuracy measurements, such as the transfer standards of the cryogenic radiometer, the remaining uncertainty components may be much smaller (∼10 −5 to 10 −6 ), thus making the uniformity error non-negligible. Our method is thus also helpful for achieving a minimum combined uncertainty.

Conclusion
We developed a technique for laser power scale transfer based on shape detection. A modified imaging scheme was designed and embedded in the scale-transfer setup. The experimental implementations realized highly repeatable positioning for different types of laser detectors, and the repeatability reached an accuracy of 7 to 13 μm, which is at least 30 times greater than that of human vision. For a typical calibration, this technique was demonstrated to be highly effective for error reduction. The relative measurement errors introduced by detector nonuniformities and misalignments were reduced from 0.19% to 0.01% for the Si detector and from 1.2% to 0.03% for the Ge detector. The proposed technique shows significant advantages in the scale transfer process, especially for high-accuracy measurements where nonuniformity errors cannot be neglected or for various detectors with less precise uniformities, such as detectors with small active areas, photodiode detectors spanning wide spectral ranges, or thermopile detectors with higher power ranges. Currently, the proposed technique is limited by the imaging system and only provides an effective resolution of 100 μm, yet it has great potential for further improvement of image resolution, algorithm, integration, etc. The imaging scheme can be easily integrated into existing laser measurement systems, thus making the technique convenient for implementation in optical metrology labs. The technique is expected to become a modularized tool to compress the uncertainty in each scale transfer process within traceability chains and also have potential for other detector-based optical metrological applications that are influenced by geometric accuracies.