Hardware-in-the-loop test method and system for combination instrument

By using an integrated rigid reference platform and displacement adjustment mechanism in hardware-in-the-loop testing, combined with multi-scale template matching and image processing algorithms, the problem of inaccurate image recognition caused by camera vibration was solved, achieving high precision and high efficiency in combined instrument testing.

CN121764045APending Publication Date: 2026-03-31SINO TRUK JINAN POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In automated hardware-in-the-loop testing of automotive instrument clusters, traditional machine vision solutions suffer from relative motion caused by vibrations due to the non-common reference design between the camera and the instrument cluster. This results in frequent repositioning of the image recognition algorithm, increasing processing time and potentially leading to test errors.

Method used

An integrated rigid reference platform and displacement adjustment mechanism are adopted, and the camera and the combined instrument are installed together on the rigid reference platform. Precise positioning is achieved through a rapid positioning fixture, and feature point matching and filtering smoothing are performed using multi-scale, multi-angle template matching and image processing algorithms to compensate for image offset.

Benefits of technology

It effectively suppressed camera shake, improved image acquisition quality and instrument testing accuracy and reliability, simplified the installation process, and improved testing accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764045A_ABST
    Figure CN121764045A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of combination instrument HIL testing, in particular to a combination instrument hardware-in-the-loop testing method and system, and the method comprises the steps: enabling a to-be-tested combination instrument to be connected with a controller of the to-be-tested combination instrument, forming a hardware-in-the-loop testing loop, enabling the instrument and a camera to be installed on an integrated rigid reference platform, through rough adjustment of the displacement mechanism and accurate positioning of the L-shaped clamp, relative shaking is inhibited from the root of machinery. The method comprises the following steps: sending a test instruction, collecting an image, carrying out feature matching by using a multi-scale / multi-angle template to obtain a matching result, calculating a matching quality score based on the matching result, determining a target and a position thereof according to the matching quality score, and carrying out filtering smoothing on the target position in continuous multiple frames to eliminate jitter. And comparing the smoothed identification result with an expected result to complete instrument function judgment. Through cooperation of mechanical vibration suppression and algorithm compensation, the problems of inaccurate image recognition and tedious resetting caused by shaking in the test are solved, and the test accuracy, reliability and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hardware-in-the-loop (HIL) testing technology for instrument clusters, specifically to a hardware-in-the-loop testing method and system for instrument clusters. Background Technology

[0002] In automated hardware-in-the-loop (HIL) testing of automotive instrument clusters, machine vision solutions are commonly used: industrial cameras capture images of the instrument display, which are then compared with standard images to determine if the instrument functions correctly. However, this approach faces significant challenges in practical applications. External disturbances in the testing environment can easily cause vibrations in the testing fixture. Traditional fixtures employ a separate, fixed design, with the camera and instrument mounted on different mechanical references and connected by a multi-layered structure including a series of bases, rotating arms, and guide rails. This structure has inherent flaws: manufacturing tolerances and assembly clearances at each connection interface are amplified step by step under vibration, resulting in significant shaking at the camera's end; the non-common reference design causes the camera and instrument to vibrate in different ways, creating unpredictable relative motion between them. This directly leads to random shifts in the instrument's position and angle in the acquired images, forcing image recognition algorithms to frequently perform time-consuming repositioning searches, increasing processing time and potentially causing test errors due to positioning failures.

[0003] Therefore, there is an urgent need for a testing method and system that can suppress relative sway from the mechanical source and intelligently compensate for residual offset from the image processing level, so as to improve the accuracy, reliability and efficiency of testing. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a hardware-in-the-loop testing method and system for combined instruments. Through the synergistic effect of mechanics and algorithms, it effectively suppresses multi-axis camera sway, significantly improving image acquisition quality and the accuracy and reliability of instrument testing.

