A container number recognition system for a reach stacker and a recognition method thereof
By employing temporal filtering, illumination enhancement, and deep learning models, a front-facing crane container number recognition system was implemented for use in rainy, snowy, and low-light conditions. This system addresses the technical problem of poor recognition performance in existing technologies and achieves accurate recognition in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANTAI PORT WEST PORT DEVELOPMENT CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
AI Technical Summary
Existing methods for identifying the container number on front-facing cranes have poor identification performance in rainy or snowy weather and in low-light conditions, and their anti-interference performance is weak, making it difficult to achieve accurate identification.
Temporal filtering, illumination enhancement algorithms, and deep learning models are employed, combined with median filtering and Gaussian filtering, to remove dynamic noise and improve illumination conditions. YOLOv5 model is used for box number region detection, and CNN combined with LSTM is used for character recognition.
It improves the accuracy of container number identification in rainy, snowy, and low-light conditions, enhances the system's anti-interference capabilities and identification precision, and ensures accurate identification of container numbers in complex environments.
Smart Images

Figure CN122135351A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of front-mounted crane container number identification, and more particularly to a front-mounted crane container number identification system and method thereof. Background Technology
[0002] In container yards, railway transfer stations, and other similar settings, reach stackers frequently need to operate across container areas, necessitating container number identification. By installing container number identification systems on reach stackers, automatic verification can be achieved, reducing repetitive operations and mitigating the risk of misdelivery due to manual data entry errors. Container number identification is one of the key technologies in logistics and port management.
[0003] However, current methods or systems for identifying container numbers on front-mounted cranes have the following problems: 1. In light rain or snow, raindrops and snowflakes adhere to the surface of the container, interfering with container number recognition and causing the recognition algorithm to misidentify or miss numbers, severely affecting the recognition results. Simultaneously, raindrops and snowflakes floating in the air also affect the identification of key points related to the container number during image acquisition.
[0004] 2. At night or in foggy weather, the poor lighting conditions reduce the contrast of container numbers, resulting in a significant decrease in recognition accuracy. Existing algorithms struggle to accurately identify container numbers in such environments.
[0005] While the existing invention patent, "A Container Number Recognition Method Based on Deep Learning," can also intelligently identify container numbers, it mainly relies on convolutional neural networks (CNNs) for number recognition, and its recognition performance significantly decreases in rainy, snowy, or low-light conditions. Furthermore, it lacks specific optimizations for rain, snow, and insufficient lighting, resulting in weak generalization ability in complex environments.
[0006] Therefore, there is a need for a front crane container number identification system and method that can accurately identify container numbers, is suitable for rainy and snowy weather and low-light environments, has good container number identification effect, and has good anti-interference performance. Summary of the Invention
[0007] This invention addresses the shortcomings of existing front-mounted crane container number identification methods, such as inability to adapt to rainy or snowy weather and low-light environments, poor container number identification performance, and poor anti-interference performance. It provides a front-mounted crane container number identification system and method that can accurately identify front-mounted crane container numbers, is applicable to rainy or snowy weather and low-light environments, has good container number identification performance, and good anti-interference performance.
[0008] The present invention provides a front-mounted crane container number identification system, comprising an input module, a preprocessing module, a time-domain filtering module, a median filtering module, a Gaussian filtering module, an illumination enhancement module, a container number identification module, and an output module; The input module is used to read input video / image data; The preprocessing module is used to perform grayscale processing on the input video / image; The time-domain filtering module is used to filter the preprocessed video / image in the time dimension. The filtering in the time dimension includes inter-frame differencing, binarization, and / or noise filtering; The median filtering module is used to perform spatial filtering on the filtered video / image to remove isolated noise points; The Gaussian filter module is used to smooth the image and reduce high-frequency noise; The illumination enhancement module is used to enhance contrast and improve image illumination unevenness, and uses histogram equalization for adaptive contrast enhancement. The container number recognition module is used for container number area detection, character segmentation and / or character recognition; The output module is used to output the identification result and the processed box number.
[0009] Furthermore, the temporal filtering module filters out dynamic noise by analyzing the differences between consecutive frames in the video.
[0010] Furthermore: The median filtering module is used to remove isolated noise points in the image. For each pixel in the image, the median value of its neighborhood is taken as the value of the current pixel. With the current pixel as the center, an N×N neighborhood window is selected, and the pixel values in the neighborhood are sorted and the median value is taken as the new value of the current pixel.
[0011] Furthermore: the Gaussian filtering module reduces high-frequency noise and smooths the image by weighted averaging; it generates an N×N Gaussian kernel based on the standard deviation σ, and then convolves the Gaussian kernel with the image to calculate the weighted average value of each pixel.
[0012] Furthermore, the illumination enhancement module enhances image contrast by adjusting the grayscale distribution of the image.
[0013] Furthermore, it also includes a post-processing module, which is used to correct the recognition results.
[0014] The identification method of the front-mounted crane container number identification system of the present invention includes the following steps: S1. Obtain video or images of a container mounted on a front-end crane; S2. Extract consecutive frames from the video at a fixed frequency, and perform grayscale processing on each frame to reduce computational complexity; S3. Filter the preprocessed video / image in the time dimension; S4. Perform spatial filtering on the filtered video / image to remove isolated noise points; S5. Reduces high-frequency noise and smooths the image by weighted averaging; S6. By adjusting the grayscale distribution of the image, the image contrast is enhanced, making the box number area clearer; S7. Perform container number area detection and character recognition on the processed image to achieve automatic container number recognition.
[0015] Furthermore, in S3, the temporal filtering of the preprocessed video / image specifically includes the following steps: S31. Calculate the pixel difference between two adjacent frames and generate a difference image; S32. Mark the dynamic noise region as a highlight region through binarization processing; S33. Replace or smooth the detected dynamic noise areas by replacing them with the corresponding pixel values from the previous or next frame.
[0016] Further: In S6, adjusting the grayscale distribution of the image specifically includes the following steps: S61. Adaptive contrast enhancement is achieved by using histogram equalization. S62. Calculate the histogram of the image, normalize it, and calculate the cumulative distribution function to map the original gray levels to the new gray levels. S63, Adaptive Contrast Enhancement, dynamically adjusts brightness based on the local contrast of the image. It does this by dividing the image into local windows and calculating the mean and standard deviation of each window.
[0017] Further: In S7, the box number area detection and character recognition specifically include the following steps: S71. Use the YOLOv5 model for box number region detection. Introduce channel attention mechanism and variable convolution in the backbone network to improve the detection capability of box number regions. S72. Perform character segmentation on the detected box number area, and extract individual characters using projection method and connected component analysis; S73. Use CNN combined with LSTM for character recognition. CNN extracts local features of characters, LSTM captures the temporal relationship between characters, and outputs the probability distribution of the character sequence. S74. The identification results are corrected through the post-processing module to ensure the integrity and accuracy of the box number.
[0018] The beneficial effects of this invention are: This invention improves the anti-interference capability and recognition accuracy of container number identification by introducing temporal filtering, illumination enhancement algorithms, and deep learning models. It enhances the recognition accuracy of the container number identification system mounted on a front-mounted crane in rainy and snowy weather by reducing interference from raindrops and snowflakes through temporal filtering and inter-frame difference methods, thus improving the robustness of container number identification. Simultaneously, it improves recognition accuracy at night and in foggy weather by enhancing image contrast through illumination enhancement algorithms, ensuring accurate container number identification even in low-light environments. Attached Figure Description
[0019] Figure 1 This is a flowchart of the method for identifying the container number on a front-facing crane; Figure 2 This is a flowchart of time-domain filtering; Figure 3 This is a schematic diagram of median filtering and Gaussian filtering; Figure 4 This is a schematic diagram of a lighting enhancement algorithm; Figure 5 This is a flowchart of the container number recognition algorithm; Figure 6 These are comparison images showing the effects of handling the box number in snowy weather. Figure 7 This is a comparison chart showing the effects of handling container numbers in rainy weather. Detailed Implementation
[0020] The following are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. The embodiments described below are only for explaining the present invention and should not be construed as limiting the present invention. The scope of protection of the present invention should be determined by the scope of the claims. The embodiments of the present invention are described in detail below. In order to facilitate the description of the present invention and simplify the description, the technical terms used in the specification of the present invention should be interpreted broadly, including but not limited to conventional alternatives not mentioned in this application, and including both direct and indirect implementation methods.
[0021] Example 1 Combination Figures 1-7 This embodiment describes an anti-interference front-mounted crane container number identification system, which includes an input module, a preprocessing module, a time-domain filtering module, a median filtering module, a Gaussian filtering module, an illumination enhancement module, a container number identification module, and an output module. The input module is mainly used for video input or image input; The preprocessing module's main function is grayscale conversion; the preprocessing module includes resizing and normalization. The temporal filtering module mainly employs inter-frame differencing, binarization, and / or noise filtering to filter out dynamic noise, such as raindrops and snowflakes, by analyzing the differences between consecutive frames in the video.
[0022] The main function of the median filtering module is to remove isolated noise points; the median filtering module is used to remove isolated noise points in the image, namely raindrops and snowflakes attached to the box numbers.
[0023] The main function of the Gaussian filtering module is to smooth the image and reduce high-frequency noise. The Gaussian filtering module reduces high-frequency noise and smooths the image through weighted averaging. Because temporal filtering is performed after preprocessing, this embodiment places Gaussian filtering after temporal filtering, rather than performing it during preprocessing. This avoids the possibility of damaging the box number image due to premature image smoothing caused by Gaussian filtering when comparing noise in different temporal domains.
[0024] The main functions of the illumination enhancement module are histogram equalization and adaptive contrast enhancement; the illumination enhancement module is used to improve image quality in low-contrast environments (such as nighttime or foggy weather).
[0025] The main functions of the container number recognition module are container number region detection, character segmentation, and character recognition. The container number recognition module realizes automatic container number recognition by performing container number region detection and character recognition on the processed image.
[0026] The main function of the output module is to output the identification result and the processed box number.
[0027] Example 2 This embodiment, described in conjunction with Example 1, discloses an anti-interference frontal crane container number identification method, comprising the following steps: S1. Obtain video or images of a container mounted on a front-end crane; S2. Extract consecutive frames from the video at a fixed frequency, and perform grayscale processing on each frame to reduce computational complexity; S3. Filter the preprocessed video / image in the time dimension; S4. Perform spatial filtering on the filtered video / image to remove isolated noise points; S5. Reduces high-frequency noise and smooths the image by weighted averaging; S6. By adjusting the grayscale distribution of the image, the image contrast is enhanced, making the box number area clearer; S7. Perform container number area detection and character recognition on the processed image to achieve automatic container number recognition.
[0028] refer to Figure 2As shown, firstly, consecutive frames are extracted from the video at a fixed frequency, and each frame is converted to grayscale to reduce computational complexity. Then, the pixel difference between two adjacent frames is calculated to generate a difference image, and dynamic noise areas are marked as highlight areas through binarization, as shown in Equation 1.
[0029] (1) Where It(x,y) represents the pixel value at position (x,y) in frame t.
[0030] Finally, the detected dynamic noise areas are replaced or smoothed by replacing them with the corresponding pixel values from the previous or next frame. Temporal filtering can effectively remove floating rain and snow noise while preserving the static characteristics of the box numbers.
[0031] refer to Figure 3 As shown in Formula 2, the core idea of the median filtering module is to take the median value of the neighborhood of each pixel in the image as the value of that pixel.
[0032] (2) Where K = [N / 2].
[0033] In practice, an N×N neighborhood window is selected centered on the current pixel. The pixel values within the neighborhood are sorted, and the median value is taken as the new value of the current pixel. Median filtering can effectively remove isolated noise points while preserving the edge and texture features of the box number. It is suitable for removing noise interference from raindrops and snowflakes attached to the box number in rainy or snowy weather.
[0034] The Gaussian filtering module reduces high-frequency noise and smooths the image by weighted averaging. First, an N×N Gaussian kernel is generated based on the standard deviation σ, as shown in Formula 3.
[0035] (3) The Gaussian kernel is then convolved with the image to calculate a weighted average for each pixel. Gaussian filtering effectively reduces high-frequency noise in images, improves image quality, and is suitable for further smoothing images and reducing the impact of rain and snow noise.
[0036] refer to Figure 4 As shown, the illumination enhancement module is used to improve image quality in low-contrast environments (such as nighttime or foggy weather). Histogram equalization enhances image contrast by adjusting the grayscale distribution of the image, making the box number regions clearer. The specific steps include calculating the image's histogram, normalizing, and calculating the cumulative distribution function (CDF), as shown in Equation 4.
[0037] (4) Finally, the original grayscale levels are mapped to the new grayscale levels. Adaptive contrast enhancement dynamically adjusts the brightness based on the local contrast of the image. By dividing the image into local windows and calculating the mean and standard deviation of each window, the brightness is dynamically adjusted to ensure that the box number areas remain clearly visible even in low-light environments.
[0038] refer to Figure 5 As shown, the container number recognition module achieves automatic container number recognition by detecting container number regions and recognizing characters in the processed image. First, a YOLOv5 model is used for container number region detection. Channel attention and variable convolution are introduced into the backbone network to improve the detection capability. Next, character segmentation is performed on the detected container number regions, using projection and connected component analysis to extract individual characters. Finally, a CNN combined with LSTM is used for character recognition. The CNN extracts local features of the characters, and the LSTM captures the temporal relationships between characters, outputting the probability distribution of the character sequence.
[0039] like Figure 6 and Figure 7 As shown, the post-processing module corrects the recognition results to ensure the integrity and accuracy of the container number. First, illegal characters are filtered using a rule base, and verification is performed according to the container number rules (4 letters + 6 numbers + 1 check digit). Next, contextual information (country code + serial number) is used to correct recognition errors, adjusting the recognition result based on the semantic relationship between the preceding and following characters. Post-processing significantly improves the accuracy of container number recognition, ensuring the system's reliability in practical applications.
[0040] Figure 5 In this context, the Detection Head is the detection head. Anchor-based is a commonly used method in fields such as computer vision, natural language processing, and temporal analysis. Its core idea is to simplify the complexity of the problem by using predefined reference benchmarks (such as boxes, points, or words) and to perform subsequent predictions, alignment, or analysis based on these anchors, thereby improving the efficiency and accuracy of the model.
[0041] MPDIoU Loss (Minimum Perimeter Distance IoU Loss) is a bounding box similarity measure that combines point distance and area comparison. It comprehensively considers factors such as overlapping or non-overlapping regions, center point distance, and width and height deviation, aiming to better measure the similarity between the predicted box and the ground truth box.
[0042] Neck is a feature fusion network; FPN is a feature pyramid network; FPA is a path aggregation network; PAN (Path Aggregation Network) is a neural network structure used for object detection and instance segmentation, which improves model performance through multi-scale feature fusion.
[0043] Backbone is the backbone network; CBS is a module composed of Conv2d+Batch+SiLU; VCB module stands for Deformable Convolutional Module.
[0044] RCB is an abbreviation for Residual Convolutional Block.
[0045] RBF module stands for Multi-Scale Receptive Field Module.
Claims
1. A front-mounted crane container number identification system, characterized in that, It includes an input module, a preprocessing module, a time-domain filtering module, a median filtering module, a Gaussian filtering module, an illumination enhancement module, a box number recognition module, and an output module; The input module is used to read input video / image data; The preprocessing module is used to perform grayscale processing on the input video / image; The time-domain filtering module is used to filter the preprocessed video / image in the time dimension. The filtering in the time dimension includes inter-frame differencing, binarization, and / or noise filtering; The median filtering module is used to perform spatial filtering on the filtered video / image to remove isolated noise points; The Gaussian filter module is used to smooth the image and reduce high-frequency noise; The illumination enhancement module is used to enhance contrast and improve image illumination unevenness, and uses histogram equalization for adaptive contrast enhancement. The container number recognition module is used for container number area detection, character segmentation and / or character recognition; The output module is used to output the identification result and the processed box number.
2. The front-mounted crane container number identification system according to claim 1, characterized in that, The temporal filtering module filters out dynamic noise by analyzing the differences between consecutive frames in the video.
3. The front-mounted crane container number identification system according to claim 1, characterized in that, The median filtering module is used to remove isolated noise points in the image. For each pixel in the image, the median value of its neighborhood is taken as the value of the current pixel. With the current pixel as the center, an N×N neighborhood window is selected, and the pixel values in the neighborhood are sorted and the median value is taken as the new value of the current pixel.
4. The front-mounted crane container number identification system according to claim 1, characterized in that, The Gaussian filtering module reduces high-frequency noise and smooths the image by weighted averaging; it generates an N×N Gaussian kernel based on the standard deviation σ, and then convolves the Gaussian kernel with the image to calculate the weighted average value of each pixel.
5. The front-mounted crane container number identification system according to claim 1, characterized in that, The illumination enhancement module enhances image contrast by adjusting the grayscale distribution of the image.
6. The front-mounted crane container number identification system according to claim 1, characterized in that, It also includes a post-processing module, which is used to correct the recognition results.
7. A method for identifying the container number of a front-mounted crane as described in any one of claims 1-6, characterized in that, Includes the following steps: S1. Obtain video or images of a container mounted on a front-end crane; S2. Extract consecutive frames from the video at a fixed frequency, and perform grayscale processing on each frame to reduce computational complexity; S3. Filter the preprocessed video / image in the time dimension; S4. Perform spatial filtering on the filtered video / image to remove isolated noise points; S5. Reduces high-frequency noise and smooths the image by weighted averaging; S6. By adjusting the grayscale distribution of the image, the image contrast is enhanced, making the box number area clearer; S7. Perform container number area detection and character recognition on the processed image to achieve automatic container number recognition.
8. The identification method of the front-mounted crane container number identification system according to claim 7, characterized in that, In S3, the temporal filtering of the preprocessed video / image specifically includes the following steps: S31. Calculate the pixel difference between two adjacent frames and generate a difference image; S32. Mark the dynamic noise region as a highlight region through binarization processing; S33. Replace or smooth the detected dynamic noise areas by replacing them with the corresponding pixel values from the previous or next frame.
9. The identification method of the front-mounted crane container number identification system according to claim 7, characterized in that, In S6, adjusting the grayscale distribution of the image specifically includes the following steps: S61. Adaptive contrast enhancement is achieved by using histogram equalization. S62. Calculate the histogram of the image, normalize it, and calculate the cumulative distribution function to map the original gray levels to the new gray levels. S63, Adaptive Contrast Enhancement, dynamically adjusts the brightness based on the local contrast of the image. It does this by dividing the image into local windows and calculating the mean and standard deviation of each window.
10. The identification method of the front-mounted crane container number identification system according to claim 7, characterized in that, In S7, the box number area detection and character recognition specifically include the following steps: S71. Use the YOLOv5 model for box number region detection. Introduce channel attention mechanism and variable convolution in the backbone network to improve the detection capability of box number regions. S72. Perform character segmentation on the detected box number area, and extract individual characters using projection method and connected component analysis; S73. Use CNN combined with LSTM for character recognition. CNN extracts local features of characters, LSTM captures the temporal relationship between characters, and outputs the probability distribution of the character sequence. S74. The identification results are corrected through the post-processing module to ensure the integrity and accuracy of the box number.