Bag body orientation detection method and system based on image mode consistency

By performing multi-view optical distortion correction and size standardization on bag images, combined with structured feature extraction and consistency analysis, the problems of image quality and feature matching in bag orientation detection were solved, achieving high-precision detection results.

CN121685641AInactive Publication Date: 2026-03-17YIXING WELLKNIT CONTAINER-BAG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies for bag orientation detection suffer from insufficient image acquisition and preprocessing, resulting in low image quality. Distortion errors and size differences affect the accuracy of feature extraction. Feature processing lacks consistency analysis, leading to low matching accuracy and unconvincing detection results.

Method used

By acquiring multi-view image data, optical distortion correction and size standardization are performed, structured feature information is extracted, pattern consistency analysis and credibility verification are conducted, and a structured inspection report is generated.

Benefits of technology

This improved the reliability and matching accuracy of feature data, enabled more precise and standardized detection of bag orientation, and significantly improved detection accuracy and the practicality of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685641A_ABST
    Figure CN121685641A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a bag body orientation detection method and system based on image mode consistency, and the method comprises the steps: collecting the multi-view image data of a bag body, and carrying out the optical distortion correction of the multi-view image data, and obtaining the corrected bag body image data; extracting structured feature information in the corrected bag body image data, and generating structured feature data of the bag body; performing mode consistency analysis on the structured feature data and a pre-constructed standard bag body feature database to obtain feature matching result data of the bag body; based on the feature matching result data, performing orientation evaluation on the bag body to obtain an orientation judgment result of the bag body; performing credibility verification on the orientation judgment result to obtain a final bag body orientation detection report of the bag body; according to the invention, the accuracy of bag body orientation detection based on image mode consistency can be improved.
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 method and system for detecting bag orientation based on image pattern consistency. Background Technology

[0002] Existing technologies have significant shortcomings in the image acquisition and preprocessing stages of bag orientation detection. After acquiring multi-view image data, no systematic image quality analysis is conducted, and qualified images are not selected based on features such as noise distribution, sharpness, and brightness. This results in low-quality images being directly entered into the subsequent processing flow. At the same time, optical distortion correction and size standardization are not performed on the images. Residual distortion errors and size differences in the images directly interfere with the accuracy of feature extraction, causing deviations in the subsequently extracted bag feature data. This makes it impossible to provide an accurate image basis for orientation detection and seriously affects the reliability of the detection results.

[0003] Existing technologies have significant shortcomings in bag feature processing, matching, and result verification. In feature processing, outlier suppression and normalization are not performed on the extracted geometric parameters, and the consistency of feature data is not verified, resulting in disorganized feature data that is difficult to effectively match with standard features. In pattern matching, a comprehensive standard bag feature database is not constructed; matching results are determined solely through simple feature comparison, and standardized formulas are not used to calculate similarity scores, resulting in low matching accuracy. In result verification, there is a lack of multi-dimensional consistency analysis and credibility level classification of orientation determination results, and the detection report is not structured and standardized, leading to unconvincing final detection results that fail to meet the accuracy and standardization requirements of practical applications. Overall, the scientific rigor and practicality of the detection process are insufficient. Summary of the Invention

[0004] This invention provides a method and system for detecting bag orientation based on image pattern consistency, in order to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a bag orientation detection method based on image pattern consistency, comprising: S1. Collect multi-view image data of the bag body, and perform optical distortion correction on the multi-view image data to obtain corrected bag body image data; S2. Extract the structured feature information from the corrected bag image data to generate the structured feature data of the bag; S3. Perform pattern consistency analysis between the structured feature data and the pre-built standard bag feature database to obtain the feature matching result data of the bag; S4. Based on the feature matching result data, the orientation of the bag is evaluated to obtain the orientation determination result of the bag; S5. Verify the credibility of the orientation determination result to obtain the final bag orientation detection report.

[0006] In a preferred embodiment, the acquisition of multi-view image data of the bag and the optical distortion correction of the multi-view image data to obtain corrected bag image data includes: Simultaneously acquire original images of the bag from different perspectives to generate a multi-view original image dataset of the bag; Image quality analysis is performed on the multi-view original image dataset to obtain image quality assessment data of the multi-view original image dataset; Filter qualified image data from the image quality assessment data; The qualified image data is subjected to optical distortion correction processing to obtain preliminary corrected image data of the bag body; The preliminary corrected image data is then subjected to size standardization to obtain the corrected bag image data.

[0007] In a preferred embodiment, the step of performing image quality analysis on the multi-view original image dataset to obtain image quality assessment data for the multi-view original image dataset includes: Noise features are extracted from the images in the multi-view original image dataset to obtain the noise distribution features of the images; Sharpness features are extracted from the images in the multi-view original image dataset, and the sharpness feature parameters of the images are defined as follows: Brightness feature analysis is performed on the images in the multi-view original image dataset to determine the brightness distribution characteristics of the images; The noise distribution features, the sharpness feature parameters, and the brightness distribution features are integrated into the image quality feature set of the multi-view original image dataset; The image quality feature set is comprehensively analyzed to obtain the image quality assessment data of the multi-view original image dataset.

[0008] In a preferred embodiment, the step of extracting structured feature information from the corrected bag image data to generate structured feature data of the bag includes: Edge features are extracted from the corrected bag image data to obtain the bag's contour feature data; Based on the contour feature data, corner point detection processing is performed on the bag body to obtain the key corner point position data of the bag body; Geometric relationship analysis is performed on the key corner point location data to obtain the geometric parameter dataset of the bag body; The geometric parameter dataset is standardized to obtain the normalized geometric feature data of the bag body; The consistency of the standardized geometric feature data is verified to obtain the structured feature data of the bag body.

[0009] In a preferred embodiment, the standardization process of the geometric parameter dataset to obtain the normalized geometric feature data of the bag includes: Extract the size and angle feature parameters from the geometric parameter dataset to generate the original geometric feature set of the bag body; The original geometric feature set is subjected to outlier suppression processing to obtain purified geometric feature data; The purified geometric feature data is normalized to obtain the standardized geometric feature data of the bag.

[0010] In a preferred embodiment, the step of performing pattern consistency analysis between the structured feature data and a pre-built standard bag feature database to obtain feature matching result data for the bag includes: Extract the orientation distribution histogram features from the structured feature data to generate the feature vector to be matched for the bag body; Read the standard feature vectors from the standard bag body feature database; Calculate the similarity score between the feature vector to be matched and the standard feature vector to generate a similarity set of the bag body; The optimal matching standard orientation is determined based on the highest score in the similarity set, and feature matching result data of the bag body is generated.

[0011] In a preferred embodiment, the step of evaluating the orientation of the bag based on the feature matching result data to obtain the orientation determination result of the bag includes: Confidence analysis is performed on the feature matching result data to obtain the matching confidence score of the feature matching result data; The matching confidence score is compared and analyzed with a preset threshold to determine the matching reliability level of the feature matching result data.

[0012] In a preferred embodiment, after comparing and analyzing the matching confidence score with a preset threshold to determine the matching reliability level of the feature matching result data, the process includes: Based on the matching reliability level, the feature matching results are weighted and fused to obtain a weighted matching result of the feature matching result data; The initial orientation determination result of the weighted matching result is obtained by performing an orientation determination on the weighted matching result through a decision analysis process. The initial orientation determination result is optimized to obtain the orientation determination result of the bag.

[0013] In a preferred embodiment, the step of verifying the reliability of the orientation determination result to obtain the final bag orientation detection report includes: A multi-dimensional consistency analysis was performed on the orientation determination results to obtain the multi-dimensional verification results of the bag. Based on the multidimensional verification results, the confidence level of the orientation determination result is determined; Based on the confidence level, the orientation determination result is labeled with reliability to obtain the labeled orientation determination result; A structured inspection report for the bag is constructed based on the orientation determination results after the annotation. The structured inspection report is processed into a standardized format to obtain the final bag orientation inspection report.