[0005] In a first aspect, the present invention provides a hardware-in-the-loop testing method for a combined instrument, comprising the following steps: S1. Connect the instrument under test (DUT) and its controller to form a hardware-in-the-loop test loop. Mount the DUT and the camera together on an integrated rigid reference platform. Use a displacement adjustment mechanism on the platform to coarsely position the relative positions of the two instruments so that the display area of ​​the instrument enters the field of view of the camera. Use a quick positioning fixture to precisely position and lock the instrument under test. S2. Send a test command to the controller to drive the instrument cluster to produce a corresponding display response. At the same time, capture the display image of the instrument cluster through the camera and match the display image with the pre-stored multi-scale template and / or multi-angle template to obtain a matching result containing the correspondence of feature points. S3. Based on the feature point correspondence in the matching results, calculate the matching quality score, and confirm the identified target and target location based on the score; S4. Filter and smooth the target location identified by S3 in multiple consecutive frames of images. S5. Compare the smoothed target recognition result with the expected result corresponding to the test command to determine whether the function of the combined instrument is qualified.

[0006] As a further limitation of the technical solution of the present invention, in S1, the combination instrument is positioned and locked by a quick positioning fixture on the support platform driven by the displacement adjustment mechanism; wherein, the quick positioning fixture includes a fixed L-shaped limiting block and an L-shaped clamping member that can move along the diagonal direction. During positioning, the corner of the instrument is made to abut against the L-shaped limiting block, and then the L-shaped clamping member is moved to press and fix it.

[0007] By using a fixed L-shaped limit block and an L-shaped clamping component, the instrument cluster can be quickly, accurately, and repeatedly positioned and locked. This design utilizes the principle of diagonal clamping, using a simple mechanical structure to simultaneously constrain the translational and rotational degrees of freedom of the instrument, ensuring that the angle and lower left corner origin position of instruments of the same model are absolutely consistent each time they are installed, greatly simplifying the installation process.

[0008] As a further limitation of the technical solution of the present invention, the camera is fixed to the integrated rigid reference platform by a mounting bracket, and the displacement adjustment mechanism is disposed on the base of the integrated rigid reference platform, used to drive the support platform to move to adjust the relative position of the camera and the instrument. The displacement adjustment mechanism includes a first guide rail and a second guide rail arranged perpendicularly to each other; the first guide rail is mounted on the second guide rail by a second guide rail slider; the support platform is mounted on the first guide rail by the first guide rail slider; coarse positioning includes: adjusting the lateral position by driving the first guide rail to move along the second guide rail, and adjusting the longitudinal position by driving the support platform to move along the first guide rail.

[0009] The system employs a mutually perpendicular first and second guide rail and slider structure, providing high-precision, quantifiable two-dimensional in-plane adjustment capability for the relative position of the camera and the instrument. By driving the two guide rail sliders separately, the lateral and longitudinal positions of the support platform (where the instrument is mounted) can be adjusted independently and precisely, enabling rapid and accurate alignment of the instrument display area and ensuring the accuracy of the camera's field of view.

[0010] As a further limitation of the technical solution of the present invention, in S2, the step of matching the displayed image with the pre-stored multi-scale template and / or multi-angle template includes: S21. Extract the image features of the displayed image and each pre-stored template respectively, and generate corresponding feature points and feature data for characterizing their local structure; the image features are ORB features, SIFT features or SURF features; S22. Based on the feature data generated in S21, the feature points of the displayed image are matched with the feature points of each template to find the correspondence between the feature points of the two sets that meet the preset geometric constraints and descriptor similarity requirements; the preset geometric constraints are based on the random sampling consensus algorithm to screen the initially matched feature point pairs to exclude incorrect matching pairs. S23. For each template, summarize the correspondence of all successfully matched feature points to form the matching result between the template and the displayed image.

[0011] By extracting robust image features such as ORB and SIFT, and using algorithms such as RANSAC for geometric consistency screening, erroneous matches caused by image noise, illumination changes, etc., can be effectively eliminated, ensuring the accuracy and reliability of the matching results.

[0012] As a further limitation of the technical solution of the present invention, the pre-stored multi-scale template is generated by scaling the standard template image by different proportions; the pre-stored multi-angle template is generated by performing affine rotation transformation on the standard template image by different angles.

[0013] By scaling and rotating standard templates at different ratios and angles, a multi-scale, multi-angle template library was pre-built. This improved the recognition success rate when there are minor deviations in instrument installation or changes in viewing angle.

