Method and device for measuring contact gap of driver controller and electronic equipment

By combining a monocular camera and a contact feature recognition model, high-precision, safe, and efficient measurement of the contact gap of the driver controller is achieved, solving the problems of insufficient measurement accuracy and low efficiency in existing technologies, and is applicable to the maintenance of rail transit vehicles.

CN121498568APending Publication Date: 2026-02-10CRRC QINGDAO SIFANG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511504704.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

The existing technology lacks sufficient precision in controlling the contact gap measurement of the controller, resulting in low efficiency of manual operation and making it difficult to meet the rail transit industry's demand for improved maintenance quality and efficiency.

Method used

Image acquisition and correction are performed using a monocular camera. Combined with a region of interest weighted fusion algorithm and a contact feature recognition model, the contact gap is automatically measured, and non-contact measurement is achieved by obtaining the transformation matrix.

Benefits of technology

It achieves high-precision, safe, and efficient measurement of the contact gap of the controller, avoiding errors from manual operation and contact damage, and improving production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121498568A_ABST
    Figure CN121498568A_ABST
Patent Text Reader

Abstract

The invention relates to a driver controller contact gap measurement method and device and electronic equipment. The method comprises the following steps: calling a monocular camera to collect a to-be-measured driver controller contact image; correcting the to-be-measured driver controller contact image based on the camera internal parameters and the camera distortion parameters of the monocular camera to obtain the corrected to-be-measured driver controller contact image; the corrected driver controller contact image to be measured is processed through a region-of-interest weighted fusion algorithm, and a movable contact outer frame region and a static contact outer frame region are obtained; determining the pixel size of a contact gap based on the movable contact outer frame area and the static contact outer frame area; and obtaining a conversion matrix matched with the monocular camera, and determining the gap size of the driver controller contact to be measured based on the conversion matrix and the pixel size of the contact gap. Gap measurement of the contacts of the driver controller to be measured is completed in a non-contact mode through image acquisition, contact with the contacts is avoided, and improper contact is avoided, so that the contact gap measurement of the driver controller can be performed more accurately, safely and efficiently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of contact gap measurement technology, and in particular to a method, apparatus and electronic device for measuring the contact gap of a controller. Background Technology