[0014] To address the aforementioned problems, the present invention also provides a bag orientation detection system based on image pattern consistency, the system comprising: The image acquisition and correction module is used to acquire multi-view image data of the bag and perform optical distortion correction on the multi-view image data to obtain corrected bag image data. The feature extraction and structuring module is used to extract structured feature information from the corrected bag image data and generate structured feature data of the bag. The pattern matching analysis module is used to perform pattern consistency analysis between the structured feature data and the pre-built standard bag feature database to obtain the feature matching result data of the bag. An orientation assessment and determination module is used to assess the orientation of the bag based on the feature matching result data, and obtain the orientation determination result of the bag. The verification report generation module is used to verify the credibility of the orientation determination result and obtain the final bag orientation detection report.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention acquires original images of the bag from multiple perspectives simultaneously through an image acquisition and correction module. After comprehensive analysis of noise distribution, sharpness, and brightness features, qualified images are selected. Optical distortion correction and size standardization are then performed to generate high-quality corrected image data, laying a precise foundation for feature extraction. The feature extraction and structuring module further performs edge feature extraction, corner detection, and geometric relationship analysis on the corrected images. Combined with outlier suppression and normalization, standardized geometric feature data is generated. Consistency verification forms structured feature data, comprehensively and accurately capturing key features of the bag and significantly improving the reliability and effectiveness of the feature data.

[0016] 2. The pattern matching analysis module of this invention extracts the orientation distribution histogram features from the structured features to generate a matching vector. Relying on a pre-built standard bag feature database, it uses a standardized formula to calculate the similarity score to determine the optimal matching orientation, thereby improving matching accuracy. The orientation evaluation and judgment module uses matching confidence scores and reliability level classifications to weight, fuse, and optimize the matching results, obtaining accurate orientation judgment results. The verification report generation module uses multi-dimensional consistency analysis to label the credibility level and constructs a structured and standardized detection report, realizing the accuracy and standardization of the entire bag orientation detection process, significantly improving detection accuracy and the practicality of results. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a bag orientation detection method based on image pattern consistency according to an embodiment of the present invention. Figure 2 A functional block diagram of a bag orientation detection system based on image pattern consistency is provided in an embodiment of the present invention. 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

[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] This application provides a method for detecting bag orientation based on image pattern consistency. The execution entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method for detecting bag orientation based on image pattern consistency can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0020] Reference Figure 1 The diagram shown is a flowchart illustrating a bag orientation detection method based on image pattern consistency according to an embodiment of the present invention. In this embodiment, the bag orientation detection method based on image pattern consistency includes: S1. Collect multi-view image data of the bag body, and perform optical distortion correction on the multi-view image data to obtain corrected bag body image data; In this embodiment of the invention, the process of acquiring multi-view image data of the bag and performing optical distortion correction on the multi-view image data to obtain corrected bag image data includes: Simultaneously acquire original images of the bag from different perspectives to generate a multi-view original image dataset of the bag; Image quality analysis is performed on the multi-view original image dataset to obtain image quality assessment data of the multi-view original image dataset; Filter qualified image data from the image quality assessment data; The qualified image data is subjected to optical distortion correction processing to obtain preliminary corrected image data of the bag body; The preliminary corrected image data is then subjected to size standardization to obtain the corrected bag image data.

[0021] The step of performing image quality analysis on the multi-view original image dataset to obtain image quality assessment data for the multi-view original image dataset includes: Noise features are extracted from the images in the multi-view original image dataset to obtain the noise distribution features of the images; Sharpness features are extracted from the images in the multi-view original image dataset, and the sharpness feature parameters of the images are defined as follows: Brightness feature analysis is performed on the images in the multi-view original image dataset to determine the brightness distribution characteristics of the images; The noise distribution features, the sharpness feature parameters, and the brightness distribution features are integrated into the image quality feature set of the multi-view original image dataset; The image quality feature set is comprehensively analyzed to obtain the image quality assessment data of the multi-view original image dataset.

[0022] Specifically, to generate a multi-view raw image dataset of the bag, original images of the bag are acquired simultaneously from different perspectives. Multiple high-definition industrial cameras need to be fixedly installed in the image acquisition area according to a preset spatial layout. The number of cameras is determined by the shape of the bag, ensuring that the lenses can completely cover all areas to be acquired, including the front, back, sides, top, and bottom of the bag, and that the shooting ranges of adjacent cameras have a reasonable overlap to ensure complete acquisition. The bag to be acquired is placed on a fixed platform in the acquisition area. The platform position is calibrated to ensure that the center of the bag is aligned with the reference point of the acquisition system.

[0023] Furthermore, the central control system sends synchronous shooting instructions to all high-definition industrial cameras. After the instructions are sent, all cameras start their shutters at the same time to capture images of the bag from the corresponding perspective. These directly captured images, without any post-processing, are combined into a set, which is the multi-view original image dataset of the bag.

[0024] Furthermore, image quality analysis is performed on the multi-view original image dataset to obtain image quality assessment data. This requires extracting images one by one from the multi-view original image dataset and conducting three core quality checks on each image. The first check is sharpness detection, which involves manually observing the discernibility of details such as bag edges, folds, and printed markings in the image. Images where all details are clearly visible are considered sharp; images where some details are blurred but do not affect the recognition of the subject are considered relatively sharp; and images where most details are indistinguishable are considered blurry. The second check is brightness uniformity detection, which involves observing the overall brightness distribution of the image. Images where the brightness of the bag area is consistent and there are no obviously overly bright or dark areas are considered uniform; images where there are small brightness deviations but do not affect the overall appearance of the bag are considered basically uniform; and images where there are large areas that are overly bright or dark are considered non-uniform.

[0025] Furthermore, the third step is color accuracy detection, which compares the color of the bag in the image with the actual color of the bag. Images with completely identical colors are considered accurate; those with slight color differences but consistent with visual perception are considered basically accurate; and those with significant color deviations are considered distorted. The results of the sharpness, brightness uniformity, and color accuracy detection for each image are recorded individually in the format of image number, sharpness level, brightness uniformity level, and color accuracy level. The dataset formed by summing all the detection records for all images constitutes the image quality assessment data for the multi-view original image dataset.

[0026] Furthermore, to screen qualified image data from the image quality assessment data, it is necessary to first establish the criteria for qualified images. Only images that simultaneously meet three conditions—a sharpness level of sharp or relatively sharp, a brightness uniformity level of uniform or basically uniform, and a color fidelity level of true or basically true—are considered qualified image data. Based on these criteria, each image in the image quality assessment data is checked against these three detection levels. Image numbers and related information corresponding to images that simultaneously meet all three conditions are selected. The selected image information undergoes a secondary verification to confirm that the detection level records for each image are correct and that they all meet the qualification criteria. The final set of all selected image information that meets the criteria constitutes the qualified image data.

[0027] Further, optical distortion correction is performed on the qualified image data to obtain preliminary corrected image data of the bag. A corresponding distortion correction template needs to be matched for each qualified image. The correction template is pre-made based on the camera model used to capture the image and includes correction rules for radial and tangential distortion that may occur at different shooting distances for that camera model. For images with radial distortion, the distribution of pixels at the image edges is manually adjusted according to the distortion compensation ratio of the edge regions in the correction template. Overstretched edge regions are proportionally shrunk, and compressed edge regions are proportionally stretched, restoring the bag edges to a straight or curved shape consistent with the actual object. For images with tangential distortion, the offset pixel blocks in the image are manually moved according to the correction direction and magnitude of the local offset in the correction template, moving the biased local areas of the bag back to the correct position, ensuring that the overall structure of the bag matches the actual object. After distortion adjustment, small blank areas in the image caused by pixel movement are manually filled using the color and brightness information of adjacent pixels to ensure image continuity. The set of all images after the above distortion correction processing constitutes the preliminary corrected image data of the bag.

