A container straightening detection system and method

By acquiring, correcting, and enhancing multi-view images, combined with consistency analysis, the problems of optical distortion and noise in container shape inspection were solved, achieving high-quality image data processing and inspection report management, and improving the accuracy and efficiency of inspection.

CN121304574BActive Publication Date: 2026-05-22QINGDAO DAPENGXIN INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO DAPENGXIN INTELLIGENT TECH CO LTD
Filing Date
2025-09-30
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing technologies fail to effectively correct optical distortion in container shape inspection, resulting in inaccurate extraction of image geometric features. Furthermore, the lack of grayscale distribution feature analysis and noise suppression affects image details, making it impossible to accurately identify container structural morphology and deformation, and leading to incomplete inspection data management.

Method used

Optical distortion correction is performed using a multi-view image acquisition and correction module, contrast enhancement and noise suppression are performed by combining image enhancement coefficients, structured geometric features are extracted, and structural morphology is identified through consistency analysis to generate a deformation assessment report and establish a bidirectional correlation index between the detection report and image data.

Benefits of technology

It improves image quality and geometric accuracy, ensures the reliability of shape recognition and the accuracy of inspection reports, realizes efficient traceability and management of inspection data, and enhances the accuracy and efficiency of container shape correction inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304574B_ABST
    Figure CN121304574B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and discloses a container shape correction detection system and method. The system comprises a multi-view image acquisition correction module, a structured geometric feature extraction module, a feature consistency analysis and shape recognition module, a deformation evaluation report generation module and a detection report correlation storage module. Multi-view image data of a container surface is acquired, optical distortion correction is performed, corrected image data is obtained, and structured geometric feature data is extracted. Feature consistency analysis is performed on the structured geometric feature data and a standard container geometric feature database, and the structure shape of the container surface is recognized. According to the structure shape recognition result, deformation evaluation is performed through a predefined deformation discrimination rule, a deformation state judgment report is generated, a bidirectional correlation index of the deformation state judgment report and corresponding multi-view image data is established, and the deformation state judgment report is stored in a container surface detection report database. The application can improve the accuracy of container shape correction detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a container shape inspection system and method. Background Technology

[0002] Existing technologies have significant shortcomings in the image acquisition and processing stages of container shape inspection. After acquiring multi-view image data, they do not systematically correct for optical distortion issues, relying solely on the original images or simply processed images for subsequent analysis. This results in residual distortion errors in the images directly affecting the accuracy of geometric feature extraction. Furthermore, they fail to calculate suitable image enhancement coefficients through grayscale distribution feature analysis, nor do they perform a complete quality optimization process involving contrast enhancement, noise suppression, and edge sharpening. As a result, image details are blurred, and noise interference is significant, failing to provide a clear and accurate image foundation for structured geometric feature extraction. Consequently, the integrity and reliability of subsequent feature data cannot be guaranteed.

[0003] Existing technologies have significant shortcomings in container structural morphology recognition and deformation assessment, as well as data management. Regarding morphology recognition and deformation assessment, a predefined standard database of container geometric features has not been constructed for multi-dimensional feature matching, nor have standardized formulas been used to calculate consistent assessment results. Relying solely on single features or subjective judgments to identify structural morphology leads to significant morphology recognition errors. Furthermore, feature data is not quantitatively compared and graded based on preset deformation discrimination rules, resulting in a lack of unified standards for deformation assessment and generating reports that fail to accurately reflect the actual deformation state. In terms of data management, a bidirectional correlation index between the deformation state assessment report and the original multi-view image data has not been established. Detection data and image data are stored independently, making it difficult to quickly match corresponding image evidence during subsequent queries and tracing. This hinders the verification and traceability of detection results, resulting in insufficient scientific rigor and practicality in the overall detection process. Summary of the Invention

[0004] This invention provides a container alignment and inspection system and method to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a container shape correction and inspection system, characterized in that the system includes a multi-view image acquisition and correction module, a structured geometric feature extraction module, a feature consistency analysis and morphology recognition module, a deformation assessment report generation module, and an inspection report association and storage module, wherein:

[0006] The multi-view image acquisition and correction module is used to acquire multi-view image data of the container surface and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface.

[0007] The structured geometric feature extraction module is used to extract structured geometric feature data related to the box structure from the corrected image data;

[0008] The feature consistency analysis and morphology recognition module is used to perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and to identify the structural morphology of the container surface.

[0009] The deformation assessment report generation module is used to assess the deformation of the container surface based on the structural morphology recognition results and through predefined deformation discrimination rules, and generate a deformation state determination report of the container surface.

[0010] The inspection report association storage module is used to establish a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.

[0011] In a preferred embodiment, when the multi-view image acquisition and correction module acquires multi-view image data of the container surface and performs optical distortion correction on the multi-view image data to obtain corrected image data of the container surface, it is specifically used for:

[0012] Acquire raw image data of the container surface from multiple perspectives;

[0013] The distortion feature parameters are extracted from the multi-view original image data to generate the distortion parameter dataset of the container surface;

[0014] Based on the distortion parameter dataset, optical distortion correction processing is performed on the multi-view original image data to obtain preliminary corrected image data of the container surface;

[0015] The preliminary corrected image data is subjected to image quality enhancement processing to obtain enhanced corrected image data;

[0016] Verify the geometric consistency of the enhanced corrected image data to obtain the corrected image data of the container surface.

[0017] In a preferred embodiment, when the multi-view image acquisition and correction module performs image quality enhancement processing on the preliminary corrected image data to obtain enhanced corrected image data, it is specifically used for:

[0018] Extract the grayscale distribution features of the preliminary corrected image data to generate image grayscale distribution data of the container surface;

[0019] Calculate the image enhancement coefficient of the preliminary corrected image data, wherein the formula for calculating the image enhancement coefficient is as follows:

[0020]

[0021] In the formula, α is the image enhancement coefficient, k1 is the variance weighting coefficient, and σ is the local variance of the preliminary corrected image data. For the maximum local variance, H max H represents the maximum grayscale value of the image in the preliminary corrected image data. min k1 is the minimum grayscale value of the image in the preliminary corrected image data, and k2 is the dynamic range weighting coefficient;

[0022] Based on the image enhancement coefficient, the preliminary corrected image data is subjected to contrast enhancement processing to obtain contrast-enhanced image data of the preliminary corrected image data.

[0023] The contrast-enhanced image data is subjected to noise suppression processing to obtain denoised enhanced image data;

[0024] The enhanced image data after denoising is then subjected to edge sharpening processing to obtain the enhanced corrected image data.

[0025] In a preferred embodiment, when the multi-view image acquisition and correction module performs contrast enhancement processing on the preliminary corrected image data based on the image enhancement coefficient to obtain contrast-enhanced image data of the container surface, it is specifically used for:

[0026] Image characteristic analysis is performed on the preliminary corrected image data to obtain the image characteristic evaluation results of the preliminary corrected image data;

[0027] Based on the image characteristic evaluation results and the image enhancement coefficients, contrast enhancement processing parameters for the preliminary corrected image data are generated;

[0028] The image is subjected to grayscale stretching based on the contrast enhancement processing parameters to obtain a preliminary enhanced image of the container surface;

[0029] The preliminary enhanced image is subjected to detail optimization processing to obtain contrast-enhanced image data of the container surface.

[0030] In a preferred embodiment, when the structured geometric feature extraction module extracts structured geometric feature data related to the box structure from the corrected image data, it is specifically used for:

[0031] Edge contour analysis is performed on the corrected image data to obtain the edge contour information of the corrected image data;

[0032] Corner detection processing is performed based on the edge contour information to obtain the corner position information of the corrected image data;

[0033] Geometric feature extraction is performed on the edge contour information and the corner point position information to obtain the geometric feature data of the corrected image data;

[0034] The edge contour information, the corner point position information, and the geometric feature data are integrated into the structured geometric feature data of the container surface.

[0035] In a preferred embodiment, when the feature consistency analysis morphology recognition module performs feature consistency analysis on the structured geometric feature data and a pre-built standard container geometric feature database, and identifies the structural morphology of the container surface, it is specifically used for:

[0036] The structured geometric feature data is matched with a pre-built standard container geometric feature database in multiple dimensions to obtain a feature matching result set of the container surface;

[0037] A consistency evaluation is performed on the feature matching result set to obtain the consistency evaluation result of the feature matching result set;

[0038] Based on a preset decision rule base, the consistency assessment results are used to identify the structural morphology, thereby obtaining the structural morphology identification results of the container surface.

[0039] The structural morphology recognition results are associated and integrated with the feature matching result set to obtain the structural morphology analysis results of the container surface.

[0040] In a preferred embodiment, when the feature consistency analysis morphology recognition module performs a consistency evaluation on the feature matching result set and obtains the consistency evaluation result of the feature matching result set, it is specifically used for:

