An AI image recognition-based container real-time tracking method

CN122530264APending Publication Date: 2026-08-07SHENZHEN JOINT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN JOINT TECH CO LTD
Filing Date
2026-06-04
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

受限于真实纹理区域与漫反射伪特征区域的亮度范围存在重叠区间,单纯依靠固定亮度阈值无法实现两类区域的有效区分,这使得AI特征匹配模型在特征点提取过程中,极易将漫反射伪特征误判为真实特征点,进而引发特征点误匹配问题

Benefits of technology

[0046]1.基于历史标准图像数据库中的集装箱标准图像,分别提取真实纹理区域和漫反射伪特征区域,进行交叉分析构建漫反射判定矩阵;实时采集当前图像基于漫反射判定矩阵识别漫反射疑似区域;基于历史图像构建漫反射判定矩阵并识别疑似区域,为漫反射区域的针对性判定提供标准化参照依据;根据识别的漫反射疑似区域,进行纹理边缘分析得到特征表现值;根据特征表现值将漫反射疑似区域判定为漫反射特征区域,并获取漫反射特征区域的定位数据集;对疑似区域做纹理边缘分析并判定漫反射区域、获取定位数据集,明确漫反射区域的边界范围以支撑后续像素级处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530264A_ABST
    Figure CN122530264A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial visual tracking, and particularly discloses a container real-time tracking method based on AI image recognition, which comprises the following steps: based on a container standard image, real texture and diffuse reflection pseudo-feature region pixels are extracted, a diffuse reflection judgment matrix is constructed, and a diffuse reflection suspected region is identified; then, a texture continuous coefficient and an edge smoothness are used to calculate a feature performance value, a real diffuse reflection region is discriminated, and a positioning data set is obtained; a pixel mask layer is generated based on the positioning data set, a feature suppression image is obtained through effectiveness screening and dynamic brightness attenuation processing; real feature points are extracted by combining Harris corner points and Canny edge detection, a matching set is constructed after double screening, and stable tracking between container frames is realized through a KLT optical flow algorithm and centroid calculation; the method reduces diffuse reflection pseudo-feature interference, improves the accuracy and reliability of container tracking in a port night LED light supplementing scene, and is suitable for actual operation working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial visual tracking technology, specifically to a real-time tracking method for containers based on AI image recognition. Background Technology

[0002] As a core hub of the global logistics network, ports are experiencing a continuous growth in container throughput. Intelligent tracking systems have become a key technological support for improving port operation efficiency and reducing labor costs. In the intelligent tracking of containers, AI feature matching technology based on computer vision plays a dominant role.

[0003] Due to insufficient lighting in the port's nighttime operating environment, LED point light sources are required for supplemental lighting to ensure the clarity of image acquisition. However, under nighttime LED supplemental lighting conditions, the surfaces of metal components such as container corner fittings and corrugated sheets are prone to diffuse reflection, resulting in weak diffuse reflection light with a brightness of <50 cd / ㎡.

[0004] The aforementioned weak diffuse reflection light creates pseudo-features in the acquired images that are highly similar to the actual texture and edge features of the container. Because the brightness ranges of the actual texture area and the diffuse pseudo-feature area overlap, simply relying on a fixed brightness threshold cannot effectively distinguish between the two types of areas. This makes it easy for AI feature matching models to misclassify diffuse pseudo-features as real feature points during feature point extraction, leading to feature point mismatch problems. This issue directly causes the container tracking position to shift towards the pseudo-feature area, severely reducing tracking accuracy and adversely affecting the safety and efficiency of subsequent operations such as port gantry crane loading and unloading, and container yard scheduling.

[0005] Therefore, this invention provides a real-time container tracking method based on AI image recognition. Summary of the Invention

[0006] The purpose of this invention is to provide a real-time container tracking method based on AI image recognition to solve the aforementioned background problems.

[0007] The objective of this invention can be achieved through the following technical solution: a real-time container tracking method based on AI image recognition, comprising:

[0008] Based on standard container images in a historical standard image database, real texture regions and diffuse reflection pseudo-feature regions are extracted separately, and cross-analysis is performed to construct a diffuse reflection determination matrix; the current image is acquired in real time and the diffuse reflection determination matrix is ​​used to identify suspected diffuse reflection regions;

[0009] Based on the identified suspected diffuse reflection regions, texture edge analysis is performed to obtain feature performance values; based on the feature performance values, the suspected diffuse reflection regions are determined to be diffuse reflection feature regions, and the localization dataset of diffuse reflection feature regions is obtained.

[0010] A pixel mask layer is generated based on the localization dataset, and a validity screening is performed to obtain valid pixels. Brightness attenuation analysis is performed on the valid pixels to obtain attenuated brightness values, and a hard verification operation is performed to obtain a feature-suppressed image.

[0011] Based on the feature suppression image, the Harris corner detection operator and the Canny edge detection operator are combined to extract the real feature points of the box. The compliant real feature points are obtained by double effective screening analysis. A new matching set is constructed based on the compliant real feature points.

