A container key identification pairing system and method
The container key identification and pairing system automatically identifies and pairs keys, solving the problem of time-consuming and labor-intensive manual trial and error, and achieving high efficiency and accuracy in key management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI CONSTRUCTION FOURTH CONSTRUCTION GROUP CO LTD
- Filing Date
- 2023-07-14
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the matching of container keys with their corresponding keys mainly relies on manual trial and error, which is time-consuming and labor-intensive. Furthermore, in multi-layered warehouses, the difficulty of manually matching keys is increased, resulting in low management efficiency.
The container key recognition and pairing system includes a recognition device fixing system, a light source correction system, a key image preprocessing system, a key image processing system, and a key recognition and pairing system. By fixing the light source and camera position, it acquires and corrects reference images, calculates the surface features of the key, and automatically recognizes and pairs keys.
It has automated key recognition, improved management efficiency, reduced the time cost of manual key testing, and realized the informatization and digitalization of warehouse key management.
Smart Images

Figure CN117011559B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart warehousing technology, and in particular to a container key identification and pairing system and method. Background Technology
[0002] Currently, construction sites involve many fixed asset materials that can be used multiple times, gradually transferring their value while maintaining their original form; these are also known as reusable materials. The quality of reusable material management at construction sites is a crucial indicator of a construction company's management level and its ability to achieve civilized construction. Therefore, strengthening on-site reusable material management is an important way to improve material management and economic efficiency. Taking shipping containers as an example, the containers used by the project department are managed uniformly by the equipment company. Each container corresponds to three keys. However, because the keys are uniformly placed without numbering during entry and exit, the containers and their corresponding keys become confused. To check and replenish the keys corresponding to the containers, it is necessary to match the recovered keys with the containers one by one. However, at present, the container key matching work mainly involves manually matching all keys sequentially with the corresponding containers, which is time-consuming and labor-intensive. Furthermore, the containers in the warehouse are stacked in multiple layers, which also increases the difficulty of manual key matching.
[0003] Therefore, how to provide a container key identification and matching system and method that can improve the efficiency of warehouse key management is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This invention provides a container key identification and pairing system and method to solve the above-mentioned technical problems.
[0005] To address the aforementioned technical problems, this invention provides a container key recognition and pairing system, comprising a recognition device fixing system, a light source correction system, a key image preprocessing system, a key image processing system, and a key recognition and pairing system.
[0006] The identification device fixing system is used to fix the positions of the light source and the camera, and to determine key parameters; the key parameters include at least the deflection angle of the light source, the height of the camera, and the tilt angle of the reference image acquisition;
[0007] The light source correction system is used to acquire reference images from different lighting directions, correct the light source, and calibrate its position.
[0008] The key image preprocessing system is used to acquire key images from different lighting directions and select images within the region of interest for preprocessing.
[0009] The key image processing system is used to calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image;
[0010] The key recognition and pairing system is used to extract the surface features of the keys based on the calculation results and determine the pairing results of multiple keys.
[0011] Preferably, the identification device fixing system includes a device fixing module and a parameter output module. The device fixing module is used to fix the position of the light source and the camera and determine the key parameters. The parameter output module is used to input the key parameters into the key image preprocessing system.
[0012] Preferably, the light source correction system includes a reference image acquisition module and a light source calibration module. The reference image acquisition module is used to acquire reference images from multiple lighting directions and input the reference images into the light source calibration module. The light source calibration module is used to traverse each reference image, calculate the distance from each pixel of each reference image to the light source, the light source angle, and the light energy matrix, and calibrate the position of the light source.
[0013] Preferably, the key image preprocessing system includes a key image acquisition module, a region of interest (ROI) selection module, and an image preprocessing module. The key image acquisition module is used to acquire multiple key images from different lighting directions using the camera, obtain a three-dimensional array of key images from multiple directions, and input it into the ROI selection module. The ROI selection module is used to calculate the average value of the key images from multiple directions to obtain a composite illumination image, select and crop the composite illumination image to obtain images within the ROI region, create a zero matrix for storing the cropped images, and input the zero matrix into the image preprocessing module. The image preprocessing module is used to process the images within the ROI region in the composite illumination image, and correct them according to the light energy matrix to obtain a preprocessed image, which is then input into the key image processing system.
[0014] Preferably, four lighting directions are used to acquire four reference images, and four key images of a key to be tested are also acquired.
[0015] Preferably, the image preprocessing module is used to: normalize the composite illumination image and binarize it to generate a binary mask; traverse each channel of the zero matrix, copy the corresponding input image to a temporary variable, and set the pixel values of the non-interest regions in the composite illumination image to 0 to mask the non-interest regions; adjust the size of the temporary variable to match the size of the light energy matrix, and store it in the zero matrix.
[0016] Preferably, the key image processing system includes a surface normal and reflectivity calculation module, a curvature calculation module, a surface height calculation module, and a calculation result output module. The surface normal and reflectivity calculation module is used to calculate the surface normal and reflectivity; the curvature calculation module is used to calculate the surface curvature and Gaussian curvature; the surface height calculation module is used to calculate the height value of each pixel; and the calculation result output module is used to input the calculation results into the key recognition and pairing system.
[0017] Preferably, the key recognition and pairing system includes a key feature extraction module, a feature pairing module, and a pairing result output module. The key feature extraction module is used to extract the groove line area where the key teeth are located, and establish a local coordinate system of the feature area with the surface height of the key groove as the vertical coordinate and the length direction of the key groove as the horizontal coordinate. The feature pairing module is used to traverse the features of each key and calculate the similarity. The pairing result output module is used to determine whether two keys correspond to the same container based on the similarity.
[0018] Preferably, the method for calculating the similarity between two keys includes calculating the mean square error between the coordinate values of the characteristic curves of each pair of keys.
[0019] The present invention also provides a method for identifying and pairing container keys, comprising the following steps:
[0020] Step 1: Fix the positions of the light source and camera, and determine the key parameters; the key parameters include at least the deflection angle of the light source, the height of the camera, and the tilt angle for acquiring the reference image;
[0021] Step 2: Acquire reference images from different lighting directions, correct the light source, and calibrate its position;
[0022] Step 3: Acquire images of the key from different lighting directions, and select images within the area of interest for preprocessing;
[0023] Step 4: Calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image;
[0024] Step 5: Extract the surface features of the keys based on the calculation results and determine the pairing results of multiple keys.
[0025] Compared with the prior art, the container key identification and pairing system and method provided by the present invention have the following advantages:
[0026] 1. This invention has strong applicability to key recognition. It can automatically complete the identification and pairing of container keys simply by taking a picture with a mobile phone camera, avoiding the tedious process of manually pairing keys.
[0027] 2. This invention has high recognition efficiency and can automatically complete the identification and pairing of a large number of keys, realizing the informatization and digitalization of warehouse key management, reducing the time cost of manual key testing, and improving the efficiency of warehouse information management. Attached Figure Description
[0028] Figure 1 This is a block diagram of a container key identification and pairing system according to a specific embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram showing the installation positions of the light source and the camera in a specific embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram of four lighting directions in a specific embodiment of the present invention;
[0031] Figure 4 This is a schematic diagram of reference images acquired from four lighting directions in a specific embodiment of the present invention;
[0032] Figure 5 This is a schematic diagram of light source calibration in a specific embodiment of the present invention;
[0033] Figure 6 This is a schematic diagram of key images captured from four lighting directions in a specific embodiment of the present invention;
[0034] Figure 7 This is a schematic diagram of a local coordinate system in a specific embodiment of the present invention;
[0035] Figure 8 This is a schematic diagram of the characteristic curve of a key in a specific embodiment of the present invention.
[0036] In the diagram: 01-Key under test, 02-Key teeth, 03-Cutting line; 10-Light source, 20-Camera. Detailed Implementation
[0037] To illustrate the technical solutions of the invention in more detail, specific embodiments are listed below to demonstrate the technical effects; it should be emphasized that these embodiments are used to illustrate the invention and not to limit the scope of the invention.
[0038] The container key identification and pairing system provided by this invention, such as Figure 1 As shown, it includes a recognition device fixing system, a light source correction system, a key image preprocessing system, a key image processing system, and a key recognition and pairing system, wherein:
[0039] The identification device fixing system is used to fix the positions of the light source 10 and the camera 20, and to determine key parameters. These key parameters include at least the deflection angle of the light source 10, the height of the camera 20, and the tilt angle for acquiring the reference image. In this embodiment, the light source 10 is a point light source, and the camera 20 can be a mobile phone camera.
[0040] The light source correction system is used to acquire reference images from different lighting directions, correct the light source 10, calibrate the position of the light source 10, and set it to a standard position.
[0041] The key image preprocessing system is used to acquire key images from different lighting directions and select images within the region of interest for preprocessing.
[0042] The key image processing system is used to calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the preprocessed key image.
[0043] The key recognition and pairing system is used to extract the surface features of the keys based on the calculation results and determine the pairing results of multiple keys.
[0044] This invention automates key feature recognition and key pairing, avoiding the tedious process of traditional manual key identification and improving the efficiency, timeliness, and accuracy of container key warehousing management.
[0045] In some embodiments, please refer to Figure 1 The identification device fixing system includes a device fixing module and a parameter output module. The device fixing module is used to fix the positions of the light source 10 and the camera 20 and determine the key parameters. Specifically, as shown... Figure 2 As shown, the device fixing module can determine the height H1 of camera 20, the height H2 of light source 10, and the horizontal projection distance L of light source 10 from the key 01 under test. For each of the multiple images acquired, assuming the beam emitted by light source 10 is parallel light, the camera lens is a telecentric lens, and camera 20 is perpendicular to the surface of the object (key 01 under test), the illumination direction must specify two parameters: the deflection angle and the tilt angle, to describe the illumination angle relative to the current scene, where:
[0046] (The deflection angle ranges from 30° to 60°)
[0047] Based on the acquired image as a reference, the horizontal angle to the right of the image center is defined as 0° (starting point). The tilt angle is the angle between the projected beam and the starting point, and is usually evenly distributed around the object (key 01 under test). Normally, three images with lighting from different directions are acquired. However, due to the small size and fine detail of the key, lighting from three directions may not adequately characterize the key's surface features, resulting in unclear reconstructed image features. Therefore, this embodiment uses lighting from four directions [0°, 90°, 180°, 270°] to avoid blind spots. Figure 3 As shown.
[0048] The parameter output module is used to input key parameters such as the height H1 of the camera 20, the height H2 of the light source 10, the horizontal projection distance L of the light source 10 from the key 01 to be tested, and the camera resolution into the region of interest (ROI) selection module of the key image preprocessing system.
[0049] In some embodiments, please refer to Figure 1 The light source correction system includes a reference image acquisition module and a light source calibration module. The reference image acquisition module is used to acquire multiple (four in this embodiment) reference images of the lighting direction, such as... Figure 4 As shown, the reference image is input into the light source calibration module.
[0050] The light source calibration module is used to traverse each reference image. For each pixel in each reference image, it calculates the distance from the pixel to the light source 10, the angle of the light source 10, and the light energy matrix, and calibrates the position of the light source 10, setting it to a standard position, such as... Figure 5 As shown.
[0051] In some embodiments, please refer to Figure 1 The key image preprocessing system includes a key image acquisition module, a region of interest selection module, and an image preprocessing module. The key image acquisition module is used to acquire multiple (four in this embodiment) key images of a key 01 under test from different lighting directions using the camera 20, such as... Figure 6 As shown, a three-dimensional array of key images from multiple directions is obtained and input into the region of interest selection module.
[0052] The region of interest (ROI) selection module is used to calculate the average value of key images from multiple directions to obtain a sumup image. The sumup image is then selected and cropped to obtain the image within the ROI region. In this embodiment, the key handle is taken as the ROI region. The height and width of the image cropping are determined, and a dilation operation is used to fill the holes in the mask to ensure that all regions within the ROI region are connected. Then, a zero matrix (procImg) of the same size is created to store the cropped image. Finally, the zero matrix is input to the image preprocessing module.
[0053] The image preprocessing module processes the image within the region of interest (ROI) of the composite illumination image and corrects it according to the light energy matrix to obtain a preprocessed image, which is then input into the key image processing system. In some embodiments, this process specifically includes: normalizing the composite illumination image and binarizing it using a binarization threshold to generate a binary mask; then, iterating through each channel of the zero matrix, copying the corresponding input image to a temporary variable, and setting the pixel values of non-ROI regions in the composite illumination image to 0 to mask the non-ROI regions; then, adjusting the size of the temporary variable to match the size of the light energy matrix and storing it in the zero matrix. This process ensures that only the image within the ROI region is processed and corrected according to the light energy matrix, finally obtaining a preprocessed image, which is then input into the surface normal and reflectivity calculation module of the key image processing system.
[0054] In some embodiments, please refer to Figure 1 The key image processing system includes a surface normal and reflectivity calculation module, a curvature calculation module, a surface height calculation module, and a calculation result output module. The surface normal and reflectivity calculation module is used to calculate the surface normal and reflectivity. Specifically, the `surfcurvature` function can be used to process the preprocessed image and the corrected light source 10 to calculate the surface normal and reflectivity. The surface normal is a three-dimensional vector used to describe the normal direction of the surface at each pixel.
[0055] The curvature calculation module is used to calculate the curvature and Gaussian curvature of the surface. Curvature is a measure of the degree of curvature of a curve, while Gaussian curvature is a measure of the degree of curvature of a surface in different directions.
[0056] The surface height calculation module is used to calculate the height value of each pixel using a normal vector and path integral method. The path integral method can employ an improved Gauss-Seidel iterative algorithm to obtain more accurate calculation results.
[0057] The calculation result output module is used to input the calculation results into the key feature extraction module of the key recognition and pairing system.
[0058] In some embodiments, please refer to Figure 1 The key recognition and pairing system includes a key feature extraction module, a feature pairing module, and a pairing result output module. The key feature extraction module is used to extract the area of the groove line 03 where the key tooth 02 is located. A local coordinate system of the feature area is established with the surface height of the key groove as the vertical coordinate Y and the length direction of the key groove as the horizontal coordinate X. Figure 7 As shown.
[0059] The feature pairing module is used to traverse the features of each key and calculate the similarity. In some embodiments, the feature pairing module can use Mean Squared Error (MSE) to traverse the features of each key for similarity calculation, measuring the feature curves of each pair of keys (e.g., ...). Figure 8 The mean square error between the coordinate values shown in the figure.
[0060] Specifically, the formula for calculating MSE is:
[0061]
[0062] Where: n is the number of samples. The x-coordinate of the i-th key is... i The depth value, The (i+1)th key has an x-coordinate of x. i The smaller the MSE value, the smaller the difference between the two keys.
[0063] Finally, the value of MSE is input into the pairing result output module.
[0064] The pairing result output module is used to determine whether two keys correspond to the same container based on the similarity (MSE value), thereby automating key feature recognition and key pairing.
[0065] The present invention also provides a method for identifying and pairing container keys, comprising the following steps:
[0066] Step 1: Fix the positions of the light source and camera, and determine the key parameters; the key parameters include at least the deflection angle of the light source, the height of the camera, and the tilt angle for acquiring the reference image;
[0067] Step 2: Acquire reference images from different lighting directions, correct the light source, and calibrate its position;
[0068] Step 3: Acquire images of the key from different lighting directions, and select images within the area of interest for preprocessing;
[0069] Step 4: Calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image;
[0070] Step 5: Extract the surface features of the keys based on the calculation results and determine the pairing results of multiple keys.
[0071] The above method can achieve automatic identification and pairing of container keys, replacing the manual key testing work and improving the efficiency of warehouse key management.
[0072] In summary, the container key recognition and pairing system and method provided by this invention includes a recognition device fixing system, a light source correction system, a key image preprocessing system, a key image processing system, and a key recognition and pairing system. The recognition device fixing system is used to fix the positions of the light source 10 and the camera 20, and determine key parameters, including at least the deflection angle of the light source 10, the height of the camera 20, and the tilt angle of the reference image acquisition. The light source correction system is used to acquire reference images from different lighting directions, correct the light source 10, calibrate its position, and set it to a standard position. The key image preprocessing system is used to acquire key images from different lighting directions and select images within the region of interest for preprocessing. The key image processing system is used to calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image. The key recognition and pairing system is used to extract the surface features of the key based on the calculation results and determine the pairing results of multiple keys. This invention can automate key feature recognition and key pairing, avoiding the tedious process of traditional manual key recognition, and improving the efficiency, timeliness, and accuracy of container key warehousing management.
[0073] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Therefore, if these modifications and variations fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.
Claims
1. A container key identification and pairing system, characterized in that, This includes a recognition device fixing system, a light source correction system, a key image preprocessing system, a key image processing system, and a key recognition and pairing system. The identification device fixing system is used to fix the positions of the light source and the camera, and to determine key parameters; the key parameters include at least the deflection angle of the light source, the height of the camera, and the tilt angle of the reference image acquisition; The light source correction system includes a reference image acquisition module and a light source calibration module. The reference image acquisition module is used to acquire reference images from multiple lighting directions and input the reference images into the light source calibration module. The light source calibration module is used to traverse each reference image, and for each pixel of each reference image, calculate its distance to the light source, the light source angle and the light energy matrix, and calibrate the position of the light source; The key image preprocessing system is used to acquire key images from different lighting directions and select images within the region of interest for preprocessing. The key image processing system is used to calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image; The key recognition and pairing system is used to extract the surface features of the key based on the calculation results and determine the pairing result of multiple keys. The key recognition and pairing system includes a key feature extraction module, a feature pairing module and a pairing result output module. The key feature extraction module is used to extract the groove line area where the key teeth are located, and establish a local coordinate system of the feature area with the surface height of the key groove as the vertical coordinate and the length direction of the key groove as the horizontal coordinate. The feature pairing module is used to traverse the features of each key and calculate the similarity. The method for calculating the similarity between two keys includes: calculating the mean square error between the ordinate values of the feature curves of each pair of keys. The pairing result output module is used to determine whether two keys correspond to the same container based on the similarity.
2. The container key identification and pairing system as described in claim 1, characterized in that, The identification device fixing system includes a device fixing module and a parameter output module. The device fixing module is used to fix the position of the light source and the camera and determine the key parameters. The parameter output module is used to input the key parameters into the key image preprocessing system.
3. The container key identification and pairing system as described in claim 1, characterized in that, The key image preprocessing system includes a key image acquisition module, a region of interest (ROI) selection module, and an image preprocessing module. The key image acquisition module uses the camera to acquire multiple key images from different lighting directions, obtains a three-dimensional array of key images from multiple directions, and inputs it into the ROI selection module. The ROI selection module calculates the average value of the key images from multiple directions to obtain a composite illumination image, selects and crops the composite illumination image to obtain images within the ROI region, creates a zero matrix for storing the cropped images, and inputs the zero matrix into the image preprocessing module. The image preprocessing module is used to process the image within the region of interest in the comprehensive illumination image, and to correct it according to the light energy matrix, thereby obtaining the preprocessed image and inputting it into the key image processing system.
4. The container key identification and pairing system as described in claim 3, characterized in that, Four reference images were obtained from four lighting directions, and four key images of a key under test were also acquired.
5. The container key identification and pairing system as described in claim 4, characterized in that, The image preprocessing module is used to: normalize the composite illumination image and binarize it to generate a binary mask; traverse each channel of the zero matrix, copy the corresponding input image to a temporary variable, and set the pixel values of the non-interest regions in the composite illumination image to 0 to mask the non-interest regions; Adjust the size of the temporary variable to match the size of the light energy matrix and store it in the zero matrix.
6. The container key identification and pairing system as described in claim 1, characterized in that, The key image processing system includes a surface normal and reflectivity calculation module, a curvature calculation module, a surface height calculation module, and a calculation result output module. The surface normal and reflectivity calculation module is used to calculate the surface normal and reflectivity. The curvature calculation module is used to calculate the curvature and Gaussian curvature of the surface; the surface height calculation module is used to calculate the height value of each pixel; and the calculation result output module is used to input the calculation results into the key recognition and pairing system.
7. A method for identifying and pairing container keys, characterized in that, Includes the following steps: Step 1: Fix the positions of the light source and camera, and determine the key parameters; the key parameters include at least the deflection angle of the light source, the height of the camera, and the tilt angle for acquiring the reference image; Step 2: Acquire reference images from multiple lighting directions, traverse each reference image, and for each pixel in each reference image, calculate its distance to the light source, the light source angle, and the light energy matrix, and mark the position of the light source; Step 3: Acquire images of the key from different lighting directions, and select images within the area of interest for preprocessing; Step 4: Calculate the surface normal vector, reflectivity, curvature, and surface height of the key in the key image; Step 5: Extract the surface features of the keys based on the calculation results and determine the pairing results of multiple keys, including: establishing a local coordinate system of the feature region with the surface height of the key groove as the ordinate and the length direction of the key groove as the abscissa; traversing the features of each key and calculating the similarity. The method for calculating the similarity between two keys includes: calculating the mean square error between the ordinate values of the feature curves of each pair of keys; and determining whether the two keys correspond to the same container based on the similarity.
Citation Information
Patent Citations
Key blank identification system with groove scanning
CN102686348A
Detection method and system suitable for various types of metal surface defects
CN115308223A