[0041] The consistency evaluation result of the feature matching result set is calculated, wherein the formula for calculating the consistency evaluation result is as follows:

[0042]

[0043] In the formula, S represents the consistency evaluation result, and w i F represents the weight coefficient of the i-th feature dimension. i Let D be the feature value of the structured geometric feature data in the i-th feature dimension. i Let be the standard feature value of the standard container geometric feature database in the i-th feature dimension, and ∑ be the weighted summation over all feature dimensions;

[0044] Based on the consistency assessment results, a consistency level is determined, and consistency assessment result data of the feature matching result set is generated.

[0045] In a preferred embodiment, when the deformation assessment report generation module performs a deformation assessment of the container surface based on the structural morphology recognition result and a predefined deformation discrimination rule to generate a deformation state determination report for the container surface, it is specifically used for:

[0046] Extract the geometric feature data from the structural morphology recognition results to generate the feature dataset to be evaluated on the surface of the container;

[0047] Read the corresponding evaluation rule data from the predefined deformation discrimination rule library;

[0048] The deformation index data of the container surface is obtained by comparing and analyzing the dataset of features to be evaluated with the preset standard dataset of features.

[0049] The deformation index data is compared with a preset threshold, and the deformation level is determined by comparing the results to obtain the deformation determination result data of the container surface.

[0050] Based on the deformation determination results data, a deformation state determination report for the container surface is generated.

[0051] In a preferred embodiment, when the inspection report association storage module establishes a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and stores it in the inspection report database of the container surface, it is specifically used for:

[0052] Extract the feature identification information from the deformation state determination report to generate the report feature identification data of the container surface;

[0053] Extract image feature information from the multi-view image data to generate image feature identification data of the container surface;

[0054] Establish a bidirectional mapping relationship between the report feature identification data and the image feature identification data, and generate bidirectional association index data for the container surface;

[0055] The bidirectional correlation index data is associated with and stored in the inspection report database of the container surface, along with the corresponding deformation state determination report and the multi-view image data.

[0056] To address the above problems, the present invention also provides a container alignment inspection method, the method comprising:

[0057] S1. Acquire multi-view image data of the container surface, and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface;

[0058] S2. Extract the structured geometric feature data related to the box structure from the corrected image data;

[0059] S3. Perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and identify the structural morphology of the container surface;

[0060] S4. Based on the structural morphology recognition results, the deformation of the container surface is evaluated using predefined deformation discrimination rules, and a deformation state determination report of the container surface is generated.

[0061] S5. Establish a bidirectional correlation index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] 1. This invention acquires multi-view image data of the container surface through a multi-view image acquisition and correction module, extracts distortion feature parameters to complete optical distortion correction, and performs contrast enhancement, noise suppression, and edge sharpening processing on the preliminary corrected image using the image enhancement coefficient calculation formula, while verifying geometric consistency. This effectively improves image quality and geometric accuracy, providing high-quality corrected image data for subsequent feature extraction. The structured geometric feature extraction module further analyzes the edge contours and corner positions of the corrected image and extracts geometric features, integrating them to form structured geometric feature data. This comprehensively captures key information about the container structure, significantly improving the completeness and accuracy of feature extraction.

[0064] 2. This invention calculates matching results and identifies structural morphology through a consistency evaluation formula, ensuring the reliability of morphology recognition; the deformation assessment report generation module compares feature data, determines the deformation level, and generates a judgment report based on predefined rules, accurately reflecting the deformation state of the container; the inspection report association storage module establishes and stores a bidirectional association index between the report and multi-view images, realizing efficient traceability and management of inspection data, which not only improves the accuracy and efficiency of container shape correction inspection, but also provides convenience for subsequent inspection data query and analysis, enhancing the practicality of the overall inspection process. Attached Figure Description

[0065] Figure 1 This is a system architecture diagram of a container alignment and inspection system provided in an embodiment of the present invention;

[0066] Figure 2 This is a flowchart illustrating a container alignment and inspection method according to an embodiment of the present invention.

[0067] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

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

[0069] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “said” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0070] Depending on the context, the word "if" or "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0071] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0072] In practice, the server-side equipment deployed in a container alignment and inspection system may consist of one or more devices. The aforementioned container alignment and inspection system can be implemented as: a business instance, a virtual machine, or hardware devices. For example, this container alignment and inspection system can be implemented as a business instance deployed on one or more devices in a cloud node. Simply put, this container alignment and inspection system can be understood as software deployed on a cloud node, used to provide a container alignment and inspection system to various user terminals. Alternatively, this container alignment and inspection system can also be implemented as a virtual machine deployed on one or more devices in a cloud node. This virtual machine contains application software for managing various user terminals. Alternatively, this container alignment and inspection system can also be implemented as a server composed of numerous identical or different types of hardware devices, with one or more hardware devices configured to provide a container alignment and inspection system to various user terminals.

[0073] In terms of implementation, the container alignment and inspection system and the user terminal are mutually compatible. That is, if the container alignment and inspection system is implemented as an application installed on a cloud service platform, the user terminal is implemented as a client that establishes a communication connection with the application; or if the container alignment and inspection system is implemented as a website, the user terminal is implemented as a webpage; or if the container alignment and inspection system is implemented as a cloud service platform, the user terminal is implemented as a mini-program in an instant messaging application.

[0074] like Figure 1 The figure shown is a system architecture diagram of a container alignment and inspection system provided in an embodiment of the present invention.