[0028] Furthermore, the preliminary corrected image data undergoes size standardization to obtain the corrected bag image data. Standardized size parameters must first be set, uniformly adjusting the resolution and aspect ratio of all images to a fixed specification. For each preliminary corrected image, open it using an image editing tool. First, adjust the resolution using the image size function in the tool. While maintaining the original aspect ratio of the image, modify the resolution parameter to a fixed specification. If the adjusted image aspect ratio does not match the fixed specification, use the cropping tool to remove blank areas at the image edges that do not include the bag body, ensuring that the cropped image only retains the bag body and necessary background areas, and that the aspect ratio strictly conforms to the fixed specification.

[0029] Furthermore, the adjusted images undergo positional calibration, centering the bag within the image so that the distances between the top and the top edge of the image, the bottom and the bottom edge, the left and right edges of the image are equal. After all the initially corrected images have undergone resolution adjustment, scaling, and positional calibration, the resulting set of images constitutes the corrected bag image data.

[0030] Specifically, noise feature extraction is performed on the images in the multi-view original image dataset to obtain the noise distribution characteristics of the images. This requires using an image viewing tool to open each image in the dataset one by one, dividing each image into four equal regions horizontally and vertically, corresponding to the upper left, upper right, lower left, and lower right parts of the image, ensuring that each region covers different positions in the image. Each region is then carefully observed with the human eye to identify irregular specks caused by camera interference and unstable ambient lighting; these specks are the image noise.

[0031] Furthermore, for each region, the number of noise points, their specific locations, and their color intensity are recorded. The noise records for the four regions are then arranged in the order of upper left, upper right, lower left, and lower right. The resulting set of information containing the number, location, and color intensity of noise in each region of the image is the noise distribution characteristics of that image.

[0032] Furthermore, sharpness features are extracted from the images in the multi-view original image dataset to obtain image sharpness feature parameters. For each image, three key parts with clear outlines on the bag are selected as observation objects: the top edge, bottom edge, and the fixed logo pattern printed on the surface of the bag. These three parts are observed one by one by the human eye. If the outline lines of the part are continuous and unbroken or blurred, and every detail of the logo pattern can be clearly distinguished, then the part is judged as sharp. If the outline lines of the part are slightly blurred but the overall direction can still be seen, and the main details of the logo pattern are distinguishable but some small details are blurred, then the part is judged as relatively sharp. If the outline lines of the part are completely blurred and the direction cannot be distinguished, and the details of the logo pattern are completely unclear, then the part is judged as blurry.

[0033] Furthermore, the total number of clear and relatively clear parts in each image is counted and divided by the total number of the three observation areas to obtain the percentage of clear and relatively clear parts. This percentage is recorded together with the clarity judgment results of each of the three parts. The information that includes the percentage and the judgment results of each part is the clarity feature parameter of the image.

[0034] Furthermore, to obtain the brightness distribution characteristics of the images in the multi-view original image dataset, brightness feature analysis is performed. Each image needs to be divided into nine equally sized analysis blocks, both horizontally and vertically, ensuring that each block evenly covers different areas of the image. A standard grayscale card is prepared, marked from left to right with multiple brightness levels ranging from pure black to pure white, each level corresponding to a fixed visual brightness. Each analysis block in the image is compared one by one with the brightness levels of the grayscale card to determine the brightness level corresponding to each block.

[0035] Furthermore, the uniformity of brightness within each block is observed simultaneously. If the brightness is consistent across all locations within a block, with no obvious bright or dark spots, the block is considered to have uniform brightness. If small bright or dark spots exist within a block, but do not affect the overall brightness level determination, the block is considered to have basically uniform brightness. If large bright or dark spots exist within a block, making it impossible to determine a uniform brightness level, the block is considered to have uneven brightness. The brightness levels and brightness uniformity determination results of the nine blocks in each image are arranged from left to right and from top to bottom. The resulting set containing this information represents the brightness distribution characteristics of the image.

[0036] Furthermore, to integrate noise distribution features, sharpness feature parameters, and brightness distribution features into an image quality feature set for the multi-view original image dataset, an independent feature record table needs to be created for each image in the multi-view original image dataset. The table should be labeled with a unique identifier for each image at the top to ensure that the feature records for each image are not confused. Three columns should be set in the table, named "Noise Distribution Features," "Sharpness Feature Parameters," and "Brightness Distribution Features." The noise distribution features extracted earlier for each image should be completely filled into the "Noise Distribution Features" column, the sharpness feature parameters into the "Sharpness Feature Parameters" column, and the brightness distribution features into the "Brightness Distribution Features" column.

[0037] Furthermore, after the feature recording tables for all images are completed, these tables are summarized in order of image identification to form a complete set containing all image noise, sharpness, and brightness feature information. This set is the image quality feature set of the multi-view original image dataset.

[0038] Furthermore, to obtain image quality assessment data for multi-view original image datasets through comprehensive analysis of image quality feature sets, it is necessary to first establish unified comprehensive analysis standards and clarify the assessment levels for each dimension of noise, sharpness, and brightness: In noise distribution characteristics, a small total number of noise points in each region without dark gray noise points indicates acceptable noise, while a large total number of noise points or the presence of dark gray noise points indicates unacceptable noise; In sharpness feature parameters, a high proportion of sharp and relatively sharp areas indicates acceptable sharpness, while a low proportion indicates unacceptable sharpness; In brightness distribution characteristics, small differences in brightness levels across all blocks without uneven brightness indicates acceptable brightness, while large differences in levels or uneven brightness indicates unacceptable brightness.

[0039] Furthermore, based on this standard, each image in the image quality feature set is evaluated in three dimensions to determine whether it is qualified or unqualified in terms of noise, sharpness, and brightness. Subsequently, the overall quality level of each image is determined based on the evaluation results of the three dimensions: qualified in all three dimensions is a high-quality image, qualified in two dimensions is a good image, qualified in one dimension is a fair image, and unqualified in all three dimensions is a poor-quality image.

[0040] Furthermore, the image identifier, noise dimension judgment result, sharpness dimension judgment result, brightness dimension judgment result, and overall quality level of each image are recorded one by one. The dataset formed by summarizing all the records of the images is the image quality assessment data of the multi-view original image dataset.

[0041] In summary, by installing cameras according to a preset layout and capturing images synchronously, ensuring coverage of all areas of the bag and image synchronization, the generated multi-view raw image dataset fully reflects the bag's features, laying an accurate foundation for subsequent detection.

[0042] In summary, by using multi-dimensional quality analysis to screen qualified images and eliminate low-quality images, we can avoid noise, blurring, and other issues from interfering with subsequent processing and ensure the reliability of the detection.

[0043] In summary, radial and tangential distortions are corrected based on camera distortion templates to restore the true shape of the bag, providing distortion-free images for accurate extraction of structured features.

[0044] In summary, unifying image resolution, aspect ratio, and bag position eliminates feature extraction bias caused by size differences, ensuring comparability of image features from different viewpoints.

[0045] In summary, establishing a standardized preprocessing workflow, clarifying the operation and output of each step, avoiding randomness, improving processing efficiency and stability, and ensuring the standardization and accuracy of the entire testing process are all crucial.

[0046] In summary, by extracting noise distribution features, sharpness features, and brightness distribution features from images across multiple dimensions, we can comprehensively capture the core elements that affect image quality. This avoids the one-sidedness of relying on a single dimension to evaluate image quality and provides a multi-dimensional and comprehensive basis for subsequent selection of qualified images.

