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.