[0014] As a further limitation of the technical solution of the present invention, step S3 includes: S31. For each pair of matches in the feature point correspondence, calculate the distance value used to measure the similarity between the pair of feature points; S32. Calculate the average value of the distance values, and calculate a score representing the overall matching quality based on the average value; S33. Compare the calculated matching quality score with a preset acceptance threshold; S34. If the score of the matching quality is higher than the acceptance threshold, the display target corresponding to the currently matched template is confirmed as the recognition result, and the target position of the target in the image is calculated based on the correspondence of the matched feature points; wherein, the target position is determined by calculating the affine transformation of the position coordinates of all successfully matched feature points in their corresponding images.

[0015] The overall quality of a single match is evaluated by calculating the feature point matching distance, and an acceptance threshold is introduced for binary decision-making, providing an objective and quantitative standard for judging the reliability of the recognition results.

[0016] As a further limitation of the technical solution of the present invention, in S32, the score of the matching quality Calculate using the following formula:

[0017] in The average value of the distance values. and This is a preset positive coefficient.

[0018] As a further limitation of the technical solution of the present invention, S1 also includes a coordinate management step: When installing a new model of instrument for the first time, record the positions of the first guide rail slider and the second guide rail slider after coarse positioning, as the initial coordinates of the instrument model; when testing the same model of instrument in subsequent tests, drive the displacement adjustment mechanism to the corresponding position directly based on the initial coordinates.

[0019] By recording and reusing the initial guide rail coordinates for each instrument model, the adjustment mechanism can be directly driven to the predetermined position when testing the same model of instrument in subsequent tests, eliminating the need for tedious visual alignment. This greatly simplifies the process, avoids disturbances introduced by repeated adjustments, and ensures the consistency of test conditions.

[0020] Secondly, the present invention also provides a hardware-in-the-loop test system for a combination instrument, used to implement the test method described in the first aspect, including an integrated rigid reference platform, a displacement adjustment mechanism, a quick positioning fixture, an image compensation processing module, and a controller; the combination instrument under test is connected to the controller to form a hardware-in-the-loop test loop. The displacement adjustment mechanism is installed on the integrated rigid reference platform and is used to coarsely position the relative position of the camera and the instrument cluster. The quick positioning fixture is mounted on the support platform driven by the displacement adjustment mechanism and is used to accurately position and lock the combination instrument placed on the support platform; the quick positioning fixture includes a fixed L-shaped limit block and an L-shaped clamping member that can move along the diagonal direction; The image compensation processing module includes: The camera is fixed to the integrated rigid reference platform by a mounting bracket and is used to capture the display images of the combined instrument; and the displacement adjustment mechanism is located on the base of the integrated rigid reference platform and is used to drive the support platform to move to adjust the relative position of the camera and the instrument. An image processor, communicatively connected to the camera, is configured to perform the following processing: The displayed image captured by the camera is matched with a pre-stored multi-scale template and / or multi-angle template to obtain a matching result containing the correspondence of feature points; based on the correspondence of feature points in the matching result, a matching quality score is calculated, and the identified target and target location are confirmed according to the score; the confirmed target location in multiple consecutive frames of images is filtered and smoothed; the smoothed target recognition result is compared with the expected result corresponding to the test command to determine whether the function of the combined instrument is qualified.

[0021] As a further limitation of the technical solution of the present invention, the displacement adjustment mechanism includes a first guide rail and a second guide rail arranged perpendicularly to each other; the first guide rail is mounted on the second guide rail via a second guide rail slider, the support platform is mounted on the first guide rail via a first guide rail slider, and the support platform is fixedly connected to the combined instrument.

[0022] As a further limitation of the technical solution of the present invention, the pre-stored multi-scale template and / or multi-angle template is stored in a memory connected to the image processor; the multi-scale template is generated by scaling a standard template image at different ratios, the scaling ratios including 0.8, 0.9, 1.1 and 1.2; the multi-angle template is generated by performing affine rotation transformations on a standard template image at different angles, the rotation angles including -5°, -2°, 2° and 5°.

[0023] As a further limitation of the technical solution of the present invention, the image processor is configured to use a Kalman filter when performing the filtering and smoothing process, and to use the target position and velocity as state variables.

[0024] As a further limitation of the technical solution of the present invention, the system also includes a host computer that communicates with the image processor, used to send the test instructions and receive the judgment results.