[0047] In summary, the three types of extracted features are integrated into an image quality feature set. Through comprehensive analysis, image quality assessment data is formed, clearly presenting the quality level of each image. This makes the distinction between qualified and unqualified images more intuitive and facilitates efficient screening of images that meet the requirements for subsequent processing.

[0048] In summary, identifying low-quality images with excessive noise, insufficient clarity, and uneven brightness in advance through quality analysis prevents these images from entering subsequent distortion correction and feature extraction stages, reducing the interference of low-quality images on detection results and improving the accuracy and reliability of bag orientation detection from the source.

[0049] S2. Extract the structured feature information from the corrected bag image data to generate the structured feature data of the bag; In this embodiment of the invention, the step of extracting structured feature information from the corrected bag image data to generate structured feature data of the bag includes: Edge features are extracted from the corrected bag image data to obtain the bag's contour feature data; Based on the contour feature data, corner point detection processing is performed on the bag body to obtain the key corner point position data of the bag body; Geometric relationship analysis is performed on the key corner point location data to obtain the geometric parameter dataset of the bag body; The geometric parameter dataset is standardized to obtain the normalized geometric feature data of the bag body; The consistency of the standardized geometric feature data is verified to obtain the structured feature data of the bag body.

[0050] The standardization process of the geometric parameter dataset to obtain the normalized geometric feature data of the bag includes: Extract the size and angle feature parameters from the geometric parameter dataset to generate the original geometric feature set of the bag body; The original geometric feature set is subjected to outlier suppression processing to obtain purified geometric feature data; The purified geometric feature data is normalized to obtain the standardized geometric feature data of the bag.

[0051] Specifically, edge features are extracted from the corrected bag image data using an edge detection method. First, the corrected bag image data is converted into a grayscale image. Then, a filtering tool is used to smooth the grayscale image to remove minor noise. Next, the gradient intensity and direction of each pixel in the smoothed image are calculated. Pixels with high gradient intensity are retained as edge candidates. Non-maximum suppression is applied to the candidate points to eliminate non-edge points. Finally, high and low thresholds are used to filter out continuous edge pixels and connect them to form complete bag edge lines. The set of information reflecting the external contour of the bag formed by these lines is the contour feature data of the bag.

[0052] Furthermore, corner detection processing is performed on the bag body based on the contour feature data. The corner detection method is adopted to perform pixel-level traversal on the edge lines in the contour feature data, calculate the grayscale change value of each pixel and its neighboring pixels on each edge line, move a sliding window on the edge lines, and calculate the corner response value of each pixel by calculating the grayscale value of the pixels within the window. A fixed response threshold is set, and pixels with response values ​​greater than the threshold are marked as corner candidate points. The candidate points are deduplicated in the neighborhood, and finally the coordinate information of the key corner positions of the top, bottom, and side connections of the bag body is obtained, which is the key corner position data of the bag body.

[0053] Furthermore, geometric relationship analysis is performed on the key corner point location data. The coordinates of the key corner points are arranged in the order of the bag's outline to determine the connection relationship between adjacent corner points. The straight-line distance between adjacent corner points is calculated using image measurement tools to obtain the corresponding side length parameters of the bag. Taking each corner point as a vertex, the included angle between two adjacent sides is calculated to obtain the corresponding corner angle parameters. At the same time, data such as the curve length and curvature change corresponding to the curvature of the outline lines are recorded. All length parameters, angle parameters, and outline line related data are compiled and summarized to form a dataset containing geometric attribute information of each part of the bag, which is the geometric parameter dataset of the bag.

[0054] Furthermore, the geometric parameter dataset is standardized. First, size and angle feature parameters are extracted. Size parameters include linear dimension data such as the top and bottom side lengths of the bag, while angle parameters include included angle data such as the left corner angle at the top and the right corner angle at the bottom. These two types of parameters are organized into subsets to form the original geometric feature set. Based on the parameters of a standard bag of the same model, normal ranges are set for the parameters in the original geometric feature set. Each parameter is checked, and for outliers, if the deviation can be traced, the accurate value is re-obtained; otherwise, the standard parameter is used to replace it, resulting in the purified geometric feature data. Using the standard bag parameters as a benchmark, the purified size parameters are converted into proportional relationships relative to the benchmark value, and the angle parameters are expressed as deviation relationships relative to the benchmark value. The parameter expression format is unified, and the resulting standardized parameter set is the standardized geometric feature data of the bag.

[0055] Furthermore, to verify the consistency of standardized geometric feature data, standardized geometric feature data of the same model standard bag is retrieved as a reference. The data to be verified is compared with the reference standard one by one to check whether the length ratio of each side of the bag, the deviation of the corner angle, and the curvature of the outline lines are consistent with the standard. From a geometric logic verification perspective, it is confirmed whether the lengths of adjacent sides and the included angles conform to the basic theorems of the sum of the interior angles of a triangle and the equality of opposite sides of a rectangle, ensuring that there are no logical contradictions. If there are no problems in the comparison and verification, the data is directly used as the structured feature data. If there are slight inconsistencies, they are marked and used as structured feature data. If there are serious contradictions, the previous steps are returned for reprocessing until data that meets the requirements is obtained, which is the structured feature data of the bag.

[0056] Specifically, open the geometric parameter dataset, view the information line by line, and distinguish between size and angle feature parameters according to the description. Size parameters describe the linear dimensions such as the top side length and side height of the bag, while angle parameters describe the angles of each corner and connection. Organize the two types of parameters into independent subsets and combine them to form the original geometric feature set of the bag.

[0057] Furthermore, based on the parameters of the same model standard bag, a fixed normal range is set for the size and angle parameters in the original geometric feature set. Each parameter is examined one by one. The value within the range is a normal parameter, and the value outside the range is an abnormal value. For abnormal values, the records are checked to confirm whether they are caused by the deviation of the detection operation. If so, the measurement is re-acquired and replaced. Otherwise, the corresponding parameters of the standard bag are used for replacement. After all abnormal values ​​are processed, the purified geometric feature data is formed.

[0058] Furthermore, using the parameters of the same model standard bag as a normalization reference, fixed reference values ​​are set for various dimensions and angle parameters; the actual values ​​of the purified dimensions are compared with the reference values ​​and converted into proportional relationships, and the actual values ​​of the angle parameters are compared with the reference values ​​and converted into deviation relationships. All of these are uniformly expressed in the format of "feature name + proportion / deviation description". After completion, standardized geometric feature data of the bag are formed.

[0059] In summary, edge feature extraction is used to obtain bag contour feature data, which fully captures the direction, curvature and line connection of the bag's external contour. This provides an intuitive and basic basis for bag morphology analysis and avoids feature extraction deviations due to missing contour information.

[0060] In summary, corner detection based on contour feature data yields key corner location data, accurately locating critical corners such as the top, bottom, and side connections of the bag. These corners serve as core references for constructing the bag's geometric relationships, laying a precise positional foundation for subsequent geometric parameter calculations.

[0061] In summary, geometric relationship analysis of key corner location data generates a geometric parameter dataset, transforming abstract corner locations into specific geometric parameters such as length and angle. This transforms bag features from morphological descriptions into quantifiable data, facilitating accurate comparison with standard features in the future.

[0062] In summary, standardizing the geometric parameter dataset yields standardized geometric feature data, unifying the units, numerical formats, and names of the parameters, eliminating comparison interference caused by inconsistent parameter representations, and enabling the bag feature data to have standardized and comparable attributes.

[0063] In summary, verifying the consistency of standardized geometric feature data forms structured feature data, ensuring that the data conforms to the basic geometric logic of the bag, eliminating contradictory or unreasonable parameters, and finally obtaining feature data with clear structure, reliable data, and compliance with standards. This provides high-quality feature support for subsequent pattern consistency analysis with the standard bag feature database, and significantly improves the accuracy of bag orientation detection.