[0075] The container alignment and inspection system 100 described in this invention can be installed on a cloud server. In terms of implementation, it can be used as one or more service devices, or as an application installed on the cloud (e.g., a mobile service operator's server, server cluster, etc.), or it can be developed into a website. Depending on the functions implemented, the container alignment and inspection system 100 may include a multi-view image acquisition and correction module 101, a structured geometric feature extraction module 102, a feature consistency analysis and morphological recognition module 103, a deformation assessment report generation module 104, and an inspection report association and storage module 105. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device's processor and perform a fixed function, stored in the electronic device's memory.

[0076] In this embodiment of the invention, in a container alignment and inspection system, each of the above-mentioned modules can be implemented independently and can call other modules. Here, "calling" can be understood as one module connecting to multiple modules of another type and providing corresponding services to those connected modules. In the container alignment and inspection system provided by this embodiment of the invention, the applicable scope of a container alignment and inspection system architecture can be adjusted by adding modules and directly calling them without modifying the program code, achieving cluster-based horizontal expansion to quickly and flexibly expand the container alignment and inspection system. In practical applications, the above-mentioned modules can be set in the same device or different devices, or they can be set in a virtual device, such as a service instance in a cloud server.

[0077] The following describes the various components and specific workflow of a container alignment and inspection system, using specific embodiments as examples:

[0078] The multi-view image acquisition and correction module 101 is used to acquire multi-view image data of the container surface and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface.

[0079] In this embodiment of the invention, when the multi-view image acquisition and correction module acquires multi-view image data of the container surface and performs optical distortion correction on the multi-view image data to obtain corrected image data of the container surface, it is specifically used for:

[0080] Acquire raw image data of the container surface from multiple perspectives;

[0081] The distortion feature parameters are extracted from the multi-view original image data to generate the distortion parameter dataset of the container surface;

[0082] Based on the distortion parameter dataset, optical distortion correction processing is performed on the multi-view original image data to obtain preliminary corrected image data of the container surface;

[0083] The preliminary corrected image data is subjected to image quality enhancement processing to obtain enhanced corrected image data;

[0084] Verify the geometric consistency of the enhanced corrected image data to obtain the corrected image data of the container surface.

[0085] When the multi-view image acquisition and correction module performs image quality enhancement processing on the preliminary corrected image data to obtain enhanced corrected image data, it is specifically used for:

[0086] Extract the grayscale distribution features of the preliminary corrected image data to generate image grayscale distribution data of the container surface;

[0087] Calculate the image enhancement coefficient of the preliminary corrected image data, wherein the formula for calculating the image enhancement coefficient is as follows:

[0088]

[0089] In the formula, α is the image enhancement coefficient, k1 is the variance weighting coefficient, and σ is the local variance of the preliminary corrected image data. For the maximum local variance, H max H represents the maximum grayscale value of the image in the preliminary corrected image data. min k1 is the minimum grayscale value of the image in the preliminary corrected image data, and k2 is the dynamic range weighting coefficient;

[0090] Based on the image enhancement coefficient, the preliminary corrected image data is subjected to contrast enhancement processing to obtain contrast-enhanced image data of the preliminary corrected image data.

[0091] The contrast-enhanced image data is subjected to noise suppression processing to obtain denoised enhanced image data;

[0092] The enhanced image data after denoising is then subjected to edge sharpening processing to obtain the enhanced corrected image data.

[0093] When the multi-view image acquisition and correction module performs contrast enhancement processing on the preliminary corrected image data based on the image enhancement coefficient to obtain contrast-enhanced image data of the container surface, it is specifically used for:

[0094] Image characteristic analysis is performed on the preliminary corrected image data to obtain the image characteristic evaluation results of the preliminary corrected image data;

[0095] Based on the image characteristic evaluation results and the image enhancement coefficients, contrast enhancement processing parameters for the preliminary corrected image data are generated;

[0096] The image is subjected to grayscale stretching based on the contrast enhancement processing parameters to obtain a preliminary enhanced image of the container surface;

[0097] The preliminary enhanced image is subjected to detail optimization processing to obtain contrast-enhanced image data of the container surface.

[0098] Specifically, to acquire multi-view raw image data of the container surface, multiple high-definition industrial cameras are first fixedly installed in the image acquisition area according to a preset spatial distribution. The lenses of these cameras are aimed at covering all areas of the container surface to be acquired, and the shooting ranges of adjacent cameras overlap to a certain extent to ensure the integrity of image acquisition. After the container enters the preset acquisition area and stops moving, the control system sends a synchronous shooting command to all high-definition industrial cameras. All cameras start shooting simultaneously, capturing image information from different surfaces and angles of the container. These unprocessed image information directly captured by each camera together constitute the multi-view raw image data of the container surface.

[0099] Furthermore, to extract distortion feature parameters from the multi-view original image data and generate a distortion parameter dataset, it is necessary to select standard reference areas such as standard markings, edge lines, or preset calibration plates on the original images, locate their actual imaging positions through image recognition, compare them with the theoretical imaging positions without distortion to determine the deviation and deformation information, and extract key parameters such as radial and tangential distortion of the lens. These parameters are then classified and organized according to camera number and image region to form a distortion parameter dataset.

[0100] Furthermore, optical distortion correction is performed on the original images based on the distortion parameter dataset to obtain preliminary corrected image data. This requires matching the corresponding distortion parameters for each original image, adjusting the position of distorted pixels (e.g., radial distortion pixels are corrected according to their distance from the image center, and tangential distortion pixels are corrected according to their row and column positions), and smoothly filling the blank areas caused by pixel movement with information from adjacent pixels to obtain preliminary corrected image data.

[0101] Furthermore, the quality of the preliminary corrected image data is enhanced to obtain the enhanced corrected image data. First, the brightness (brightness of dark areas and brightness of bright areas) and contrast are adjusted pixel by pixel. Then, the noise is removed by the neighborhood averaging method. Finally, the brightness difference between edge pixels and adjacent pixels is increased to sharpen the edges, thus obtaining the enhanced corrected image data.

[0102] Furthermore, to verify the geometric consistency of the enhanced image and obtain the final corrected image data, it is necessary to select overlapping image pairs taken by adjacent cameras, determine the fixed feature points on the container surface as common reference points, calculate the coordinate deviation of the same reference point in different images, and if they are all within the allowable range, it is determined to meet the requirements, and the enhanced image is the final corrected image data; if the deviation exceeds the standard, the image needs to be re-corrected, enhanced and verified again until the deviation of all reference points meets the requirements.

[0103] Specifically, to extract the grayscale distribution features of the preliminary corrected image data to generate the image grayscale distribution data of the container surface, it is necessary to first read the grayscale value of each pixel in the preliminary corrected image data pixel by pixel. The grayscale value represents the brightness of the pixel and covers the complete brightness range from pure black to pure white. Then, the number of pixels with different grayscale values ​​in the whole image is counted, that is, the total number of pixels corresponding to each brightness level is recorded. Then, all grayscale values ​​are arranged in order of brightness, and the number of pixels corresponding to each grayscale value is recorded one by one with the grayscale value, forming a grayscale statistical result with grayscale value on the horizontal axis and corresponding pixel count on the vertical axis. This statistical result is the image grayscale distribution data of the container surface.

[0104] Furthermore, to calculate the image enhancement coefficient of the preliminary corrected image data, it is necessary to first determine the minimum and maximum gray values ​​in the image based on the generated image gray-level distribution data, that is, to find the gray values ​​of the darkest and brightest pixels in the image; then calculate the dynamic range of the gray values, which is the difference between the maximum and minimum gray values; subsequently, calculate the image enhancement coefficient according to the preset target dynamic range, specifically by dividing the target dynamic range by the current image's gray-level dynamic range. The result is the image enhancement coefficient, which is used to subsequently adjust the gray values ​​of image pixels to optimize the gray-level dynamic range.

[0105] Furthermore, to obtain contrast-enhanced image data of the preliminary corrected image data by performing contrast enhancement processing on the preliminary corrected image data based on the image enhancement coefficient, it is necessary to first obtain the original gray value of each pixel in the preliminary corrected image data pixel by pixel; for each pixel, the minimum gray value in the image gray distribution data is subtracted from its original gray value to obtain the gray value deviation value of that pixel; then the gray value deviation value is multiplied by the calculated image enhancement coefficient to obtain the adjusted gray value deviation value.

[0106] Furthermore, the adjusted grayscale deviation value is added to the minimum value of the target dynamic range to obtain the new grayscale value of the pixel. If the new grayscale value exceeds the maximum value of the target dynamic range, it is set to the grayscale value corresponding to pure white; if it is lower than the minimum value, it is set to the grayscale value corresponding to pure black. After the grayscale values ​​of all pixels have been adjusted, the resulting new image data is the contrast-enhanced image data of the preliminary corrected image data.

[0107] Furthermore, noise suppression processing is performed on the contrast-enhanced image data to obtain denoised enhanced image data. The neighborhood averaging method is used for this process. First, the neighborhood range is determined, typically a small pixel area centered on the current pixel. Then, the contrast-enhanced image data is processed pixel by pixel. For each pixel, the grayscale values ​​of all pixels in its neighborhood are read. The average of these grayscale values ​​is calculated by adding all grayscale values ​​in the neighborhood and then dividing by the total number of pixels in the neighborhood. The calculated average value replaces the original grayscale value of the current pixel, thereby eliminating isolated noise points caused by light interference, equipment current fluctuations, etc., during image acquisition. After all pixels have undergone neighborhood averaging, the resulting image data is the denoised enhanced image data.

[0108] Furthermore, edge sharpening processing is performed on the denoised enhanced image data to obtain enhanced corrected image data. An edge detection and grayscale adjustment method is adopted. First, the edge features of each pixel are determined pixel by pixel. The edge is determined by comparing the grayscale value difference between the current pixel and its horizontal and vertical adjacent pixels. If the grayscale value difference between the current pixel and its adjacent pixels is greater than the preset edge determination threshold, the pixel is determined to be an edge pixel.

[0109] Furthermore, for the locations identified as edge pixels, the difference between their gray values ​​and those of adjacent non-edge pixels is increased. Specifically, the gray value of the edge pixel is increased by a fixed amount, while the gray values ​​of its adjacent non-edge pixels are decreased by the same fixed amount to enhance the contrast between light and dark at the edge. For non-edge pixels, their gray values ​​remain unchanged. After the edge sharpening processing of all pixels is completed, the resulting image data is the enhanced and corrected image data.

[0110] Specifically, the variance weighting coefficient is a fixed value that is preset before image enhancement processing. It is used to adjust the degree of influence of local image variance on the image enhancement coefficient. Its value is determined based on the results of a large number of container surface image enhancement experiments to ensure that the final enhanced image can clearly present the details of the container surface. The local image variance needs to be obtained by processing the preliminary correction image data. Specifically, the preliminary correction image data is divided into multiple local regions of the same size.

[0111] Furthermore, the sum of squared differences between the gray values ​​of all pixels in each local region and the average gray value of that region is calculated, and then divided by the total number of pixels in that region to obtain the variance of each local region. Then, the representative value among all local region variances is selected as the local variance of the image. The maximum local variance is a fixed value pre-set based on the gray value characteristics of similar container surface images. This value is the maximum local variance that may occur in similar images under normal imaging conditions.

[0112] Furthermore, the maximum grayscale value of the image is extracted from the preliminary correction image data. Specifically, the grayscale values ​​of all pixels in the preliminary correction image data are read pixel by pixel, and the maximum value is determined by comparing all grayscale values. Similarly, the minimum grayscale value of the image is extracted from the preliminary correction image data. Specifically, the grayscale values ​​of all pixels in the preliminary correction image data are read pixel by pixel, and the minimum value is determined by comparing all grayscale values. The dynamic range weight coefficient is also a fixed value preset before image enhancement processing. It is used to adjust the influence of the image grayscale dynamic range on the image enhancement coefficient. Its value is also determined based on the results of a large number of container surface image enhancement experiments. It is used in conjunction with the variance weight coefficient to achieve the best image enhancement effect.

[0113] Furthermore, the significance of this formula lies in comprehensively considering the local gray-level distribution uniformity and overall gray-level dynamic range of the preliminary corrected image data to calculate the image enhancement coefficient that can adapt to the image, thereby providing a precise basis for subsequent contrast enhancement processing.

[0114] Furthermore, the ratio of the local variance to the maximum local variance reflects the degree of difference in grayscale values ​​within a local area of ​​the image. The larger the ratio, the more significant the local grayscale differences. In this case, combined with the variance weighting coefficient, a more appropriate influence weight can be assigned to the local grayscale differences in the image enhancement coefficient. The difference between the maximum and minimum grayscale values ​​of the image, divided by a fixed value, reflects the overall grayscale dynamic range of the image. The larger the difference, the wider the overall grayscale range. Combined with the dynamic range weighting coefficient, a more appropriate influence weight can be assigned to the overall grayscale dynamic range in the image enhancement coefficient. Adding these two calculation results, the resulting image enhancement coefficient can simultaneously meet the needs of highlighting local image details and optimizing overall contrast. This ensures that subsequent contrast enhancement processing based on this coefficient can both make local image details clearer and make the overall brightness and darkness contrast more suitable for observation.

[0115] Furthermore, the trend of this formula is that, with the variance weighting coefficient and dynamic range weighting coefficient fixed, the larger the local variance of the image, the larger the ratio of the local variance to the maximum local variance, the larger the calculation result of this part, and the larger the final image enhancement coefficient; the smaller the local variance of the image, the smaller this ratio, the smaller the calculation result of this part, and the smaller the final image enhancement coefficient.

[0116] Furthermore, the larger the difference between the maximum and minimum gray values ​​of the image, the larger the result of dividing this difference by a fixed value, the larger the calculated result of this part, and the larger the final image enhancement coefficient; conversely, the smaller the difference between the maximum and minimum gray values ​​of the image, the smaller the result of dividing this difference by a fixed value, the smaller the calculated result of this part, and the smaller the final image enhancement coefficient; when the local variance of the image reaches the maximum local variance, the ratio of the local variance of the image to the maximum local variance is a fixed value of one, at which point the calculated result of this part reaches the maximum value determined by the variance weighting coefficient; when the difference between the maximum and minimum gray values ​​of the image reaches a fixed value, the result of dividing this difference by a fixed value is a fixed value of one.

[0117] Furthermore, at this point, the calculation result of this part reaches the maximum value determined by the dynamic range weighting coefficient; when the local variance of the image and the difference between the maximum gray value and the minimum gray value of the image both reach their respective maximum values, the final image enhancement coefficient reaches its maximum value; when the local variance of the image is a fixed value of zero and the difference between the maximum gray value and the minimum gray value of the image is a fixed value of zero, the final image enhancement coefficient is a fixed value of zero.

[0118] Specifically, to obtain the image characteristic evaluation results of the preliminary corrected image data, image characteristic analysis is performed on the preliminary corrected image data. First, the gray values ​​of all pixels in the preliminary corrected image data are counted to determine the maximum and minimum gray values, thereby clarifying the overall brightness range of the image. Then, the image is divided into multiple local regions of the same size, and the distribution of gray values ​​of pixels in each local region is counted to determine the degree of concentration of gray values ​​in each region, i.e., whether there are a large number of pixels clustered in a certain gray range.

[0119] Furthermore, the system simultaneously identifies whether there are obvious dark or bright areas in the image. Dark areas refer to continuous regions with generally low gray values, while bright areas refer to continuous regions with generally high gray values. Finally, the system summarizes information such as the overall brightness range, the degree of gray value concentration in each local region, and the location and range of dark and bright areas to form the preliminary image characteristic evaluation results of the corrected image data.

[0120] Furthermore, based on the image characteristic evaluation results and image enhancement coefficients, the contrast enhancement processing parameters for the preliminary corrected image data are generated. First, the maximum gray value, minimum gray value, and distribution information of dark and bright areas need to be extracted from the image characteristic evaluation results. Combined with the image enhancement coefficients, the target range of gray-scale stretching is determined. The minimum value of the target range is set to the gray value corresponding to pure black, and the maximum value is set to the gray value corresponding to pure white.

[0121] Furthermore, for dark areas, the adjustment range of grayscale values ​​is set according to the degree of their low grayscale values ​​and the image enhancement coefficient, so that the grayscale values ​​of dark areas can be stretched to a suitable range within the target range, avoiding excessive stretching that would amplify noise. Similarly, for bright areas, the adjustment range of grayscale values ​​is set according to the degree of their high grayscale values ​​and the image enhancement coefficient, so that the grayscale values ​​of bright areas can also be reasonably stretched to the target range. The information such as the target range of grayscale stretching, the adjustment range of dark areas, the adjustment range of bright areas, and the overall grayscale stretching ratio are integrated to form the contrast enhancement processing parameters for the preliminary corrected image data.

[0122] Furthermore, to obtain a preliminary enhanced image of the container surface by performing grayscale stretching on the image based on the contrast enhancement processing parameters, it is necessary to first determine the stretching ratio of the grayscale value of each pixel in the image according to the grayscale stretching target range set in the contrast enhancement processing parameters.

[0123] Furthermore, for each pixel in the preliminary corrected image data, its original grayscale value is read. If the pixel belongs to a dark area, its original grayscale value is stretched towards the middle range of the target range according to the dark area adjustment range, that is, the value of the original grayscale value is increased, so that it changes from a dark state to a moderate brightness. If the pixel belongs to a bright area, its original grayscale value is stretched towards the middle range of the target range according to the bright area adjustment range, that is, the value of the original grayscale value is decreased, so that it changes from a bright state to a moderate brightness.

[0124] Furthermore, for pixels that are neither dark nor bright, the grayscale values ​​are directly adjusted according to the overall grayscale value stretching ratio to distribute the grayscale values ​​proportionally within the target range. After the grayscale values ​​of all pixels have been stretched and adjusted, the resulting image is the preliminary enhanced image of the container surface.

[0125] Furthermore, to obtain contrast-enhanced image data of the container surface by performing detail optimization processing on the preliminary enhanced image, it is necessary to first identify the detailed regions of the container surface in the preliminary enhanced image. These detailed regions include parts with obvious features such as surface texture, markings, and corners. For these detailed regions, the gray value difference between each pixel and its neighboring pixels is compared pixel by pixel. If the difference is small and the details are not clear enough, the gray value difference between the pixel and its neighboring pixels is appropriately increased. Specifically, the gray value of the pixel in the detailed region is increased or the gray value of its neighboring pixels is decreased to make the detailed features more prominent.

[0126] Furthermore, the image is simultaneously checked for abrupt transitions caused by grayscale stretching, i.e., areas where the grayscale values ​​of adjacent pixels change too much. These areas are then smoothed by adjusting the grayscale values ​​of pixels within the transition area to ensure a smooth transition from one grayscale value to another, avoiding obvious color blocks or breaks. After completing the detail enhancement and transition smoothing processes, the resulting image data is the contrast-enhanced image data of the container surface.

[0127] In summary, the acquisition of raw image data from multiple perspectives can comprehensively cover the surface of the container, avoid information loss, provide a complete foundation for subsequent processing, and meet the need for comprehensive capture of surface information.

[0128] In summary, by extracting distortion feature parameters to generate a dataset, distortion problems can be accurately located, providing support for targeted correction and solving the error problem that existing technologies have not systematically corrected distortion.

[0129] In summary, the preliminary corrected image obtained based on the dataset correction eliminates distortion errors, restores the true geometric shape, provides an accurate basis for feature extraction, and supports the precise extraction of structural feature targets.

[0130] In summary, image quality enhancement improves details and reduces noise, making key structural features clearer, addressing the shortcomings of insufficient image quality that affect recognition, and improving the reliability of feature extraction.

[0131] In summary, verifying geometric consistency ensures accurate spatial positioning of multi-view images, avoids splicing misalignment, guarantees effective feature fusion during subsequent morphology recognition, and improves detection accuracy.

[0132] In summary, the acquisition of raw images from multiple perspectives can fully cover the surface of the container, avoid information loss, provide a complete data foundation for subsequent processing, and meet the need for comprehensive capture of surface information in documents.

[0133] In summary, by extracting distortion feature parameters to generate a dataset, the type and degree of distortion can be accurately located, providing support for correction and solving the error problem of existing technologies not systematically correcting distortion.

[0134] In summary, the preliminary corrected image obtained based on the dataset correction eliminates distortion errors, restores the true geometric shape, provides an accurate basis for feature extraction, and supports the precise extraction of structural feature targets.

[0135] In summary, image quality enhancement improves detail blurring and noise issues, makes key structural features clearer, addresses the shortcomings of insufficient image quality affecting recognition, and enhances the reliability of feature extraction.

[0136] In summary, verifying geometric consistency ensures accurate spatial positioning of multi-view images, avoids splicing misalignment, guarantees effective feature fusion during subsequent morphology recognition, and improves detection accuracy.

[0137] In summary, the acquisition of raw image data from multiple perspectives can comprehensively cover the surface of the container, avoid information loss, provide a complete foundation for subsequent processing, and meet the need for comprehensive capture of surface information.

[0138] In summary, by extracting distortion feature parameters to generate a dataset, distortion problems can be accurately located, providing support for targeted correction and solving the error problem that existing technologies have not systematically corrected distortion.

[0139] In summary, the preliminary corrected image obtained based on the dataset correction eliminates distortion errors, restores the true geometric shape, provides an accurate basis for feature extraction, and supports the precise extraction of structural feature targets.

[0140] In summary, image quality enhancement improves details and reduces noise, making key structural features clearer, addressing the shortcomings of insufficient image quality that affect recognition, and improving the reliability of feature extraction.

[0141] In summary, verifying geometric consistency ensures accurate spatial positioning of multi-view images, avoids splicing misalignment, guarantees effective feature fusion during subsequent morphology recognition, and improves detection accuracy.

[0142] The structured geometric feature extraction module 102 is used to extract structured geometric feature data related to the box structure from the corrected image data;

[0143] In this embodiment of the invention, when the structured geometric feature extraction module extracts structured geometric feature data related to the box structure from the corrected image data, it is specifically used for:

[0144] Edge contour analysis is performed on the corrected image data to obtain the edge contour information of the corrected image data;

[0145] Corner detection processing is performed based on the edge contour information to obtain the corner position information of the corrected image data;

[0146] Geometric feature extraction is performed on the edge contour information and the corner point position information to obtain the geometric feature data of the corrected image data;

[0147] The edge contour information, the corner point position information, and the geometric feature data are integrated into the structured geometric feature data of the container surface.

[0148] Specifically, to obtain the edge contour information of the corrected image data through edge contour analysis, the corrected image data must first be traversed pixel by pixel, comparing the gray value of each pixel with its horizontal and vertical adjacent pixels. When the difference in gray value between adjacent pixels is greater than a preset edge determination threshold, the pixel is determined to be an edge pixel. After identifying all edge pixels, adjacent edge pixels are connected sequentially according to their coordinate positions in the image to form continuous lines. These continuous lines outline the contour shape of the container surface in the corrected image, including the side edges, end edges, and edges of protruding or concave structures on the surface. All these outlined continuous lines and their coordinate distribution in the image are recorded, and the resulting record is the edge contour information of the corrected image data.

[0149] Furthermore, to obtain the corner position information of the corrected image data by performing corner detection processing based on edge contour information, it is necessary to first extract all continuous edge lines from the edge contour information and analyze the direction change of each edge line one by one; for each edge line, select adjacent pixels on the line in sequence, calculate the direction of the line connecting adjacent pixels, and when the direction of the line connecting adjacent pixels before and after a certain pixel changes significantly, the pixel is determined to be a corner.

[0150] For example, when the edge line suddenly turns from the horizontal direction to the vertical direction, the intersection of the two lines is the corner point; after detecting all corner points, record the specific coordinate position of each corner point in the image, including the horizontal coordinate and the vertical coordinate; organize and summarize the coordinate position information of all corner points, and the resulting summary is the corner point position information of the corrected image data.

[0151] Furthermore, geometric feature extraction is performed on the edge contour information and corner position information to obtain the geometric feature data of the corrected image data. First, based on the continuous lines in the edge contour information, the length of the line between two adjacent corner points is measured. By calculating the distance between the coordinates of the two corner points in the horizontal and vertical directions, the actual length of the line is determined. Then, based on the distribution of corner points in the corner position information, the angle formed between three adjacent edge lines is determined. By analyzing the direction of the three lines, the size of the included angle between two adjacent lines at the corner point is determined.

[0152] Furthermore, based on the overall shape outlined by the edge contour information, basic geometric shapes such as rectangles and trapezoids on the container surface are identified, and the side lengths, interior angles, and other features of these shapes are recorded. In addition, it is necessary to count the number of lines in the edge contour, the total number of corner points, and the distribution of different geometric shapes. The measured line lengths, angles, geometric features, and statistical information of lines and corner points are integrated to form the geometric feature data of the corrected image data.

[0153] Furthermore, to integrate edge contour information, corner position information, and geometric feature data into structured geometric feature data of the container surface, a unified information integration framework needs to be established first. This framework includes three core modules: edge contour, corner position, and geometric features. Each module stores corresponding data content. The coordinate distribution and contour shape data of all continuous lines in the edge contour information are completely imported into the edge contour module of the framework. The specific coordinate positions of each corner point in the corner position information are classified according to the distribution area of ​​the corner points on the container surface and then imported into the corner position module of the framework.

[0154] Furthermore, the line lengths, angles, geometric features, and statistical information in the geometric feature data are associated with the corresponding edge lines and corner points. For example, the length data of a line is associated with the coordinates of the two corner points corresponding to that line, and then imported into the geometric feature module of the framework. After all the data is imported, the correlation of the data in the three modules is verified to ensure that the correspondence between edge contours, corner point positions, and geometric features is accurate. The final integrated framework containing complete associated data is the structured geometric feature data of the container surface.

[0155] In summary, edge contour analysis outlines the box's contour, providing a foundation for subsequent feature extraction and meeting the need for comprehensive capture of the box's structural information in the file.

[0156] In summary, corner detection and localization of key corner coordinates provide accurate references for geometric feature measurement, supporting the goal of accurately extracting structural features from documents.

[0157] In summary, extracting geometric feature data to quantify structural features provides a basis for comparison with standard databases and meets the accuracy requirements of document feature consistency analysis.

[0158] In summary, integrating the three types of information to form structured data avoids data fragmentation, provides comprehensive input for subsequent morphology recognition and deformation assessment, and ensures detection reliability.

[0159] The feature consistency analysis and morphology recognition module 103 is used to perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and to identify the structural morphology of the container surface.

[0160] In this embodiment of the invention, when the feature consistency analysis morphology recognition module performs feature consistency analysis on the structured geometric feature data and a pre-built standard container geometric feature database, and identifies the structural morphology of the container surface, it is specifically used for:

[0161] The structured geometric feature data is matched with a pre-built standard container geometric feature database in multiple dimensions to obtain a feature matching result set of the container surface;

[0162] A consistency evaluation is performed on the feature matching result set to obtain the consistency evaluation result of the feature matching result set;

[0163] Based on a preset decision rule base, the consistency assessment results are used to identify the structural morphology, thereby obtaining the structural morphology identification results of the container surface.

[0164] The structural morphology recognition results are associated and integrated with the feature matching result set to obtain the structural morphology analysis results of the container surface.

[0165] When the feature consistency analysis and morphological recognition module performs a consistency evaluation on the feature matching result set and obtains the consistency evaluation result of the feature matching result set, it is specifically used for:

[0166] The consistency evaluation result of the feature matching result set is calculated, wherein the formula for calculating the consistency evaluation result is as follows:

[0167]

[0168] In the formula, S represents the consistency evaluation result, and w i F represents the weight coefficient of the i-th feature dimension.i Let D be the feature value of the structured geometric feature data in the i-th feature dimension. i Let be the standard feature value of the standard container geometric feature database in the i-th feature dimension, and ∑ be the weighted summation over all feature dimensions;

[0169] Based on the consistency assessment results, a consistency level is determined, and consistency assessment result data of the feature matching result set is generated.

[0170] Specifically, the structured geometric feature data is matched with a pre-built standard container geometric feature database in multiple dimensions to obtain a feature matching result set for the container surface. First, the contents of the pre-built standard container geometric feature database need to be defined. This database stores standard data of edge contours, corner positions, and geometric features for different models of standard containers, including standard line lengths, standard angle sizes, and standard geometric distributions. Then, actual data of the three dimensions of edge contour information, corner position information, and geometric feature data are extracted from the structured geometric feature data and compared with the standard data of the same dimension for the corresponding model of standard container in the database.

[0171] Furthermore, for edge contour information, the actual outlined contour lines are compared with the standard contour in terms of direction and continuity; for corner point position information, the actual corner point coordinate distribution and quantity are compared with the standard corner point; for geometric feature data, the actual line length, angle size, and geometric features are compared with the standard data in terms of consistency. The comparison results of each dimension, including matching items, differences, and the specific manifestations of the differences, are classified and recorded by dimension, and the complete record formed is the feature matching result set of the container surface.

[0172] Furthermore, to obtain the consistency evaluation result of the feature matching result set, it is necessary to first set the judgment criteria for the consistency evaluation, namely, in the three dimensions of edge contour, corner position, and geometric features, the proportion of matching items in each dimension to the total number of feature items in that dimension must reach the preset qualified proportion.

[0173] Next, the total number of feature items and the number of matching items for each dimension in the feature matching result set are counted separately, and the matching ratio for each dimension is calculated by dividing the number of matching items by the total number of feature items. Then, it is determined whether the matching ratio for each dimension reaches the qualified ratio. If the matching ratio for a certain dimension reaches the qualified ratio, it is determined that the dimension meets the consistency requirements; otherwise, it is determined that it does not meet the requirements.

[0174] Furthermore, the final judgment results of the three dimensions are combined. If all three dimensions meet the consistency requirements, the overall judgment is high consistency; if two dimensions meet the requirements and one dimension does not, the overall judgment is medium consistency; if only one dimension meets the requirements or none of the three dimensions meet the requirements, the overall judgment is low consistency. The matching ratio of each dimension, the dimension judgment results and the overall consistency level are organized and recorded. The resulting record is the consistency evaluation result of the feature matching result set.

[0175] Furthermore, based on the preset decision rule base, the structural morphology of the container surface is identified by performing structural morphology identification on the consistency assessment results. First, the content of the preset decision rule base needs to be clarified. This rule base stores the structural morphology determination rules corresponding to different consistency assessment results. For example, the rule stipulates that when the consistency is high, it is determined to be a standard structural morphology. When the consistency is medium, the difference item type needs to be further analyzed. If the difference item is a non-critical feature, it is determined to be a basic standard structural morphology. If the difference item is a critical feature, it is determined to be a slightly deformed structural morphology. When the consistency is low, if the difference item is a missing or severely deviated critical feature, it is determined to be a severely deformed structural morphology.

[0176] Next, the overall consistency level and the specific types of differences in each dimension are extracted from the consistency assessment results and matched against the corresponding rules in the decision rule base. If the overall consistency level is high, it is directly determined as a standard structural form according to the rules. If it is medium consistency, it is analyzed whether the differences are key features and determined as a basic standard structural form or a slightly deformed structural form according to the rules. If it is low consistency, it is determined as a severely deformed structural form according to the rules based on the severity of the differences. The final determined structural form type and the determination basis are recorded, and the resulting record is the structural form identification result of the container surface.

[0177] Furthermore, to obtain the structural morphology analysis results of the container surface by associating and integrating the structural morphology recognition results with the feature matching result set, it is necessary to first establish an association and integration framework, which includes three parts: morphology recognition conclusion, matching data support, and difference item association. The structural morphology type and judgment criteria in the structural morphology recognition results are filled into the morphology recognition conclusion part of the framework. Matching data corresponding to the judgment criteria are extracted from the feature matching result set.

[0178] For example, when a structure is determined to be slightly deformed, the key feature differences that lead to this determination are extracted and filled into the matching data support part of the framework, so that the shape recognition conclusion has specific data support; then the structure shape type is associated with the differences in the feature matching result set to explain the impact of different differences on the shape determination.

[0179] For example, a slight deviation in the contour of an edge is a non-critical difference and does not affect the overall shape determination, while a significant deviation at a corner point is a critical difference and causes the shape to be determined as a slight deformation. These correlation analysis contents are filled into the difference correlation section of the framework.

[0180] Furthermore, after filling in the content of each part of the framework, the overall information is verified to ensure that the morphological recognition conclusions are consistent with the matching data support and the logical association of the differences. The final complete framework content is the structural morphological analysis result of the container surface.

[0181] Specifically, to calculate the consistency evaluation result of the feature matching result set, it is necessary to first extract matching data in three dimensions from the feature matching result set: edge contour information, corner position information, and geometric feature data. Each dimension contains matching feature items and difference feature items. For each dimension, the number of matching feature items and the total number of feature items in that dimension are counted. The total number of feature items is the sum of the number of matching feature items and the number of difference feature items. The matching ratio of each dimension is calculated separately, that is, the number of matching feature items in each dimension divided by the total number of feature items in that dimension.

[0182] Furthermore, considering the importance of the three dimensions in the overall feature evaluation, a fixed weight value is assigned to each dimension. The weight values ​​of edge contour information, corner position information, and geometric feature data are determined based on their influence on the judgment of container structural morphology. For example, corner position information has the greatest impact on the judgment of structural morphology and has the highest weight value. The matching ratio of each dimension is multiplied by the corresponding weight value to obtain the weighted matching value of each dimension. The weighted matching values ​​of the three dimensions are added together, and the sum is the consistency evaluation result of the feature matching result set.

[0183] Furthermore, to generate consistency assessment result data for the feature matching result set by determining the consistency level based on the consistency assessment results, three consistency levels and corresponding judgment ranges need to be preset first: high consistency, medium consistency, and low consistency. Each level corresponds to a fixed range of consistency assessment result values. The calculated consistency assessment result is compared with the preset ranges of the three levels. If the consistency assessment result is within the range corresponding to high consistency, it is determined to be at the high consistency level; if it is within the range corresponding to medium consistency, it is determined to be at the medium consistency level; and if it is within the range corresponding to low consistency, it is determined to be at the low consistency level.

[0184] Furthermore, the matching ratio, weighted matching value, final consistency assessment result value, and consistency level of each dimension are recorded simultaneously. This information is then organized in a fixed format to form a complete record containing specific values ​​and level judgments. This record is the consistency assessment result data of the feature matching result set.

[0185] Specifically, the weight coefficient of the i-th feature dimension is a fixed value that is pre-set before the consistency assessment. Its size is determined according to the importance of the feature dimension in the judgment of container structure. For example, the corner position feature dimension has a greater impact on the judgment of structure, and the corresponding weight coefficient value is larger. The weight coefficients of all feature dimensions are determined after extensive experimental verification to ensure the accuracy of the assessment results.

[0186] Furthermore, the feature value of the i-th feature dimension of the structured geometric feature data comes from the structured geometric feature data, which is obtained by performing edge contour analysis, corner detection processing and geometric feature extraction on the corrected image data.

[0187] Furthermore, the standard feature value of the standard container geometric feature database in the i-th feature dimension comes from the pre-built standard container geometric feature database, which stores the standard parameters of different models of standard containers in each feature dimension. The standard feature value of the i-th feature dimension is the value of the standard parameter in the database that is consistent with the model of the container to be evaluated in that dimension.

[0188] Furthermore, the significance of this formula lies in calculating an evaluation result that reflects the overall consistency between the structured geometric feature data and the standard container geometric feature database by comprehensively considering the matching degree of each feature dimension and combining the importance of different feature dimensions. Specifically, by calculating the correspondence between the feature value of the structured geometric feature data in the i-th feature dimension and the standard feature value of the standard container geometric feature database in the i-th feature dimension, the matching degree of that dimension is obtained. Then, the matching degree of that dimension is weighted using the weight coefficient of each feature dimension. Finally, all weighted matching degrees are summed and divided by the sum of the weight coefficients of all feature dimensions. The result obtained is the overall consistency evaluation result, which can objectively reflect the degree of consistency between the structured geometric features and standard features of the container to be evaluated.

[0189] Furthermore, the trend of this formula is that, with the weight coefficients of each feature dimension fixed, the higher the matching degree between the feature value of the structured geometric feature data in a certain feature dimension and the standard feature value of the standard container geometric feature database in that dimension, the larger the calculation result corresponding to that dimension, and the greater the positive contribution to the overall consistency assessment result.

[0190] Furthermore, the lower the match between the feature value of a certain feature dimension and the standard feature value, the smaller the calculation result corresponding to that dimension, and the smaller the positive contribution to the overall consistency evaluation result; when the feature values ​​of all feature dimensions match the standard feature values ​​perfectly, the calculation result corresponding to each dimension reaches the maximum value under that dimension, and the overall consistency evaluation result reaches the maximum value; when the feature values ​​of all feature dimensions do not match the standard feature values ​​at all, the calculation result corresponding to each dimension is the minimum value, and the overall consistency evaluation result reaches the minimum value.

[0191] Furthermore, the larger the weight coefficient of a feature dimension, the more significant the impact of changes in the matching degree between its feature value and the standard feature value on the overall consistency assessment result; conversely, the smaller the weight coefficient of a feature dimension, the weaker the impact of changes in its matching degree on the overall assessment result.

[0192] In summary, multi-dimensional feature matching can comprehensively compare structured geometric features with standard database data, covering dimensions such as contours, corners, and geometric features. It avoids the bias of single feature matching, obtains a complete set of feature matching results, provides a comprehensive basis for subsequent consistency assessment, and meets the need for accurate feature consistency analysis in documents.

[0193] In summary, consistency evaluation of the matching result set can quantify the degree of agreement between structured features and standard features, avoid subjective judgment errors, obtain objective evaluation results, solve the defects of existing technologies that rely on single features or subjective judgments, and meet the requirements of the document to improve the reliability of morphological recognition.

[0194] In summary, by identifying structural morphology based on the decision rule base, the container shape can be determined according to preset standards, ensuring the uniformity and standardization of morphology recognition, avoiding differences in judgment under different detection scenarios, and supporting the goal of standardizing the identification of container structural morphology in the document.

[0195] In summary, by linking and integrating the morphological recognition results with the matching result set, the morphological conclusions are supported by specific matching data, forming a complete structural morphological analysis result. This avoids the disconnect between the results and the data, provides a clear basis for subsequent deformation assessment, and meets the core requirement in the document to ensure the scientific nature of the testing process.

[0196] In summary, by calculating the consistency assessment results using a specific formula, and combining the matching degree and weight coefficients of each feature dimension, the actual matching situation of features in different dimensions is considered, and the importance of key features is reflected through weights. This avoids assessment bias caused by a single dimension or equal weights, making the results more in line with the needs of judging the container structure morphology, solving the shortcomings of existing technologies in quantifying assessments, and meeting the requirements of the document for accurately conducting feature consistency analysis.

[0197] In summary, generating data based on the consistency level determination of the evaluation results can transform abstract evaluation results into explicit levels, providing a clear basis for subsequent structural morphology identification, avoiding the disconnect between evaluation results and morphology determination, ensuring the standardization and accuracy of morphology identification, supporting the goal of identifying container structural morphology through consistency analysis in the document, and improving the standardization of the inspection process.

[0198] The deformation assessment report generation module 104 is used to assess the deformation of the container surface based on the structural morphology recognition result and a predefined deformation discrimination rule, and generate a deformation state determination report of the container surface.

[0199] In this embodiment of the invention, when the deformation assessment report generation module performs deformation assessment on the container surface based on the structural morphology recognition result and according to predefined deformation discrimination rules, and generates a deformation state determination report for the container surface, it is specifically used for:

[0200] Extract the geometric feature data from the structural morphology recognition results to generate the feature dataset to be evaluated on the surface of the container;

[0201] Read the corresponding evaluation rule data from the predefined deformation discrimination rule library;

[0202] The deformation index data of the container surface is obtained by comparing and analyzing the dataset of features to be evaluated with the preset standard dataset of features.

[0203] The deformation index data is compared with a preset threshold, and the deformation level is determined by comparing the results to obtain the deformation determination result data of the container surface.

[0204] Based on the deformation determination results data, a deformation state determination report for the container surface is generated.

[0205] Specifically, to extract geometric feature data from the structural morphology recognition results to generate a dataset of features to be evaluated on the container surface, it is necessary to first open the structural morphology recognition result file containing edge contour information, corner position information, and geometric feature data, and then filter out geometric feature data related to deformation assessment, such as the actual length of edge lines, the actual distance between corners, the size of the included angle of key parts, and the contour size of the surface protrusions or depressions. These features are then classified by feature type and labeled with feature positions, and organized into a structured table with three columns: feature type, feature position, and actual measurement value. This table is the dataset of features to be evaluated on the container surface.

[0206] Furthermore, to read the corresponding evaluation rule data in the predefined deformation discrimination rule library, it is necessary to first determine the model of the container to be evaluated, find the corresponding rule file in the specified path of the rule library according to the model, open the file to read the deformation judgment criteria, feature priority sorting and multi-feature comprehensive judgment logic of different geometric features, and organize them into an evaluation rule list in the format of feature type-judgment criteria-priority for direct subsequent use.

[0207] Furthermore, the deformation index data of the container surface is obtained by comparing and analyzing the feature dataset to be evaluated with the preset standard feature dataset. First, a standard feature dataset consistent with the model of the container to be evaluated is obtained. The actual measured value and standard value of each data in the data to be evaluated are compared one by one. The deviation value is calculated and the deviation direction is recorded. According to the evaluation rules, it is determined whether the deviation belongs to the deformation category and the deformation type is marked. The deviation, direction, deformation judgment results and types of all feature data are integrated to form the deformation index data of the container surface.

[0208] Furthermore, to obtain the deformation judgment result data of the container surface by comparing the deformation index data with the preset threshold and determining the deformation level, it is necessary to first obtain the three preset thresholds of slight, moderate and severe for each deformation type from the rule base, compare the deviation value of the deformed feature data with the corresponding threshold to determine the deformation level of a single feature, combine the multi-feature comprehensive judgment logic to statistically analyze all deformation feature levels and determine the overall deformation level, and organize and record the deformation level of each feature, the overall deformation level and the judgment basis to form the deformation judgment result data of the container surface.

[0209] Furthermore, a deformation status assessment report for the container surface is generated based on the deformation assessment results. This report must be filled out in a fixed format, including the report title, basic container information, details of deformation characteristics, overall deformation level, assessment basis, and recommended treatment measures. The title is "Container Surface Deformation Status Assessment Report." The basic information includes the model, unique number, and assessment time. The details of deformation characteristics are presented in a table. The overall deformation level is indicated. The rules and key deviation data cited explain the assessment basis and provide treatment recommendations. After verification, a complete report document is generated, which is the container surface deformation status assessment report.

[0210] In summary, extracting geometric feature data from structural morphology recognition results to generate a feature dataset to be evaluated can accurately screen out key data related to deformation assessment, providing a targeted data foundation for subsequent comparative analysis and avoiding interference from irrelevant data.

[0211] In summary, by reading the evaluation rule data from the predefined deformation discrimination rule library, evaluations can be carried out based on standardized rules, avoiding subjective judgment differences, ensuring uniform evaluation standards when inspecting different containers, and supporting the goal of standardized deformation evaluation in the document.

[0212] In summary, by comparing the feature dataset to be evaluated with the standard feature dataset, deformation index data can be obtained, the deviation between the actual characteristics of the box and the standard characteristics can be quantified, the specific deformation situation can be clarified, and objective data basis can be provided for the determination of deformation level, thus solving the deficiency of existing technology in deformation assessment lacking quantitative standards.

[0213] In summary, by comparing deformation index data with preset thresholds and determining the deformation level, the resulting data can transform deviations into clear levels, avoid ambiguous judgments, make the degree of deformation clearly identifiable, and provide accurate conclusions to support the generation of judgment reports.

[0214] In summary, generating a deformation state assessment report based on the deformation assessment results can integrate the assessment process and conclusions, forming a complete and traceable testing result, providing a basis for subsequent data management and traceability, and meeting the core requirement in the document to ensure the practicality and scientific nature of the testing process.

[0215] The inspection report association storage module 105 is used to establish a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.

[0216] In this embodiment of the invention, when the inspection report association storage module establishes a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and stores it in the inspection report database of the container surface, it is specifically used for:

[0217] Extract the feature identification information from the deformation state determination report to generate the report feature identification data of the container surface;

[0218] Extract image feature information from the multi-view image data to generate image feature identification data of the container surface;

[0219] Establish a bidirectional mapping relationship between the report feature identification data and the image feature identification data, and generate bidirectional association index data for the container surface;

[0220] The bidirectional correlation index data is associated with and stored in the inspection report database of the container surface, along with the corresponding deformation state determination report and the multi-view image data.

[0221] Specifically, to extract the feature identification information from the deformation condition assessment report to generate report feature identification data for the container surface, it is necessary to first open the deformation condition assessment report containing basic container information and deformation feature details, filter out the unique number of the container to be assessed, the specific time of the assessment operation, and the overall deformation level, organize it according to the fixed format of container unique number - assessment time - overall deformation level, and store it in the form of structured data to form report feature identification data for the container surface.

[0222] Furthermore, to extract image feature information from multi-view image data to generate image feature identification data for the container surface, it is necessary to first open the multi-view image data file containing original images of different surfaces and angles of the container, extract the unique identifier of the image acquisition device, the specific acquisition time, the covered surface area and resolution information, classify and record them according to the format of acquisition device identifier - acquisition time - covered surface area - resolution, and organize them into a structured dataset. This dataset is the image feature identification data for the container surface.

[0223] Furthermore, to establish a bidirectional mapping relationship between report feature identification data and image feature identification data to generate bidirectional associated index data, the unique container number and time need to be selected as the core associated fields. The unique container number and evaluation time in the report feature identification data are matched with the same fields in the image feature identification data to identify the report and image of the same detection event. Index paths pointing to each other are added to the two types of data respectively. The index paths and feature identification information are integrated to form an index file containing bidirectional pointing relationships, that is, the bidirectional associated index data of the container surface.

[0224] Furthermore, the bidirectional correlation index data is associated with and stored in the detection report database along with the corresponding deformation state determination report and multi-view image data. This requires opening the detection report database, which contains three preset storage partitions: report, image, and index. The report and image data are then imported into their respective partitions and assigned unique storage addresses. When importing the index data into the index partition, the storage addresses of the report and image are added. After verifying that the correlation is correct, the database state is saved, thus achieving the associated storage of the three.

[0225] In summary, extracting report feature identifiers to generate data provides clear identification for associating reports with images, meeting the need for precise management of detection data in documents.

[0226] In summary, extracting image feature identifiers to generate data solves the problem of matching images with reports, and supports the goals of document association management detection and image data.

[0227] In summary, establishing a two-way mapping to generate index data and enabling cross-referencing between reports and images meets the requirement of improving the convenience of data retrieval in document processing.

[0228] In summary, storing the three types of data in the database ensures the complete archiving of test results, meeting the core requirement of document protection and traceability of the testing process.

[0229] Reference Figure 2 The diagram shown is a flowchart illustrating a container alignment inspection method according to an embodiment of the present invention. In this embodiment, the container alignment inspection method includes:

[0230] S1. Acquire multi-view image data of the container surface, and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface;

[0231] S2. Extract the structured geometric feature data related to the box structure from the corrected image data;

[0232] S3. Perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and identify the structural morphology of the container surface;

[0233] S4. Based on the structural morphology recognition results, the deformation of the container surface is evaluated using predefined deformation discrimination rules, and a deformation state determination report of the container surface is generated.

[0234] S5. Establish a bidirectional correlation index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.

[0235] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0236] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0237] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A container alignment and inspection system, characterized in that, The system includes a multi-view image acquisition and correction module, a structured geometric feature extraction module, a feature consistency analysis and morphological recognition module, a deformation assessment report generation module, and a detection report association and storage module, wherein: The multi-view image acquisition and correction module is used to acquire multi-view image data of the container surface and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface, including: Acquire raw image data of the container surface from multiple perspectives; The distortion feature parameters are extracted from the multi-view original image data to generate the distortion parameter dataset of the container surface; Based on the distortion parameter dataset, optical distortion correction processing is performed on the multi-view original image data to obtain preliminary corrected image data of the container surface; Extract the grayscale distribution features of the preliminary corrected image data to generate image grayscale distribution data of the container surface; Calculate the image enhancement coefficient of the preliminary corrected image data, wherein the formula for calculating the image enhancement coefficient is as follows: ; In the formula, The image enhancement coefficient is... These are the variance weighting coefficients. The local variance of the image data for preliminary correction, For the maximum local variance, The maximum grayscale value of the image in the preliminary corrected image data. The minimum grayscale value of the image in the preliminary corrected image data. For dynamic range weighting coefficients; Based on the image enhancement coefficients, the preliminary corrected image data is subjected to contrast enhancement processing to obtain contrast-enhanced image data of the preliminary corrected image data. The contrast-enhanced image data is subjected to noise suppression processing to obtain denoised enhanced image data; The denoised enhanced image data is then subjected to edge sharpening processing to obtain the enhanced corrected image data; Verify the geometric consistency of the enhanced corrected image data to obtain the corrected image data of the container surface; The structured geometric feature extraction module is used to extract structured geometric feature data related to the box structure from the corrected image data; The feature consistency analysis and morphology recognition module is used to perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and to identify the structural morphology of the container surface. The deformation assessment report generation module is used to assess the deformation of the container surface based on the structural morphology and through predefined deformation discrimination rules, and generate a deformation state determination report of the container surface. The inspection report association storage module is used to establish a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.