[0025] As can be seen from the above technical solutions, this application has the following advantages: If disturbances occur during the experiment, due to the integrated framework adopted in this application, there is only one propagation path, which greatly reduces the number of disturbance variables. Specifically, the path is: cabinet → second guide rail → first guide rail → support platform → instrument. A quick positioning fixture is set up to accurately position and lock the combined instrument placed on the support platform, so that there is no possibility of relative displacement between the support platform and the instrument. The dual guide rail structure adopted in this application provides four support points between the cabinet and the second guide rail, between the second guide rail and the first guide rail, and between the first guide rail and the support platform, minimizing the vibration and displacement caused by disturbances.

[0026] By employing a multi-scale / multi-angle template matching algorithm, along with matching quality assessment and temporal filtering smoothing, residual image biases are effectively compensated. This method integrates mechanical vibration suppression and algorithmic compensation, systematically solving the technical challenges of inaccurate image recognition and cumbersome resetting caused by shaking in HIL testing, significantly improving the accuracy, reliability, and efficiency of the test. Attached Figure Description

[0027] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart illustrating the method provided in an embodiment of the present invention.

[0029] Figure 2 This is a schematic diagram of the side structure of the integrated rigid reference platform in an embodiment of the present invention.

[0030] Figure 3 This is a schematic diagram of the front view structure of the integrated rigid reference platform in an embodiment of the present invention. Detailed Implementation

[0031] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0033] like Figure 1 , Figure 2 and Figure 3 As shown, this embodiment of the invention provides a hardware-in-the-loop testing method for a combined instrument, including the following steps: S1. Connect the instrument under test (DUT) and its controller to form a hardware-in-the-loop test loop. Mount the DUT and camera 9 together on an integrated rigid reference platform. Use a displacement adjustment mechanism on the platform to coarsely position the relative positions of the two instruments so that the display area of ​​the instrument enters the camera's field of view. Use a quick positioning fixture on the support platform driven by the displacement adjustment mechanism to position and lock the DUT. The quick positioning fixture includes a fixed L-shaped limit block 7 and an L-shaped clamping member 6 that can move along the diagonal direction. During positioning, make the corner of the instrument abut against the L-shaped limit block 7, and then move the L-shaped clamping member 6 to press and fix it.

[0034] The displacement adjustment mechanism includes a first guide rail 3 and a second guide rail 1 arranged perpendicularly to each other. The first guide rail 3 moves on the second guide rail 1 via a second guide rail slider 2, and the support platform 5 moves on the first guide rail 3 via a first guide rail slider 4. The coarse positioning includes: adjusting the lateral position of the support platform 5 on which the instrument cluster is mounted by driving the movement of the first guide rail slider 4, and adjusting the longitudinal position of the support platform 5 by driving the movement of the second guide rail slider 2. In this case, the movement of the first guide rail 3 on the second guide rail 1 drives the movement of the support platform 5. The slider is driven by an existing structure. In this embodiment of the invention, a set of high-rigidity, high-precision bidirectional double guide rails is used to form a guide rail group, which is integrated on an integrated rigid reference platform to support and adjust the instrument cluster for four-way in-plane adjustment. Specifically, the double guide rails of the second guide rail, i.e., the lower structure of the integrated common reference frame, support the double guide rails of the first guide rail, the support platform, and the instrument cluster mounted above. The guide rail assembly uses precision linear guide rails as the guiding foundation, and is driven by high-precision ball screws or precision trapezoidal screws. Readings and control are achieved via knob scales and a vernier scale on the mounting plate side, with a positioning accuracy of up to 0.01mm. All adjusting shafts are equipped with reliable mechanical locking mechanisms (such as eccentric cam locking blocks or clamping bolts), which securely lock the shafts after adjustment, eliminating any potential backlash or wobble.