[0064] In summary, the extraction of size and angle feature parameters generates the original geometric feature set. The geometric parameters are then categorized and integrated according to dimensions, clearly distinguishing between size parameters describing the linear dimensions of the bag and angle parameters describing the size of the included angle. This avoids analytical confusion caused by the mixing of different types of parameters and provides clearly categorized basic data for subsequent processing.

[0065] In summary, outlier suppression processing is performed on the original geometric feature set to obtain purified geometric feature data. By setting a reasonable normal range, outlier parameters are identified and corrected, and invalid data caused by detection bias is eliminated. This ensures that the feature data conforms to the actual geometric properties of the bag, improves data reliability, and avoids outliers interfering with subsequent matching analysis.

[0066] In summary, normalization of the purified data yields standardized geometric feature data. By using standard bag parameters as a benchmark, the parameter representation and comparison logic are unified, eliminating the magnitude and representation differences of parameters between different bags. This provides a unified and comparable standard for bag feature data, offering accurate and standardized feature basis for subsequent pattern consistency analysis with the standard bag feature database, thereby improving matching accuracy and detection accuracy.

[0067] S3. Perform pattern consistency analysis between the structured feature data and the pre-built standard bag feature database to obtain the feature matching result data of the bag; In this embodiment of the invention, the step of performing pattern consistency analysis between the structured feature data and a pre-built standard bag feature database to obtain the feature matching result data of the bag includes: Extract the orientation distribution histogram features from the structured feature data to generate the feature vector to be matched for the bag body; Read the standard feature vectors from the standard bag body feature database; Calculate the similarity score between the feature vector to be matched and the standard feature vector to generate a similarity set of the bag body. The formula for calculating the similarity score is as follows: In the formula, The similarity score is given. The first feature vector to be matched One portion, The first eigenvector of the standard feature vector One portion, The dimension of the feature vector; The optimal matching standard orientation is determined based on the highest score in the similarity set, and feature matching result data of the bag body is generated.

[0068] Specifically, the structured feature data of the bag is opened, and directional features such as the direction and angle of the contour lines and the direction of the connecting line segments of key corner points are filtered out. According to the preset intervals covering all directions from horizontal left to horizontal right, these directional information are classified, the number of directional features in each interval is counted, and the statistical results are arranged in interval order to form a numerical sequence reflecting the distribution pattern of directions, which is the feature vector to be matched.

[0069] Furthermore, to read the standard feature vectors in the standard bag feature database, you need to log in to the standard bag feature database through the database management tool. This database stores feature data of standard bags of different types and specifications. Each standard bag corresponds to one or more sets of standard feature vectors. Each set of standard feature vectors is generated based on the directional distribution histogram features of its structured feature data.

[0070] Furthermore, based on the type and specifications of the bag to be analyzed, the corresponding standard bag entry is retrieved from the database, and all standard feature vectors under that entry are found. These standard feature vectors are then completely extracted using the database reading function, ensuring that the extracted standard feature vectors match the type and specifications of the bag to be analyzed. After extraction, these standard feature vectors are temporarily stored in the analysis system for subsequent calculations.

[0071] Furthermore, to calculate the similarity score between the feature vector to be matched and the standard feature vector to generate a similarity set of the bag, the first standard feature vector needs to be taken from the temporarily stored standard feature vectors and compared with the feature vector to be matched. During the comparison, the values ​​of corresponding positions in the two vectors are checked one by one. If the values ​​of corresponding positions are the same, it is counted as a complete match. If the values ​​are different, it is counted as a partial match or a mismatch according to the magnitude of the difference. The weight of a complete match is the highest, the weight of a partial match is the second highest, and the weight of a mismatch is zero.

[0072] Furthermore, the matching weights at all positions are summed to obtain the total matching weight between the two vectors. A higher total matching weight indicates a higher similarity. The total matching weight is then converted into a corresponding similarity score. The similarity score between the feature vector to be matched and each of the other standard feature vectors is calculated sequentially using the same method. All the calculated similarity scores are then arranged in the order of the standard feature vectors, and the resulting set containing all scores is the bag similarity set.

[0073] Furthermore, the highest score is found from the similarity set, and its corresponding standard feature vector and the standard bag orientation are determined, which is the optimal matching standard orientation. The optimal matching orientation, the highest score, and other scores and their corresponding standard orientations are recorded as auxiliary information and organized in the format of "optimal matching orientation - highest score - auxiliary matching information" to form the feature matching result data.

[0074] Specifically, the first feature vector to be matched Each component comes from the bag body's unmatched feature vector generated after extracting the directional distribution histogram features from the structured feature data. This unmatched feature vector consists of directional information such as the direction angle of each segment of the bag body's outline, the direction of the connecting line segments of key corner points, etc. After classifying and counting the number of directional features in each preset directional interval, the numerical sequence is formed by arranging them in interval order. Each value in the sequence is the corresponding component of the unmatched feature vector.

[0075] Furthermore, the first eigenvector of the standard feature vector Each component comes from a standard feature vector read from the standard bag feature database. This standard feature vector is generated based on the directional distribution histogram feature of the structured feature data of the corresponding standard bag. Similarly, it is classified and statistically analyzed according to directional information and sorted by interval to form a numerical sequence. Each value in the sequence is the corresponding component of the standard feature vector.

[0076] Furthermore, the dimension of the feature vector comes from the numerical sequence length of the feature vector to be matched and the standard feature vector. Since the feature vector to be matched and the standard feature vector are both generated statistically according to the same preset direction interval, their sequence lengths are consistent, and this length is the dimension of the feature vector.

[0077] Furthermore, the calculation process involves multiplying the corresponding components of the feature vector to be matched and the standard feature vector pairwise, summing all the results, and then squaring each component of the feature vector to be matched and summing all the squares to obtain the square root of the sum. Similarly, squaring each component of the standard feature vector and summing all the squares to obtain the square root of the sum is also performed. Finally, the sum of the pairwise multiplications of the corresponding components is divided by the product of the square and square root of the feature vector to be matched and the square and square root of the standard feature vector. The final result is the similarity score.

[0078] Furthermore, the core of this process is to obtain an index that reflects the similarity between the bag body's features to be matched and the standard features by quantifying the degree of fit between the two feature vectors in directional distribution. The higher the similarity score, the closer the directional distribution features represented by the feature vector to be matched and the standard feature vector are, and the higher the matching degree between the actual features of the bag body and the standard features.

[0079] Furthermore, the closer each component of the feature vector to be matched is to the corresponding component of the standard feature vector, the larger the result of multiplying the corresponding components pairwise, and the sum of all multiplication results also increases. At the same time, the change in the product of the square root of the sum of squares of each component of the feature vector to be matched and the square root of the sum of squares of each component of the standard feature vector is less than the change in the sum of the corresponding component multiplications, which makes the final similarity score increase accordingly.

[0080] Furthermore, the greater the difference between the numerical values ​​of each component of the feature vector to be matched and the corresponding component of the standard feature vector, the smaller the result of multiplying the corresponding components pairwise, and the sum decreases accordingly. Meanwhile, the product of the squares and the square roots changes relatively smoothly, leading to a decrease in the similarity score. When the feature vector to be matched is exactly the same as the standard feature vector, the sum of the product of the corresponding components pairwise equals the sum of the squares of each component of the feature vector to be matched, at which point the similarity score reaches its maximum value. When the directional distribution characteristics of the feature vector to be matched are completely opposite to those of the standard feature vector, the sum of the product of the corresponding components pairwise will show a minimum value, and the similarity score will also reach its minimum value.