2. The container alignment and inspection system as described in claim 1, characterized in that, When the multi-view image acquisition and correction module performs contrast enhancement processing on the preliminary corrected image data based on the image enhancement coefficient to obtain contrast-enhanced image data of the container surface, it is specifically used for: Image characteristic analysis is performed on the preliminary corrected image data to obtain the image characteristic evaluation results of the preliminary corrected image data; Based on the image characteristic evaluation results and the image enhancement coefficients, contrast enhancement processing parameters for the preliminary corrected image data are generated; The image is subjected to grayscale stretching based on the contrast enhancement processing parameters to obtain a preliminary enhanced image of the container surface; The preliminary enhanced image is subjected to detail optimization processing to obtain contrast-enhanced image data of the container surface.

3. The container alignment and inspection system as described in claim 1, characterized in that, When the structured geometric feature extraction module extracts structured geometric feature data related to the box structure from the corrected image data, it is specifically used for: Edge contour analysis is performed on the corrected image data to obtain the edge contour information of the corrected image data; Corner detection processing is performed based on the edge contour information to obtain the corner position information of the corrected image data; Geometric feature extraction is performed on the edge contour information and the corner point position information to obtain the geometric feature data of the corrected image data; The edge contour information, the corner point position information, and the geometric feature data are integrated into the structured geometric feature data of the container surface.