[0002] With the rapid development of the rail transit industry, the number and technological level of rail transit vehicles have significantly increased, leading to a simultaneous increase in vehicle maintenance needs and complexity. Within the rail transit vehicle maintenance system, the maintenance quality of the driver controller (also known as the driver's controller) directly affects the operational safety of rail vehicles; therefore, the accuracy and reliability of its maintenance process have become a key focus of the industry.

[0003] Measuring the gap between the moving and stationary contacts is a crucial step in the maintenance of the controller. Current technology indicates that controller measurement typically involves manual operation using a handheld feeler gauge with a fixed positioning module. Specifically, maintenance personnel manually insert the feeler gauge between the moving and stationary contacts, assessing whether the gap meets standards by judging the degree of matching between the feeler gauge thickness and the contact gap. However, this traditional feeler gauge measurement method has significant shortcomings in terms of accuracy control, contact protection, and operational efficiency, making it difficult to meet the rail transit industry's dual demands for improved quality and efficiency in controller maintenance.

[0004] Therefore, finding a more accurate, safe, and efficient method for measuring the contact gap of the controller has become a current research hotspot. Summary of the Invention

[0005] This invention provides a method, apparatus, and electronic device for measuring the contact gap of a driver controller, enabling more accurate, safe, and efficient measurement of the contact gap of the driver controller.

[0006] This invention provides a method for measuring the contact gap of a driver controller. The method includes: using a monocular camera to acquire an image of the driver controller contact point to be measured; correcting the image of the driver controller contact point to be measured based on the camera's intra-camera parameters and camera distortion parameters to obtain a corrected image of the driver controller contact point to be measured; processing the corrected image of the driver controller contact point to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region; determining the pixel size of the contact gap based on the moving contact outline region and the stationary contact outline region; obtaining a transformation matrix that matches the monocular camera, and determining the gap size of the driver controller contact point to be measured based on the transformation matrix and the pixel size of the contact gap.

[0007] According to a method for measuring the contact gap of a driver controller provided by the present invention, after obtaining the corrected contact image of the driver controller to be measured, the method further includes: obtaining a contact feature map of the corrected contact image of the driver controller to be measured; obtaining the location of the contact gap matching the contact feature map based on the contact feature map; and processing the corrected contact image of the driver controller to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region, specifically including: processing the corrected contact image of the driver controller to be measured according to the location of the contact gap using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region.

[0008] According to the present invention, before obtaining the location of the contact gap matching the contact feature map based on the contact feature map, the method further includes: acquiring a plurality of predetermined reference driver control contact images, wherein the reference driver control contact images are reference driver control contact images acquired along different directions, wherein different reference driver control contact images correspond to contact gaps at different contact gap locations; obtaining a reference contact feature map matching each of the reference driver control contact images based on each of the reference driver control contact images; the step of obtaining the location of the contact gap matching the contact feature map based on the contact feature map specifically includes: comparing the contact feature map with each of the reference contact feature maps to obtain the reference contact feature map with the highest matching degree; obtaining the location of the contact gap matching the contact feature map based on the location of the contact gap matching the reference contact feature map with the highest matching degree.

[0009] According to the present invention, a method for measuring the contact gap of a driver controller is characterized in that obtaining a contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image specifically includes: calling a pre-trained contact feature recognition model, wherein the contact feature recognition model is used to obtain a contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image; inputting the corrected driver controller contact image to the contact feature recognition model to obtain the contact feature map of the corrected driver controller contact image output by the contact feature recognition model.

[0010] According to a method for measuring the contact gap of a controller provided by the present invention, the contact feature recognition model is trained in the following manner: acquiring multiple sets of historical contact images, wherein the historical contact images include historical contact feature maps that match the historical contact images; performing data augmentation processing on each of the historical contact images to obtain enhanced historical contact images; constructing a training dataset based on the multiple sets of historical contact images and the multiple sets of enhanced historical contact images; and training the contact feature recognition model based on the training dataset to obtain a trained contact feature recognition model.

[0011] According to a method for measuring the contact gap of a driver controller provided by the present invention, the transformation matrix matching the monocular camera is obtained in the following manner: acquiring a reference driver controller contact to be measured, and arranging two-dimensional orthogonally arranged standard gauge blocks on the plane where the reference driver controller contact is located; calling the monocular camera to acquire standard gauge block images of the standard gauge blocks; obtaining the sub-pixel coordinates of the image corner points based on the standard gauge block images; calculating the world coordinates of the image corner points based on the intrinsic parameters of the monocular camera; and determining the transformation matrix matching the monocular camera based on the transformation relationship between the world coordinates of the image corner points and the sub-pixel coordinates of the image corner points.

[0012] According to a method for measuring the contact gap of a controller provided by the present invention, after obtaining the sub-pixel coordinates of the image corner points based on the standard gauge block image, the method further includes: performing planar collinearity verification on the image corner points and eliminating non-coplanar points based on the sub-pixel coordinates of the image corner points to obtain verified image corner points; the step of determining a transformation matrix matching the monocular camera based on the transformation relationship between the world coordinates and the sub-pixel coordinates of the image corner points specifically includes: determining a transformation matrix matching the monocular camera based on the transformation relationship between the world coordinates and the sub-pixel coordinates of the verified image corner points.

[0013] According to the present invention, a driver controller contact gap measurement system includes: a fixed frame, the fixed frame being mounted on the driver controller to be measured; a displacement subsystem, the displacement subsystem being mounted on the fixed frame, for receiving instructions from a processor to drive a monocular camera to move; and a processor, for executing any one of the driver controller contact gap measurement methods described above, and issuing instructions to the displacement subsystem.

[0014] According to the present invention, a device for measuring the contact gap of a driver controller includes: an acquisition module for using a monocular camera to acquire an image of the contact point of the driver controller to be measured; a correction module for correcting the image of the contact point of the driver controller to be measured based on the camera's intraocular parameters and camera distortion parameters to obtain a corrected image of the contact point of the driver controller to be measured; a processing module for processing the corrected image of the contact point of the driver controller to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region; a determination module for determining the pixel size of the contact gap based on the moving contact outline region and the stationary contact outline region; and a measurement module for acquiring a transformation matrix matching the monocular camera and determining the gap size of the contact point of the driver controller to be measured based on the transformation matrix and the pixel size of the contact gap.

[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the controller contact gap measurement method as described above.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the controller contact gap measurement method as described above.

[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the controller contact gap measurement method as described above.

[0018] This invention provides a method, apparatus, and electronic device for measuring the contact gap of a driver controller. The method involves using a monocular camera to acquire images of the driver controller contacts to be measured; correcting the images based on the camera's intrinsic and distortion parameters to obtain a corrected image; processing the corrected image using a region-of-interest (ROI) weighted fusion algorithm to obtain the moving and stationary contact outline regions; determining the pixel dimensions of the contact gap based on these regions; acquiring a transformation matrix matching the monocular camera; and determining the contact gap size based on the transformation matrix and the pixel dimensions of the contact gap. This non-contact method of image acquisition avoids direct contact with the contacts, preventing improper contact and enabling more accurate, safe, and efficient driver controller contact gap measurement. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating the driver controller contact gap measurement method provided by the present invention.

[0021] Figure 2 This is a schematic diagram of the process provided by the present invention, which uses a region of interest weighted fusion algorithm to process the corrected image of the driver's controller contact point to obtain the moving contact outline region and the stationary contact outline region.

[0022] Figure 3 This is a schematic diagram of the process provided by the present invention for obtaining the location of the contact gap that matches the contact feature map.

[0023] Figure 4 This is a schematic diagram of the process for obtaining a transformation matrix that matches a monocular camera, provided by the present invention.

[0024] Figure 5 This is a schematic diagram of the structure of the controller contact gap measuring device provided by the present invention.

[0025] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0027] The contact gap of controllers (such as contact switches in electrical controllers) is a key parameter affecting their performance and reliability. Traditional measurement methods typically rely on manual measurement using feeler gauges or microscopes, which suffers from low efficiency and large subjective errors. This invention employs a vision measurement method based on a monocular camera to achieve automated and high-precision contact gap measurement.

[0028] Figure 1 This is a flowchart illustrating the driver controller contact gap measurement method provided by the present invention.

[0029] The following will combine Figure 1The process of measuring the contact gap of the controller provided by the present invention will be described.

[0030] In an exemplary embodiment of the present invention, combined with Figure 1 As can be seen, the method for measuring the contact gap of the controller may include steps 110 to 150, and each step will be described below.

[0031] In step 110, a monocular camera is invoked to acquire images of the contact points of the controller to be measured.

[0032] In one embodiment, a monocular camera can be used to acquire images of the driver controller contacts to be measured. During application, the camera can be aimed at the contact portion of the driver controller, ensuring that the camera's optical axis is approximately perpendicular to the contact plane.

[0033] In step 120, the driver controller contact image to be measured is corrected based on the camera intrinsic parameters and camera distortion parameters of the monocular camera to obtain the corrected driver controller contact image.

[0034] In another embodiment, the camera intrinsic parameters and camera distortion parameters of the monocular camera can also be obtained, both of which can be obtained through calibration. Further, the acquired image of the driver's controller contact point to be measured can be input into the calibration algorithm. Using OpenCV's `undistort` function, image correction is performed based on the intrinsic parameters and distortion parameters obtained from the calibration, eliminating the influence of lens distortion and obtaining the corrected image of the driver's controller contact point. The corrected image is closer to the ideal perspective projection, improving the accuracy of subsequent processing.

[0035] In step 130, the corrected image of the driver's contact points to be measured is processed by the region of interest weighted fusion algorithm to obtain the outer frame regions of the moving and stationary contacts.

[0036] In one embodiment, an initial region of interest (ROI) can be manually or automatically defined in the corrected image, such as a corrected image of the driver's touch point to be measured, roughly covering the touch point area. During application, the Canny edge detection algorithm can be used to extract edge features from the image, while color segmentation (if the touch point is a specific color) or threshold segmentation (such as the Otsu thresholding method) is used to separate the touch point from the background. The edge features and color features are then weighted and fused, where the weights can be set according to feature importance (e.g., edge weight can be 0.7, color weight can be 0.3). Using the fused feature map, a contour detection algorithm (such as OpenCV's findContours function) is used to find all potential contours. Finally, the outline contours of moving and stationary touch points can be filtered based on the area, shape, and position features of the contours. For example, moving touch points are typically moving parts, and their outlines may be rectangular; stationary touch points are fixed, and their outlines may be circular. By fitting the minimum bounding rectangle or ellipse, the precise coordinates of the moving contact outer frame region and the stationary contact outer frame region are obtained, which is to say, the moving contact outer frame region and the stationary contact outer frame region are obtained.

[0037] In step 140, the pixel size of the contact gap is determined based on the moving contact outline region and the stationary contact outline region.

[0038] In one embodiment, the closest points between the moving contact outline region and the stationary contact outline region can be extracted. For example, the Euclidean distances between all points on the moving contact outline boundary and all points on the stationary contact outline boundary can be calculated, and the minimum distance value can be used as the pixel size of the contact gap.

[0039] In step 150, a transformation matrix matching the monocular camera is obtained, and the gap size of the controller contact to be measured is determined based on the transformation matrix and the pixel size of the contact gap.

[0040] In one embodiment, a transformation matrix matching the monocular camera can be obtained, whereby the transformation matrix is ​​obtained through camera calibration, converting pixel dimensions into actual physical dimensions. Further, based on the transformation matrix and the pixel dimensions of the contact gap, the gap size of the controller contact to be measured is determined. In this embodiment, the entire process is executed automatically by a computer without human intervention, reducing measurement time from several minutes in traditional methods to just a few seconds, significantly improving production efficiency and making it suitable for rapid inspection on production lines. Furthermore, non-contact measurement avoids physical contact with the contacts, preventing contact damage or contamination caused by measuring tools and extending the lifespan of the controller.

[0041] This invention provides a method for measuring the contact gap of a driver controller. The method involves using a monocular camera to acquire images of the driver controller contacts to be measured; correcting these images based on the camera's intrinsic and distortion parameters to obtain a corrected image; processing the corrected image using a region-of-interest (ROI) weighted fusion algorithm to obtain the moving and stationary contact outline regions; determining the pixel dimensions of the contact gap based on these outline regions; acquiring a transformation matrix that matches the monocular camera; and determining the contact gap size based on the transformation matrix and the pixel dimensions of the contact gap. This non-contact method of image acquisition avoids direct contact with the contacts, preventing improper contact and enabling more accurate, safe, and efficient driver controller contact gap measurement.

[0042] Figure 2 This is a schematic diagram of the process provided by the present invention, which uses a region of interest weighted fusion algorithm to process the corrected image of the driver's controller contact point to obtain the moving contact outline region and the stationary contact outline region.

[0043] Region-of-interest (ROI) weighted fusion algorithms require processing the entire corrected image or searching within a large initial ROI, resulting in high computational cost and potential interference when the touch point background is complex. This invention provides a clear search direction for the weighted fusion algorithm by first extracting touch point features and locating the gap orientation, thus improving processing efficiency and accuracy. The following will combine... Figure 2 The process of processing the corrected driver controller contact image to obtain the moving contact outline region and the stationary contact outline region by using the region of interest weighted fusion algorithm provided by the present invention is described.

[0044] In an exemplary embodiment of the present invention, combined with Figure 2 As can be seen, processing the corrected driver controller contact image after measurement using the region of interest weighted fusion algorithm to obtain the moving contact outline region and the stationary contact outline region may include steps 210 to 230, which will be described in detail below.

[0045] In step 210, a contact feature map of the corrected driver controller contact image is obtained based on the corrected driver controller contact image.

[0046] In one embodiment, feature processing can be performed on the calibrated driver controller contact image to obtain a contact feature map of the calibrated driver controller contact image. In another embodiment, a contact feature recognition model can be pre-trained, and the contact feature map of the calibrated driver controller contact image can be obtained based on the contact feature recognition model.

[0047] In yet another exemplary embodiment of the present invention, continuing with the previously described embodiments, the contact feature map of the corrected driver controller contact image can be obtained based on the corrected driver controller contact image, which can be achieved in the following manner: The pre-trained contact feature recognition model is invoked, which is used to obtain the contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image. The corrected image of the driver's controller contact point is input into the contact feature recognition model to obtain the contact feature map of the corrected image of the driver's controller contact point output by the contact feature recognition model.

[0048] In one embodiment, a pre-trained touch feature recognition model can be invoked. Further, the calibrated image of the driver's controller touch points to be measured undergoes necessary preprocessing (such as scaling to the input size required by the model, normalizing pixel values, etc.) before being input into the touch feature recognition model. The model performs forward inference on the input image and ultimately outputs a touch feature map of the same size as the input image or a scaled version thereof.

[0049] In step 220, based on the contact feature map, the location of the contact gap that matches the contact feature map is obtained.

[0050] In step 230, the corrected image of the controller contact point to be measured is processed according to the orientation of the contact gap by using the region of interest weighted fusion algorithm to obtain the moving contact outer frame region and the stationary contact outer frame region.

[0051] In one embodiment, the location of the contact gap can be obtained by combining the contact feature map. Furthermore, when applying the weighted fusion algorithm, the search and calculation can be prioritized on the determined location (corresponding to the location of the contact gap). For example, if the gap location is determined to be in the left-right direction, the algorithm will focus on analyzing the gradient changes and feature differences in the horizontal direction of the image. Geometric constraints will be set based on this location when filtering contours and fitting bounding boxes. For gaps in the left-right direction, the algorithm will anticipate that the moving contact bounding box and the stationary contact bounding box are located on the left and right sides of the image (or vice versa), and accordingly exclude interfering contours that do not match the location, thereby quickly and efficiently obtaining the moving contact bounding box region and the stationary contact bounding box region.

[0052] In this embodiment, through this directional guidance, the weighted fusion algorithm can more quickly and accurately locate the outer frame areas of the moving contact and the outer frame areas of the stationary contact, especially the boundary between the two, i.e. the edge of the gap.

[0053] Figure 3This is a schematic diagram of the process provided by the present invention for obtaining the location of the contact gap that matches the contact feature map.

[0054] The following will combine Figure 3 The process of obtaining the location of the contact gap that matches the contact feature map is explained.

[0055] In an exemplary embodiment of the present invention, combined with Figure 3 As can be seen, obtaining the location of the contact gap that matches the contact feature map based on the contact feature map may include steps 310 to 340, and each step will be described below.

[0056] In step 310, multiple predetermined reference driver control contact images are acquired. The reference driver control contact images are obtained by collecting reference driver control contact images along different directions. Different reference driver control contact images correspond to contact gaps at different locations.

[0057] In one embodiment, a set of reference driver controller contact images can be pre-acquired. Using the same or similar driver controller and camera system, multiple images are acquired around the contact from several typical directions, such as directly above, upper left, upper right, directly left, and directly right, ensuring that these images cover various gap orientations that may occur in actual testing of that driver controller model. Each reference driver controller contact image corresponds to a clearly defined contact gap orientation. This orientation can be pre-calibrated using high-precision measuring instruments or directly specified by experts based on the images. These orientation labels will serve as the basis for subsequent matching judgments.

[0058] In step 320, a reference contact feature map matching each reference controller contact image is obtained based on the reference controller contact image.

[0059] In one embodiment, a reference contact feature map matching each reference controller contact image can be obtained based on each reference controller contact image. The approach to determining the reference contact feature map is the same as that to determining the contact feature map, and will not be repeated in this embodiment.

[0060] In step 330, the contact feature map is compared with each reference contact feature map to obtain the reference contact feature map with the highest matching degree.

[0061] In step 340, the location of the contact gap that matches the reference contact feature map with the highest matching degree is obtained.

[0062] In one embodiment, the contact feature map can be compared one-to-one with all reference contact feature maps in the reference library to obtain the reference contact feature map with the highest matching degree. Further, based on the location of the contact gap matching the reference contact feature map with the highest matching degree, the location of the contact gap matching the contact feature map is retrieved. In this embodiment, since the images in the reference library are typical samples collected under controlled conditions, their location labels are precisely known. By comparing with a large sample library, interference caused by noise, local occlusion, or illumination fluctuations in a single image can be effectively resisted, and the judgment result is more reliable and stable than simply analyzing the geometric features of a single image.

[0063] In yet another exemplary embodiment of the present invention, the touch feature recognition model can be trained in the following manner, continuing with the previously described embodiments: Acquire multiple sets of historical touch point images, wherein the historical touch point images include historical touch point feature maps that match the historical touch point images; Data augmentation processing is performed on each of the aforementioned historical touchpoint images to obtain enhanced historical touchpoint images; A training dataset is constructed based on multiple sets of historical touch images and multiple sets of enhanced historical touch images. The touch feature recognition model is trained based on the training dataset to obtain a trained touch feature recognition model.

[0064] In one embodiment, an initial dataset of driver control contact images can be collected, i.e., multiple sets of historical contact images can be acquired. These images should cover as many real-world scenarios as possible. For each historical contact image, a professional can use annotation tools to perform pixel-level annotations, generating a historical contact feature map that precisely corresponds to it.

[0065] In another embodiment, in order to increase the diversity and quantity of data and prevent model overfitting, a series of random geometric and optical transformations are applied to each set of original training samples (including images and their labeled feature maps) collected above to simulate various changes in the real world, thereby obtaining historical touch point images after enhancement processing.

[0066] It should be noted that when performing the above transformation on the original historical touch point image, the corresponding historical touch point feature map must be transformed synchronously with exactly the same parameters to ensure that the image and label remain strictly aligned in space. Each transformation will generate a new set of enhanced historical touch point images and corresponding enhanced historical touch point feature maps.

[0067] Furthermore, a training dataset can be constructed based on multiple sets of historical touch point images and multiple sets of enhanced historical touch point images. The touch point feature recognition model can then be trained using this dataset to obtain a well-trained model. In this embodiment, through data augmentation, the model incorporates various possible image variations (such as different angles, lighting, noise, etc.) during the training phase, enabling it to better adapt to new situations not encountered in real production lines.

[0068] Figure 4 This is a schematic diagram of the process for obtaining a transformation matrix that matches a monocular camera, provided by the present invention.

[0069] The following will combine Figure 4 The process of obtaining a transformation matrix that matches a monocular camera, as provided by the present invention, will be explained.

[0070] In an exemplary embodiment of the present invention, combined with Figure 4 As can be seen, obtaining the transformation matrix that matches the monocular camera can include steps 410 to 450, and each step will be described below.

[0071] In step 410, a reference driver controller contact point is obtained, and two-dimensional orthogonally arranged standard gauge blocks are laid out on the plane where the reference driver controller contact point is located.

[0072] In one embodiment, a reference controller contact to be measured can be selected, such as a real product part or a high-precision simulation model. A two-dimensional orthogonally arranged standard gauge block is then placed on the same plane as this reference contact. This standard gauge block can typically be a grid or checkerboard of known precise dimensions, ensuring that the plane of the standard gauge block is as parallel as possible to the camera's imaging plane to minimize perspective error. The two-dimensional orthogonally arranged standard gauge block can also be located on one side of the switch's stationary point.

[0073] In step 420, a monocular camera is used to acquire standard gauge block images.

[0074] In step 430, the sub-pixel coordinates of the image corners are obtained based on the standard block image.

[0075] In one embodiment, the same monocular camera can be used to acquire a clear image containing the entire standard gauge block at a fixed position and focal length, thus obtaining the standard gauge block image. Further, the acquired standard gauge block image is processed, and a corner detection algorithm is used to automatically identify all interior corner points of the standard gauge block grid. To obtain accuracy higher than integer pixels, sub-pixel localization technology is further employed. Through iterative calculation, the coordinate accuracy of the corner points is improved to the sub-pixel level, obtaining the sub-pixel coordinates of the image corner points.

[0076] In step 440, the world coordinates of the image corner points are calculated based on the intrinsic parameters of the monocular camera.

[0077] In step 450, a transformation matrix matching the monocular camera is determined based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points.

[0078] In one embodiment, the world coordinates of the image corner points can also be calculated based on the intrinsic parameters and / or distortion parameters of the monocular camera. Further, based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points, a transformation matrix matching the monocular camera is determined. In this embodiment, by using high-precision standard blocks and sub-pixel positioning technology, the transformation error from pixel coordinates to physical coordinates is greatly reduced, thus laying the foundation for accurately determining the gap size subsequently.

[0079] In yet another exemplary embodiment of the present invention, continuing with the previously described embodiments, after obtaining the sub-pixel coordinates of the image corner points based on the standard block image (corresponding to step 440), the driver's controller contact gap measurement method may further include the following steps: Based on the sub-pixel coordinates of image corner points, planar collinearity verification is performed on image corner points and non-coplanar points are removed to obtain verified image corner points; The transformation matrix matching the monocular camera is determined based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points. This can be achieved in the following way: Based on the transformation relationship between the world coordinates and sub-pixel coordinates of the corner points in the verified image, a transformation matrix matching the monocular camera is determined.

[0080] In one embodiment, since the standard gauge block is a two-dimensional plane and is arranged on the same plane as the controller contacts, all corner points should ideally be strictly coplanar. After camera imaging, the sub-pixel coordinates of these corner points should satisfy a common planar homography transformation relationship. Any corner point that significantly deviates from this relationship is a non-coplanar point and is considered an outlier. In application, the planar collinearity of image corner points can be checked based on their sub-pixel coordinates, and non-coplanar points can be eliminated to obtain the checked image corner points.

[0081] Furthermore, the final transformation matrix can be recalculated using the sub-pixel coordinates and corresponding world coordinates of the verified image corner points after verification and cleaning. In application, the transformation matrix matching the monocular camera can be determined based on the transformation relationship between the verified image corner points' world coordinates and their sub-pixel coordinates. In this embodiment, by actively removing abnormal corner points that deviate from the coplanar model, the interference of abnormal corner points on matrix calculation can be eliminated, making the final solved transformation matrix more representative of the true, global coordinate mapping relationship, thereby minimizing the transformation error from pixel to physical size.

[0082] As described above, the present invention provides a method for measuring the contact gap of a driver controller. This method involves using a monocular camera to acquire images of the driver controller contacts to be measured; correcting the images based on the camera's intrinsic and distortion parameters to obtain a corrected image; processing the corrected image using a region-of-interest (ROI) weighted fusion algorithm to obtain the moving and stationary contact outline regions; determining the pixel dimensions of the contact gap based on these regions; acquiring a transformation matrix that matches the monocular camera; and determining the contact gap size based on the transformation matrix and the pixel dimensions of the contact gap. This non-contact method of image acquisition avoids direct contact with the contacts, preventing improper contact and enabling more accurate, safe, and efficient measurement of the driver controller contact gap.

[0083] The following describes the driver controller contact gap measuring device provided by the present invention. The driver controller contact gap measuring device described below and the driver controller contact gap measuring method described above can be referred to in correspondence.

[0084] Figure 5 This is a schematic diagram of the structure of the controller contact gap measuring device provided by the present invention.

[0085] The following will combine Figure 5 The structure of the controller contact gap measuring device provided by the present invention will be described.

[0086] In an exemplary embodiment of the present invention, combined with Figure 5 As can be seen, the driver controller contact gap measuring device may include a data acquisition module 510, a calibration module 520, a processing module 530, a determination module 540, and a measurement module 550. Each module will be described in detail below.

[0087] The acquisition module 510 can be configured to call a monocular camera to acquire images of the contact points of the driver controller to be measured. The correction module 520 can be configured to correct the driver controller contact image to be measured based on the camera intrinsic parameters and camera distortion parameters of the monocular camera, so as to obtain the corrected driver controller contact image to be measured. Processing module 530 can be configured to process the corrected driver controller contact image to be measured using a region of interest weighted fusion algorithm to obtain the moving contact outline region and the stationary contact outline region. The determining module 540 can be configured to determine the pixel size of the contact gap based on the moving contact frame region and the stationary contact frame region; The measurement module 550 can be configured to acquire a transformation matrix that matches the monocular camera and determine the gap size of the controller contact to be measured based on the transformation matrix and the pixel size of the contact gap.

[0088] In an exemplary embodiment of the present invention, the correction module 520 may further be configured to: Based on the corrected contact image of the driver controller to be measured, a contact feature map of the corrected contact image of the driver controller to be measured is obtained; Based on the contact feature map, the location of the contact gap that matches the contact feature map is obtained; The processing module 530 can process the corrected driver controller contact image to be measured using a region-of-interest weighted fusion algorithm in the following way to obtain the moving contact outline region and the stationary contact outline region: Using a region-of-interest weighted fusion algorithm, the corrected image of the controller contact points to be measured is processed according to the orientation of the contact gap to obtain the moving contact outline region and the stationary contact outline region.

[0089] In an exemplary embodiment of the present invention, the correction module 520 may further be configured to: Multiple predetermined reference driver control contact images are acquired, wherein the reference driver control contact images are reference driver control contact images acquired along different directions, and different reference driver control contact images correspond to contact gaps at different locations. Based on the contact images of each of the reference controllers, a reference contact feature map matching the contact images of each of the reference controllers is obtained; The correction module 520 can obtain the location of the contact gap that matches the contact feature map based on the contact feature map in the following way: The contact feature map is compared with each of the reference contact feature maps to obtain the reference contact feature map with the highest matching degree; Based on the location of the contact gap that matches the reference contact feature map with the highest matching degree, the location of the contact gap that matches the contact feature map is obtained.

[0090] In an exemplary embodiment of the present invention, the calibration module 520 can obtain a contact feature map of the calibrated driver controller contact image based on the calibrated driver controller contact image: The pre-trained contact feature recognition model is invoked, wherein the contact feature recognition model is used to obtain the contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image. The corrected driver controller contact image is input into the contact feature recognition model to obtain the contact feature map of the corrected driver controller contact image output by the contact feature recognition model.

[0091] In an exemplary embodiment of the present invention, the correction module 520 may train the touch feature recognition model in the following manner: Acquire multiple sets of historical touch point images, wherein the historical touch point images include historical touch point feature maps that match the historical touch point images; Data augmentation processing is performed on each of the aforementioned historical touchpoint images to obtain enhanced historical touchpoint images; A training dataset is constructed based on multiple sets of historical touch images and multiple sets of enhanced historical touch images. The touch feature recognition model is trained based on the training dataset to obtain a trained touch feature recognition model.

[0092] In an exemplary embodiment of the present invention, the measurement module 550 may obtain a transformation matrix matching the monocular camera in the following manner: Obtain a reference driver controller contact point to be measured, and arrange two-dimensional orthogonally arranged standard gauge blocks on the plane where the reference driver controller contact point is located; The monocular camera is used to acquire standard gauge block images of the standard gauge block. Based on the standard block image, the sub-pixel coordinates of the image corner points are obtained; The world coordinates of the image corner points are calculated based on the intrinsic parameters of the monocular camera; Based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points, a transformation matrix matching the monocular camera is determined.

[0093] In an exemplary embodiment of the present invention, the measurement module 550 may further be configured to: Based on the sub-pixel coordinates of the image corner points, planar collinearity verification is performed on the image corner points and non-coplanar points are eliminated to obtain the verified image corner points; The measurement module 550 can determine a transformation matrix matching the monocular camera by using the following method to realize the transformation relationship between the world coordinates and the sub-pixel coordinates of the image corner points: Based on the transformation relationship between the world coordinates and sub-pixel coordinates of the corner points in the verified image, a transformation matrix matching the monocular camera is determined.

[0094] Based on the same inventive concept, the present invention also provides a driver controller contact gap measurement system. The structure of the driver controller contact gap measurement system will be described below with reference to the following embodiments.

[0095] In an exemplary embodiment of the present invention, the driver controller contact gap measurement system may include: A fixed frame is installed on the controller to be measured. The displacement subsystem is mounted on a fixed frame and is used to receive instructions from the processor to move the monocular camera. The processor is used to execute any one of the driver's contact gap measurement methods and issue instructions to the displacement subsystem.

[0096] In this embodiment, the driver controller contact gap measurement system completes the gap measurement of the driver controller contact points in a non-contact manner by acquiring images, avoiding contact with the contact points and preventing improper contact, thereby enabling more accurate, safe and efficient driver controller contact gap measurement.

[0097] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640. The processor 610 can call logic instructions in the memory 630 to execute a method for measuring the contact gap of a driver controller. This method includes: using a monocular camera to acquire an image of the driver controller contact point to be measured; correcting the image of the driver controller contact point to be measured based on the camera's intrinsic parameters and camera distortion parameters to obtain a corrected image of the driver controller contact point to be measured; processing the corrected image of the driver controller contact point to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region; determining the pixel size of the contact gap based on the moving contact outline region and the stationary contact outline region; obtaining a transformation matrix matching the monocular camera, and determining the gap size of the driver controller contact point to be measured based on the transformation matrix and the pixel size of the contact gap.

[0098] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0099] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the driver controller contact gap measurement method provided by the above methods. The method includes: calling a monocular camera to acquire an image of the driver controller contact point to be measured; correcting the image of the driver controller contact point to be measured based on the camera's intrinsic parameters and camera distortion parameters to obtain a corrected image of the driver controller contact point to be measured; processing the corrected image of the driver controller contact point to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outer frame region and a stationary contact outer frame region; determining the pixel size of the contact gap based on the moving contact outer frame region and the stationary contact outer frame region; obtaining a transformation matrix matching the monocular camera, and determining the gap size of the driver controller contact point to be measured based on the transformation matrix and the pixel size of the contact gap.