[0081] In summary, the extraction of directional distribution histogram features to generate matching vectors transforms abstract directional features such as the direction of the bag outline and the direction of the connection between key corner points into a quantifiable ordered numerical sequence, providing an adapted carrier for comparison with standard vectors and avoiding matching deviations caused by the difficulty in quantifying directional features.

[0082] In summary, the standard feature vectors for matching are retrieved from the standard bag feature database. Relying on a database that covers multiple types and specifications of standard data, it provides an authoritative reference for matching and solves the problem of low accuracy caused by the lack of a unified standard in traditional matching.

[0083] In summary, the similarity score is calculated using a standardized formula, and the directional feature fit is accurately quantified through vector component operations, avoiding subjective experience errors. The generated similarity set objectively presents the matching situation between the bag to be analyzed and each standard vector.

[0084] In summary, the optimal matching orientation is determined based on the highest score in the similarity set, and the feature matching result is formed by combining auxiliary information. This quickly locks the standard orientation with the highest fit, providing an accurate basis for subsequent orientation evaluation and significantly improving detection accuracy.

[0085] S4. Based on the feature matching result data, the orientation of the bag is evaluated to obtain the orientation determination result of the bag; In this embodiment of the invention, the step of evaluating the orientation of the bag based on the feature matching result data to obtain the orientation determination result of the bag includes: Confidence analysis is performed on the feature matching result data to obtain the matching confidence score of the feature matching result data; The matching confidence score is compared and analyzed with a preset threshold to determine the matching reliability level of the feature matching result data; Based on the matching reliability level, the feature matching results are weighted and fused to obtain a weighted matching result of the feature matching result data; The initial orientation determination result of the weighted matching result is obtained by performing an orientation determination on the weighted matching result through a decision analysis process. The initial orientation determination result is optimized to obtain the orientation determination result of the bag.

[0086] The formula for calculating the matching confidence score is as follows: ; In the formula, Score the confidence level of the match. The number of spatially consistent matching point pairs in the feature matching result data. The total number of matching point pairs in the feature matching result data. The distance variance of the matching pairs The preset average distance deviation, To match the spatial distribution standard deviation of the pairs, The preset average similarity value, The weighting coefficient for spatial consistency. These are the weighting coefficients for distance stability. The weighting coefficients for similarity consistency. It is an exponential function.

[0087] Specifically, the highest similarity score of the best match and the similarity scores of each auxiliary match are extracted from the feature matching results data. The analysis revolves around three core dimensions: the highest score value, the difference between the highest and second-highest scores, and the degree of concentration of the auxiliary scores. A base score is assigned to the highest score within a fixed interval, an additional score is assigned based on the difference, and an extra score is assigned based on the degree of concentration. The sum of these three scores is the matching confidence score.

[0088] Furthermore, two reliability thresholds, high and low, are preset based on a large amount of historical matching data, with the high threshold being higher than the low threshold. The matching confidence score is compared with the thresholds; scores above the high threshold indicate high reliability, scores between the two thresholds indicate medium reliability, and scores below the low threshold indicate low reliability.

[0089] Furthermore, weighting coefficients are set according to reliability levels, with high reliability having the highest weight, followed by medium reliability, and low reliability having the lowest weight. All standard orientations and their corresponding similarity scores are extracted, and the scores are multiplied by the corresponding weighting coefficients to obtain weighted scores. The scores are then sorted from high to low to form weighted matching results.

[0090] Furthermore, the standard orientation with the highest weighted score is selected as the candidate orientation according to the rules. Its contour, corner points, and other features in the standard database are extracted and then checked against the structured features of the bag body. If there is no conflict, it is determined as the initial orientation; if there is a slight conflict, it is marked and determined; if there is a significant conflict, the second highest-scoring orientation is selected for re-checking until the initial orientation is determined.

[0091] Furthermore, by comparing the geometric parameters of the bag body corresponding to the initial orientation with those of the standard structured features, if the core features are completely matched, the initial result is the final result; if there is a basic match but a slight deviation, the result is refined and corrected by combining the imaging angle and the environment; if there is a significant mismatch, the process returns to the weighted fusion step for correction until the final orientation that matches the core features is obtained.

[0092] Specifically, the number of spatially consistent matching point pairs in the feature matching result data comes from the analysis of matching point pairs in the feature matching result data. Each pair of matching points is examined in terms of their spatial position relative to the corresponding features in the bag's structured feature data and the standard bag feature database. If the spatial distribution of a pair of matching points conforms to the geometric structure logic of the bag and the standard bag, it is determined to be a spatially consistent matching point pair. The total number of all such matching point pairs is the numerical value. The total number of matching point pairs in the feature matching result data is the sum of all point pairs participating in the matching process, encompassing both spatially consistent and non-spatially consistent matching point pairs, and is directly calculated from the matching records of the feature matching result data.

[0093] Furthermore, the distance variance of a matching pair is calculated as the average of the squares of the differences between the actual distance and the standard distance for each pair of matching points. This is done by first calculating the distance difference for each pair, squaring each difference, and then summing all the squares and dividing by the total number of matching pairs. The preset average distance deviation is a fixed value set based on a large amount of standard bag matching experimental data. It reflects the average level of distance deviation during standard bag matching and is stored in the system's preset parameter library.

[0094] Furthermore, the spatial distribution standard deviation of the matching pairs is calculated to determine the degree to which all matching pairs deviate from the average distribution position in spatial distribution. First, determine the average distribution position of all matching pairs, then calculate the distance of each matching pair to that position, square these distances and calculate the average value, and finally take the square root to obtain the standard deviation.

[0095] Furthermore, the preset average similarity value is a fixed value derived from the statistical analysis of historical standard bag matching data and is stored in the system's preset parameter library. The weighting coefficients for spatial consistency, distance stability, and similarity consistency are fixed coefficients set according to their importance in the matching confidence assessment. The sum of the three is a fixed value, which is determined through a large number of matching verification experiments and then stored in the system.

[0096] Further, the calculation process first calculates the ratio of the number of spatially consistent matching pairs to the total number of matching pairs, and multiplies this ratio by the weighting coefficient of spatial consistency to obtain the score for the spatial consistency dimension. Next, it calculates the ratio of the distance variance of the matching pair to the preset average distance deviation, subtracts this ratio from 1, and multiplies it by the weighting coefficient of distance stability to obtain the score for the distance stability dimension. Then, it calculates the ratio of the spatial distribution standard deviation of the matching pair to the preset average similarity value, inverts this ratio, and substitutes it into the exponential function operation. The exponential function operation uses the inverted ratio as the exponent and calculates with the natural constant as the base. The result is multiplied by the weighting coefficient of similarity consistency to obtain the score for the similarity consistency dimension. Finally, the scores of the three dimensions are added together, and the sum is the matching confidence score.

[0097] Furthermore, this process comprehensively considers three core dimensions—the rationality of the spatial distribution of matching point pairs, the stability of distance deviation, and the concentration of similarity distribution—to quantitatively evaluate the reliability of feature matching results data. The higher the score, the better the consistency of feature matching results in the three dimensions of space, distance, and similarity, and the stronger the reliability of the matching results.

[0098] Furthermore, the more spatially consistent matching pairs there are, the greater the ratio of the number of spatially consistent matching pairs to the total number of matching pairs, the higher the score of the spatial consistency dimension, and the higher the matching confidence score; conversely, the smaller the ratio, the lower the score of the spatial consistency dimension, and the lower the matching confidence score.

[0099] Furthermore, the smaller the distance variance of the matched pair, the smaller the ratio of the distance variance of the matched pair to the preset average distance deviation, and the larger the result of 1 minus this ratio, the higher the score of the distance stability dimension, and the higher the matching confidence score; conversely, the larger the distance variance, the lower the score of this dimension, and the lower the matching confidence score.