4. The container alignment and inspection system as described in claim 1, characterized in that, The feature consistency analysis and morphology recognition module, when performing feature consistency analysis between the structured geometric feature data and a pre-built standard container geometric feature database, and identifying the structural morphology of the container surface, is specifically used for: The structured geometric feature data is matched with a pre-built standard container geometric feature database in multiple dimensions to obtain a feature matching result set of the container surface; A consistency evaluation is performed on the feature matching result set to obtain the consistency evaluation result of the feature matching result set; Based on a preset decision rule base, the consistency assessment results are used to identify the structural morphology, thereby obtaining the structural morphology identification results of the container surface. The structural morphology recognition results are associated and integrated with the feature matching result set to obtain the structural morphology analysis results of the container surface.

5. The container alignment and inspection system as described in claim 4, characterized in that, When the feature consistency analysis and morphological recognition module performs a consistency evaluation on the feature matching result set and obtains the consistency evaluation result of the feature matching result set, it is specifically used for: The consistency evaluation result of the feature matching result set is calculated, wherein the formula for calculating the consistency evaluation result is as follows: ; In the formula, The consistency assessment results are as follows. For the first Weight coefficients for each feature dimension For the structured geometric feature data in the first... Feature values ​​of each feature dimension For the standard container geometric feature database in the first Standard feature values ​​for each feature dimension To perform a weighted summation across all feature dimensions; Based on the consistency assessment results, a consistency level is determined, and consistency assessment result data of the feature matching result set is generated.