[0012] The new matching set is processed by normalizing the feature point coordinates and assigning a unique identifier. The KLT optical flow tracing algorithm is used to perform inter-frame tracking analysis to obtain the pixel displacement vector, and the centroid calculation method is used to obtain the tracking position of the container core.

[0013] Furthermore, the diffuse reflection determination matrix is ​​constructed as follows:

[0014] Obtain the diffuse reflection capture range and pixel gradient factor;

[0015] The pixel's brightness value is within the diffuse reflection capture range and the pixel's gradient value is less than the pixel gradient factor.

[0016] Furthermore, the method for obtaining the diffuse reflection capture range is as follows:

[0017] Obtain the true texture brightness range and diffuse brightness range;

[0018] The base threshold is obtained by averaging the maximum value of the real texture brightness range and the minimum value of the diffuse brightness range. The supplementary lighting distance is multiplied by the correction term to obtain the supplementary lighting distance correction term. The brightness distinction feature value is obtained by summing the base threshold and the supplementary lighting distance correction term.

[0019] The diffuse reflection capture range is [luminance distinguishing feature value - Q, luminance distinguishing feature value + Q].

[0020] Furthermore, the process of obtaining the feature representation values ​​is as follows:

[0021] The brightness values ​​of pixels in the suspected diffuse reflection region and the real texture reference region are obtained, and the texture continuity coefficient is obtained by performing adjacent difference analysis.

[0022] Edge smoothness is obtained by performing edge detection analysis on suspected diffuse reflection areas;

[0023] The feature performance value is obtained by multiplying the texture continuity coefficient of the suspected diffuse reflection region with the edge smoothness.

[0024] Furthermore, the method for performing adjacent difference analysis is as follows:

[0025] The suspected diffuse reflection area is traversed using a 3×3 pixel grid. The absolute difference in brightness is calculated by taking the absolute difference in brightness values ​​of adjacent pixels in the horizontal and vertical directions within each grid. All absolute differences in brightness within the suspected diffuse reflection area are counted and their arithmetic mean is calculated and marked as the pixel difference mean.

[0026] Obtain the average pixel difference of the real texture reference area;

[0027] The texture continuity coefficient is calculated by comparing the average pixel difference of the suspected diffuse region with the average pixel difference of the real texture reference region.

[0028] Furthermore, the edge detection analysis is performed as follows:

[0029] Count the number of edge pixels in the suspected diffuse reflection region, and also count the total number of pixels in the suspected diffuse reflection region;

[0030] The edge smoothness of the suspected diffuse reflection region is obtained by calculating the ratio of the number of edge pixels to the total number of pixels.

[0031] Furthermore, the process of obtaining the attenuation brightness value is as follows:

[0032] Obtain the effective pixels and actual brightness values, calculate the difference between the maximum value of the diffuse brightness range and the actual brightness value of the effective pixels, and then calculate the ratio between the result of the difference calculation and the maximum value of the diffuse brightness range to obtain the brightness attenuation coefficient.

[0033] The attenuated brightness value is calculated by multiplying the actual brightness value of the effective pixel by the brightness attenuation coefficient.

[0034] Furthermore, the method for obtaining valid pixels is as follows:

[0035] To obtain the diffuse reflection feature region, OpenCV pixel localization and masking technology is used to generate a pixel mask layer. The inside of the mask layer is the diffuse reflection feature pixel, and the outside of the mask layer is the real texture pixel.

[0036] The actual brightness value of each pixel in the mask layer is extracted and its validity is screened to obtain valid pixels.

[0037] Furthermore, the process of obtaining compliant and authentic feature points is as follows:

[0038] Obtain the neighborhood similarity of the target feature points;

[0039] The brightness values ​​of the target feature point and other feature points are obtained. The average brightness value is calculated by summing the brightness values ​​of the other feature points and taking the average value. The brightness matching error is calculated by comparing the brightness value of the target feature point with the average brightness value.

[0040] Compliant and authentic feature points are obtained through a dual effective screening based on the domain similarity and brightness matching error of the target feature points.

[0041] Furthermore, the method for obtaining the neighborhood similarity of target feature points is as follows:

[0042] Obtain other feature points in the neighborhood of the target feature point and integrate them to obtain a feature dataset;

[0043] Obtain the feature dataset of all target feature points, and calculate the Euclidean distance between the target feature points and all other feature points based on the Euclidean distance formula;

[0044] The neighborhood similarity of the target feature point is obtained by averaging the Euclidean distances between the target feature point and all other feature points.

[0045] The beneficial effects of this invention are as follows:

[0046] 1. Based on standard container images in a historical standard image database, extract real texture regions and diffuse reflection pseudo-feature regions respectively, and perform cross-analysis to construct a diffuse reflection determination matrix; acquire current images in real time and identify suspected diffuse reflection regions based on the diffuse reflection determination matrix; construct a diffuse reflection determination matrix based on historical images and identify suspected regions to provide a standardized reference for targeted determination of diffuse reflection regions; perform texture edge analysis on the identified suspected diffuse reflection regions to obtain feature performance values; determine the suspected diffuse reflection regions as diffuse reflection feature regions based on the feature performance values, and obtain the localization dataset of diffuse reflection feature regions; perform texture edge analysis on suspected regions and determine diffuse reflection regions, obtain the localization dataset, and clarify the boundary range of diffuse reflection regions to support subsequent pixel-level processing.