[0100] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the driver controller contact gap measurement method provided by the above methods. The method includes: using a monocular camera to acquire an image of a driver controller contact point to be measured; correcting the image of the driver controller contact point to be measured based on the camera's intrinsic parameters and camera distortion parameters to obtain a corrected image of the driver controller contact point to be measured; processing the corrected image of the driver controller contact point to be measured using a region of interest weighted fusion algorithm to obtain a moving contact outline region and a stationary contact outline region; determining the pixel size of the contact gap based on the moving contact outline region and the stationary contact outline region; obtaining a transformation matrix matching the monocular camera, and determining the gap size of the driver controller contact point to be measured based on the transformation matrix and the pixel size of the contact gap.

[0101] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring the contact gap of a controller, characterized in that, The method includes: Use a monocular camera to acquire images of the contact points of the controller to be measured; Based on the camera intrinsic parameters and camera distortion parameters of the monocular camera, the image of the driver controller contact point to be measured is corrected to obtain the corrected image of the driver controller contact point to be measured. The corrected image of the controller contact points to be measured is processed by a region of interest weighted fusion algorithm to obtain the moving contact outline region and the stationary contact outline region. The pixel size of the contact gap is determined based on the outer frame area of ​​the moving contact and the outer frame area of ​​the stationary contact. Obtain the transformation matrix that matches the monocular camera, and determine the gap size of the driver controller contact to be measured based on the transformation matrix and the pixel size of the contact gap.