[0035] In this embodiment of the invention, a unique and fixed coordinate system is established on the platform for each model of instrument. On the support platform, there are two L-shaped clamps located diagonally opposite each other, one of which is an L-shaped limiting block 7, fixed to the support platform and immovable. This ensures that the instrument's two translational degrees of freedom and one rotational degree of freedom in the horizontal plane are restricted, guaranteeing that the installation angle and the lower left corner origin position of all instruments of the same model are absolutely consistent each time. The L-shaped clamping member 6, located diagonally, can move along the diagonal angle and has locking and unlocking functions. When replacing a new test instrument, the L-shaped clamping member 6 is unlocked, the old instrument is removed, one corner of the new instrument is placed against the L-shaped limiting block 7, and the L-shaped clamping member 6 is pushed along the diagonal direction to clamp the new instrument.

[0036] Due to differences in specifications, size, and display area among various instruments, the guide rails need to be adjusted to center the camera on the instrument. The position of the two guide rail sliders at this point should be recorded. Testing is then conducted (some tests involve recording all instrument messages, corresponding lights, alarm pop-ups, etc., and comparing this with the actual display content. Therefore, when testing the same instrument at different times, the actual display position must be identical to the previously recorded image, requiring a complete instrument reset). If the same instrument needs to be tested again, simply move the guide rail sliders to the recorded position. This effectively reduces disturbance during instrument replacement and ensures accuracy during reset.

[0037] S2. Send a test command to the instrument combination, capture its display image through the camera, and match the display image with the pre-stored multi-scale template and / or multi-angle template to obtain a matching result containing the correspondence of feature points; S3. Based on the feature point correspondence in the matching results, calculate the matching quality score, and confirm the identified target and target location based on the score; S4. Perform filtering and smoothing processing on the target location identified in S3 in multiple consecutive frames of images; specifically including: A state vector containing the target's position and motion state is established, and a state estimator is initialized; the state estimator is a Kalman filter, and the state vector includes at least the two-dimensional position coordinates (x, y) of the target in the image coordinate system and its corresponding velocity components (vx, vy). For the target location confirmed in step S3 in each new frame: a) Based on the state vector of the previous moment, predict the target state at the current moment using a uniform motion model; b) Using the target position confirmed in step S3 in the current frame as the observation value, correct the predicted state to obtain the smoothed optimal state estimate at the current time. The position component is extracted from the optimal state estimate and used as the smoothed position of the target in the frame image.

[0038] It should be noted that if the target position cannot be confirmed by S3 in the current frame, only the prediction step (a) is executed, but the update step (b) is not executed, and the position component in the prediction state is used as the smooth output of the current frame.

[0039] S5. Compare the smoothed target recognition result with the expected result corresponding to the test command to determine whether the function of the combined instrument is qualified.

[0040] In some embodiments, step S2, matching the displayed image with a pre-stored multi-scale template and / or multi-angle template, includes: S21. Extract the image features of the displayed image and each pre-stored template respectively, and generate corresponding feature points and feature data for characterizing their local structure; the image features are ORB features, SIFT features or SURF features; S22. Based on the feature data generated in S21, the feature points of the displayed image are matched with the feature points of each template to find the correspondence between the feature points of the two sets that meet the preset geometric constraints and descriptor similarity requirements; the preset geometric constraints are based on the random sampling consensus algorithm to screen the initially matched feature point pairs to exclude incorrect matching pairs. S23. For each template, summarize the correspondence of all successfully matched feature points to form the matching result between the template and the displayed image.

[0041] The pre-stored multi-scale template is generated by scaling the standard template image at different ratios; the pre-stored multi-angle template is generated by performing affine rotation transformations at different angles on the standard template image.

[0042] In some embodiments, step S3 includes: S31. For each pair of matches in the feature point correspondence, calculate the distance value used to measure the similarity between the pair of feature points; S32. Calculate the average value of the distance values, and calculate a score representing the overall matching quality based on the average value; S33. Compare the calculated matching quality score with a preset acceptance threshold; S34. If the score of the matching quality is higher than the acceptance threshold, the display target corresponding to the currently matched template is confirmed as the recognition result, and the target position of the target in the image is calculated based on the correspondence of the matched feature points; wherein, the target position is determined by calculating the affine transformation of the position coordinates of all successfully matched feature points in their corresponding images.

[0043] In S32, the score of matching quality Calculate using the following formula:

[0044] in The average value of the distance values. and This is a preset positive coefficient.