[0047] 2. A pixel mask layer is generated based on the positioning dataset, and validity screening is performed to obtain valid pixels. Brightness attenuation analysis is conducted on the valid pixels to obtain attenuated brightness values, and a hard verification operation is performed to obtain a feature-suppressed image. The pixel mask layer is generated and processed through multiple rounds to obtain the feature-suppressed image, filtering out invalid pixel interference and reducing the masking effect of diffuse reflection on the true features of the container. Based on the feature-suppressed image, the Harris corner detection operator and the Canny edge detection operator are combined to extract the true feature points of the container. A double validity screening analysis is performed to obtain compliant true feature points, and a new matching set is constructed based on these compliant true feature points. The two detection operators are combined to extract feature points and perform double screening to construct a new matching set, integrating the advantages of different operators to improve the reliability and applicability of feature point selection. The new matching set undergoes feature point coordinate normalization and is assigned a unique identifier. The KLT optical flow tracing algorithm is used for inter-frame tracking analysis to obtain pixel displacement vectors, and the centroid calculation method is used to obtain the core tracking position of the container. Stable tracking of inter-frame feature points is achieved, and the core motion position of the container is locked. Attached Figure Description

[0048] The invention will now be further described with reference to the accompanying drawings.

[0049] Figure 1 This is a flowchart of the steps of a real-time container tracking method based on AI image recognition in this invention;

[0050] Figure 2 This is a logical diagram illustrating how a suspected diffuse reflection region is identified as a diffuse reflection feature region in this invention.

[0051] Figure 3 This is a functional module diagram of a real-time container tracking system based on AI image recognition in this invention. Detailed Implementation

[0052] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0053] Example 1

[0054] like Figures 1-2 As shown, a real-time container tracking method based on AI image recognition includes:

[0055] Step 1: Based on standard container images in the historical standard image database, extract the real texture region and diffuse reflection pseudo-feature region respectively, and perform cross-analysis to construct a diffuse reflection determination matrix; acquire the current image in real time and identify suspected diffuse reflection regions based on the diffuse reflection determination matrix;

[0056] In step one, the process of constructing the diffuse reflection determination matrix through cross-analysis is as follows:

[0057] Acquire standard images of containers under nighttime port LED supplemental lighting scenarios from a historical standard image database;

[0058] The standard images of the container include 1,000 images with different lighting angles from 0° to 45° and different lighting distances from 5 to 20m; this ensures that the samples cover the lighting conditions that may occur in actual operations and avoids statistical bias caused by a single sample.

[0059] The standard image of the container was segmented using OpenCV image processing technology to extract the real texture region and the diffuse pseudo-feature region respectively.

[0060] It should be noted that the real texture areas are mainly selected from the flat parts of the corrugated plate and the parts with clear outlines of the container edge, excluding areas that are prone to diffuse reflection, such as metal corner pieces and welds; the diffuse reflection pseudo-feature areas are mainly selected from the surface of metal corner pieces and the parts of the corrugated plate that are diffusely reflected by LED supplementary light; for each standard container image, 5 real texture areas and 5 diffuse reflection pseudo-feature areas are selected, and N real texture pixels and N pseudo-feature pixels are selected respectively.

[0061] Preferably, N is 50;

[0062] The brightness values ​​of real texture pixels and pseudo feature pixels are calculated using a pixel brightness extraction algorithm.

[0063] The brightness range of the real texture and the range of diffuse reflection brightness are obtained by combining the brightness values ​​of real texture pixels and pseudo feature pixels with mathematical statistical analysis methods.

[0064] Preferably, the actual texture brightness range is 12-38 cd / ㎡, and the diffuse reflection brightness range is 18-49 cd / ㎡;

[0065] The results of mathematical statistical analysis show that there is an overlap between the real texture brightness range and the diffuse reflection brightness range. If a fixed brightness threshold is used alone, the two types of regions cannot be effectively distinguished.

[0066] Therefore, considering the influence of the true texture brightness range, the diffuse reflection brightness range, and the supplementary lighting distance, a formula for calculating the brightness distinction feature value between the true texture brightness range and the diffuse reflection brightness range is defined as follows:

[0067] The base threshold is obtained by averaging the maximum value of the real texture brightness range and the minimum value of the diffuse brightness range. The supplementary lighting distance is multiplied by the correction term to obtain the supplementary lighting distance correction term. The brightness distinction feature value is obtained by summing the base threshold and the supplementary lighting distance correction term.

[0068] Among them, the supplementary lighting distance correction term is used to adapt to the brightness changes under different supplementary lighting distances, effectively making up for the influence of supplementary lighting distance on brightness and improving the adaptability of the threshold.

[0069] It should be noted that the brightness distinction feature values ​​corresponding to standard images of containers at different supplementary lighting distances are different;