[0100] Furthermore, the smaller the standard deviation of the spatial distribution of the matched pairs, the smaller the ratio of the standard deviation of the spatial distribution of the matched pairs to the preset average similarity value, and the larger the inverted ratio, the larger the result of substituting into the exponential function, resulting in a higher score in the similarity consistency dimension and a higher matching confidence score. Conversely, the larger the standard deviation of the spatial distribution, the lower the score in this dimension, and the lower the matching confidence score. When any one of the weighting coefficients of spatial consistency, distance stability, and similarity consistency increases, the influence of the corresponding dimension score on the matching confidence score will be enhanced. If the score of this dimension is high, the matching confidence score will increase more significantly; if the score of this dimension is low, the matching confidence score will decrease more significantly.

[0101] In summary, confidence analysis is performed on feature matching results data and a matching confidence score is generated. The core dimensions, such as the highest similarity score, score difference, and auxiliary score distribution, are comprehensively considered to quantify the reliability of the matching results into a specific score. This provides an intuitive data basis for subsequent evaluation and avoids the one-sidedness of judging the reliability of the matching based on a single score.

[0102] In summary, the reliability level of the matching is determined by comparing the confidence score with a preset threshold. Based on historical data, the threshold is clearly divided into high, medium, and low levels, giving the reliability of the matching results a clear definition standard and providing an accurate basis for subsequent weighted processing, thus solving the problem of ambiguous reliability judgment in traditional assessments.

[0103] In summary, the feature matching results are weighted and fused based on the matching reliability level. Corresponding weight coefficients are set according to the level, and the similarity scores of each standard are converted into weighted scores and sorted. This strengthens the influence of high reliability matching results and weakens the interference of low reliability results, making the weighted matching results more consistent with the actual characteristics of the bag.

[0104] In summary, the initial orientation determination result is determined through decision analysis. By double-checking the consistency between the candidate orientation and the structural features of the bag, orientation options with obvious conflicts are eliminated to ensure that the initial result has basic rationality and lay a reliable foundation for the final determination result.

[0105] In summary, by optimizing the initial orientation determination results and combining the differences between the core features of the bag and the standard features, minor deviations are corrected and obvious conflicts are resolved, ultimately obtaining a determination result that perfectly matches the actual orientation of the bag, greatly improving the accuracy and reliability of bag orientation assessment.

[0106] In summary, by combining spatial consistency, distance stability, and similarity consistency, and balancing their importance with corresponding weight coefficients, the system comprehensively covers key indicators of matching reliability, avoiding the one-sidedness of evaluation based on a single dimension.

[0107] In summary, by relying on feature matching results and preset standard data, subjective experience-based judgments are eliminated, ensuring objective and consistent scoring and removing human bias. Quantifying matching reliability provides a specific score, clearly distinguishing different matching qualities, and providing a precise basis for determining matching reliability levels, ensuring reasonable level classification. This helps in screening high-reliability matching results, laying the foundation for subsequent weighted fusion and orientation determination, reducing interference from low-reliability results, and improving the accuracy of bag orientation assessment.

[0108] S5. Verify the credibility of the orientation determination result to obtain the final bag orientation detection report.

[0109] In this embodiment of the invention, verifying the reliability of the orientation determination result to obtain the final bag orientation detection report includes: A multi-dimensional consistency analysis was performed on the orientation determination results to obtain the multi-dimensional verification results of the bag. Based on the multidimensional verification results, the confidence level of the orientation determination result is determined; Based on the confidence level, the orientation determination result is labeled with reliability to obtain the labeled orientation determination result; A structured inspection report for the bag is constructed based on the orientation determination results after the annotation. The structured inspection report is processed into a standardized format to obtain the final bag orientation inspection report.

[0110] Specifically, to obtain the multi-dimensional verification result of the bag body, a multi-dimensional consistency analysis of the orientation determination results is performed. This requires identifying three core verification dimensions: structured feature dimension, feature matching dimension, and visual feature dimension. Structured feature dimension verification involves retrieving the bag body's structured feature data and checking whether its geometric parameters, such as the positions of key corner points and the contour direction, are consistent with the standard bag body features corresponding to the orientation determination result. Feature matching dimension verification involves examining the similarity score of the best-matching standard orientation and auxiliary matching information in the feature matching result data to confirm whether most matching information supports the orientation determination result. Visual feature dimension verification involves opening the corrected bag body image data and directly observing whether the bag body's visual orientation in the image matches the determination result. The verification results of the three dimensions are recorded as "consistent" or "inconsistent," and the information set formed by summarizing the records of the three dimensions constitutes the multi-dimensional verification result of the bag body.

[0111] Furthermore, to determine the credibility level of the orientation judgment result based on the multi-dimensional verification results, three credibility levels and corresponding judgment criteria need to be preset. The high credibility level corresponds to the verification results of all three dimensions being consistent, the medium credibility level corresponds to the verification results of two dimensions being consistent and one dimension being inconsistent, and the low credibility level corresponds to the verification results of one or zero dimensions being consistent.

[0112] Furthermore, by comparing the number of "consistent" dimensions in the multidimensional verification results, if all three dimensions are consistent, the credibility level of the result is determined to be high credibility; if two dimensions are consistent and one dimension is inconsistent, it is determined to be medium credibility; if one or zero dimensions are consistent, it is determined to be low credibility.

[0113] Furthermore, the orientation determination results are reliably labeled based on their credibility levels to obtain the labeled orientation determination results. Specific labeling content needs to be set for different credibility levels: high credibility level is labeled "Highly Reliable: Consistent across structured features, feature matching, and visual features"; medium credibility level is labeled "Generally Reliable: Consistent across two dimensions and inconsistent across one dimension, with the specific inconsistent dimension to be specified"; low credibility level is labeled "Low Reliable: Inconsistent across most dimensions, with the specific inconsistent dimension and reason to be specified". The corresponding labeling content is added to the end of the orientation determination result and merged with the original orientation determination result to form a complete set of information including the determination result and reliability labeling, which is the labeled orientation determination result.

[0114] Furthermore, based on the annotated orientation determination results, a structured inspection report for the bag is constructed. This report must be organized according to a fixed framework, comprising four parts: basic information, orientation determination results, reliability verification details, and annotation explanations. The basic information section includes the bag's unique identifier, inspection time, and inspection equipment model. The orientation determination results section details the annotated orientation determination results. The reliability verification details section lists the verification process and results for the structured feature dimension, feature matching dimension, and visual feature dimension. The annotation explanations explain the basis for the reliability annotations and the weight of each verification dimension. Filling in all parts according to the framework order results in a structured report text, which is the structured inspection report for the bag.

[0115] Furthermore, the structured test report is standardized to obtain the final bag orientation test report. A preset standard format template is required. The template specifies that the font is SimSun, the font size is 12pt, the line spacing is a fixed value of 22pt, the headings are bold and left-aligned, and the body text is left-aligned with the first line indented by two characters.

[0116] Furthermore, adjust the font, font size, line spacing, and alignment of the structured test report according to the template. Add a report number at the top of the first page, consisting of the test date and the bag identification. Add signature fields for the tester and reviewer at the end of the report. Check the report content for typos or formatting errors and correct them. The final report, with the bag facing upwards, is the result of all formatting adjustments and information additions.

[0117] In summary, consistency analysis is conducted from three core dimensions: structured features, feature matching, and visual features. This comprehensively compares the alignment determination results with the bag's structured feature data, feature matching results, and the corrected bag image, avoiding the one-sidedness of single-dimensional verification and ensuring that the generated multi-dimensional verification results can fully and objectively reflect the actual reliability of the determination results.

[0118] In summary, based on the number of "consistent" dimensions in the multidimensional verification results, three confidence levels—high, medium, and low—are clearly defined, providing a clear and unified standard for the reliability of the judgment results. This solves the ambiguity caused by the lack of clear judgment criteria in traditional verification and provides precise support for subsequent reliability labeling.