[0045] In this embodiment, the calculation coefficients A and B of the matching quality score can be determined through the following statistical calibration process: On the integrated rigid reference platform, the quick-positioning fixture is used to repeatedly install a known qualified standard instrument. After each installation, image acquisition and feature matching steps are performed, and the distance values ​​between all feature point pairs calculated after each successful match are recorded. Based on a large number of collected distance values Based on the statistical distribution, determine a reasonable upper limit for the distance from the mean. Define the target score mapping relationship, for example, the desired score mapping. = 0 = , = hour = Based on these two points, the coefficients A and B can be solved. For example, A = B = ( - ) / Using the calibrated coefficients A and B, calculate the matching quality score for these N experiments. .analyze The distribution of all The statistical measure; based on the statistical measure, the acceptance threshold is set to: lower than the vast majority of correctly installed... It is also higher than the score of low-quality matches caused by typical interference.

[0046] In some embodiments, the method further includes: establishing and maintaining a dynamic search region, including the following steps: Upon receiving the test command, the initial position of the target is identified and recorded from the first frame image, and the first dynamic search area is determined with the initial position as the center. For each subsequent frame, based on the target's position information in the processed frames, its estimated position in the current frame is predicted. Using this estimated position as the center, a current dynamic search region is determined for searching the target in the current frame. The size of the current dynamic search region is adaptively adjusted according to the target's position fluctuations in historical frames. The step of predicting the target's estimated position in the current frame based on the target's position information in the processed frames includes: The motion state of the displayed target in the image is defined as a state vector, which includes at least the position and velocity of the target in the image coordinate system; Based on the updated state vector of the previous frame and combined with a preset uniform motion model, the predicted state vector of the displayed target in the current frame is calculated; the displayed target is identified within the current dynamic search area to obtain its actual measured position in the current frame; the predicted state vector is corrected using the actual measured position to obtain the updated state vector of the current frame, which is used for prediction of the next frame. The position component is extracted from the predicted state vector as the estimated position of the display target in the current frame.

[0047] The step of adaptively adjusting the size of the current dynamic search area based on the degree of positional fluctuation of the displayed target in historical frames includes: Based on the actual identification position of the displayed target in the most recent N consecutive frames of images, the standard deviation of its position coordinates is calculated as a measure of the degree of position fluctuation. Based on the measure of the degree of volatility, a region scaling factor is determined through a predefined mapping relationship, wherein the larger the measure of the degree of volatility, the larger the region scaling factor. Centered on the estimated location, the size of the current dynamic search region is the product of the baseline search region size and the region scaling factor.

[0048] It should be noted that adaptively adjusting the size of the current dynamic search region also includes: When the display target is successfully identified within the dynamic search area for multiple consecutive frames, the size of the dynamic search area is gradually reduced until a preset minimum size is reached; When the target for display fails to be identified within the dynamic search area, the search area size in the next frame is enlarged according to a preset amplification ratio. The predefined mapping relationship is generated through one of the following methods: By analyzing the correlation between target tracking success rate and search area size in historical test data, multiple consecutive fluctuation ranges are predefined, and a fixed area scaling factor is assigned to each range. The region scaling factor The measure of the degree of fluctuation After formula And determined, among which The preset slope coefficient is greater than zero. This is the preset baseline scaling factor.

[0049] The predefined mapping relationship is configured such that when the measure of volatility is lower than the first threshold, the region scaling factor is set to 1, i.e., the baseline search region size is used; when the measure of volatility is higher than the second threshold, a system alarm is triggered or the tracking process is re-initialized.

[0050] This invention also provides a hardware-in-the-loop test system for combined instruments, used to implement the test methods described in the above embodiments, combined with... Figure 2 and Figure 3 It includes an integrated rigid reference platform, a displacement adjustment mechanism, a rapid positioning fixture, and an image compensation processing module; the instrument under test is connected to the controller to form a hardware-in-the-loop test loop. The displacement adjustment mechanism is installed on the integrated rigid reference platform and is used for coarse positioning of the relative position of the camera 9 and the instrument cluster. The quick positioning fixture is set on the support platform 5 driven by the displacement adjustment mechanism and is used for precise positioning and locking of the instrument cluster placed on the support platform 5. The quick positioning fixture includes a fixed L-shaped limit block 7 and an L-shaped clamping member 6 that can move along the diagonal direction. The displacement adjustment mechanism includes a first guide rail 3 and a second guide rail 1 arranged perpendicularly to each other. The first guide rail 3 is installed on the second guide rail 1 through the second guide rail slider 2, and the support platform 5 is installed on the first guide rail 3 through the first guide rail slider 4. The support platform 5 is fixedly connected to the instrument cluster.