[0070] The Sobel operator is used to calculate the gradient value of each pixel in the real texture pixels and pseudo feature pixels, and the pixel gradient factor is obtained by statistical analysis.

[0071] For example, by analyzing the gradient values ​​of statistical samples, it is shown that the pixel gradient values ​​of the real texture region are all greater than or equal to 0.8, with an average value of 1.3; the pixel gradient values ​​of the diffuse pseudo-feature region are all less than 0.8, with an average value of 0.5. Finally, the pixel gradient factor is determined to be 0.8.

[0072] A diffuse reflection determination matrix is ​​constructed based on brightness-distinguishing feature values ​​and pixel gradient factors, specifically as follows:

[0073] Condition 1: The pixel's brightness value is within the diffuse reflection capture range: [Brightness distinguishing feature value - Q, Brightness distinguishing feature value + Q];

[0074] Preferably, Q is 5;

[0075] It is understandable that the diffuse reflection capture range falls in the core segment of the overlapping area between the real texture brightness range and the diffuse reflection brightness range. The core segment of the overlapping area is the part where the brightness of the two types of regions intersects most densely and is most easily confused visually. It is also the key area where diffuse reflection pseudo-features are most easily misjudged as real textures.

[0076] Condition 2: The gradient value of a pixel is less than the pixel gradient factor;

[0077] If a pixel in the acquired image satisfies both condition one and condition two, then that pixel is marked as a suspected diffuse reflection point.

[0078] In step one, the process of real-time acquisition of the current image and identification of suspected diffuse reflection regions based on the diffuse reflection determination matrix is ​​as follows:

[0079] Real-time acquisition of current images of containers, obtaining the brightness and gradient values ​​of pixels in the current image, and combining the diffuse reflection determination matrix to identify suspected diffuse reflection points in the current image;

[0080] All suspected diffuse reflection points in the current image are obtained and integrated using the eight-neighbor connectivity method to obtain the suspected diffuse reflection region;

[0081] Step 2: Based on the identified diffuse reflection suspected areas, perform texture edge analysis to obtain feature performance values; based on the feature performance values, determine the diffuse reflection suspected areas as diffuse reflection feature areas, and obtain the localization dataset of diffuse reflection feature areas;

[0082] In step two, the process of obtaining feature representation values ​​through texture edge analysis based on the identified diffuse reflection suspected areas is as follows:

[0083] The suspected diffuse reflection area is traversed using a 3×3 pixel grid. The absolute difference in brightness is calculated by taking the absolute difference in brightness values ​​of adjacent pixels in the horizontal and vertical directions within each grid. All absolute differences in brightness within the suspected diffuse reflection area are counted and their arithmetic mean is calculated and marked as the pixel difference mean.

[0084] Similarly, the real texture reference area (the area outside the suspected diffuse reflection area in the current image) is traversed using a 3×3 pixel grid. The absolute difference in brightness is calculated by the absolute difference in brightness values ​​of adjacent pixels in the horizontal and vertical directions within each grid. All absolute differences in brightness within the real texture reference area are counted and the arithmetic mean is calculated and marked as the pixel difference mean.

[0085] The texture continuity coefficient of each suspected diffuse region is calculated by comparing the average pixel difference of the suspected diffuse region with the average pixel difference of the real texture reference region.

[0086] It should be noted that the physical meaning of the texture continuity coefficient is: to quantify the brightness continuity distribution characteristics of the suspected diffuse reflection area and the degree of deviation from the brightness change characteristics of the real texture area of ​​the container; by the ratio of the average brightness difference between adjacent pixels in the suspected area and the real texture area, the degree of brightness change in the area is transformed into a quantitative index. The coefficient of the diffuse reflection pseudo-feature area is significantly smaller due to its uniform brightness and small difference, while the coefficient of the real texture area is close to 1 due to the natural fluctuation of brightness. This provides the core quantitative basis for distinguishing the two types of areas based on the brightness distribution law.

[0087] A 5×5 Gaussian filter is applied to the suspected diffuse reflection region to remove noise interference from image noise on edge pixel statistics. The Canny edge detection operator is then used to extract edge pixels within the suspected diffuse reflection region.

[0088] Count the number of edge pixels in the suspected diffuse reflection region, and also count the total number of pixels in the suspected diffuse reflection region;

[0089] The edge smoothness of the suspected diffuse reflection region is calculated by the ratio of the number of edge pixels to the total number of pixels.

[0090] The texture continuity and edge smoothness of each suspected diffuse reflection region in the current image are obtained and multiplied to calculate the feature representation value of the suspected diffuse reflection region.

[0091] In step two, the process of determining the suspected diffuse reflection region as a diffuse reflection feature region based on the feature performance value and obtaining the localization dataset of the diffuse reflection feature region is as follows:

[0092] In some embodiments, the feature performance value of the diffuse reflection suspected region is compared with the feature performance threshold;

[0093] It should be noted that the feature representation threshold was obtained by those skilled in the art through mathematical and statistical analysis of the diffuse reflection suspected area and the real texture area of ​​the standard container image;

[0094] If the feature performance value of a suspected diffuse reflection region is less than or equal to the feature performance threshold, then the suspected diffuse reflection region is determined to be a diffuse reflection feature region.