2. The method for measuring the contact gap of the controller according to claim 1, characterized in that, After obtaining the calibrated image of the driver's contact points to be measured, the method further includes: Based on the corrected contact image of the driver controller to be measured, a contact feature map of the corrected contact image of the driver controller to be measured is obtained; Based on the contact feature map, the location of the contact gap that matches the contact feature map is obtained; The process of processing the corrected driver controller contact image using a region-of-interest weighted fusion algorithm to obtain the moving contact outline region and the stationary contact outline region specifically includes: Using a region-of-interest weighted fusion algorithm, the corrected image of the controller contact points to be measured is processed according to the orientation of the contact gap to obtain the moving contact outline region and the stationary contact outline region.

3. The method for measuring the contact gap of the controller according to claim 2, characterized in that, Before obtaining the location of the contact gap matching the contact feature map based on the contact feature map, the method further includes: Multiple predetermined reference driver control contact images are acquired, wherein the reference driver control contact images are reference driver control contact images acquired along different directions, and different reference driver control contact images correspond to contact gaps at different locations. Based on the contact images of each of the reference controllers, a reference contact feature map matching the contact images of each of the reference controllers is obtained; The step of obtaining the location of the contact gap matching the contact feature map based on the contact feature map specifically includes: The contact feature map is compared with each of the reference contact feature maps to obtain the reference contact feature map with the highest matching degree; Based on the location of the contact gap that matches the reference contact feature map with the highest matching degree, the location of the contact gap that matches the contact feature map is obtained.