[0051] The image compensation processing module includes: Camera 9 is fixed to the integrated rigid reference platform by mounting bracket 8 and is used to capture the display image of the combined instrument; and the displacement adjustment mechanism is located on the base of the integrated rigid reference platform and is used to drive the support platform to move to adjust the relative position of the camera and the instrument. An image processor, communicatively connected to the camera, is configured to perform the following processing: The displayed image captured by the camera is matched with a pre-stored multi-scale template and / or multi-angle template to obtain a matching result containing the correspondence of feature points; based on the correspondence of feature points in the matching result, a matching quality score is calculated, and the identified target and target location are confirmed according to the score; the confirmed target location in multiple consecutive frames of images is filtered and smoothed; the smoothed target recognition result is compared with the expected result corresponding to the test command to determine whether the function of the combined instrument is qualified.

[0052] In this embodiment of the invention, the image processor is further configured to perform dynamic tracking processing to replace or assist the template matching, the dynamic tracking processing including: Determine the initial position of the target and set the initial search area in the first frame image; For subsequent images, predict the target's current position based on its motion information in the processed frames, and update the dynamic search region. The target is identified within the dynamic search area and its position is filtered and smoothed.

[0053] The pre-stored multi-scale templates and / or multi-angle templates are stored in a memory connected to the image processor; the multi-scale templates are generated by scaling a standard template image at different ratios, including 0.8, 0.9, 1.1, and 1.2; the multi-angle templates are generated by performing affine rotation transformations on a standard template image at different angles, including -5°, -2°, 2°, and 5°.

[0054] When performing the filtering and smoothing process, the image processor is configured to use a Kalman filter and use the target position and velocity as state variables.

[0055] In some embodiments, the system further includes a host computer that communicates with the image processor to send the test instructions and receive the judgment results.

[0056] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0057] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0058] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0059] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A cluster instrument hardware-in-the-loop test method, characterized by, The method comprises the steps of: S1, connecting the to-be-tested combination instrument with its controller to form a hardware-in-the-loop test loop, mounting the to-be-tested combination instrument and the camera on an integrated rigid reference platform, and coarsely positioning the relative positions of the two through a displacement adjusting mechanism arranged on the platform to make the display area of the instrument enter the field of view of the camera; and finely positioning and locking the combination instrument through a quick positioning clamp; S2, sending a test instruction to the controller to make the controller drive the combination instrument to generate a corresponding display response, collecting the display image of the combination instrument through the camera, and matching the display image with a plurality of pre-stored scale templates and / or a plurality of angle templates to obtain a matching result containing a feature point correspondence; S3, calculating a matching quality score based on the feature point correspondence in the matching result, and confirming the recognized target and target position according to the score; S4, filtering and smoothing the target position confirmed through S3 in a plurality of continuous images; S5, comparing the target recognition result after the smoothing processing with an expected result corresponding to the test instruction to determine whether the function of the combination instrument is qualified.

2. The combination instrument hardware-in-the-loop test method of claim 1, wherein, The camera is fixed on the integrated rigid reference platform through a mounting bracket, and the displacement adjusting mechanism is arranged on the base of the integrated rigid reference platform and used to drive the carrier table to move to adjust the relative positions of the camera and the instrument.

3. The combination instrument hardware-in-the-loop test method of claim 2, wherein, In S1, the quick positioning clamp arranged on the carrier table positions and locks the combination instrument in a diagonal pressing manner, which comprises a fixed L-shaped limiting block and an L-shaped clamping piece movable along the diagonal direction, and the corner of the instrument is abutted against the L-shaped limiting block during positioning, and then the L-shaped clamping piece is pressed and fixed.