[0095] If the feature performance value of a suspected diffuse reflection region is greater than the feature performance threshold, the region is determined to be a mislabeled real texture region, the suspected diffuse reflection label of the region is immediately canceled, and it is removed from the suspected diffuse reflection region.

[0096] After identifying and marking all suspected diffuse reflection areas, all identified diffuse reflection feature areas in the current image are summarized to form a localization dataset of diffuse reflection feature areas. This dataset provides regional coordinate references for subsequent brightness attenuation processing, ensuring that only real diffuse reflection pseudo-feature areas are processed, thus avoiding damage to the true texture and edge features of the box due to regional localization deviations.

[0097] The technical solution of this embodiment is as follows: Based on standard container images in a historical standard image database, real texture regions and diffuse reflection pseudo-feature regions are extracted respectively, and cross-analysis is performed to construct a diffuse reflection determination matrix; the current image is acquired in real time, and the diffuse reflection determination matrix is ​​used to identify suspected diffuse reflection regions; a diffuse reflection determination matrix is ​​constructed based on historical images, and suspected regions are identified, providing a standardized reference for the targeted determination of diffuse reflection regions; based on the identified suspected diffuse reflection regions, texture edge analysis is performed to obtain feature performance values; based on the feature performance values, the suspected diffuse reflection regions are determined as diffuse reflection feature regions, and the location dataset of diffuse reflection feature regions is obtained; texture edge analysis is performed on the suspected regions, and the diffuse reflection regions are determined and the location dataset is obtained, clarifying the boundary range of the diffuse reflection regions to support subsequent pixel-level processing.

[0098] Example 2

[0099] Please see Figure 1 As shown, a real-time container tracking method based on AI image recognition includes:

[0100] Step 3: Generate a pixel mask layer based on the localization dataset and perform validity screening to obtain valid pixels; perform brightness attenuation analysis on the valid pixels to obtain attenuated brightness values, and perform hard verification to obtain a feature-suppressed image;

[0101] In step three, the process of generating a pixel mask layer based on the location dataset and performing validity screening to obtain valid pixels is as follows:

[0102] Based on the localization dataset of diffuse reflection feature regions, pixel-level adaptive brightness attenuation processing is performed on the diffuse reflection feature regions in the current image:

[0103] Retrieve the localization dataset to obtain the complete pixel coordinate range of each diffuse feature region in the current image;

[0104] Based on OpenCV pixel localization and masking technology, an independent pixel mask layer is generated for each diffuse reflection feature region. The inside of the mask layer is the diffuse reflection feature pixel, and the outside of the mask layer is the real texture pixel.

[0105] Among these measures, it is ensured that the brightness attenuation operation only applies to pixels within the mask layer, thus avoiding false attenuation of the real texture area.

[0106] Extract the actual brightness value of each pixel within the mask layer;

[0107] The extracted actual brightness values ​​are screened for validity, and brightness distortion values ​​caused by image sensor noise and transmission interference are removed. If the actual brightness value of a pixel exceeds the diffuse reflection pseudo-feature brightness range of 18-49 cd / ㎡, it is determined to be an invalid distortion value, and the original brightness value of the pixel is maintained and not included in the subsequent attenuation calculation.

[0108] Pixels retained after validity screening are marked as valid pixels;

[0109] In step three, the process of performing brightness attenuation analysis on effective pixels to obtain attenuated brightness values ​​and performing hard verification to obtain the feature-suppressed image is as follows:

[0110] The difference between the maximum value of the diffuse reflection brightness range and the actual brightness value of the effective pixel is calculated, and the result of the difference calculation is compared with the maximum value of the diffuse reflection brightness range to obtain the brightness attenuation coefficient.

[0111] The attenuated brightness value is calculated by multiplying the actual brightness value of the effective pixel by the brightness attenuation coefficient.

[0112] It should be noted that the brightness attenuation coefficient is a dynamic value. Different brightness pixels within the diffuse reflection feature area correspond to different attenuation coefficients. The closer the actual brightness of a pixel is to 49 cd / m², the smaller the brightness attenuation coefficient and the greater the brightness attenuation. The closer the actual brightness of a pixel is to 18 cd / m², the larger the brightness attenuation coefficient and the smaller the brightness attenuation. This achieves on-demand attenuation in the diffuse reflection feature area and avoids regional brightness distortion caused by uniform attenuation.

[0113] Perform a hard check on the brightness reduction value:

[0114] If the pixel's attenuation brightness value is greater than or equal to the brightness distinction feature value, then the pixel's attenuation brightness value is directly modified to the difference between the brightness distinction feature value and the unit reference value.

[0115] Preferably, the unit base value is 1;

[0116] If the pixel's attenuation brightness value is less than the brightness distinguishing feature value, no processing is performed;

[0117] Understandably, the significance of hard verification lies in finding the optimal solution between completely weakening false features and preserving all real features. This ensures that false features lose their brightness basis for being misjudged, without harming any real box features, and only targets confirmed false features.