6. The container alignment and inspection system as described in claim 1, characterized in that, When the deformation assessment report generation module performs deformation assessment on the container surface based on the structural morphology recognition results and predefined deformation discrimination rules, and generates a deformation state determination report for the container surface, it is specifically used for: Extract the geometric feature data from the structural morphology recognition results to generate the feature dataset to be evaluated on the surface of the container; Read the corresponding evaluation rule data from the predefined deformation discrimination rule library; The deformation index data of the container surface is obtained by comparing and analyzing the dataset of features to be evaluated with the preset standard dataset of features. The deformation index data is compared with a preset threshold, and the deformation level is determined by comparing the results to obtain the deformation determination result data of the container surface. Based on the deformation determination results data, a deformation state determination report for the container surface is generated.

7. The container alignment and inspection system as described in claim 1, characterized in that, When the inspection report association storage module establishes a bidirectional association index between the deformation state determination report and the corresponding multi-view image data, and stores it in the inspection report database of the container surface, it is specifically used for: Extract the feature identification information from the deformation state determination report to generate the report feature identification data of the container surface; Extract image feature information from the multi-view image data to generate image feature identification data of the container surface; Establish a bidirectional mapping relationship between the report feature identification data and the image feature identification data, and generate bidirectional association index data for the container surface; The bidirectional correlation index data is associated with and stored in the inspection report database of the container surface, along with the corresponding deformation state determination report and the multi-view image data.

