Interferometer light intensity adjustment method, system, device, and medium
By separating the brightness evaluation and saturation monitoring regions in the interferometer, calculating the quantile brightness and saturation index, and automatically adjusting the light intensity, the inconsistency and overexposure problems of light intensity adjustment in traditional interferometers are solved, and stable optical measurement conditions are achieved.
Patent Information
- Application Number
- CN202611674048.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional interferometers rely on manual operation for light intensity adjustment, resulting in poor measurement consistency and an inability to accurately balance overall brightness with local overexposure. Furthermore, automatic adjustment is easily misled by background dilution or local bright spots, leading to distorted phase calculations.
By acquiring real-time preview images from the interferometer, the brightness evaluation area and saturation monitoring area are determined, the quantile brightness index and saturation index are calculated, the light intensity control quantity is determined based on the index, and multiple frames of images are continuously acquired under the same control quantity for judgment to ensure that the brightness is within the target range and there is no local overexposure.
It achieves automated and robust adjustment of the interferometer light intensity, ensures consistency of multi-frame phase shift or frequency sweep measurement conditions, avoids random fluctuations in the light source and noise interference, and ensures that the measurement is carried out under optimal stable conditions.
Smart Images

Figure CN123185458A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical measurement technology, and in particular to an interferometer optical intensity adjustment method, system, device and medium. Background Technology
[0002] Interferometers use an imaging camera to record the bright and dark fringes formed by the reference light and the measurement light to calculate the measured surface shape or wavefront. The acquired image must be within the camera's effective grayscale range: if the image is too dark, the fringe modulation is easily overwhelmed by readout noise and quantization errors; if the image is too bright, bright fringes, local high-reflectivity areas, or stray reflection areas will reach the camera's full scale, resulting in saturation truncation and distorted phase calculations. Traditional equipment often relies on manual observation or automatic camera exposure adjustment. Manual adjustment is heavily influenced by personal experience and lacks consistency; automatic camera exposure alters integration time, readout noise, and grayscale response, disrupting the consistency of multi-frame phase shift measurements. Furthermore, automatic adjustment based on the average grayscale of the entire image is susceptible to background dilution, while using only the maximum grayscale is easily misled by hot pixels or local bright spots, resulting in an inability to balance overall brightness and local overexposure, and prone to misjudgment when a single frame accidentally falls within the target range. Summary of the Invention
[0003] The purpose of this invention is to provide an interferometer light intensity adjustment method, system, device and medium, which can solve the problems of light intensity adjustment relying on manual operation, destroying measurement consistency and failing to accurately balance overall brightness and local overexposure in traditional methods.
[0004] To address the aforementioned technical problems, this invention provides an interferometer optical intensity tuning method, comprising: Acquire real-time preview images of the interferometer to determine the brightness evaluation area and saturation monitoring area; Calculate the quantile luminance index within the luminance evaluation area and the saturation index within the saturation monitoring area; The light intensity control amount is determined based on the saturation index and the quantile brightness index, and the light intensity control amount is sent to the light intensity actuator to obtain a new preview image; Determine whether the preset number of preview images acquired continuously under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the conditions are met, the adjustment ends and the current light intensity control value is maintained.
[0005] To address the aforementioned technical problems, the present invention also provides an interferometer optical intensity tuning system, comprising: The image acquisition module is used to acquire real-time preview images of the interferometer and determine the brightness evaluation area and saturation monitoring area; The index calculation module is used to calculate the quantile luminance index within the luminance evaluation area and the saturation index within the saturation monitoring area. The control decision module is used to determine the light intensity control amount based on the saturation index and the quantile brightness index, send the light intensity control amount to the light intensity actuator, and obtain a new preview image; The determination and locking module is used to determine whether the preset number of preview images acquired continuously under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the requirements are met, the adjustment is ended and the current light intensity control value is maintained.
[0006] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the interferometer light intensity tuning method described above.
[0007] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the interferometer light intensity tuning method described above.
[0008] The beneficial effects of this invention are that the interferometer light intensity adjustment method provided by this invention calculates the quantile brightness index of the brightness evaluation area and the saturation index of the saturation monitoring area separately, and processes the overall fringe brightness evaluation and local overexposure monitoring independently, avoiding the average gray level of the whole image being diluted by the background or the maximum gray level being misled by hot pixels; the light intensity control quantity is determined according to the saturation index and the quantile brightness index, and multiple frames of images are continuously acquired under the same control quantity for judgment. Only when the brightness meets the standard and the saturation does not exceed the limit is the adjustment ended and the control quantity maintained, overcoming the misjudgment caused by a single frame accidentally falling into the target band or random fluctuations of the light source, and ensuring that the interferometric measurement is carried out under the optimal and stable light intensity conditions.
[0009] In addition, the present invention also provides a corresponding interferometer optical intensity adjustment system, electronic device and computer-readable storage medium for the interferometer optical intensity adjustment method, which have the same or corresponding technical features as the interferometer optical intensity adjustment method mentioned above, and have the same effect. Attached Figure Description
[0010] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart of an interferometer light intensity tuning method provided in an embodiment of the present invention; Figure 2This is a schematic diagram of the interferometer light intensity tuning synthesis process provided in an embodiment of the present invention; Figure 3 Comparison of interference fringes under different light intensities and local saturation states provided in embodiments of the present invention; Figure 4 This is a schematic diagram of the light intensity modulation process curves under different initial states provided in the embodiments of the present invention; Figure 5 This is a schematic diagram of the structure of the interferometer optical intensity adjustment system provided in an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0013] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0014] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0015] Embodiments of this invention provide an interferometer light intensity adjustment method. When executing this method, the camera's exposure time, gain, and measurement timing parameters can be kept constant. Only the light flux entering the interference light path is changed through a physical light intensity actuator, thereby ensuring the consistency of multi-frame phase-shift or frequency-sweep measurement conditions. This invention can be applied to optical measurement equipment that requires controlling the imaging light intensity and avoiding saturation, such as phase-shift interferometry, Fourier transform interferometry, frequency-sweep interferometry, white-light scanning interferometry, and digital holography.
[0016] The following section describes the method in detail, taking into account the execution flow of the interferometer light intensity adjustment method. Figure 1 The flowchart of the interferometer light intensity tuning method provided in the embodiments of the present invention is as follows: Figure 1 As shown, the method includes: S101. Acquire real-time preview images of the interferometer and determine the brightness evaluation area and saturation monitoring area.
[0017] Real-time preview images refer to the image frames continuously output by the camera during the intensity adjustment phase, used to observe the current interference state. The brightness evaluation region refers to a specific image range used to calculate the overall fringe brightness level, which can be marked by a corresponding mask. The saturation monitoring region refers to a specific image range used to statistically determine whether pixel grayscale has reached full scale, which can also be marked by a corresponding mask.
[0018] During step S101, the present invention acquires a preview image from the camera in real time and generates a mask covering the effective interference aperture and excluding the background as a brightness evaluation area based on the image center, short side size, or effective aperture edge. The saturation monitoring area can be the same as the brightness evaluation area or can be set as an expanded area including the brightness evaluation area. By distinguishing between the brightness evaluation and saturation monitoring areas, interference from background noise on the brightness evaluation is avoided.
[0019] In specific implementation, let the first... The preview image is denoted as The image width is denoted as Image height is denoted as The brightness evaluation area should ideally cover the effective interference aperture and exclude the background outside the aperture. For circular or near-circular apertures located in the center of the image, the center and radius of the area can be set according to the image center and the size of the shorter side: ; In the formula, The x-coordinate of the region center The ordinate is the vertical axis of the region's center. For the region radius, Let the ratio of the region radius to the shorter side of the image satisfy the following condition: .
[0020] In a preferred embodiment, the radius of the evaluation region occupies 30% to 45% of the shorter side of the image. This results in the brightness evaluation region: ; In the formula, The set of pixels in the brightness evaluation region. These are the pixel coordinates of the image.
[0021] For non-circular apertures, the brightness evaluation area can be set as an ellipse, polygon, ring, partitioned region, effective pixel mask, or an area automatically obtained based on the workpiece edge. When the workpiece position changes, this area can be translated, rotated, or scaled according to the alignment result. The saturation monitoring area can also be set using the same or similar geometric shape and coordinate calculation method described above, simply by expanding the coverage to include potentially highly reflective areas.
[0022] S102. Calculate the quantile luminance index within the luminance evaluation area and the saturation index within the saturation monitoring area.
[0023] The quantile brightness index (also known as high quantile grayscale) refers to the grayscale value at a preset quantile position after sorting the pixel grayscale values within the brightness evaluation area by size. The saturation index (also known as saturation ratio) refers to the number, proportion, or continuous area of pixels within the saturation monitoring area whose grayscale values reach or exceed the saturation threshold.
[0024] In step S102, this invention does not employ methods where the average grayscale of the entire image is easily lowered by a dark background or where the maximum grayscale is easily dominated by hot pixels. Instead, it extracts high-quantum grayscale as a quantile brightness index to stably reflect the overall usable grayscale of bright stripes; simultaneously, it independently calculates the proportion of saturated pixels. The independent calculation of the quantile brightness index and the saturation index can accurately distinguish between two distinct light intensity states: overall darkness and local overexposure, providing a precise basis for subsequent control decisions.
[0025] This invention uses high-resolution grayscale within the effective aperture to represent the overall level of bright stripes. Compared to the average grayscale of the entire image, it is less affected by the background outside the aperture, and compared to the absolute maximum grayscale, it is less affected by individual hot pixels or reflective points. Normal brightness control and saturation protection use resolution brightness and saturation indices respectively. Even if the resolution brightness is close to the target, if the saturation of a local pixel exceeds the allowable value, the light is immediately reduced. Therefore, an overall brightness value is not used to replace local overexposure checks.
[0026] In practice, the pixel grayscale values within the brightness evaluation area are used to form a sample set, and the quantile level is selected. , define the first The frame quantile brightness index is: ; In the formula, For the first Percentile brightness index of a frame image This indicates that the quantile level is taken as quantile functions, For the first Image in coordinates The pixel grayscale value at that location, This indicates the removal of the boundary. For grayscale value variables, For the first The cumulative gray-level distribution function of an image within the brightness evaluation region.
[0027] quantile level Preferably, it is 70% to 99%, more preferably 80% to 95%. Taking 90% as an example, after sorting the pixels in the region from smallest to largest, approximately 90% of the pixels do not exceed this grayscale value. This indicator can reflect the approximate level of bright stripes, but it is not entirely determined by a single hot pixel or reflective point like the maximum grayscale. In practical applications, the quantile brightness indicator can also be calculated using alternative methods such as weighted quantiles, representative values after block division, truncated mean, or high quantile values of the stripe envelope.
[0028] In practice, a saturation threshold is set within the saturation monitoring area. Let the total number of pixels in this region be . , No. The number of pixels in a frame whose grayscale level reaches or exceeds the saturation threshold is Then the saturation pixel ratio is: ; In the formula, For the first The proportion of saturated pixels in a frame image, also known as the saturation index. This represents the total number of pixels within the saturation monitoring area. For the first The frame satisfies the pixel grayscale value The number of pixels, This is the saturation threshold.
[0029] The saturation monitoring area can be the entire image range, the effective interference aperture range, an expanded range of the brightness evaluation area, or a specific image area defined by a mask after excluding fixed bad pixels and known irrelevant reflective areas. Saturation triggering conditions can include the saturation pixel ratio exceeding a preset threshold, the number of saturated pixels exceeding a preset threshold, the appearance of continuous saturation areas, or saturation across multiple consecutive frames. For registered fixed hot pixels, they can be excluded first using a bad pixel table to avoid repeated triggering of protection by a single bad pixel.
[0030] To ensure a margin between the target brightness range and the camera's full-scale range, the following formula can be used to check the reasonableness of the parameters: ; In the formula, For the target quantile brightness, For brightness tolerance, To allow for grayscale margin.
[0031] The above inequalities are only used to prevent the target band from being set too close to full scale, and cannot be used to conclude that the image is free of local saturation. Therefore, successful adjustment still requires independent satisfaction of the saturation ratio or other saturation criteria. The above saturation thresholds can be set to a fixed grayscale value based on the camera's bit depth, or determined based on black level, linear range, exposure time, gain, or camera calibration curves; warning thresholds and protection thresholds can also be set separately to reduce the step size in advance when approaching saturation. Parameters such as preset thresholds and brightness tolerances can be set based on experience or according to the measurement accuracy requirements.
[0032] S103. Determine the light intensity control quantity based on the saturation index and the quantile brightness index, send the light intensity control quantity to the light intensity actuator, and obtain a new preview image.
[0033] Light intensity control refers to the numerical command used to drive the light intensity actuator to change the light flux entering the interference optical path. The light intensity actuator is the hardware device that physically changes the light intensity.
[0034] During step S103, the light intensity control amount is determined based on the saturation index and quantile brightness index calculated in step S103. If the saturation exceeds the limit, the light intensity control amount in the light reduction direction is immediately calculated; if the saturation is not complete, the light intensity control amount in the light enhancement or light reduction direction is calculated based on the comparison result between the quantile brightness index and the target range. After the calculation is completed, it is sent to the execution mechanism, and a new preview image after execution is obtained.
[0035] In one implementation, step S103 determines the light intensity control amount based on the saturation index and the quantile brightness index. Specifically, this may include: when the saturation index exceeds a preset allowable value, determining a light intensity control amount that adjusts towards light reduction; when the saturation index does not exceed the preset allowable value, determining a light intensity control amount based on the comparison result between the quantile brightness index and the target range; wherein, when the quantile brightness index is lower than the lower limit of the target range, determining a light intensity control amount that adjusts towards light enhancement; when the quantile brightness index is higher than the upper limit of the target range, determining a light intensity control amount that adjusts towards light reduction; when the quantile brightness index is within the target range, maintaining the current light intensity control amount and continuing multi-frame determination.
[0036] Accordingly, after obtaining a new preview image in step S103, the process may further include: if the current saturation index of a preset allowable value exceeds the preset allowable value and a light reduction backoff is performed, and if the current saturation index of a preset number of consecutively acquired preview images under the same light intensity control quantity does not exceed the preset allowable value, the current light intensity control quantity is recorded as a safety boundary; in conventional light enhancement adjustment, the candidate light intensity control quantity is restricted to the direction-related allowable range formed by the safety boundary and the physical limit of the actuator, so that the adjusted light intensity control quantity does not exceed the safety boundary; when the safety boundary has not yet been established, the light intensity control quantity is constrained according to the physical range of the actuator.
[0037] In practice, when saturation is detected, a forced reduction in light intensity can be implemented directly, and a safety boundary is recorded after confirming that there is no saturation. The safety boundary refers to the critical value of the light intensity control that has been confirmed not to cause local overexposure. If subsequent enhancement is required, the candidate light intensity control value is forcibly limited to within the safety boundary. This solves the problem of the system repeatedly oscillating between overexposure, light reduction, enhancement, and reexposure due to local high reflectivity, thus improving the safety of adjustment.
[0038] The aforementioned preset allowable values can be obtained empirically or pre-calibrated based on the camera's linear response range and the signal-to-noise ratio requirements of interferometry. After saturation occurs, the light is first reduced, and a direction-dependent safety boundary is established after confirming no saturation in consecutive images. A conservative approach can directly limit the control quantity. When higher brightness is required, verification can be performed step-by-step between the safety position and the nearest saturation position, thus balancing the avoidance of re-saturation with the expansion of the usable brightness range.
[0039] In specific implementation, after recording the safety boundary, the following steps may also be included: if the quantile brightness index is lower than the lower limit of the target range and brightness enhancement is required, the light intensity control quantity corresponding to the safety boundary is used as the starting reference, and the light intensity control quantity position where oversaturation occurred in the historical record is approximated; during the approximation process, new light intensity control quantities are issued step by step with an amplitude smaller than the preset trial step size; new preview images are acquired under each level of light intensity control quantity, and the current light intensity control quantity is updated to the new safety boundary only when the current saturation index of the preset number of consecutively acquired preview images does not exceed the preset allowable value; if the current saturation index exceeds the preset allowable value again during the approximation process, the process reverts to the light intensity control quantity corresponding to the previous safety boundary and terminates the current brightness enhancement approximation.
[0040] During the process of approaching the safety boundary, since the target brightness has not yet been reached, even if the quantile brightness index is below the lower limit of the target range, the conventional coarse adjustment step size is not used. Instead, a forced automatic switch to a fine adjustment step size is initiated. Through this step-by-step probing, the system avoids directly crossing the safety boundary due to excessive single control, which could lead to image resaturation. This ensures that the usable light intensity range is explored as much as possible while maintaining safety.
[0041] The preset trial step size refers to a tiny increment of control quantity set to approach the limit brightness. Since conservative safety boundaries may limit the full utilization of the camera's dynamic range, this invention allows for approximation to a known saturation position with extremely small step sizes. The boundary is only updated after multiple consecutive frames confirm safety, and immediately reverts once saturation is reached. This method maximizes the utilization of the limit brightness without avoiding the risk of overexposure. Using a larger step size when far from the target can shorten the adjustment time, while using a smaller step size when approaching the target can reduce overshoot and back-and-forth adjustments; the specific step size can be calibrated based on the actuator response.
[0042] Saturation protection has higher priority than normal brightness adjustment. When the saturation index... When the allowable value is exceeded, or when other saturation conditions such as pixel count or continuous region are triggered, this invention can immediately clear the unfinished stable image group and perform a callback according to the known light reduction direction. The calculation method for the saturation callback control amount is as follows: ; In the formula, This is the control amount after saturation callback. This means limiting the control quantity to the lower limit of the actuator's physical limits. and upper limit Projection operations between them This is the current light intensity control value. Symbols indicating the direction (polarity) of actuator adjustment. This is the saturation subtraction step size that varies with the current saturation index.
[0043] The saturation subtraction step size can be graded according to the degree of saturation, for example: ; In the formula, This is the first reduction step size. This is the second reduction step size, and its Less than ; As a saturation index, This is a preset threshold for saturation level classification. When the saturation index... Less than At that time, it was determined to be slightly oversaturated and the first reduction step size was adopted. When the saturation index Greater than or equal to When the condition is determined to be severe or with a large area of saturation, a second light reduction step size is applied. In other words, a smaller callback is used when only a small number of pixels are saturated, and a larger callback is used when the saturation ratio is high or the continuous saturation area is large. The settings can be obtained empirically or pre-calibrated based on camera characteristics and the tolerance for local overexposure by interferometry. After the command is issued, the system enters a stable waiting state; the transitional images during this waiting period are not used for normal brightness adjustment.
[0044] After the dimming correction, re-acquire images at the current control position; only when consecutive images confirm that the image is no longer saturated is that position recorded as a safe position. A safety boundary is used to limit the further movement of the light intensity control quantity in the direction that leads to saturation. If increasing the control quantity brightens the image, subsequent control quantities should not exceed [a certain value]. If increasing the control input darkens the image, then the subsequent control input should not be less than... The corresponding allowed range is: ; In the formula, This represents the currently allowed control range. This invention can separately save the control position where saturation most recently occurred. When further brightness enhancement is needed, it can be achieved from... The system iterates towards the nearest saturation position with smaller step sizes; each new position must be confirmed by unsaturation and multi-frame stability before moving to the safety boundary. If this verification is not performed, the system continues to operate within the conservative boundary. If the candidate light intensity control value, after being limited, is the same as the current light intensity control value, it indicates that the allowable boundary has been reached. The system stops, explains the reason, and does not continue to adjust back and forth.
[0045] In another implementation, step S103 determines the light intensity control quantity based on the saturation index and the quantile brightness index. Specifically, this may include: determining the brightness error between the quantile brightness index and the target brightness value; determining a first adjustment step size when the absolute value of the brightness error is greater than a preset error threshold; determining a second adjustment step size when the absolute value of the brightness error is less than or equal to the preset error threshold; the first adjustment step size being greater than the second adjustment step size; comparing the preview images obtained after two consecutive adjustments of the light intensity control quantity, and calibrating the adjustment polarity of the light intensity actuator based on whether the change direction of the two light intensity control quantities is consistent with the change direction of the corresponding quantile brightness index; and determining a candidate light intensity control quantity based on the adjustment polarity and the determined first or second adjustment step size.
[0046] In implementation, this method introduces a variable step size and online polarity calibration. Polarity adjustment refers to the attribute of the image brightening or darkening when the control quantity increases. Since different actuators have opposite characteristics, or wiring changes can cause polarity reversal, this invention automatically identifies the polarity by comparing the direction of brightness change between two consecutive control quantities. Simultaneously, it selects either a first or second adjustment step size based on the error magnitude, balancing adjustment speed and overshoot prevention. The actuator direction is determined based on the actual change in light intensity control quantity and image brightness, without relying on fixed wiring directions or a single manufacturer's interface. The same control method can be adapted to different actuators that brighten or darken with increased control quantity.
[0047] In practical implementation, the error between the current representative brightness and the target brightness value is defined as: ; In the formula, For the first Brightness error during each adjustment The target brightness value, This represents the brightness at the current control position. Target brightness value. The specific value for the desired ideal brightness level can be set to the center value within the target range, or it can be set to other values.
[0048] When the absolute value of the brightness error is large, a coarse adjustment step size is used; when approaching the target, a fine adjustment step size is used; when the absolute value of the brightness error is less than or equal to the brightness tolerance (i.e., within the target tolerance band), no further dimming movement is performed. The step size selection method is as follows: ; ; In the formula, This represents the absolute value of the brightness error. For the first The selected step size for this adjustment. This is the first adjustment step size, also known as the coarse adjustment step size. This is the second adjustment step size, i.e., the fine-tuning step size, and , The preset error threshold is the error limit for entering fine-tuning. This refers to the brightness tolerance.
[0049] When the absolute value of the brightness error is greater than the preset error threshold, a coarse adjustment step size is selected; when the absolute value of the brightness error is greater than the brightness tolerance but less than or equal to the preset error threshold, a fine adjustment step size is selected; when the absolute value of the brightness error is less than or equal to the brightness tolerance, the step size is zero, and the current light intensity control value is maintained.
[0050] Calculate the candidate light intensity control quantity without amplitude limiting based on the error direction, actuator direction, and selected step size, and then project this candidate quantity onto the current allowable control range: ; ; In the formula, This refers to the candidate light intensity control quantity that has not been limited. This is the current light intensity control value. The direction sign indicates the polarity. For symbolic functions, For the selected step size, For the final issued new light intensity control quantity, This represents the projection operation that projects the candidate light intensity control quantity onto the currently allowed control range. It is the permissible control range formed by the physical limits and safety boundaries of the actuator.
[0051] The aforementioned coarse and fine stepping can be replaced by a variable step size proportional to the error, a binary search, or direct back-calculation based on the actuator calibration curve. Regardless of the calculation method used, the actuator's physical range, permissible single-time variation, current saturation safety boundary, and whether the equipment is in an adjustable state must be checked before issuing control commands. The aforementioned preset error thresholds and brightness tolerances can be set empirically or pre-calibrated based on the equipment's response speed and measurement accuracy requirements.
[0052] Furthermore, in specific implementation, step S103, acquiring a new preview image, may specifically include: in response to the issuance of the light intensity control quantity, recording the image frame number or timestamp; identifying and discarding images whose frame number is earlier than the issuance action, images that are duplicates of those issued before the issuance action, and images that are within the preset actuator response transition period; and after receiving feedback from the actuator in place or after a preset waiting time, only new images whose frame number is later than the transition period and contain the characteristics of the current light intensity control quantity being effective are used as new preview images.
[0053] In practice, due to delays in the rotation of the mechanical attenuation wheel or communication, the images captured immediately after a command is issued are often transitional frames or old images. This implementation method aligns timestamps with frame numbers and combines this with actuator positioning feedback to accurately eliminate invalid frames, ensuring that the images used in the calculation are necessarily those after the current light intensity control has taken effect, preventing misjudgments due to data timing errors. After each control command, the actuator response is first confirmed and transitional frames are excluded. Then, under the same control position, the target range, saturation conditions, and inter-frame fluctuations of multiple consecutive frames are checked. This avoids mixing images under different control states and also distinguishes between accidentally entering the target zone and truly stable images.
[0054] After each control command is sent, the control flow enters a waiting state. Execution confirmation can come from device response, actual position readback, encoder positioning, or analog signal entering the allowable range. If there is no position feedback, the system can wait for a preset time or ignore a specified number of frames after successful command transmission. Only new images acquired after both confirmation and waiting are completed are evaluated. Images acquired before command transmission, duplicate frames, transition frames, and images inconsistent with current evaluation parameters are discarded. Transition frames refer to image frames acquired after the control command is issued but before the actuator reaches a stable state. The preset time can be set according to the actuator's mechanical response speed; a longer waiting time is set for actuators with high inertia, such as mechanical attenuation wheels, and a shorter waiting time is set for electronic responses, such as laser power adjustment. The specified number of frames can be calculated based on the camera's frame rate and the actuator's response time.
[0055] It should be noted that the control directions of actuators with different light intensities may be opposite. This invention uses directional symbols. This indicates the effect of increasing the control variable on image brightness: when When the control input increases, the image becomes brighter; when... When the control input increases, the image darkens. Upon system startup, an existing calibration direction can be read; if the direction is unknown and the current image is not saturated, a small trial adjustment is performed first, comparing the brightness of the two stable positions before and after the trial adjustment. If the image is already saturated upon startup, it first returns to the preset low-light position or calls a known light-reducing direction, and then performs direction verification after the image is no longer saturated. The mathematical expression for direction determination is as follows: ; ; In the formula, As a variable for determining direction, This represents the change in light intensity control between two adjacent stable control positions. This represents the brightness change between two adjacent stable control positions. This is the preset noise reduction threshold. When When the control quantity increases, the image becomes brighter; when... When the control quantity increases, the image darkens; when... At that time, the previous reliable direction should be used for judgment, that is... The above noise immunity threshold It can be set according to the noise level of the image sensor, the stability of the light source, and empirical data.
[0056] S104. Determine whether the preset number of preview images continuously acquired under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the requirements are met, end the adjustment and maintain the current light intensity control value.
[0057] The target range refers to the desired brightness range of the interference fringes. The preset allowable value refers to the maximum allowed proportion or number of saturated pixels. The current quantile brightness index and the current saturation index are indices calculated from the newly acquired preview image.
[0058] When executing step S104, once the quantile brightness index enters the target range for the first time, it can remain stationary under the current light intensity control value, continuously acquiring a preset number of preview images. This invention does not end the adjustment simply because a single frame image accidentally meets the target; instead, it requires that multiple consecutive frames under the same control value meet the brightness target without saturation. This step effectively eliminates misjudgments caused by transient fluctuations in the light source, camera noise, or actuators not completely stabilizing. When the conditions are met, the current light intensity control value is locked to ensure that the light intensity is in the most stable and suitable state during the formal measurement.
[0059] Further, in specific implementation, step S104 may include: continuously acquiring a preset number of preview images under the same light intensity control value to form an image group; extracting the current quantile brightness index and current saturation index of each image in the image group, and determining whether the current quantile brightness index of each image falls within the target range and whether the current saturation index of each image does not exceed the preset allowable value; calculating the difference between the maximum and minimum values of the current quantile brightness index in the image group, and determining whether the difference is less than the preset fluctuation threshold; when the current quantile brightness index of each image falls within the target range, the current saturation index of each image does not exceed the preset allowable value, and the difference between the maximum and minimum values of the current quantile brightness index in the image group is less than the preset fluctuation threshold, the adjustment ends and the current light intensity control value is maintained.
[0060] In implementation, the preset fluctuation threshold refers to the range threshold used to measure the brightness stability of multiple frames. This implementation constructs a dual stability evaluation system of single-frame compliance and multi-frame range convergence. It not only requires that each frame in the image group be qualified, but also requires that the difference between the maximum and minimum brightness values within the group be extremely small, forcing the light intensity to remain stably within the target band. This overcomes the occasional compliance phenomenon caused by random flickering of the light source. During intensity adjustment, it is preferable to keep the camera exposure time, gain, and measurement sequence unchanged, while changing the brightness through a physical light flux actuator, thereby reducing the impact of automatic exposure on the consistency of multi-frame phase shift, frequency sweep acquisition, and subsequent phase calculation conditions.
[0061] In practical implementation, after the control command is confirmed and a stable waiting period is completed, this invention collects a set of valid images under the same light intensity control. Light intensity adjustment is considered successful only if this set of images simultaneously meets the following three conditions: the quantile brightness index of each frame is within the target tolerance band; the saturation index of each frame does not exceed the preset allowable value; and the difference between the maximum and minimum values of the quantile brightness index within the image group does not exceed the preset stable threshold. The mathematical expression of the above conditions is as follows: ; In the formula, For the target quantile brightness, For brightness tolerance, For the first image in the image group Percentile brightness index of a frame image For the first Saturation index of frame image To the maximum permissible saturation ratio, This represents a stable group of images collected at the current control position. The allowed inter-frame brightness fluctuations are defined by a preset stability threshold. The third condition confirms that the image has stabilized, rather than only a few frames accidentally falling within the target range.
[0062] If the control command changes, saturation is triggered in any frame, the frame sequence number is abnormal, or the wait times out, the current image group is cleared and collected again. When a stable image group has not yet met the success conditions but has obtained multiple frames of valid data, the median of these frames can be used as the representative brightness for this control calculation. ; In the formula, This represents the brightness at the current control position. This indicates a median calculation. This value represents the brightness and can be used to calculate the brightness error later, thus avoiding interference from single-frame noise in control decisions.
[0063] Furthermore, in specific implementation, before executing step S101, the process may include: acquiring the interferometer's operating status signal; determining whether the current state is a measurement state based on the operating status signal; if the current state is a measurement state, refusing to start light intensity adjustment and outputting a status conflict prompt; during the light intensity adjustment process, if camera disconnection, actuator disconnection, command timeout, or light intensity control quantity reaching physical limits is detected, the adjustment process is interrupted, the current light intensity control quantity is maintained, and a fault code is recorded.
[0064] In implementation, this invention can correlate and constrain the intensity adjustment process with the interferometer's measurement flow, preventing adjustment actions from being triggered during phase-shift acquisition or wavelength scanning. Simultaneously, termination conditions are set for abnormal situations such as hardware disconnection or timeouts during the adjustment process. This method ensures the safety of the interferometer's operation and the validity of the measurement data. Maintaining constant light intensity after the formal measurement begins and stopping adjustment in case of abnormalities in the camera, actuator, communication, or operating status avoids interference from intensity adjustment actions with normal measurements; the operation record can also be used for fault location and equipment calibration.
[0065] The parameters involved in intensity adjustment can include actuator allowable range, initial control quantity, target quantile brightness, brightness tolerance, saturation threshold, saturation trigger threshold, coarse adjustment step size, fine adjustment step size, error threshold for entering fine adjustment, waiting time or number of frames ignored after command, number of frames required for success, inter-frame stabilization threshold, saturation dimming step size, maximum number of adjustments, and maximum waiting time for a new image. These parameters can be calibrated based on the device response or preset to stable, normal, or fast settings. The various thresholds can be set empirically based on the specific camera's bit depth, noise level, and actuator response speed, or pre-calibrated according to measurement accuracy requirements.
[0066] In practical implementation, before acquiring the real-time preview image in step S101, the present invention performs a start-up constraint check. The system confirms that the camera is outputting a valid preview image, the light intensity actuator and its control interface are available, and there are no ongoing phase-shift acquisitions, wavelength scans, formal measurements, focusing, or other actions that conflict with light intensity adjustment. It also checks whether the target quantile brightness, saturation threshold, and control range meet the reasonableness requirements. If a new valid image cannot be acquired within the specified time, or if any hardware state does not meet the requirements, the light intensity adjustment is refused to start or immediately stopped to ensure the safety of the interferometer operation and the validity of the measurement data.
[0067] Light intensity adjustment is preferably performed only during the real-time preview stage or before the formal measurement begins. Once the formal acquisition, such as phase-shifting sequences, wavelength scanning sequences, time-averaged measurements, or other acquisitions requiring constant light intensity, begins, the system stops calculating and issuing new light intensity control values, and maintains the camera exposure, gain, and current light intensity actuator position unchanged. After focusing, motion stage adjustment, reference mirror switching, or optical path reconstruction is completed, light intensity adjustment can be performed again before the formal measurement.
[0068] During intensity modulation operation, if the camera disconnects, the preview source changes, the actuator loses connection, the user switches to manual control, or a formal measurement begins, the system immediately stops intensity modulation. Upon stopping, any unfinished waiting states and stable image groups are cleared; depending on equipment safety requirements, the system can maintain its current position or return to a preset low-light position. This ensures that intensity modulation actions will never interfere with the interferometer's formal multi-frame measurement sequence, guaranteeing the validity of the measurement data and the safety of equipment operation.
[0069] In the interferometer light intensity adjustment method provided in the embodiments of the present invention, by independently monitoring quantile brightness and local saturation, combined with a multi-frame continuous determination method, the automatic and robust adjustment of the interferometer light intensity is realized, ensuring the consistency of measurement conditions without changing the camera exposure and gain.
[0070] Figure 2 This is a schematic diagram of the interferometer intensity tuning synthesis process provided in an embodiment of the present invention. Figure 2As shown, the process includes an image acquisition and evaluation stage, a saturation judgment and multi-frame confirmation stage, and a direction step size calculation and constraint projection stage. In the image acquisition and evaluation stage, control values are issued and confirmed to be in place while stabilization is awaited. After acquiring valid new frames and filtering transitional and old configuration frames, the brightness quantile of the evaluation area and the saturation ratio of the monitoring area are calculated. Upon entering the saturation judgment and multi-frame confirmation stage, if saturation is detected, the light is preferentially reduced and the safety boundary is tightened, then the process returns to the control value issuance step. If saturation is not detected, non-saturated frames under the same control value are collected for multi-frame stabilization confirmation. When the brightness enters the target band and the saturation ratio meets the constraints, the process successfully ends and maintains the current light intensity control value. If the termination condition is not yet met, the process enters the direction step size calculation and constraint projection stage, where direction and step size are judged. After projection constrained by physical range, rate of change, and safety boundary, if movement can continue, a new control value is issued and the process returns to the control value issuance step; if movement cannot continue, the process stops and the reason is recorded.
[0071] Before the above process begins, the startup and initialization phase is initiated. This phase receives a light intensity adjustment request, begins a new adjustment process, and clears the state left over from the previous adjustment. Subsequently, it checks whether the camera and preview image are normal, whether the light intensity actuator and its interface are available, whether there are any measurement or conflicting actions, and whether all control parameters meet safety requirements. If any condition is not met, startup is refused and the reason is recorded. After the checks are passed, the control direction state, adjustment count, waiting count, stable image group, processed frame sequence number, and saturation safety boundary are reset. Next, the current light intensity control value or the preset initial light intensity control value is sent to the light intensity actuator, awaiting command confirmation and waiting for the actuator and image to stabilize, thus preparing for subsequent image acquisition and index calculation.
[0072] In this process, the startup and initialization phase is used to check the camera, light intensity actuator, and operating status control and fault protection module, and clear the old state. The control quantity issuance step issues control quantities through the command interface, confirms the actuator response, and waits for stabilization. The image evaluation step obtains the new image after the current command takes effect from the real-time preview frame acquisition module. The region and mask generation module, quantile brightness calculation module, saturation state detection module, and multi-frame stability evaluation module can calculate the quantile brightness index of the brightness evaluation area, the saturation index of the saturation monitoring area, and multi-frame stability. When saturation is detected, light is preferentially reduced and a safety boundary is established or tightened. When not saturated, stable images are collected under the same light intensity control quantity. The adjustment ends when all images enter the target band, the saturation condition is qualified, and the fluctuation meets the requirements; otherwise, the control direction judgment module determines the control direction, and the control decision module selects the coarse or fine adjustment step size, and limits the candidate light intensity control quantity to the physical range, rate of change, and direction-related safety range. When movement can continue, a new control quantity is issued and the process returns to the control quantity issuance step; when movement is impossible, the boundary is reached, the waiting timeout occurs, or a fault occurs, the adjustment stops.
[0073] Figure 3 This is a comparison diagram of interference fringes under different light intensities and local saturation states, provided as an embodiment of the present invention. Figure 3 As shown, the top left, top right, bottom left, and bottom right images correspond to underexposure, target brightness, near-saturation, and local saturation states, respectively, all using a grayscale range of 0 to 255. The brightness evaluation area is a concentric circle with a radius equal to 0.77 times the aperture radius, and the saturation monitoring area is a concentric circle with a radius equal to 0.985 times the aperture radius; the area lines are not superimposed on the images. In the bottom right image, a local hotspot causes the saturation ratio to exceed 0.2%, triggering priority dimming. Brightness and saturation indices are calculated using a floating-point simulated grayscale field. The interference fringes of the four states—underexposure, target brightness, near-saturation, and local saturation caused by superimposed local hotspots—are compared. This visually demonstrates that in the local saturation state, although the overall quantile brightness index remains within the normal range, local high-reflectivity areas have triggered saturation protection, verifying the necessity of independent monitoring of quantile brightness and local saturation.
[0074] Figure 4 This is a schematic diagram of the light intensity scaling process curves under different initial states provided in embodiments of the present invention. Figure 4 As shown, four preset trajectories are used to illustrate the brightness adjustment and successful confirmation process. The example target brightness band is 188 ± 7, requiring a saturation ratio not exceeding 0.2%, passing four consecutive frames under the same light intensity control, and the brightness range of these four frames not exceeding 5; the range threshold of 5 is set for this example. The four examples meet the conditions in the 11th, 9th, 7th, and 11th valid evaluation frames, respectively. The initial saturation example confirms the safety boundary after completing four consecutive frames of no saturation verification at a light intensity control of 0.68. The horizontal axis only includes valid evaluation frames; the solid circle represents the final confirmation frame. Figure 4 The image shows the initial underexposure (top left), the initial overexposure (top right), the initial saturation (bottom left), and the image with reversed direction (bottom right). Figure 4 The adjustment process of the preset trajectory clearly reflects the linkage between the control quantity and the brightness at each quantile. As shown in the lower left figure, during initial saturation, the system can quickly and preferentially reduce the brightness and establish a safety boundary at a specific control quantity after confirming no saturation. As shown in the lower right figure, when the actuator polarity is reversed, the system can automatically identify and adjust in the opposite direction based on the actual change in the control quantity and brightness.
[0075] In one simulation verification embodiment, to verify the control effect of the light intensity adjustment method of the present invention, an interference fringe grayscale model was constructed and the adjustment process was numerically simulated. Let... This is the normalized light intensity control quantity. For background items, For modulation terms, For fixed spatial phase, For the first Frame phase shift, For noise, the first The frame grayscale model is as follows: ; In the formula, For the first Frame image in coordinates grayscale value at that location This is a truncation function used to limit grayscale values to between 0 and 1. between, This represents the upper limit of the simulated grayscale. Figure 3 The index is calculated using floating-point grayscale, and an eight-bit display image is exported to simulate the upper limit of grayscale. It is 255, quantile level 90%, saturation threshold The value is 250; the following values are only used to illustrate the control process.
[0076] like Figure 3 As shown, the underexposure state is... When it is 0.14, The value is 71.6, and the saturation ratio is... ; Target brightness state When it is 0.70, The value is 190.7, and the saturation ratio is... Approaching saturation state, i.e. When it is 0.88, The value is 225.8, and the saturation ratio remains at [value missing]. Protection has not yet been triggered. After overlaying local hotspots, When it is 0.82, The value was 216.1, but 6483 saturated pixels appeared within the saturation monitoring area, out of a total of 727272 pixels in the monitoring area; the saturation ratio was... Its rounding is Exceeding the example threshold Therefore, the controller prioritizes reducing light. This set of results directly illustrates that: quantile brightness is used to determine overall brightness, while saturation ratio is used to check for localized overexposure; the two cannot be substituted for one another.
[0077] like Figure 4 As shown, the example target band of the preset simulation trajectory is... Required saturation ratio The requirements are that four consecutive frames must pass under the same control quantity, and the brightness difference between the four frames must not exceed 5. The four examples—underexposure start, overexposure start, initial saturation, and actuator direction reversal—must meet the termination condition in the 11th, 9th, 7th, and 11th valid evaluation frames, respectively. The initial saturation example has a preset known light reduction direction. After confirming no saturation for four consecutive frames, a safety boundary is established; in the example of direction reversal, the control value is increased to darken the image based on the relationship between the control value and the brightness, and then the image is adjusted in reverse to enter the target band.
[0078] In an implementation scenario using an eight-bit monochrome camera, the brightness evaluation area is a circular region centered on the image center, with a diameter occupying 60% to 90% of the image's shorter side; the quantile level is set to 85% to 95%. The target quantile brightness is set to approximately 40% to 60% of full scale, and the saturation threshold is set to approximately 96% to 99.6% of full scale, with an example allowing a saturation ratio of 0.2%. The coarse adjustment step size is approximately 3% to 8% of the total actuator range, and the fine adjustment step size is approximately 0.3% to 2% of the total range. This embodiment collects three to eight frames at the same control position as successful confirmation, and ignores three to fifteen frames or waits for an equivalent time after each command confirmation. In addition to requiring each frame to enter the target band and meet the saturation limit, it is also required that the difference between the maximum and minimum quantile brightness values within a group does not exceed a preset stable threshold. Coarse adjustment is used when the initial brightness deviates significantly from the target, and fine adjustment is used when it approaches the target; when saturation occurs, the brightness is first reduced and confirmed to be unsaturated, and then the current position is used as a conservative safety boundary. The above ratios, frame counts, and step sizes are all preferred ranges and are not limited here.
[0079] In practical implementation, the brightness evaluation area is not limited to the central circular aperture; it can be an ellipse, rectangle, polygon, ring, partitioned aperture, effective pixel mask, workpiece edge segmentation result, reference spot area, or user-specified area, and can be translated, rotated, or scaled according to the workpiece alignment result. The quantile level is not limited to 90% and can be selected within a range greater than 50% and less than 100%, and can also be adjusted based on stripe contrast and noise level. The quantile brightness index can also be replaced by weighted quantiles, block-based representative values, truncated mean, high grayscale peak values of the histogram, or high quantile values of the stripe envelope. The saturation monitoring area can be the entire image, the effective aperture, an expanded area of the brightness evaluation area, or a combination of multiple key areas. Saturation conditions can be determined by the number of pixels, pixel ratio, continuous area, number of consecutive frames, or a combination of the above conditions, and a bad pixel table can be used to exclude fixed hot pixels. The saturation threshold can be set to a fixed grayscale based on the camera bit depth, or determined based on black level, linear range, exposure time, gain, or camera calibration curve; warning thresholds and protection thresholds can also be set separately to reduce the step size in advance when approaching saturation. Multi-frame success conditions can require all frames to pass, or they can require a specified number of consecutive successful frames or a threshold for the proportion of successful frames. Inter-frame stability can be judged by the difference between the maximum and minimum values, standard deviation, median absolute deviation, or the slope of brightness change.
[0080] In practice, brightness adjustment can employ fixed coarse / fine step sizes, multi-level step sizes, proportional adjustment, binary search, or direct back-calculation based on the actuator calibration curve. Regardless of the method used, saturation-priority dimming and control boundary checks precede command issuance. Control direction can be obtained through equipment calibration, interface definition, small-scale trial adjustments during startup, or monotonic relationships between multiple stable positions. When directional evidence is insufficient, maintain the original judgment; if saturation is already present and the direction is unknown, first enter the preset low-light position, and blindly adjust without saturation. The saturation safety boundary can be conservatively adopted, directly using the confirmed absence of saturation. Limit subsequent control values; alternatively, the most recent saturation position can be saved. The actuator is verified step-by-step with small increments from the nearest saturation position, and the boundary is only moved when the new position is continuously unsaturated and the brightness is stable. Actuator stability can be determined by fixing the waiting time, ignoring a specified number of frames, position readback, speed readback, or the stabilization of image brightness changes. Command confirmation can come from device response, encoder positioning, analog signal reaching the target, or a combination of the above conditions.
[0081] The intensity actuator is not limited to a single board or mechanical structure; it can adjust the laser drive current, the power of the light-emitting device, the acousto-optic modulator, the electro-optic modulator, the neutral density wheel, the continuous attenuator, the variable aperture, the polarizer, the liquid crystal device, or the digital micromirror device. The command interface is not limited to a specific protocol and can use analog voltage or current, pulse width modulation, general purpose input / output, serial communication, universal serial bus, Ethernet, controller area network, fieldbus, programmable logic controller, or manufacturer-provided software interfaces.
[0082] From the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0083] Embodiments of the present invention also provide an interferometer optical intensity tuning system. Figure 5 This is a schematic diagram of the interferometer intensity modulation system provided in an embodiment of the present invention. This embodiment is based on functional modules, such as… Figure 5 As shown, the system includes: Image acquisition module 10 is used to acquire real-time preview images of the interferometer and determine the brightness evaluation area and saturation monitoring area; The index calculation module 11 is used to calculate the quantile brightness index within the brightness evaluation area and the saturation index within the saturation monitoring area. The control decision module 12 is used to determine the light intensity control quantity based on the saturation index and the quantile brightness index, send the light intensity control quantity to the light intensity actuator, and obtain a new preview image; The determination and locking module 13 is used to determine whether the preset number of preview images continuously acquired under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the requirements are met, the adjustment is ended and the current light intensity control value is maintained.
[0084] In the interferometer intensity adjustment system provided in this embodiment of the invention, the quantile brightness index and saturation index can be calculated through the interaction of the image acquisition module 10, the index calculation module 11, the control decision module 12 and the judgment locking module 13, respectively, thus decoupling the overall fringe brightness evaluation from the local overexposure monitoring. The light intensity control quantity is determined based on the dual indexes, and multiple frames of images are continuously acquired under the same control quantity for judgment. This overcomes the influence of occasional single-frame achievement and light source fluctuations, effectively avoids overall brightness distortion and local saturation truncation, and ensures that the interferometric measurement is performed under optimal and stable light intensity conditions.
[0085] Since the embodiments of the interferometer optical intensity adjustment system and the interferometer optical intensity adjustment method correspond to each other, the descriptions of the features in the embodiments corresponding to the interferometer optical intensity adjustment system can be found in the relevant descriptions of the embodiments corresponding to the interferometer optical intensity adjustment method, and will not be repeated here. Furthermore, it has the same beneficial effects as the interferometer optical intensity adjustment method mentioned above.
[0086] In practical implementation, the functional modules of the intensity modulation system provided in this invention can be implemented by software programs, digital signal processors, field-programmable gate arrays, microcontrollers, industrial computers, programmable logic controllers, or combinations of the above devices. Image acquisition, image evaluation, and control decision-making can be deployed on the same computer, or separately on the camera, acquisition end, host computer, and actuator controller. The intensity modulation system provided in this invention can be implemented as interferometer built-in software, external control box, camera-end program, programmable logic controller program, industrial computer service, or remote control module. The functions can be centralized in the same device or distributed across the camera, host computer, and actuator controller.
[0087] Based on this, the light intensity adjustment system provided in this embodiment of the invention has a variety of extended functions. The system can adjust the total luminous flux, or adjust the reference light and measurement light separately, or adjust different wavelengths, polarizations, and illumination channels separately. Each channel can be set with its own brightness target and saturation conditions. When the physical light intensity actuator reaches the allowable boundary but still cannot meet the target, the system can maintain a safe position and prompt for manual intervention. Under the condition that it is confirmed that measurement consistency will not be compromised, camera exposure or gain can also be used as a secondary control variable, and all parameters can be fixed again before the formal measurement begins.
[0088] Using the above-described optical intensity adjustment system, the optical intensity adjustment of this invention can be performed before each measurement, or triggered after changing the workpiece, standard mirror, or optical path components, completing focusing, environmental changes, brightness drift exceeding a threshold, or measurement quality check failure, while stopping adjustment during formal acquisition. This invention can be applied to phase-shift interferometry, Fourier transform interferometry, frequency sweep interferometry, white light scanning interferometry, digital holography, coherent microscopy, speckle interferometry, and other optical measurement equipment that requires control of imaging light intensity and avoidance of saturation.
[0089] Furthermore, in specific implementation, the control decision module 12 can be used to determine the light intensity control amount adjusted in the light reduction direction when the saturation index exceeds the preset allowable value; when the saturation index does not exceed the preset allowable value, the light intensity control amount is determined based on the comparison result between the quantile brightness index and the target range; wherein, when the quantile brightness index is lower than the lower limit of the target range, the light intensity control amount adjusted in the light enhancement direction is determined; when the quantile brightness index is higher than the upper limit of the target range, the light intensity control amount adjusted in the light reduction direction is determined; when the quantile brightness index is within the target range, the current light intensity control amount is maintained, and multi-frame judgment continues. If the saturation index exceeds the preset allowable value and a light reduction backoff is performed, and the current saturation index of the preset number of consecutive preview images acquired under the same light intensity control value does not exceed the preset allowable value, the current light intensity control value is recorded as a safety boundary. In regular light enhancement adjustment, the candidate light intensity control value is restricted to the direction-dependent allowable range formed by the safety boundary and the physical limit of the actuator. The allowable range is determined according to the direction in which the image becomes brighter or darker due to the increase of the light intensity control value, so that the adjusted light intensity control value does not exceed the safety boundary. When the safety boundary has not yet been established, the light intensity control value is constrained according to the physical range of the actuator.
[0090] Specifically, the control decision module 12 can also be used to, after recording the safety boundary, if the quantile brightness index is lower than the target range lower limit and brightness enhancement is required, use the light intensity control quantity corresponding to the safety boundary as the starting reference and approach the position of the light intensity control quantity where oversaturation occurred in the historical record; during the approach process, new light intensity control quantities are issued step by step with an amplitude smaller than the preset trial step size; new preview images are acquired under each level of light intensity control quantity, and the current light intensity control quantity is updated to the new safety boundary only when the current saturation index of the preset number of consecutively acquired preview images does not exceed the preset allowable value; if the current saturation index exceeds the preset allowable value again during the approach process, the light intensity control quantity corresponding to the previous safety boundary is returned and the current brightness enhancement approach is terminated.
[0091] Furthermore, in specific implementation, the control decision module 12 can also be used to determine the brightness error between the quantile brightness index and the target brightness value; when the absolute value of the brightness error is greater than a preset error threshold, a first adjustment step size is determined; when the absolute value of the brightness error is less than or equal to the preset error threshold, a second adjustment step size is determined; the first adjustment step size is greater than the second adjustment step size; the preview images obtained after two consecutive light intensity control values are compared, and the adjustment polarity of the light intensity actuator is calibrated according to whether the change direction of the two light intensity control values is consistent with the change direction of the corresponding quantile brightness index; and the candidate light intensity control value is determined according to the adjustment polarity and the determined first or second adjustment step size.
[0092] Furthermore, in specific implementation, the control decision module 12 can also be used to respond to the issuance of light intensity control quantity, record the image frame number or timestamp; determine images with frame numbers earlier than the issuance action, images that are repeated before the issuance action, and images that are within the preset actuator response transition period as invalid images and discard them; after receiving feedback from the actuator in place or after a preset waiting time, only new images with frame numbers later than the transition period and containing the characteristics of the current light intensity control quantity being effective are used as new preview images.
[0093] Furthermore, in specific implementation, the determination and locking module 13 can be used to continuously acquire a preset number of preview images under the same light intensity control value to form an image group; extract the current quantile brightness index and the current saturation index of each image in the image group, and determine whether the current quantile brightness index of each image falls within the target range and whether the current saturation index of each image does not exceed the preset allowable value; calculate the difference between the maximum and minimum values of the current quantile brightness index in the image group, and determine whether the difference is less than the preset fluctuation threshold; when the current quantile brightness index of each image falls within the target range, the current saturation index of each image does not exceed the preset allowable value, and the difference between the maximum and minimum values of the current quantile brightness index in the image group is less than the preset fluctuation threshold, the adjustment ends and the current light intensity control value is maintained.
[0094] Furthermore, in specific implementation, it may also include: a state interlock and fault protection module, used to acquire the operating status signal of the interferometer; determine whether it is currently in measurement state based on the operating status signal; if it is in measurement state, refuse to start light intensity adjustment and output a state conflict prompt; during the light intensity adjustment process, if camera disconnection, actuator disconnection, command timeout, or light intensity control quantity reaches physical limit is detected, the adjustment process is interrupted, the current light intensity control quantity is maintained, and a fault code is recorded.
[0095] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above embodiments of the interferometer light intensity tuning method.
[0096] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described interferometer light intensity tuning method embodiments when running.
[0097] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0098] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the interferometer light intensity tuning method.
[0099] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described interferometer light intensity modulation method embodiments.
[0100] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-chip (SoC), a complex programmable logic device (CPLD), a microcontroller unit (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0101] The units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0102] The above provides a detailed description of the interferometer optical intensity adjustment method, system, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. An interferometer light intensity tuning method, characterized in that, include: Acquire real-time preview images of the interferometer to determine the brightness evaluation area and saturation monitoring area; Calculate the quantile luminance index within the luminance evaluation area and the saturation index within the saturation monitoring area; The light intensity control amount is determined based on the saturation index and the quantile brightness index, and the light intensity control amount is sent to the light intensity actuator to obtain a new preview image; Determine whether the preset number of preview images acquired continuously under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the conditions are met, the adjustment ends and the current light intensity control value is maintained.
2. The interferometer intensity tuning method according to claim 1, characterized in that, Determining the light intensity control amount based on the saturation index and the quantile brightness index includes: When the saturation index exceeds the preset allowable value, determine the amount of light intensity control to be adjusted in the direction of light reduction; When the saturation index does not exceed the preset allowable value, the light intensity control amount is determined based on the comparison result between the quantile brightness index and the target range; wherein, when the quantile brightness index is lower than the lower limit of the target range, the light intensity control amount is determined to be adjusted in the direction of increasing light; when the quantile brightness index is higher than the upper limit of the target range, the light intensity control amount is determined to be adjusted in the direction of decreasing light; when the quantile brightness index is within the target range, the current light intensity control amount is maintained, and multi-frame judgment continues. After acquiring the new preview image, the following is also included: If the saturation index exceeds the preset allowable value and a light reduction backoff is performed, and if the current saturation index of the preset number of consecutive preview images acquired under the same light intensity control value does not exceed the preset allowable value, the current light intensity control value is recorded as a safety boundary. In normal light enhancement adjustment, the candidate light intensity control value is restricted to the direction-related allowable range formed by the safety boundary and the physical limit of the actuator. The allowable range is determined according to the direction in which the image becomes brighter or darker due to the increase of the light intensity control value, so that the adjusted light intensity control value does not exceed the safety boundary. When no safety boundary has been established, the light intensity control value is constrained according to the physical range of the actuator.
3. The interferometer intensity tuning method according to claim 1, characterized in that, Determining the light intensity control amount based on the saturation index and the quantile brightness index includes: Determine the brightness error between the quantile brightness index and the target brightness value; When the absolute value of the brightness error is greater than a preset error threshold, a first adjustment step size is determined; when the absolute value of the brightness error is less than or equal to the preset error threshold, a second adjustment step size is determined; the first adjustment step size is greater than the second adjustment step size. Compare the preview images obtained after two consecutive light intensity control values, and calibrate the adjustment polarity of the light intensity actuator based on whether the change direction of the two light intensity control values is consistent with the change direction of the corresponding quantile brightness index. Based on the adjustment polarity and the determined first or second adjustment step size, a candidate light intensity control quantity is determined.
4. The interferometer intensity tuning method according to claim 1, characterized in that, Get a new preview image, including: In response to the issuance of light intensity control parameters, record the image frame number or timestamp; Images whose frame number is earlier than the action to be issued, images that are duplicates of those issued before the action to be issued, and images that are within the preset actuator response transition period are identified as invalid images and are removed. After receiving feedback from the actuator in place or after a preset waiting time, only new images with frame numbers later than the transition period and containing the characteristics of the current light intensity control quantity being effective are used as new preview images.
5. The interferometer intensity tuning method according to claim 1, characterized in that, Determine whether a preset number of consecutively acquired preview images under the same light intensity control value simultaneously satisfy the conditions that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If these conditions are met, the adjustment ends and the current light intensity control value is maintained, including: Under the same light intensity control, a preset number of preview images are continuously acquired to form an image group; Extract the current quantile brightness index and current saturation index of each frame in the image group, and determine whether the current quantile brightness index of each frame falls within the target range and whether the current saturation index of each frame does not exceed the preset allowable value. Calculate the difference between the maximum and minimum values of the current quantile brightness index within the image group, and determine whether the difference is less than the preset fluctuation threshold; When the current quantile brightness index of each frame falls within the target range, the current saturation index of each frame does not exceed the preset allowable value, and the difference between the maximum and minimum values of the current quantile brightness index within the image group is less than the preset fluctuation threshold, the adjustment ends and the current light intensity control is maintained.
6. The interferometer intensity tuning method according to claim 2, characterized in that, After recording the security boundaries, the following is also included: If the quantile brightness index is lower than the lower limit of the target range and light enhancement is required, the light intensity control amount corresponding to the safety boundary is used as the starting reference, and the light intensity control amount position where oversaturation occurred in the historical record is approximated. During the approach process, new light intensity control values are issued step by step with an amplitude smaller than the preset trial step size; At each level of light intensity control, a new preview image is acquired. Only when the current saturation index of the preset number of consecutively acquired preview images does not exceed the preset allowable value, the current light intensity control is updated to a new safety boundary. If the current saturation index exceeds the preset allowable value again during the approximation process, the light intensity control value will be returned to the previous safety boundary and the current light enhancement approximation will be terminated.
7. The interferometer intensity tuning method according to claim 1, characterized in that, Before acquiring a real-time preview image of the interferometer, the following steps are also included: Acquire the operating status signal of the interferometer; The system determines whether it is currently in measurement mode based on the operating status signal. If it is in measurement mode, it refuses to start light intensity adjustment and outputs a status conflict prompt. If, during the light intensity adjustment process, a camera disconnection, actuator failure, command timeout, or light intensity control value reaching the physical limit is detected, the adjustment process is interrupted, the current light intensity control value is maintained, and a fault code is recorded.
8. An interferometer light intensity modulation system, characterized in that, include: The image acquisition module is used to acquire real-time preview images of the interferometer and determine the brightness evaluation area and saturation monitoring area; The index calculation module is used to calculate the quantile luminance index within the luminance evaluation area and the saturation index within the saturation monitoring area. The control decision module is used to determine the light intensity control amount based on the saturation index and the quantile brightness index, send the light intensity control amount to the light intensity actuator, and obtain a new preview image; The determination and locking module is used to determine whether the preset number of preview images acquired continuously under the same light intensity control value simultaneously meet the requirements that the current quantile brightness index is within the target range and the current saturation index does not exceed the preset allowable value. If the requirements are met, the adjustment is ended and the current light intensity control value is maintained.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the interferometer light intensity tuning method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the interferometer light intensity tuning method as described in any one of claims 1 to 7.