[0118] The final determined attenuation brightness values ​​are assigned one by one to the corresponding valid pixels, and the pixel brightness of the diffuse reflection feature area in the mask layer is redrawn.

[0119] After the pixel brightness redraw is completed, the pixel mask layer of all diffuse reflection feature regions is removed, and the images are integrated to obtain the current image after brightness suppression, which is then marked as the feature-suppressed image.

[0120] Step 4: Extract the true feature points of the box based on the feature suppression image combined with the Harris corner detection operator and the Canny edge detection operator, perform double effective screening analysis to obtain compliant true feature points, and construct a new matching set based on the compliant true feature points;

[0121] In step four, the process of extracting the true feature points of the box based on the feature-suppressed image combined with the Harris corner detection operator and the Canny edge detection operator is as follows:

[0122] The feature-suppressed image is preprocessed, and a 2×2 mean filter operator is used to perform global noise reduction on the image to filter out tiny noise points left by the image sensor.

[0123] The Harris corner detection operator combined with the Canny edge detection operator is used to extract features and suppress the true feature points of the box in the image;

[0124] Specifically, the Harris corner detection operator is used to extract the texture intersection points of the container corrugated plate, and the Canny edge detection operator is used to extract the outline points of the container body. The two types of feature points are summarized and integrated to obtain the real feature point set, and the pixel coordinates and brightness values ​​of each feature point in the real feature point set are obtained.

[0125] It should be noted that the extracted feature points are only for the real texture area after brightness suppression. After brightness attenuation, no effective feature points can be extracted from the diffuse reflection feature area, thus avoiding the intervention of false feature points in the extraction process.

[0126] In step four, a dual effective screening analysis is performed to obtain compliant and genuine feature points. The process of constructing a new matching set based on these compliant and genuine feature points is as follows:

[0127] Using each feature point in the real feature point set as the center, a 3×3 pixel range is defined as the neighborhood region of that feature point; the feature point at the center is marked as the target feature point, and the feature points in the neighborhood region are marked as other feature points;

[0128] The feature dataset is obtained by associating and integrating the target feature point with other feature points in the target feature point's neighborhood.

[0129] Obtain the feature dataset of all target feature points, and calculate the Euclidean distance between the target feature points and all other feature points based on the Euclidean distance formula;

[0130] The neighborhood similarity of the target feature point is obtained by averaging the Euclidean distances between the target feature point and all other feature points.

[0131] Extract the brightness values ​​of the target feature point and other feature points from the feature dataset. Sum the brightness values ​​of the other feature points and take the average value to obtain the average brightness value. Calculate the difference between the brightness value of the target feature point and the average brightness value to obtain the brightness matching error.

[0132] It should be noted that the magnitude of the brightness matching error reflects the consistency of brightness between a single feature point and its neighboring feature points. The smaller the brightness matching error, the more the brightness distribution of the feature point conforms to the brightness characteristics of the real box.

[0133] A dual effective screening method is used based on the neighborhood similarity and brightness matching error of the target feature points. Condition 1: Neighborhood similarity is less than or equal to 3 pixels; Condition 2: Brightness matching error is less than or equal to 5 cd / ㎡.

[0134] The target feature points are subjected to double effective screening in sequence. If the target feature point meets both condition one and condition two at the same time, it is determined to be a compliant and real feature point and is retained.

[0135] If the target feature point does not meet both conditions at the same time, it is determined to be an invalid feature point. Such feature points are mostly residual noise or a small number of pseudo feature points that have not been completely eliminated after the attenuation of the diffuse reflection feature area. They are immediately removed from the set of real feature points.

[0136] All compliant and authentic feature points are aggregated to construct a new matching set of container feature points;

[0137] It should be noted that the new matching set is used as the sole data source for AI feature point matching. The AI ​​performs container feature point matching based on this new matching set, which completely avoids the problem of false feature point mismatch at the data source level. It directly corrects the tracking position that the AI ​​shifts to the false feature area during tracking, ensuring the accuracy of container tracking position.

[0138] Step 5: Normalize the feature point coordinates of the new matching set and assign a unique identifier. Use the KLT optical flow tracing algorithm to perform inter-frame tracking analysis to obtain the pixel displacement vector, and use the centroid calculation method to obtain the tracking position of the container core.

[0139] In step five, the new matching set is normalized for feature point coordinates and assigned a unique identifier. The process of obtaining the pixel displacement vector through inter-frame tracking analysis using the KLT optical flow tracing algorithm is as follows:

[0140] Perform feature point normalization processing based on the new matching set;

[0141] The feature point coordinate normalization algorithm of OpenCV is used to convert the original pixel coordinates of all compliant real feature points in the new matching set into image normalized coordinates;

[0142] At the same time, each compliant and genuine feature point is assigned a unique digital feature identifier code;

[0143] Understandably, the benefits of normalization are: eliminating the interference of different monitoring image resolutions on tracking calculations, and enabling independent tracing of single feature points and inter-frame tracking.

[0144] The KLT optical flow tracing algorithm is used to perform inter-frame continuous tracking of compliant real feature points with digital feature identification codes;