[0119] In summary, by adding exclusive annotations for different confidence levels, high-confidence levels are annotated with consistent information verified across all dimensions, while medium and low-confidence levels are annotated with inconsistencies and their causes. This allows the orientation determination results to be accompanied by a complete reliability explanation, improving the interpretability of the results and making it easier for users to intuitively judge the credibility of the results.

[0120] In summary, a structured test report is constructed by integrating the unique bag identifier, test time, post-labeling judgment results, verification details, and other content into a fixed framework. This avoids the problems of disorganized content and missing key information in traditional reports, making the report logically clear, information complete, and able to comprehensively present key information throughout the entire testing process.

[0121] In summary, by using a pre-set standard format template to unify the report font, font size, and layout, and by adding a report number and signature field, a standardized final test report is formed. This not only meets the requirements for report standardization and seriousness in practical applications, but also facilitates subsequent archiving, retrieval, and reuse, further enhancing the practical value of the bag orientation test results.

[0122] like Figure 2 The diagram shown is a functional block diagram of a bag orientation detection system based on image pattern consistency provided in an embodiment of the present invention.

[0123] The bag orientation detection system 100 based on image pattern consistency described in this invention can be installed in an electronic device. Depending on the functions implemented, the bag orientation detection system 100 may include an image acquisition and correction module 101, a feature extraction and structuring module 102, a pattern matching and analysis module 103, an orientation evaluation and determination module 104, and a verification report generation module 105. The module described in this invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0124] In this embodiment, the functions of each module / unit are as follows: The image acquisition and correction module 101 is used to acquire multi-view image data of the bag and perform optical distortion correction on the multi-view image data to obtain corrected bag image data. The feature extraction and structuring module 102 is used to extract structured feature information from the corrected bag image data and generate structured feature data of the bag. The pattern matching analysis module 103 is used to perform pattern consistency analysis between the structured feature data and the pre-built standard bag feature database to obtain the feature matching result data of the bag. The orientation assessment and determination module 104 is used to assess the orientation of the bag based on the feature matching result data, and obtain the orientation determination result of the bag. The verification report generation module 105 is used to verify the credibility of the orientation determination result and obtain the final bag orientation detection report of the bag.

[0125] In the several embodiments provided by this invention, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0126] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0127] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0128] 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.

[0129] 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.

[0130] 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 bag orientation detection method based on image pattern consistency, characterized by, The method comprises: S1. Collecting multi-view image data of the bag body, and performing optical distortion correction on the multi-view image data to obtain corrected bag body image data; S2. Extracting structured feature information in the corrected bag body image data to generate structured feature data of the bag body; S3. Performing pattern consistency analysis on the structured feature data and a pre-constructed standard bag body feature database to obtain feature matching result data of the bag body; S4. Based on the feature matching result data, performing orientation evaluation on the bag body to obtain orientation determination result of the bag body; S5. Verifying the orientation determination result to obtain a final bag body orientation detection report of the bag body.

2. The bag orientation detection method based on image pattern consistency according to claim 1, wherein, The method comprises: Synchronously acquiring original images of the bag body at different angles to generate a multi-view original image data set of the bag body; Performing image quality analysis on the multi-view original image data set to obtain image quality evaluation data of the multi-view original image data set; Screening qualified image data in the image quality evaluation data; Performing optical distortion correction processing on the qualified image data to obtain preliminary corrected image data of the bag body; Performing size standardization processing on the preliminary corrected image data to obtain corrected bag body image data.

3. The bag orientation detection method based on image pattern consistency according to claim 2, wherein, The method comprises: Extracting noise feature of the image in the multi-view original image data set to obtain noise distribution feature of the image; Extracting sharpness feature of the image in the multi-view original image data set, the sharpness feature parameter of the image; Performing brightness feature analysis on the image in the multi-view original image data set, the brightness distribution feature of the image; Integrating the noise distribution feature, the sharpness feature parameter and the brightness distribution feature into the image quality feature set of the multi-view original image data set; Performing comprehensive analysis on the image quality feature set to obtain image quality evaluation data of the multi-view original image data set.

4. The bag orientation detection method based on image pattern consistency according to claim 1, wherein, The method comprises: Performing edge feature extraction on the corrected bag body image data to obtain contour feature data of the bag body; Performing corner point detection processing on the bag body based on the contour feature data to obtain key corner point position data of the bag body; Performing geometric relationship analysis on the key corner point position data to obtain geometric parameter data set of the bag body; Performing standardization processing on the geometric parameter data set to obtain standardized geometric feature data of the bag body; Verifying consistency of the standardized geometric feature data to obtain structured feature data of the bag body.

5. The bag orientation detection method based on image pattern consistency according to claim 4, wherein, The method comprises: extracting size feature parameters and angle feature parameters in the geometric parameter dataset to generate an original geometric feature set of the bag; performing outlier suppression processing on the original geometric feature set to obtain purified geometric feature data; performing normalization processing on the purified geometric feature data to obtain normalized geometric feature data of the bag.

6. The bag orientation detection method based on image pattern consistency of claim 1, wherein, The mode consistency analysis of the structured feature data with the pre-constructed standard bag feature database obtains feature matching result data of the bag, including: extracting direction distribution histogram features in the structured feature data to generate a to-be-matched feature vector of the bag; reading standard feature vectors in the standard bag feature database; calculating similarity scores between the to-be-matched feature vector and the standard feature vectors to generate a similarity set of the bag; determining the best matching standard orientation according to the highest score in the similarity set to generate the feature matching result data of the bag.

7. The bag orientation detection method based on image pattern consistency of claim 1, wherein, The orientation evaluation of the bag based on the feature matching result data obtains an orientation determination result of the bag, including: performing confidence analysis on the feature matching result data to obtain a matching confidence score of the feature matching result data; comparing and analyzing the matching confidence score with a preset threshold to determine a matching reliability level of the feature matching result data.

8. The bag orientation detection method based on image pattern consistency according to claim 7, wherein, After the comparison and analysis of the matching confidence score with the preset threshold to determine the matching reliability level of the feature matching result data, including: based on the matching reliability level, performing weighted fusion processing on the feature matching result to obtain a weighted matching result of the feature matching result data; performing orientation determination on the weighted matching result through a decision analysis process to obtain an initial orientation determination result of the weighted matching result; performing optimization processing on the initial orientation determination result to obtain the orientation determination result of the bag.

9. The bag orientation detection method based on image pattern consistency according to claim 1, wherein, The credibility verification of the orientation determination result obtains a final bag orientation detection report of the bag, including: performing multi-dimensional consistency analysis on the orientation determination result to obtain a multi-dimensional verification result of the bag; determining a credibility level of the orientation determination result according to the multi-dimensional verification result; based on the credibility level, performing reliability labeling on the orientation determination result to obtain a labeled orientation determination result; constructing a structured detection report of the bag according to the labeled orientation determination result; performing standardized format processing on the structured detection report to obtain the final bag orientation detection report of the bag.

10. A bag orientation detection system based on image pattern consistency, characterized by, The system includes: an image acquisition correction module configured to acquire multi-view image data of a bag and perform optical distortion correction on the multi-view image data to obtain corrected bag image data; a feature extraction and structuring module configured to extract structured feature information in the corrected bag image data to generate structured feature data of the bag; a pattern matching analysis module configured to perform mode consistency analysis of the structured feature data with a pre-constructed standard bag feature database to obtain feature matching result data of the bag; An orientation evaluation determination module is configured to perform orientation evaluation on the bag based on the feature matching result data, and obtain an orientation determination result of the bag. A verification report generation module is configured to perform credibility verification on the orientation determination result, and obtain a final bag orientation detection report of the bag.