4. The method for measuring the contact gap of the controller according to claim 2 or 3, characterized in that, The step of obtaining the contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image specifically includes: The pre-trained contact feature recognition model is invoked, wherein the contact feature recognition model is used to obtain the contact feature map of the corrected driver controller contact image based on the corrected driver controller contact image. The corrected driver controller contact image is input into the contact feature recognition model to obtain the contact feature map of the corrected driver controller contact image output by the contact feature recognition model.

5. The method for measuring the contact gap of the controller according to claim 4, characterized in that, The touch feature recognition model was trained in the following manner: Acquire multiple sets of historical touch point images, wherein the historical touch point images include historical touch point feature maps that match the historical touch point images; Data augmentation processing is performed on each of the aforementioned historical touchpoint images to obtain enhanced historical touchpoint images; A training dataset is constructed based on multiple sets of historical touch images and multiple sets of enhanced historical touch images. The touch feature recognition model is trained based on the training dataset to obtain a trained touch feature recognition model.

6. The method for measuring the contact gap of the controller according to claim 1, characterized in that, The transformation matrix that matches the monocular camera is obtained in the following way: Obtain a reference driver controller contact point to be measured, and arrange two-dimensional orthogonally arranged standard gauge blocks on the plane where the reference driver controller contact point is located; The monocular camera is used to acquire standard gauge block images of the standard gauge block. Based on the standard block image, the sub-pixel coordinates of the image corner points are obtained; The world coordinates of the image corner points are calculated based on the intrinsic parameters of the monocular camera; Based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points, a transformation matrix matching the monocular camera is determined.