[0145] Using the new matching set of the current image as the benchmark feature set, for each of the container monitoring image frames acquired in real time, extract the compliant real feature points that correspond one-to-one with the digital feature identification codes of the benchmark feature set;

[0146] The pixel displacement vector of the same compliant real feature point between two adjacent frames is calculated using the KLT optical flow method.

[0147] It is understandable that the pixel displacement vector represents the inter-frame movement trajectory of each compliant real feature point;

[0148] In step five, the process of obtaining the core tracking position of the container using the centroid calculation method is as follows:

[0149] Obtain the image normalized coordinates of all compliant real feature points within a single frame image, and use the centroid calculation method to obtain the centroid normalized coordinates of the compliant real feature points within that frame;

[0150] Among them, the centroid normalized coordinates are used as the core tracking position of the container in the corresponding frame image, realizing the transformation from single feature point tracking to feature point group aggregation tracking, and weakening the interference of small displacement of individual feature points.

[0151] The centroid normalized coordinates of compliant real feature points are restored to the pixel coordinates of the original image through inverse transformation;

[0152] Meanwhile, the pixel coordinates of the original image are converted into physical coordinates of the actual port operation space by using the conversion parameters between the port monitoring scene pixels and physical space obtained through camera calibration technology.

[0153] Understandably, the system achieves real-time output and caching of container tracking location and trajectory, synchronously outputs the converted physical coordinates of each frame in real time, and caches the physical coordinate data of the latest 20 consecutive frames according to the time sequence to form continuous tracking trajectory data of the container. The cached data adopts a cyclic overwrite storage mode, retaining only the latest continuous trajectory data, providing continuous spatial position reference for real-time monitoring of port container operations, while ensuring efficient utilization of the monitoring system's storage resources.

[0154] The technical solution of this embodiment is as follows: A pixel mask layer is generated based on the positioning dataset, and validity screening is performed to obtain valid pixels; brightness attenuation analysis is performed on the valid pixels to obtain attenuated brightness values, and a hard verification operation is performed to obtain a feature suppression image; the pixel mask layer is generated and processed through multiple rounds to obtain a feature suppression image, filtering out invalid pixel interference and weakening the masking effect of diffuse reflection on the true features of the container; based on the feature suppression image, the Harris corner detection operator and the Canny edge detection operator are combined to extract the true feature points of the container, and a double validity screening analysis is performed to obtain compliant true feature points; a new matching set is constructed based on the compliant true feature points; feature points are extracted by combining the two detection operators and double screening is performed to construct a new matching set, integrating the advantages of different operators to improve the reliability of feature point screening and the applicability of matching; the new matching set is normalized for feature point coordinates and assigned a unique identifier code, and the KLT optical flow tracing algorithm is used for inter-frame tracking analysis to obtain pixel displacement vectors, and the core tracking position of the container is obtained through centroid calculation; stable tracking of inter-frame feature points is achieved, and the core motion position of the container is locked.

[0155] Example 3

[0156] Please see Figure 3 As shown, a real-time container tracking system based on AI image recognition includes the following modules:

[0157] The diffuse reflection determination module extracts real texture regions and diffuse reflection pseudo-feature regions from standard container images in a historical standard image database, performs cross-analysis to construct a diffuse reflection determination matrix, and acquires current images in real time to identify suspected diffuse reflection regions based on the diffuse reflection determination matrix.

[0158] Feature localization module: Based on the identified diffuse reflection suspected areas, perform texture edge analysis to obtain feature performance values; based on the feature performance values, determine the diffuse reflection suspected areas as diffuse reflection feature areas, and obtain the localization dataset of diffuse reflection feature areas;

[0159] Masking suppression module: Generates a pixel mask layer based on the localization dataset and performs validity screening to obtain valid pixels; performs brightness attenuation analysis on the valid pixels to obtain attenuated brightness values, and performs hard verification to obtain a feature-suppressed image;

[0160] The dual-screen matching module extracts real feature points of the box by combining the feature suppression image with the Harris corner detection operator and the Canny edge detection operator, performs dual effective screening analysis to obtain compliant real feature points, and constructs a new matching set based on the compliant real feature points;

[0161] Tracking and positioning module: Normalizes the feature point coordinates of the new matching set and assigns a unique identifier. It uses the KLT optical flow tracing algorithm to perform inter-frame tracking analysis to obtain the pixel displacement vector and obtains the core tracking position of the container through the centroid calculation method.

[0162] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A real-time container tracking method based on AI image recognition, characterized in that: include: Based on standard container images from a historical standard image database, real texture regions and diffuse reflection pseudo-feature regions are extracted respectively, and cross-analysis is performed to construct a diffuse reflection determination matrix. Real-time acquisition of current images; identification of suspected diffuse reflection areas based on diffuse reflection determination matrix. Based on the identified diffuse reflection suspected areas, texture edge analysis is performed to obtain feature performance values; Based on the feature performance values, the suspected diffuse reflection area is determined to be a diffuse reflection feature area, and the localization dataset of the diffuse reflection feature area is obtained. A pixel mask layer is generated based on the localization dataset, and a validity screening is performed to obtain valid pixels. Brightness attenuation analysis is performed on the valid pixels to obtain attenuated brightness values, and a hard verification operation is performed to obtain a feature-suppressed image. Based on the feature suppression image, the Harris corner detection operator and the Canny edge detection operator are combined to extract the real feature points of the box. The compliant real feature points are obtained by double effective screening analysis. A new matching set is constructed based on the compliant real feature points. The new matching set is processed by normalizing the feature point coordinates and assigning a unique identifier. The KLT optical flow tracing algorithm is used to perform inter-frame tracking analysis to obtain the pixel displacement vector, and the centroid calculation method is used to obtain the tracking position of the container core.