8. A method for inspecting the shape of a container, characterized in that, Includes the following steps: S1. Acquire multi-view image data of the container surface, and perform optical distortion correction on the multi-view image data to obtain corrected image data of the container surface, including: Acquire raw image data of the container surface from multiple perspectives; The distortion feature parameters are extracted from the multi-view original image data to generate the distortion parameter dataset of the container surface; Based on the distortion parameter dataset, optical distortion correction processing is performed on the multi-view original image data to obtain preliminary corrected image data of the container surface; Extract the grayscale distribution features of the preliminary corrected image data to generate image grayscale distribution data of the container surface; Calculate the image enhancement coefficient of the preliminary corrected image data, wherein the formula for calculating the image enhancement coefficient is as follows: ; In the formula, The image enhancement coefficient is... These are the variance weighting coefficients. The local variance of the image data for preliminary correction, For the maximum local variance, The maximum grayscale value of the image in the preliminary corrected image data. The minimum grayscale value of the image in the preliminary corrected image data. For dynamic range weighting coefficients; Based on the image enhancement coefficients, the preliminary corrected image data is subjected to contrast enhancement processing to obtain contrast-enhanced image data of the preliminary corrected image data. The contrast-enhanced image data is subjected to noise suppression processing to obtain denoised enhanced image data; The denoised enhanced image data is then subjected to edge sharpening processing to obtain the enhanced corrected image data; Verify the geometric consistency of the enhanced corrected image data to obtain the corrected image data of the container surface; S2. Extract the structured geometric feature data related to the box structure from the corrected image data; S3. Perform feature consistency analysis between the structured geometric feature data and the pre-built standard container geometric feature database, and identify the structural morphology of the container surface; S4. Based on the structural morphology, the deformation of the container surface is evaluated using predefined deformation discrimination rules, and a deformation state determination report of the container surface is generated. S5. Establish a bidirectional correlation index between the deformation state determination report and the corresponding multi-view image data, and store it in the inspection report database of the container surface.