7. The method for measuring the contact gap of the controller according to claim 6, characterized in that, After obtaining the sub-pixel coordinates of the image corner points based on the standard block image, the method further includes: Based on the sub-pixel coordinates of the image corner points, planar collinearity verification is performed on the image corner points and non-coplanar points are eliminated to obtain the verified image corner points; The method of determining a transformation matrix that matches the monocular camera based on the transformation relationship between the world coordinates and sub-pixel coordinates of the image corner points specifically includes: Based on the transformation relationship between the world coordinates and sub-pixel coordinates of the corner points in the verified image, a transformation matrix matching the monocular camera is determined.

8. A driver controller contact gap measurement system, characterized in that, The controller contact gap measurement system includes: A fixed frame is mounted on the controller to be measured. A displacement subsystem, which is mounted on a fixed frame, is used to receive instructions from the processor to drive the monocular camera to move and operate. The processor is configured to execute the controller contact gap measurement method according to any one of claims 1 to 7 and issue instructions to the displacement subsystem.

9. A device for measuring the contact gap of a controller, characterized in that, The device includes: The acquisition module is used to call the monocular camera to acquire images of the contact points of the controller to be measured. The correction module is used to correct the driver controller contact image to be measured based on the camera intrinsic parameters and camera distortion parameters of the monocular camera, so as to obtain the corrected driver controller contact image to be measured. The processing module is used to process the corrected image of the driver's controller contact points to be measured using a region of interest weighted fusion algorithm to obtain the moving contact outline region and the stationary contact outline region. The determining module is used to determine the pixel size of the contact gap based on the moving contact outer frame area and the stationary contact outer frame area; The measurement module is used to acquire a transformation matrix that matches the monocular camera, and to determine the gap size of the controller contact to be measured based on the transformation matrix and the pixel size of the contact gap.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the controller contact gap measurement method as described in any one of claims 1 to 7.