2. The real-time container tracking method based on AI image recognition according to claim 1, characterized in that: The method for constructing the diffuse reflection determination matrix is ​​as follows: Obtain the diffuse reflection capture range and pixel gradient factor; The pixel's brightness value is within the diffuse reflection capture range and the pixel's gradient value is less than the pixel gradient factor.

3. The real-time container tracking method based on AI image recognition according to claim 2, characterized in that: The method for obtaining the diffuse reflection capture range is as follows: Obtain the true texture brightness range and diffuse brightness range; The base threshold is obtained by averaging the maximum value of the real texture brightness range and the minimum value of the diffuse brightness range. The supplementary lighting distance correction term is obtained by multiplying the supplementary lighting distance and the correction term. The brightness distinction feature value is obtained by summing the base threshold and the supplementary lighting distance correction term; The diffuse reflection capture range is [luminance distinguishing feature value - Q, luminance distinguishing feature value + Q].

4. The real-time container tracking method based on AI image recognition according to claim 1, characterized in that: The process of obtaining feature performance values ​​is as follows: The brightness values ​​of pixels in the suspected diffuse reflection region and the real texture reference region are obtained, and the texture continuity coefficient is obtained by performing adjacent difference analysis. Edge smoothness is obtained by performing edge detection analysis on suspected diffuse reflection areas; The feature performance value is obtained by multiplying the texture continuity coefficient of the suspected diffuse reflection region with the edge smoothness.

5. The real-time container tracking method based on AI image recognition according to claim 4, characterized in that: The method for performing adjacent difference analysis is as follows: The suspected diffuse reflection area is traversed using a pixel grid. The absolute difference in brightness is calculated by the absolute difference in brightness values ​​of adjacent pixels in the horizontal and vertical directions within each grid. All absolute differences in brightness within the suspected diffuse reflection area are counted and their arithmetic mean is calculated and marked as the pixel difference mean. Obtain the average pixel difference of the real texture reference area; The texture continuity coefficient is calculated by comparing the average pixel difference of the suspected diffuse region with the average pixel difference of the real texture reference region.

6. The real-time container tracking method based on AI image recognition according to claim 4, characterized in that: The method for performing edge detection analysis is as follows: Count the number of edge pixels in the suspected diffuse reflection region, and also count the total number of pixels in the suspected diffuse reflection region; The edge smoothness of the suspected diffuse reflection region is obtained by calculating the ratio of the number of edge pixels to the total number of pixels.

7. The real-time container tracking method based on AI image recognition according to claim 1, characterized in that: The process of obtaining the attenuation brightness value is as follows: Obtain the effective pixels and actual brightness values, calculate the difference between the maximum value of the diffuse brightness range and the actual brightness value of the effective pixels, and then calculate the ratio between the result of the difference calculation and the maximum value of the diffuse brightness range to obtain the brightness attenuation coefficient. The attenuated brightness value is calculated by multiplying the actual brightness value of the effective pixel by the brightness attenuation coefficient.

8. The real-time container tracking method based on AI image recognition according to claim 7, characterized in that: The method for obtaining valid pixels is as follows: To obtain the diffuse reflection feature region, OpenCV pixel localization and masking technology is used to generate a pixel mask layer. The inside of the mask layer is the diffuse reflection feature pixel, and the outside of the mask layer is the real texture pixel. The actual brightness value of each pixel in the mask layer is extracted and its validity is screened to obtain valid pixels.

9. The real-time tracking method for containers based on AI image recognition according to claim 1, characterized in that: The process of obtaining compliant and true feature points is as follows: Obtain the neighborhood similarity of the target feature points; The brightness values ​​of the target feature point and other feature points are obtained. The average brightness value is calculated by summing the brightness values ​​of the other feature points and taking the average value. The brightness matching error is calculated by comparing the brightness value of the target feature point with the average brightness value. Compliant and authentic feature points are obtained through a dual effective screening based on the domain similarity and brightness matching error of the target feature points.

10. A real-time container tracking method based on AI image recognition according to claim 9, characterized in that: The method for obtaining the neighborhood similarity of target feature points is as follows: Obtain other feature points in the neighborhood of the target feature point and integrate them to obtain a feature dataset; Obtain the feature dataset of all target feature points, and calculate the Euclidean distance between the target feature points and all other feature points based on the Euclidean distance formula; The neighborhood similarity of the target feature point is obtained by averaging the Euclidean distances between the target feature point and all other feature points.