A stereoscopic calibration optimization method and system based on dual-pattern differential brightness driving and a storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-11
Smart Images

Figure CN122550495A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional display calibration and image processing technology, and in particular to a dual-pattern differential brightness driven stereo calibration optimization method, system and storage medium. Background Technology
[0002] Stereoscopic display devices (such as glasses-free 3D displays and head-mounted stereoscopic displays) rely on the precise matching of the display panel pixel structure, parallax optical elements, and viewing position to correctly deliver left and right views to both eyes. During production, assembly, repair, and maintenance, key display parameters (such as parallax offset and optical element position) must be calibrated to eliminate quality issues such as crosstalk, ghosting, and viewpoint shift.
[0003] The current mainstream automatic calibration method adopts a closed-loop iterative strategy of "acquisition-evaluation-update". In the evaluation stage, a single test pattern (such as black and white checkerboard, stripes or square patterns) is usually used to evaluate the display quality under the current parameters: by acquiring a single image, the brightness or contrast of a specific area in the image is calculated as an evaluation signal to drive the parameter search.
[0004] However, the single-pattern evaluation mechanism has two inherent flaws:
[0005] In the later stages of calibration (parameter fine-tuning), the signal amplitude caused by parameter changes decreases, while common-mode interference such as ambient light drift, baseline offset of the acquisition sensor, and circuit noise is on the same order of magnitude as the signal, resulting in large fluctuations in the evaluation sequence. The optimization algorithm has difficulty distinguishing between parameter improvements and random disturbances, thus leading to convergence stagnation or parameter jitter, ultimately limiting the calibration accuracy and consistency.
[0006] Data acquisition sensors (such as industrial cameras) are typically more sensitive to white (bright) areas than to black (dark) areas. During single-pattern evaluation, the viewpoint contribution corresponding to bright areas is amplified, while the viewpoint contribution corresponding to dark areas is compressed. This causes the optimization process to systematically favor one viewpoint (the viewpoint corresponding to the bright area), while the other viewpoint exhibits noticeable ghosting or uneven brightness. The essence of stereoscopic display requires both left and right viewpoints to achieve acceptable display quality simultaneously; the viewpoint bias caused by single-pattern evaluation severely disrupts the balance between the two viewpoints.
[0007] Furthermore, existing solutions rarely employ complementary pattern differential mechanisms to simultaneously suppress common-mode interference and compensate for sensor sensitivity bias. Some multi-pattern calibration methods are only used to measure crosstalk rate or viewpoint distribution, without directly using the differential evaluation of complementary patterns as the driving force for parameter iteration updates, and without addressing the issues of weak signal and dual-viewpoint imbalance during the fine-tuning stage.
[0008] Therefore, how to construct an evaluation mechanism that is resistant to common-mode interference and unbiased for dual viewpoints, and use it to drive the efficient and high-precision convergence of calibration parameters, is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0009] In order to solve the above-mentioned technical problems, the present invention provides a stereo calibration optimization method, system and storage medium driven by dual-pattern differential brightness.
[0010] The technical solution of this invention is implemented as follows:
[0011] A dual-pattern differential brightness-driven stereo calibration optimization method includes:
[0012] Under the same candidate parameters, at least two types of test patterns with complementary brightness are displayed sequentially;
[0013] Collect the display images corresponding to the at least two types of test patterns respectively;
[0014] For each type of test pattern, the brightness evaluation value is calculated according to the preset spatial area division of the displayed image;
[0015] A differential evaluation quantity is constructed based on the difference between the brightness evaluation values of the at least two types of test patterns;
[0016] The calibration parameters are iteratively updated based on the differential evaluation quantity until the preset convergence or termination condition is met.
[0017] Furthermore, the brightness evaluation value is obtained in the following way:
[0018] The acquired display image is divided into multiple spatial sub-regions. The average pixel brightness in each sub-region is calculated. Then, based on the positional relationship of each sub-region, the sum of the average brightness of a pair of diagonal sub-regions is calculated. The difference between the sum of the average brightness of a pair of diagonal sub-regions and the sum of the average brightness of another pair of diagonal sub-regions is used as the brightness evaluation value.
[0019] Furthermore, the two types of complementary brightness test patterns include a first test pattern and a second test pattern obtained by inverting the brightness of the first test pattern; the differential evaluation value is constructed by calculating the difference between the brightness evaluation value of the first test pattern and the brightness evaluation value of the second test pattern, and is used to suppress common-mode brightness disturbances and compensate for viewpoint bias caused by the asymmetry of the sensitivity of the acquisition sensor to bright and dark areas.
[0020] Furthermore, the stereo calibration optimization method includes at least two optimization stages:
[0021] The initial stage adopts a single-pattern evaluation method, and performs parameter search with the first search step size;
[0022] At least one post-fine-tuning stage enables the differential evaluation quantity to perform parameter search with a second search step size smaller than the first search step size.
[0023] Furthermore, the iterative update of the parameters includes a symmetric candidate comparison process:
[0024] On the calibration parameter axis to be optimized, with the current optimal parameter value as the center and the search step size of the current post-fine-tuning stage as the interval, two symmetrical candidate parameters, one in the positive direction and one in the negative direction, are generated.
[0025] For each candidate parameter, keeping the candidate parameter unchanged, two types of complementary brightness test patterns are displayed in sequence, images are acquired, brightness evaluation values are calculated, and a corresponding differential evaluation quantity is constructed based on the difference between the two types of brightness evaluation values.
[0026] Select the candidate with the better difference evaluation value as the winning candidate;
[0027] The differential evaluation value of the winning candidate is compared with the baseline differential evaluation value corresponding to the current optimal parameter;
[0028] If the differential evaluation value of the winning candidate is better than the baseline differential evaluation value, then the winning candidate is accepted as the new optimal parameter and the baseline differential evaluation value is updated; otherwise, the current optimal parameter remains unchanged.
[0029] Furthermore, the post-fine-tuning stage employs a strategy of progressively reducing the search scale:
[0030] Multiple fine-tuning sub-stages are set up to be executed sequentially. Each sub-stage has a decreasing search step size multiplier. After the previous sub-stage converges, the optimal parameters are passed to the next sub-stage.
[0031] Furthermore, for each of the at least two types of complementary brightness test patterns, multiple frames of images are continuously acquired after the pattern is displayed, the brightness evaluation value of each frame is calculated, and the average of the brightness evaluation values of the multiple frames is taken as the final brightness evaluation value of the pattern.
[0032] Furthermore, it also includes credibility control:
[0033] If any frame of image acquisition fails or communication is abnormal, the current evaluation is marked as invalid and the current parameters are not updated.
[0034] When multiple consecutive evaluations are ineffective or no parameter improvement occurs, a phase rollback or retry mechanism is triggered, and an anomaly alarm is issued.
[0035] A dual-pattern differential brightness-driven stereo calibration and optimization system includes:
[0036] The pattern control module controls the display terminal to sequentially display at least two types of test patterns with complementary brightness under the same candidate parameters;
[0037] The acquisition and processing module acquires the display image corresponding to the test pattern and calculates the brightness evaluation value of each type of test pattern according to the preset spatial area division.
[0038] The differential evaluation module constructs a differential evaluation quantity based on the difference between the brightness evaluation values of the at least two types of test patterns;
[0039] The optimization decision module drives the iterative update of calibration parameters based on the differential evaluation metric.
[0040] The process management module controls the stage switching, convergence determination, and exception handling of the calibration process.
[0041] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned dual-pattern differential brightness-driven stereo calibration optimization method.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] 1. This invention sequentially displays at least two types of test patterns with complementary brightness under the same candidate parameters, and constructs a differential evaluation quantity based on the difference between the brightness evaluation values of the two types of patterns. Since the influence of common-mode factors such as ambient light drift, sensor baseline offset, and circuit noise on the two types of patterns is approximately equal, the differential operation can cancel them out, so that the evaluation quantity mainly reflects the real response difference between the patterns. When the parameter change amplitude is small in the later stage of calibration, this mechanism significantly improves the signal-to-noise ratio of the evaluation signal, avoids convergence stagnation or parameter jitter caused by signal fluctuation, thereby enhancing the robustness and final state accuracy of the calibration process, and solving the technical problems of evaluation signal being overwhelmed by common-mode interference, easy convergence stagnation or jitter in the fine-tuning stage.
[0044] 2. This invention employs a complementary brightness test pattern—in the first pattern, the white area corresponds to one viewpoint and the black area corresponds to another viewpoint; in the second pattern, the two are interchanged—a differential evaluation quantity is constructed based on the difference between the two types of brightness evaluation values. At this time, the deviation introduced by the sensor's high sensitivity in the bright area is opposite in direction in the two evaluations. After differential operation, they cancel each other out, making the differential evaluation quantity an unbiased estimate of the quality difference between the left and right viewpoints. Based on this evaluation quantity, parameter iteration is driven, which is equivalent to finding the most balanced parameter state between the two viewpoints. This avoids the problem of systematic parameter bias towards one viewpoint and ghosting or uneven brightness in the other viewpoint in single pattern evaluation. It ensures that the calibration results truly meet the core requirement of stereoscopic display for dual viewpoint balance and solves the technical problem of systematic parameter bias towards one viewpoint and ghosting in the other viewpoint due to asymmetric sensor sensitivity in single pattern evaluation.
[0045] 3. This invention drives parameter iterative updates based on differential evaluation quantities until preset convergence or termination conditions are met. Since the differential evaluation sequence has lower volatility and higher directional consistency, its response to parameter changes is more sensitive and monotonic, which is conducive to setting reliable convergence thresholds and reducing the probability of false convergence or missed convergence. This makes the calibration process predictable and traceable, significantly improving the consistency of calibration results between multiple calibrations of the same equipment and between different equipment. It is suitable for first calibration and recalibration scenarios on the production line. Attached Figure Description
[0046] Figure 1 This is a flowchart of a dual-pattern differential brightness-driven stereo calibration optimization method according to Example 1;
[0047] Figure 2 This is a framework diagram of a dual-pattern differential brightness driven stereo calibration and optimization system according to Example 2. Detailed Implementation
[0048] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0049] Example 1
[0050] like Figure 1 As shown, this embodiment provides a stereo calibration optimization method driven by dual-pattern differential brightness, including:
[0051] Under the same candidate parameters, at least two types of test patterns with complementary brightness are displayed sequentially;
[0052] The two types of complementary brightness test patterns include a first test pattern and a second test pattern obtained by inverting the brightness of the first test pattern; the differential evaluation value is constructed by calculating the difference between the brightness evaluation value of the first test pattern and the brightness evaluation value of the second test pattern, and is used to suppress common-mode brightness disturbances and compensate for viewpoint bias caused by the asymmetry of the sensitivity of the acquisition sensor to bright and dark areas.
[0053] Specifically, let the current candidate parameter be... (For example, during the first iteration) =0), keep this parameter unchanged, and control the display to first display the first test pattern: a 2×2 grid pattern, with white in the upper left corner (RGB=255,255,255), black in the upper right corner (0,0,0), black in the lower left corner, and white in the lower right corner;
[0054] After the display stabilizes (approximately 50ms), the second test pattern is displayed. This pattern is obtained by inverting the brightness of the first pattern: black in the upper left corner, white in the upper right corner, white in the lower left corner, and black in the lower right corner. The two types of patterns are displayed sequentially under the same parameters.
[0055] The display images corresponding to the at least two types of test patterns are collected respectively.
[0056] Specifically, the camera is aimed at the effective area of the display, and one frame of image is captured after each type of pattern has stabilized. To reduce noise, this embodiment captures 5 frames of each type of pattern continuously in actual operation. For the sake of brevity, the principle is described in terms of single frames. The captured image data is transmitted to the computer in real time.
[0057] For each type of test pattern, the brightness evaluation value is calculated according to the preset spatial area division.
[0058] The brightness evaluation value is obtained through the following method:
[0059] The acquired display image is divided into multiple spatial sub-regions. The average pixel brightness in each sub-region is calculated. Then, based on the positional relationship of each sub-region, the sum of the average brightness of a pair of diagonal sub-regions is calculated. The difference between the sum of the average brightness of a pair of diagonal sub-regions and the sum of the average brightness of another pair of diagonal sub-regions is used as the brightness evaluation value.
[0060] Specifically, each captured image frame is divided into four sub-regions: top left, top right, bottom left, and bottom right. The average pixel brightness within each sub-region is calculated and denoted as . , , , Then calculate the brightness evaluation value using the following formula. : ;
[0061] This formula is equivalent to the sum of the brightness of a pair of diagonal sub-regions (top left + bottom right) minus the sum of the brightness of another pair of diagonal sub-regions (top right + bottom left);
[0062] For the first test pattern, This reflects the difference in optical response between the white area (corresponding to viewpoint A) and the black area (corresponding to viewpoint B); for the second test pattern (reverse color). This reflects the difference between the white area (corresponding to viewpoint B) and the black area (corresponding to viewpoint A). Theoretically, the optimal parameters are... and The absolute values of all of them are close to 0.
[0063] A differential evaluation metric is constructed based on the difference between the brightness evaluation values of the at least two types of test patterns.
[0064] Specifically, calculate the differential evaluation metric: This differential evaluation metric can automatically cancel common-mode interference such as ambient light drift and camera baseline shift, while also compensating for viewpoint bias caused by the camera's high sensitivity to bright areas (because...). Biased towards viewpoint A, (The bias is towards viewpoint B; the difference cancels out after subtraction). The smaller the absolute value, the more balanced the left and right viewpoints are.
[0065] The calibration parameters are iteratively updated based on the differential evaluation quantity until the preset convergence or termination condition is met.
[0066] Specifically, this embodiment adopts a phased optimization strategy. In the post-fine-tuning stage, the differential evaluation quantity is used as the objective function, and the parameters are continuously updated through symmetric candidate comparison.
[0067] The convergence condition is: no parameter improvement in two consecutive scans, and the current step size is less than 0.5 pixels. When the convergence condition is met, the calibration ends, and the optimal parameters are output.
[0068] The stereo calibration optimization method includes at least two optimization stages:
[0069] The initial stage adopts a single-pattern evaluation method, and performs parameter search with the first search step size;
[0070] At least one post-fine-tuning stage enables the differential evaluation quantity to perform parameter search with a second search step size smaller than the first search step size.
[0071] Specifically, in the preliminary stage: using the single-pattern evaluation value of the first test pattern. As an evaluation metric, the first search step size is set to 4 pixels. The parameter search employs symmetrical trial and error: starting with the current optimal parameter... Generate from the center For each of the two candidates (cropped to the boundary), calculate their individual pattern evaluation value and update the result with the better one. If the update is successful, multiply the step size by 1.2 (accelerate); if it fails, multiply the step size by 0.5 (shrink), and repeat until the step size is less than 0.5 pixels.
[0072] In actual implementation, starting from p=0, after 5 iterations, we obtain... =-1.2 pixels, step size reduced to 0.5, stage ends.
[0073] Post-fine-tuning stage: Switch to dual-pattern differential evaluation metric The second search step size is set to 1 pixel. First, the output of the pre-processing stage... =-1.2 Baseline remeasurement: Measure three times using the differential evaluation scale and average the results. Then it enters the subsequent stage of a progressively narrowing search.
[0074] The iterative update of the parameters includes a symmetric candidate comparison process:
[0075] On the calibration parameter axis to be optimized, with the current optimal parameter value as the center and the search step size of the current post-fine-tuning stage as the interval, two symmetrical candidate parameters, one in the positive direction and one in the negative direction, are generated.
[0076] For each candidate parameter, keeping the candidate parameter unchanged, two types of complementary brightness test patterns are displayed in sequence, images are acquired, brightness evaluation values are calculated, and a corresponding differential evaluation quantity is constructed based on the difference between the two types of brightness evaluation values.
[0077] Select the candidate with the better difference evaluation value as the winning candidate;
[0078] The differential evaluation value of the winning candidate is compared with the baseline differential evaluation value corresponding to the current optimal parameter;
[0079] If the differential evaluation value of the winning candidate is better than the baseline differential evaluation value, then the winning candidate is accepted as the new optimal parameter and the baseline differential evaluation value is updated; otherwise, the current optimal parameter remains unchanged.
[0080] Specifically, taking a sub-stage of the subsequent stage as an example, the current step size =1 pixel, current optimal parameter =−0.2, baseline =0.015, generating two symmetric candidates: =−0.2+1=0.8, =−0.2−1=−1.2, respectively for and Perform a complete dual-pattern differential evaluation (displaying the first pattern acquired 5 frames). The second pattern was captured in 5 frames. ,calculate ),get =0.023, =0.009;
[0081] Compare absolute values. =0.009<0.015 and less than Therefore, the winning candidate is Its differential evaluation quantity is better;
[0082] Will =0.009 and baseline Comparing the values with 0.015, the result is better, therefore it is accepted. =−1.2 is the new optimal parameter, and it is updated. =0.009;
[0083] If the differential evaluation value of a winning candidate is not better than the baseline, the original parameters are kept unchanged. After one round of scanning, if there is improvement, the next round is continued; otherwise, convergence is determined.
[0084] The post-fine-tuning stage employs a strategy of progressively reducing the search scale:
[0085] Multiple fine-tuning sub-stages are set up to be executed sequentially. Each sub-stage has a decreasing search step size multiplier. After the previous sub-stage converges, the optimal parameters are passed to the next sub-stage.
[0086] Specifically, in this embodiment, three fine-tuning sub-stages are set in the post-stage, with step size ratios of 2, 1, and 0.5, respectively, that is, the actual step sizes are 2 pixels, 1 pixel, and 0.5 pixels respectively.
[0087] First sub-phase (step size 2 pixels): From initial... Starting with -1.2, a symmetric candidate comparison is performed. After two consecutive rounds without improvement, the comparison converges, yielding the result. =−0.2;
[0088] Second sub-stage (step size 1 pixel): Inherit −0.2, retest the baseline, continue the symmetric search, and converge to −0.1;
[0089] Third sub-stage (step size 0.5 pixels): Inherit -0.1, retest the baseline, and converge to -0.04 after the search;
[0090] At the start of each sub-stage, the differential evaluation of the current optimal parameter is remeasured as a baseline to eliminate the scaling effect caused by step size changes.
[0091] For each of the at least two types of complementary brightness test patterns, multiple frames of images are continuously acquired after the pattern is displayed, the brightness evaluation value of each frame is calculated, and the average of the brightness evaluation values of the multiple frames is taken as the final brightness evaluation value of the pattern.
[0092] Specifically, in actual implementation, in order to suppress random noise, the camera continuously acquires 5 frames of images for each test pattern (first or second) displayed;
[0093] Calculate the luminance evaluation value independently for each frame. (k=1..5), then take the arithmetic mean: The mean value is then used for subsequent differential evaluation calculations. Multi-frame sampling significantly improves the stability of the evaluation metrics, especially in the post-fine-tuning stage, where subtle parameter changes are less likely to be masked by noise.
[0094] Reliability control (additional supplement): This embodiment also has a built-in exception handling mechanism. If any frame image acquisition times out (>200ms) or communication command fails to be sent, the evaluation of that round is marked as invalid, the parameters are not updated, and the same candidate is automatically retried (up to 3 times).
[0095] If three consecutive rounds are ineffective, an anomaly alarm is triggered and calibration is paused; if three consecutive rounds are effective but the parameters do not improve, a phase rollback (resetting to the starting state of the previous sub-phase) is triggered and the step size is reduced.
[0096] Through the above steps, this embodiment finally obtains the optimal offset parameters. =−0.04 pixels;
[0097] This embodiment is only an example. In actual applications, the parameter range, step size ratio, number of sampling frames, etc. can be adjusted according to the specific device, but the core technical solution remains unchanged.
[0098] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned dual-pattern differential brightness-driven stereo calibration optimization method.
[0099] Example 2
[0100] like Figure 2 As shown, this embodiment provides a dual-pattern differential brightness driven stereo calibration optimization system, including:
[0101] The pattern control module controls the display terminal to sequentially display at least two types of test patterns with complementary brightness under the same candidate parameters;
[0102] Specifically, when the optimization decision module issues a candidate parameter value (e.g., the current optimal parameters) After (=0), the pattern control module first sends a parameter setting command to the display, which will then display the parameters. Write to the display. Then, send the first test pattern command in sequence: a 2×2 grid pattern, with white in the top left corner (RGB=255,255,255), black in the top right corner (0,0,0), black in the bottom left corner, and white in the bottom right corner;
[0103] After the display stabilizes (approximately 50ms), the second test pattern command is sent. This pattern is obtained by inverting the brightness of the first pattern (top left black, top right white, bottom left white, bottom right black). If multiple frames need to be acquired, the module will control the display to keep the same pattern unchanged until the acquisition is complete.
[0104] The pattern control module is also responsible for resending baseline measurement commands during phase switching and resetting pattern display parameters before the start of each fine-tuning sub-phase.
[0105] The acquisition and processing module acquires the display image corresponding to the test pattern and calculates the brightness evaluation value of each type of test pattern according to the preset spatial area division.
[0106] Specifically, after the pattern control module displays a test pattern and issues a "stable and ready" signal, the acquisition and processing module starts the camera and continuously acquires multiple frames of images (5 frames in this embodiment). For each frame, the region of interest is first cropped (only the effective area of the display is retained), and then divided into four sub-regions: upper left, upper right, lower left, and lower right, according to a 2×2 grid.
[0107] Calculate the average brightness of all pixels within each sub-region, and denote it as... , , , Next, the brightness evaluation value of the frame is calculated: After calculating the brightness of 5 frames, the arithmetic mean is taken to obtain the final brightness evaluation value of this type of pattern. The data acquisition and processing module will The corresponding pattern identifier (first pattern or second pattern) is passed to the differential evaluation module;
[0108] If a frame capture times out or the image is obviously abnormal (such as being completely black), the acquisition and processing module will report the error to the process management module and request a retry.
[0109] The differential evaluation module constructs a differential evaluation quantity based on the difference between the brightness evaluation values of the at least two types of test patterns;
[0110] Specifically, when the brightness evaluation value of the first pattern is received... Brightness evaluation value of the second pattern Then, the differential evaluation module calculates: The differential evaluation value automatically eliminates common-mode interference such as ambient light drift and camera baseline shift, while compensating for viewpoint bias caused by the camera's high sensitivity to bright areas.
[0111] The smaller the absolute value, the more balanced the left and right viewpoints are under the current parameters;
[0112] The differential evaluation module will calculate the results. value along with the corresponding candidate parameters This information is then output to the optimization decision-making module.
[0113] In addition, this module is also responsible for providing the process management module with baseline remeasurement results when switching phases or starting sub-phases.
[0114] The optimization decision module drives the iterative update of calibration parameters based on the differential evaluation metric.
[0115] Specifically, the optimal parameters for the current stage are obtained from the process management module. Current search step size and baseline differential evaluation metrics ;
[0116] Generate two symmetric candidates: , And cut it to within the boundary;
[0117] In sequence and The data is transmitted to the pattern control module, triggering a complete round of dual-pattern differential evaluation (completed by the acquisition and processing module and the differential evaluation module), and the corresponding differential evaluation quantity is obtained. and ;
[0118] Compare and The candidate with the smaller value is selected as the winning candidate. Its differential evaluation metric is denoted as ;
[0119] like < Then accept Update the new optimal parameters. , If the parameters are not improved, inform the process management module that "there is improvement in this round"; otherwise, keep the original parameters and inform it that "there is no improvement in this round".
[0120] The optimization decision module will also switch to single-pattern evaluation mode (using only the first pattern, with the differential evaluation module not participating) in the pre-process stage according to the instructions of the process management module, and use different step sizes and convergence conditions.
[0121] The process management module controls the stage switching, convergence determination, and exception handling of the calibration process;
[0122] Specifically, phase transition:
[0123] The initial state is set as the pre-stage. The pre-stage uses single-pattern evaluation. The first search step size is 4 pixels. The process management module monitors the improvement status and current step size returned by the optimization decision module.
[0124] When the step size is reduced to less than 0.5 pixels or there is no improvement for 3 consecutive rounds, the pre-stage is determined to be converged. The current optimal parameters and the initial termination step size (1 pixel) of the post-stage are passed to the optimization decision module, and the module is switched to the post-fine-tuning stage.
[0125] The post-fine-tuning stage is further divided into multiple sub-stages (step size multiplier sequence [2,1,0.5]).
[0126] Upon entering each new sub-stage, the process management module first instructs the differential evaluation module to perform baseline remeasurement (averaging three consecutive measurements) of the current optimal parameters, and then updates the optimization decision module. And the current step size (base step size multiplied by the multiplier);
[0127] Convergence criterion:
[0128] Within each sub-stage, if the optimization decision module reports "no improvement" for two consecutive scans (each scan includes the evaluation of positive and negative candidates), the process management module determines that the sub-stage has converged.
[0129] If the current sub-stage is the last sub-stage (multiplier 0.5), then the entire calibration process is considered to have converged; otherwise, the optimal parameters are passed to the next sub-stage, and the above process is repeated.
[0130] Exception handling:
[0131] The process management module monitors the status of the data acquisition and processing module and the communication interface in real time. If any module reports an error (such as data acquisition timeout), it commands the evaluation of the current candidate parameter to be invalid, does not update the parameter, and automatically retryes the same candidate (up to 3 times).
[0132] If three consecutive rounds of evaluation are invalid due to errors, the process management module will trigger an exception alarm (a pop-up window will appear on the interface and the error will be written to the log), and will pause the calibration or execution phase rollback according to the preset strategy (resetting the current sub-phase to the parameters and step size at the beginning of the sub-phase).
[0133] If three consecutive rounds of evaluation are effective but there is no parameter improvement, and the current step size has not yet reached the lower limit, the process management module can also trigger a stage rollback (e.g., multiply the step size by 0.8 and then retry) to avoid getting stuck in a local flat area.
[0134] Data recording: The process management module is also responsible for recording the parameter trajectory, differential evaluation values for each round, abnormal events, etc. throughout the calibration process, which facilitates subsequent quality traceability;
[0135] Example of a complete transformation from the preceding stage to the following stage:
[0136] The process management module sets the status to "preceding", step size to 4, and mode to "single pattern". The optimization decision module generates candidate parameters, the pattern control module displays the first pattern, and the acquisition and processing module calculates... The optimization decision module is compared and updated. After 5 iterations, the step size is reduced to 0.5, and the initial convergence is achieved, yielding... =−1.2;
[0137] The process management module switches the status to "Post," step size to 1, and mode to "Differential," and notifies the differential evaluation module to... =−1.2 Measurement Baseline Entering the first sub-stage (multiplier 2, actual step size 2). Optimization decision module generation. =−1.2+2=0.8, =−3.2 (trimmed to -10);
[0138] The pattern control module displays the first and second patterns sequentially, and the acquisition and processing module calculates... , Differential evaluation module calculation , The optimization decision-making module is updated selectively.
[0139] After the first sub-stage converges, the process management module passes the optimal parameter -0.2 to the second sub-stage, retests the baseline, sets the step size to 1, and continues the search. The third sub-stage eventually converges to -0.04.
[0140] If consecutive data collection failures occur at any stage, the process management module will issue an alert and perform a rollback to ensure system robustness.
[0141] The system in this embodiment maps each feature in the method claims to a specific functional module, and achieves a complete and stable automatic calibration process through the cooperation between modules. The implementation of each module can be done in software (such as C++ / Python programs) or hardware (such as FPGA acceleration), both of which fall within the scope of protection of this invention.
[0142] The specific embodiments of the invention have been described in detail above, but these are merely examples. The invention is not limited to the specific embodiments described above. Those skilled in the art should understand that the embodiments and descriptions in the specification are only illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A stereoscopic calibration optimization method of dual-pattern differential brightness driving, characterized in that, include: Under the same candidate parameters, at least two types of test patterns with complementary brightness are displayed sequentially; Collect the display images corresponding to the at least two types of test patterns respectively; For each type of test pattern, the brightness evaluation value is calculated according to the preset spatial area division of the displayed image; A differential evaluation quantity is constructed based on the difference between the brightness evaluation values of the at least two types of test patterns; The calibration parameters are iteratively updated based on the differential evaluation quantity until the preset convergence or termination condition is met.
2. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, The brightness evaluation value is obtained through the following method: The acquired display image is divided into multiple spatial sub-regions. The average pixel brightness in each sub-region is calculated. Then, based on the positional relationship of each sub-region, the sum of the average brightness of a pair of diagonal sub-regions is calculated. The difference between the sum of the average brightness of a pair of diagonal sub-regions and the sum of the average brightness of another pair of diagonal sub-regions is used as the brightness evaluation value.
3. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, The two types of complementary brightness test patterns include a first test pattern and a second test pattern obtained by inverting the brightness of the first test pattern; The differential evaluation value is constructed by calculating the difference between the brightness evaluation value of the first test pattern and the brightness evaluation value of the second test pattern. It is used to suppress common-mode brightness disturbances and compensate for viewpoint bias caused by the asymmetry of the sensitivity of the acquisition sensor to bright and dark areas.
4. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, The stereo calibration optimization method includes at least two optimization stages: The initial stage adopts a single-pattern evaluation method, and performs parameter search with the first search step size; At least one post-fine-tuning stage enables the differential evaluation quantity to perform parameter search with a second search step size smaller than the first search step size.
5. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, The iterative update of the parameters includes a symmetric candidate comparison process: On the calibration parameter axis to be optimized, with the current optimal parameter value as the center and the search step size of the current post-fine-tuning stage as the interval, two symmetrical candidate parameters, one in the positive direction and one in the negative direction, are generated. For each candidate parameter, keeping the candidate parameter unchanged, two types of complementary brightness test patterns are displayed in sequence, images are acquired, brightness evaluation values are calculated, and a corresponding differential evaluation quantity is constructed based on the difference between the two types of brightness evaluation values. Select the candidate with the better difference evaluation value as the winning candidate; The differential evaluation value of the winning candidate is compared with the baseline differential evaluation value corresponding to the current optimal parameter; If the differential evaluation value of the winning candidate is better than the baseline differential evaluation value, then the winning candidate is accepted as the new optimal parameter and the baseline differential evaluation value is updated; otherwise, the current optimal parameter remains unchanged.
6. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 4, characterized in that, The post-fine-tuning stage employs a strategy of progressively reducing the search scale: Multiple fine-tuning sub-stages are set up to be executed sequentially. Each sub-stage has a decreasing search step size multiplier. After the previous sub-stage converges, the optimal parameters are passed to the next sub-stage.
7. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, For each of the at least two types of complementary brightness test patterns, multiple frames of images are continuously acquired after the pattern is displayed, the brightness evaluation value of each frame is calculated, and the average of the brightness evaluation values of the multiple frames is taken as the final brightness evaluation value of the pattern.
8. The stereo calibration optimization method driven by dual-pattern differential brightness according to claim 1, characterized in that, It also includes credibility control: If any frame of image acquisition fails or communication is abnormal, the current evaluation is marked as invalid and the current parameters are not updated. When multiple consecutive evaluations are ineffective or no parameter improvement occurs, a phase rollback or retry mechanism is triggered, and an anomaly alarm is issued.
9. A stereo calibration and optimization system driven by dual-pattern differential brightness, characterized in that, include: The pattern control module controls the display terminal to sequentially display at least two types of test patterns with complementary brightness under the same candidate parameters; The acquisition and processing module acquires the display image corresponding to the test pattern and calculates the brightness evaluation value of each type of test pattern according to the preset spatial area division; The differential evaluation module constructs a differential evaluation quantity based on the difference between the brightness evaluation values of the at least two types of test patterns; The optimization decision module drives the iterative update of calibration parameters based on the differential evaluation metric. The process management module controls the stage switching, convergence determination, and exception handling of the calibration process.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a stereo calibration optimization method driven by dual-pattern differential brightness according to any one of claims 1 to 8.