4. The combination instrument hardware-in-the-loop test method of claim 3, wherein, In S1, the displacement adjusting mechanism comprises first and second guide rails arranged perpendicularly to each other; the first guide rail is installed on the second guide rail through a second guide rail sliding block; the carrier table is installed on the first guide rail through a first guide rail sliding block; the coarse positioning comprises adjusting the transverse position by driving the first guide rail to move along the second guide rail, and adjusting the longitudinal position by driving the carrier table to move along the first guide rail.

5. The combination instrument HIL testing method of claim 1, wherein, In S2, the step of matching the display image with the pre-stored scale templates and / or angle templates comprises: S21, extracting the image features of the display image and each pre-stored template respectively to generate corresponding feature points and feature data for representing the local structures; the image features are ORB features, SIFT features or SURF features; S22, based on the feature data generated in S21, matching the feature points of the display image with the feature points of each template to find the feature point correspondence between the two sets that meet the preset geometric constraints and the description similarity requirements; the preset geometric constraints are to filter the preliminary matched feature point pairs based on the random sample consensus algorithm to exclude the wrong matching pairs; S23, for each template, all the successfully matched feature point correspondences are summarized to form the matching result between the template and the display image.

6. The combination instrument hardware-in-the-loop test method of claim 5, wherein, The pre-stored multi-scale templates are generated by scaling the standard template image at different scales; and the pre-stored multi-angle templates are generated by performing affine rotation transformation on the standard template image at different angles.

7. The combination instrument HIL test method of claim 5, wherein, The steps of S3 include: S31, for each pair of matches in the feature point correspondence, a distance value is calculated to measure the similarity between the pair of feature points; S32, the average value of the distance values is calculated, and a score representing the overall matching quality is calculated according to the average value; S33, the calculated matching quality score is compared with a preset acceptance threshold; S34, if the matching quality score is higher than the acceptance threshold, the display target corresponding to the currently matched template is confirmed as the recognition result, and the target position of the target in the image is calculated based on the matched feature point correspondence; wherein the target position is determined by calculating the affine transformation of the position coordinates of all successfully matched feature points in their corresponding images.

8. The combination instrument hardware-in-the-loop test method of claim 7, wherein, In S32, the score of the quality of the match The calculation is made according to the following formula: wherein is an average value of the distance values, and is a preset positive coefficient.

9. The combination instrument HIL test method of claim 3, wherein, S1 further includes a coordinate management step: When a new model of combined instrument is first installed, the positions of the first guide rail slider and the second guide rail slider after the coarse positioning is completed are recorded as the initial coordinates of the model of instrument; when a same model of instrument is tested subsequently, the displacement adjusting mechanism is directly driven to the corresponding position according to the initial coordinates.

10. A combination instrument hardware-in-the-loop test system for implementing the test method of any one of claims 1 to 9, characterized by The system comprises an integrated rigid reference platform, a displacement adjusting mechanism, a quick positioning clamp, an image compensation processing module, and a controller; the combined instrument to be tested is connected with the controller to form a hardware-in-the-loop test loop; The displacement adjusting mechanism is installed on the integrated rigid reference platform and is used for coarse positioning of the relative positions of the camera and the combined instrument; The quick positioning clamp is arranged on the bearing table driven by the displacement adjusting mechanism and is used for precise positioning and locking of the combined instrument placed on the bearing table; The quick positioning clamp comprises a fixed L-shaped limiting block and an L-shaped clamping piece movable along the diagonal direction; The image compensation processing module comprises: The camera is fixed on the integrated rigid reference platform through a mounting bracket and is used for collecting the display image of the combined instrument; and the displacement adjusting mechanism is arranged on the base of the integrated rigid reference platform and is used for driving the bearing table to move to adjust the relative positions of the camera and the instrument; The image processor is in communication connection with the camera and is configured to perform the following processing: The display image collected by the camera is matched with the pre-stored multi-scale templates and / or multi-angle templates to obtain a matching result containing feature point correspondence; based on the feature point correspondence in the matching result, a matching quality score is calculated, and the recognized target and target position are confirmed according to the score; the confirmed target positions in continuous multiple frames of images are subjected to filtering and smoothing processing; the target recognition result after the smoothing processing is compared with the expected result corresponding to the test instruction to determine whether the function of the combined instrument is qualified.