A computer vision-based package void identification system, device, and method
Through a computer vision-based package void ratio recognition system, Gaussian filtering and K-Means clustering methods are used to distinguish between packaging and product areas, combined with 3D laser scanning to calculate void ratios. This solves the low efficiency and poor accuracy problems of existing packaging inspection technologies, and achieves efficient and accurate packaging analysis and optimized design.
Patent Information
- Application Number
- CN202411821237.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing packaging inspection technology mainly relies on manual inspection, which is inefficient and easily affected by subjective factors. Automated inspection technology is difficult to meet the complex and changeable packaging inspection needs, resulting in waste of resources and environmental pollution.
A computer vision-based package void ratio recognition system is adopted, including image acquisition, image preprocessing, clustering processing, area data output and 3D laser scanning modules. Gaussian filtering and K-Means clustering methods are used to distinguish the background, packaging and product areas, and 3D infrared laser scanning is used to obtain height information to calculate the void ratio.
It realizes the real-time identification of package void ratio, significantly improves the efficiency and accuracy of packaging analysis, can effectively evaluate the rationality of packaging, help enterprises optimize packaging design, reduce material waste and promote sustainable development.
Smart Images

Figure CN119919693B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, and in particular to a package porosity identification system, device and method based on computer vision. BACKGROUND
[0002] Before products are transported, they need to be wrapped with materials such as paper, plastic film, and corrugated paper. These materials are called packaging. Packaging is crucial for the circulation and safety of goods, but it also causes over-packaging, which leads to waste of resources and environmental pollution. Over-packaging, which means too many layers of packaging, too much material, too large a volume, and too high a cost, does not match the value and functional needs of the product, which increases costs and consumer burden and goes against the concept of green and sustainable development.
[0003] Currently, packaging detection technologies on the market mainly include manual detection and automated detection. Manual detection relies on the experience of detection personnel, is inefficient, and is easily affected by subjective factors, and cannot meet the needs of large-scale production. Although automated detection technology improves detection efficiency and accuracy to some extent, most existing technologies are based on traditional mechanical, electrical, and sensor technologies, which cannot meet the complex and changing needs of packaging detection. SUMMARY
[0004] Therefore, embodiments of the present application provide a package porosity identification system, device and method based on computer vision.
[0005] The first aspect of the present application provides a package porosity identification system based on computer vision, comprising an image acquisition module, an image preprocessing module, a clustering processing module, an area data output module, a three-dimensional laser scanning module, and a porosity data output module.
[0006] The image acquisition module is configured to acquire two-dimensional image information of a package to obtain first package information.
[0007] The image preprocessing module is configured to perform image preprocessing on the first package information to obtain second package information.
[0008] The clustering processing module is configured to classify pixel points of the second package information to obtain a first region, a second region, and a third region representing a background, a package, and a product of the package, respectively.
[0009] The area data output module is configured to calculate area information of the second region and the third region.
[0010] The three-dimensional laser scanning module is configured to obtain height information of the second region and the third region.
[0011] The porosity data output module is configured to calculate the porosity of the package according to the area information and the height information.
[0012] Further, the image acquisition module comprises at least one camera and a fill-in light aperture; the camera is configured to acquire two-dimensional image information of the package, and the fill-in light aperture is configured to adjust the exposure level of the package.
[0013] Further, the image preprocessing module comprises a Gaussian kernel generation module, a Gaussian filtering module, and an image integration module.
[0014] The Gaussian kernel generation module is configured to generate a Gaussian kernel.
[0015] The Gaussian filtering module is configured to perform a Gaussian filtering operation on the first package information using the Gaussian kernel.
[0016] The image integration module is configured to perform image integration on the first package information after the Gaussian filtering operation to obtain second package information.
[0017] Further, the clustering processing module classifies the pixel points of the second package information by the following steps:
[0018] determining the cluster centers of each cluster of the second package information; the clusters include a background, a package, and a product;
[0019] calculating the Euclidean distances of each pixel point of the second package information to the cluster centers;
[0020] assigning the pixel points to the cluster with the lowest Euclidean distance of each pixel point according to the Euclidean distance;
[0021] combining the pixel points under each cluster to form a first region, a second region, and a third region representing the background, the package, and the product of the package.
[0022] Further, before the step of combining the pixel points under each cluster, the following steps are further included:
[0023] calculating the mean value of the feature vectors of all pixel points in each cluster; the feature vectors include color;
[0024] moving the cluster center of each cluster according to the mean value of the feature vectors;
[0025] returning to the step of calculating the Euclidean distances of each pixel point of the second package information to the cluster centers, and re-performing the pixel point assignment operation until a preset iteration number is reached or the moving distance of the cluster center is less than a preset threshold.
[0026] Further, the following steps are further included:
[0027] The clustering effect of the clustering processing module is determined using a contour coefficient; the contour coefficient expression is:
[0028]
[0029] Wherein, a(i) is the average distance of the i-th pixel point to other pixel points in the same cluster, b(i) is the average distance of the i-th sample to all pixel points in other clusters, and S(i) represents the contour coefficient of the i-th sample.
[0030] Further, the three-dimensional laser scanning module includes a three-dimensional infrared laser scanner, which emits infrared laser to the package, and determines the height information of the second region and the third region according to the flight time of the reflected laser.
[0031] Further, the void ratio data output module calculates the package void ratio through the following expression:
[0032]
[0033] Wherein, Si, Li represent the area information and height information of the third region; S, L represent the area information and height information of the second region, i represents the i-th package, and n represents the total number of packages.
[0034] The second aspect of the present application provides an electronic device for realizing the computer vision-based package void ratio identification system of the first aspect, comprising a measurement platform, a processor and a display;
[0035] The measurement platform comprises a base, a camera, an adjustable aperture and a three-dimensional infrared laser scanner;
[0036] Wherein, the base is used for placing the package; a rotating platform and a rotating vertical rod are arranged on the base; the rotating platform is connected with the rotating vertical rod to rotate the package and / or the rotating vertical rod; a horizontal moving bracket is arranged on the rotating vertical rod;
[0037] The camera and the adjustable aperture realize the function of the image acquisition module; the adjustable aperture is connected to the horizontal moving bracket through an aperture holder; the camera is fixed to the horizontal moving bracket through a camera holder; the horizontal moving bracket can move the camera and / or the adjustable aperture in the horizontal direction;
[0038] The three-dimensional infrared laser scanner realizes the function of the three-dimensional laser scanning module; the three-dimensional infrared laser scanner is connected to the rotating vertical rod through a fixed sliding block; the fixed sliding block can move the three-dimensional infrared laser scanner in the horizontal direction;
[0039] The image preprocessing module, the clustering processing module, the area data output module and the porosity data output module are integrated in the processor, the image preprocessing module, the clustering processing module, the area data output module and the porosity data output module realize corresponding functions, and the package porosity is output.
[0040] The display is used for showing the package porosity.
[0041] The third aspect of the present application discloses a package porosity identification method based on computer vision, applied to the package porosity identification system based on computer vision, comprising the following steps:
[0042] Obtaining two-dimensional image information of the package;
[0043] Determining the area representing the background, the area representing the package and the area representing the product in the two-dimensional image information;
[0044] Calculating the area information of the area representing the package and the area representing the product respectively;
[0045] Obtaining the height information of the area representing the package and the area representing the product respectively through three-dimensional laser scanning technology;
[0046] According to the area information and the height information of the area representing the package and the area representing the product respectively, the porosity of the package is calculated.
[0047] The embodiment of the present application also discloses a computer program product or a computer program, the computer program product or the computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the preceding method.
[0048] The embodiment of the present application has the following aspects: the package porosity identification system, device and method based on computer vision realize real-time identification of the package porosity, significantly improve the efficiency and accuracy of packaging analysis. The present application realizes accurate processing of the package image through Gaussian filter denoising and clustering method, can effectively distinguish the background, packaging and product in the image, and obtain more accurate area information. The present application can effectively evaluate the rationality of the packaging, has good expansibility and adaptability, can be widely applied to packaging analysis of various products, helps enterprises to optimize packaging design, reduces material waste, and promotes sustainable development. The present application is especially suitable for the fields of fast consumer goods and electronic products.
[0049] Additional aspects and advantages of the present application will be given in the following description section, some of which will become apparent from the following description, or will be understood by those skilled in the art through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 The present invention is a schematic diagram of the implementation process of a package void ratio recognition system based on computer vision.
[0052] Figure 2 It is a schematic diagram of the electronic device architecture of the present invention.
[0053] Figure 3 It is a schematic diagram of the measurement platform architecture of the electronic device of the present invention.
[0054] Figure 4 The figure is a flowchart of the steps of the package void ratio identification method based on computer vision of the present invention.
[0055] Figure numerals: 1-fixed slider, 2-three-dimensional infrared laser scanner, 3-rotating pole, 4-camera holder, 5-camera, 6-aperture holder, 7-adjustable aperture, 8-rotating platform, 9-base, 10-horizontally movable bracket. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0057] Before products are shipped out of the warehouse, they must be wrapped in materials such as paper, plastic film, and corrugated paper. This material is called packaging. While packaging is crucial to the circulation and safety of goods, it also leads to the problem of overpackaging, which wastes resources and pollutes the environment. Excessive packaging, defined as excessive packaging with too many layers, inappropriate materials, excessive volume, and high costs, is inconsistent with the product's value and functional requirements. This increases costs and burdens consumers, and violates the concept of green and sustainable development.
[0058] Currently, packaging inspection technologies on the market primarily include manual inspection and automated inspection. Manual inspection relies on the experience of inspectors, is inefficient, and is susceptible to subjective factors, making it inadequate for large-scale production. While automated inspection technology has improved efficiency and accuracy to a certain extent, existing technologies, mostly based on traditional mechanical, electrical, and sensor technologies, struggle to meet the complex and ever-changing demands of packaging inspection.
[0059] As a new automatic detection technology, computer vision technology shows great potential in the field of packaging detection due to its high precision, speed and flexibility. Therefore, the embodiment of the present application proposes a package porosity identification system, device and method based on computer vision, aiming to solve the above problems.
[0060] As shown in Figure 1 The first embodiment of the present application provides a package porosity identification system based on computer vision, which comprises an image acquisition module, an image preprocessing module, a clustering processing module, an area data output module, a three-dimensional laser scanning module and a porosity data output module. The image acquisition module is used to acquire two-dimensional image information of the package to obtain first package information. The image preprocessing module is used to perform image preprocessing on the first package information to obtain second package information. The clustering processing module is used to classify the pixel points of the second package information to obtain a first region, a second region and a third region representing the background, the packaging and the product of the package, respectively. The area data output module is used to calculate the area information of the second region and the third region. The three-dimensional laser scanning module is used to obtain the height information of the second region and the third region. The porosity data output module is used to calculate the porosity of the package according to the area information and the height information.
[0061] The embodiment of the present application realizes real-time identification of package porosity, significantly improving the efficiency and accuracy of packaging analysis.
[0062] The implementation effects of each module of the system of the present application are described below:
[0063] Image acquisition module: the image acquisition module in the embodiment of the present application comprises at least one camera and a fill light aperture; the camera is used to acquire two-dimensional image information of the package, and the fill light aperture is used to adjust the exposure level of the package. In the embodiment of the present application, the camera is arranged at the top end of the package, and the acquired two-dimensional image information is a top view of the package. As a preferred embodiment, multiple cameras can be arranged, and multiple cameras at different positions can acquire two-dimensional image information of the package from different angles to offset the deviation caused by the viewing angle and light. The adjustable aperture can control the light environment around the package, so that the package can be photographed in a suitable exposure environment. The image acquisition module of the present application can obtain clear package images under different environmental conditions through the cooperation of the camera and the fill light aperture, and provide high-quality image data basis for subsequent image processing.
[0064] Image preprocessing module: the two-dimensional image information acquired by the image acquisition module may be affected by factors such as uneven illumination and noise interference. Therefore, image preprocessing is needed to improve the accuracy of subsequent clustering algorithms. The image preprocessing module in the embodiment of the present application comprises a Gaussian kernel generation module, a Gaussian filter module and an image integration module.
[0065] The Gaussian kernel generation module is configured to generate a Gaussian kernel. The Gaussian kernel size determined in the embodiment of the application is (2x1+1)x(2x1+1), which is represented as a 3x3 matrix. The center point of the matrix is (0, 0), the radius r = 1, and the x and y value ranges of the Gaussian kernel are [-1, 1].
[0066] The Gaussian filtering module is configured to perform Gaussian filtering on the first wrapping information using the Gaussian kernel. For each pixel point (x, y) in the Gaussian kernel, the corresponding Gaussian value is calculated by the following formula:
[0067]
[0068] wherein σ is the standard deviation of the Gaussian distribution.
[0069] The expression for performing the filtering operation on the Gaussian kernel is:
[0070] l'(x, y) = (l * G)(x, y) =∑ m=-k ∑ n=-k l(x+m, y+n)·G(m, n);
[0071] wherein l(x, y) is the pixel value of the original image at point (x, y), l'(x, y) is the pixel value of the image after Gaussian filtering at point (x, y), G(m, n) is the value of the Gaussian kernel at position (m, n), and k is the radius of the Gaussian kernel, which is 1 in the application. m represents the offset of the convolution kernel in the horizontal direction, and the value range is [-k, k]. n represents the offset of the convolution kernel in the vertical direction, and the value range is also [-k, k].
[0072] The image integration module is configured to perform image integration on the first wrapping information after the Gaussian filtering operation to obtain second wrapping information. If multiple cameras are set in the image acquisition module, multiple two-dimensional image information of the wrapped image after the Gaussian filtering operation is obtained, and the image integration module integrates the multiple two-dimensional images into one two-dimensional image as the second wrapping information, which can eliminate the influence of light, viewing angle and other factors on image recognition.
[0073] The clustering processing module: in the embodiment of the application, the RGB color value is selected as the feature vector, and the second wrapping information is placed in the RGB color space for clustering operation. In another part of the embodiment, the texture feature, geometric moment feature and the like or a combination thereof can also be selected as the feature vector for clustering operation. After the second wrapping information is placed in the RGB color space, each pixel point in the image is represented in the form of a two-dimensional array.
[0074] The K-Means clustering method is used for clustering the pixel points in the embodiments of the present application, and the clustering operation specifically includes the following steps.
[0075] First, the cluster centers of each cluster of the second package information are determined. The clusters set in the embodiments of the present application include background, package and product, which respectively represent the background area, the package area and the product area in the image.
[0076] Second, the Euclidean distance of each pixel point of the second package information to the cluster center is calculated. Specifically, the Euclidean distance d(x i ,c k ) is used to measure the similarity between each pixel point (feature point) in the image and the current cluster center. Specifically, the clustering algorithm calculates the distance of each pixel point to all cluster centers, and assigns the pixel to the cluster represented by the cluster center with the shortest distance.
[0077] The expression of the Euclidean distance is as follows:
[0078]
[0079] In the formula, x i is the feature vector (RGB color value in the embodiments of the present application) of the current pixel, and c k is the kth cluster center. In this way, the clustering algorithm can effectively classify each pixel point in the image as product, background or package, and then form the background area, the package area and the product area.
[0080] In some embodiments, the clustering algorithm further includes the step of iterative optimization. Specifically, the step includes the following steps:
[0081] Calculate the mean value of the feature vector of all pixel points in each cluster; the feature vector includes color;
[0082] According to the mean value of the feature vector, move the cluster center of each cluster;
[0083] Return to the step of calculating the Euclidean distance of each pixel point of the second package information to the cluster center, and re-perform the pixel point assignment operation until a preset number of iterations is reached or the moving distance of the cluster center is less than a preset threshold.
[0084] In each iteration, the step of updating the cluster center aims to make the cluster more accurate by calculating the mean value of all pixel points belonging to each cluster. This process can ensure that the cluster center is constantly moving towards the "center" of the pixel distribution of its own category, so as to better represent the category.
[0085] The expression of updating the cluster center is as follows:
[0086]
[0087] where N k is the number of pixels assigned to cluster C k x i is the feature vector of these pixels. After updating the cluster centers, the clustering algorithm will again calculate the distance of each pixel to the new cluster center and reassign the cluster. This process will be iterated until the moving distance of the cluster center is less than a preset threshold, or a predetermined number of iterations is reached.
[0088] In some embodiments, after completing the clustering operation of the pixels, a step of evaluating the clustering effect is further included. The embodiment of the present application uses the contour coefficient to judge the clustering effect of the clustering processing module; the contour coefficient expression is:
[0089]
[0090] where a(i) is the average distance of the i-th pixel to other pixels in the same cluster, b(i) is the average distance of the i-th sample to all pixels in other clusters, and S(i) represents the contour coefficient of the i-th sample. The larger the contour coefficient value, the better the clustering algorithm effect, and a negative value indicates a poor clustering effect.
[0091] Area data output module: the area data output module of the embodiment of the present application outputs the area information of the actual packaging region and the product region after K-Means clustering processing, and visualizes the clustering, converts the area in pixel units into actual physical units, and obtains the third area S i of the product, which represents A1, and the second area S of the packaging, which represents A2.
[0092] Three-dimensional laser scanning module: the embodiment of the present application uses a three-dimensional infrared laser scanner to acquire depth information of the collected packaging image, determines the light distance by emitting infrared laser pulses and measuring the time of flight required for them to reflect back from the package, and further obtains the depth information of each position of the package. The second area height of the packaging is represented by L, and the third area depth of the product is represented by L i , which provides basic data for subsequent void ratio calculation.
[0093] Void ratio data output module: the void ratio data output module of the embodiment of the present application calculates the package void ratio through the following expression:
[0094]
[0095] where Si and Li represent the area information and height information of the third region; S and L represent the area information and height information of the second region, i represents the i-th package, and n represents the total number of packages.
[0096] The beneficial effects of the embodiments of the present application are:
[0097] 1. Automatically identify and calculate the packaging void ratio, significantly improve the efficiency and accuracy of packaging analysis.
[0098] 2. Through Gaussian filter denoising and K-Means clustering method, accurate processing of packaging image is realized, which can effectively distinguish background area, packaging area and product area, so as to obtain more accurate area information.
[0099] 3. According to the height of image sensor and the area of platform related proportion, the actual packaging area and product area information can be output, which provides reliable basic data for subsequent packaging void ratio calculation.
[0100] 4. Real-time identification of packaging void ratio is realized, and data support for packaging design optimization is also provided. By analyzing the area and height information of product and packaging, the rationality of packaging can be effectively evaluated, which helps enterprises optimize packaging design, reduces material waste and promotes sustainable development.
[0101] The second embodiment of the present application provides an electronic device for realizing the computer vision-based package void ratio identification system of the first embodiment. As shown in Figure 2 , the device includes a measurement platform, a processor and a display, and the measurement platform, the processor and the display are connected through a communication serial bus.
[0102] As shown in Figure 3 , the measurement platform includes a base, a camera, an adjustable aperture and a three-dimensional infrared laser scanner.
[0103] Among them, the base is used to place the package; the base is provided with a rotating platform and a rotating vertical rod; the rotating platform is connected with the rotating vertical rod to rotate the package and / or the rotating vertical rod; the rotating vertical rod is provided with a horizontal moving bracket.
[0104] The camera and the adjustable aperture realize the function of the image acquisition module; the adjustable aperture is connected to the horizontal moving bracket through the aperture holder; the camera is fixed to the horizontal moving bracket through the camera holder; the horizontal moving bracket can move the camera and / or the adjustable aperture in the horizontal direction to realize multi-angle package identification.
[0105] The three-dimensional infrared laser scanner realizes the function of the three-dimensional laser scanning module; the three-dimensional infrared laser scanner is connected to the rotating vertical rod through the fixed sliding block; the fixed sliding block can move the three-dimensional infrared laser scanner in the horizontal direction.
[0106] The image preprocessing module, the clustering processing module, the area data output module and the porosity data output module are integrated in the processor, the image preprocessing module, the clustering processing module, the area data output module and the porosity data output module realize corresponding functions, and the porosity of the package is output.
[0107] The display is used for displaying the porosity of the package, and can also display intermediate information such as area data and depth data.
[0108] The third embodiment of the present application discloses a package porosity identification method based on computer vision, which is applied to the package porosity identification system based on computer vision of the first embodiment. Figure 4 As shown in the figure, the method comprises the following steps:
[0109] S1. Obtain two-dimensional image information of the package;
[0110] S2. Determine the area representing the background, the area representing the package and the area representing the product in the two-dimensional image information;
[0111] S3. Calculate the area information of the area representing the package and the area representing the product respectively;
[0112] S4. Obtain the height information of the area representing the package and the area representing the product respectively through a three-dimensional laser scanning technology;
[0113] S5. Calculate the porosity of the package according to the area information and the height information of the area representing the package and the area representing the product respectively.
[0114] The function realized by the method embodiment is the same as that of the system embodiment, and the beneficial effects achieved are also the same as those achieved by the system.
[0115] The embodiment also provides a computer program product, when the computer program product runs on a computer, so that the computer executes the above-mentioned related steps to realize the package porosity identification method based on computer vision provided by the above-mentioned embodiment.
[0116] Those skilled in the art can understand that the modules in the device in the embodiments of the present application can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments of the present application can be combined into one module or unit or component, and furthermore can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, all combinations of all features disclosed in the present specification (including the corresponding claims, abstract and drawings) and all processes or units of any methods or apparatuses disclosed herein can be adopted. Unless explicitly stated otherwise, each feature disclosed in the present specification (including the corresponding claims, abstract and drawings) can be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0117] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0118] In addition, each embodiment in the present specification is described in a progressive manner, and the same or similar parts between embodiments can be referred to. Especially, for the device, apparatus and the like embodiments, since they are basically similar to the method embodiments, the relevant parts can be referred to the part of the description of the method embodiments. The above described device, apparatus and the like embodiments are only illustrative, and the modules, units and the like described as separate components can be or can not be physically separated, that is, they can be located in one place, or can be distributed to multiple places, such as nodes of a system network. Specifically, part or all of the modules, units can be selected to achieve the purpose of the above embodiment scheme according to actual needs. Those skilled in the art can understand and implement without paying creative labor.
[0119] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0120] In addition, the terms "first", "second", and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the descriptive terms "first", "second", etc. are to be interpreted, by those skilled in the art, as a structural or positional description and not by a chronological or serial order, unless explicitly so defined by the claims. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting, unless explicitly defined as such.
[0121] In the description of the present application, the meaning of the term "a plurality" is at least two or two or more, for example, two, three, four, and the like, unless specifically defined otherwise in the embodiments.
[0122] While the embodiments of the present application have been illustrated and described, it is understood that the embodiments described are exemplary only and not limiting, as the scope of the application is variously defined by the appended claims. Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that fall within the scope of the claims, together with all of the alternatives and equivalents thereof. It is intended that the description and examples be considered exemplary only, with the true scope and spirit of the application being indicated by the following claims.
Claims
1. A package void ratio recognition system based on computer vision, characterized in that: It includes image acquisition module, image preprocessing module, clustering processing module, area data output module, 3D laser scanning module and void ratio data output module; The image acquisition module is used to acquire two-dimensional image information of the package to obtain first package information; The image preprocessing module is used to perform image preprocessing on the first package information to obtain second package information; The clustering processing module is used to classify pixels of the second package information to obtain a first region, a second region, and a third region representing the background, packaging, and product of the package, respectively; The area data output module is used to calculate the area information of the second area and the third area; The three-dimensional laser scanning module is used to obtain height information of the second area and the third area; The void ratio data output module is used to calculate the void ratio of the package based on the area information and height information; The clustering processing module classifies the pixels of the second package information through the following steps: Determining cluster centers of each cluster of the second package information; the clusters include background, packaging, and product; Calculating the Euclidean distance between each pixel of the second package information and the cluster center; According to the Euclidean distance of each pixel, the pixel is assigned to the cluster with the lowest Euclidean distance; Combining the pixels in each cluster to form a first region, a second region, and a third region representing the background, packaging, and product of the package; Before the step of combining the pixels in each cluster, the following steps are also included: Calculating the mean of the feature vectors of all pixels in each cluster; the feature vectors include colors; Moving the cluster center of each cluster according to the mean of the eigenvector; Returning to the step of calculating the Euclidean distance between each pixel of the second package information and the cluster center, re-performing the pixel allocation operation until a preset number of iterations is reached or the moving distance of the cluster center is less than a preset threshold; The following steps are also included: The silhouette coefficient is used to judge the clustering effect of the clustering processing module; the silhouette coefficient expression is: Among them, a(i) is the average distance from the i-th pixel to other pixels in the same cluster, b(i) is the average distance from the i-th sample to all pixels in other clusters, and s(i) represents the silhouette coefficient of the i-th sample.
2. The computer vision-based package void ratio recognition system according to claim 1, characterized in that: The image acquisition module includes at least one camera and a fill light aperture; the camera is used to acquire two-dimensional image information of the package, and the fill light aperture is used to adjust the exposure level of the package.
3. The computer vision-based package void ratio recognition system according to claim 1, characterized in that: The image preprocessing module includes a Gaussian kernel generation module, a Gaussian filtering module and an image integration module; The Gaussian kernel generation module is used to generate a Gaussian kernel; The Gaussian filtering module is used to perform a Gaussian filtering operation on the first package information using the Gaussian kernel; The image integration module is used to perform image integration on the first package information after the Gaussian filtering operation to obtain second package information.
4. The computer vision-based package void ratio recognition system according to claim 1, characterized in that: The three-dimensional laser scanning module includes a three-dimensional infrared laser scanner, which emits infrared laser to the package and determines the height information of the second area and the third area according to the flight time of the reflected laser.
5. The computer vision-based package void ratio recognition system according to claim 1, characterized in that: The void ratio data output module calculates the package void ratio by the following expression: Among them, Si and Li represent the area information and height information of the third area; S and L represent the area information and height information of the second area, i represents the i-th package, and n represents the total number of packages.
6. An electronic device for implementing the package void ratio identification system based on computer vision according to any one of claims 1 to 5, characterized in that: Includes measurement platform, processor and display; The measuring platform includes a base, a camera, an adjustable aperture and a three-dimensional infrared laser scanner; The base is used to place the package; a rotating platform and a rotating pole are provided on the base; the rotating platform is connected to the rotating pole to rotate the package and / or the rotating pole; a horizontal movable bracket is provided on the rotating pole; The camera and the adjustable aperture realize the functions of the image acquisition module; the adjustable aperture is connected to the horizontal movable bracket via an aperture clamp; the camera is fixed to the horizontal movable bracket via a camera clamp; the horizontal movable bracket can move the camera and / or the adjustable aperture in the horizontal direction; The three-dimensional infrared laser scanner realizes the function of the three-dimensional laser scanning module; the three-dimensional infrared laser scanner is connected to the rotating vertical pole through a fixed slider; the fixed slider can move the three-dimensional infrared laser scanner in the horizontal direction; The processor integrates the image preprocessing module, clustering processing module, area data output module and void ratio data output module to realize the corresponding functions of the image preprocessing module, clustering processing module, area data output module and void ratio data output module, and outputs the void ratio of the package; The display is used to display the void ratio of the package.
7. A computer vision-based package void ratio identification method, applied to the computer vision-based package void ratio identification system according to any one of claims 1 to 5, characterized in that: The following steps are involved: Obtain the two-dimensional image information of the package; determining an area representing a background, an area representing a package, and an area representing a product in the two-dimensional image information; Calculating area information of each of the area representing the package and the area representing the product; Acquire the height information of the area representing the packaging and the area representing the product by using 3D laser scanning technology; The void ratio of the package is calculated based on the area information and height information of the area representing the package and the area representing the product.
Citation Information
Patent Citations
Retinal vessel segmentation method based on kernel intuition fuzzy C-means clustering
CN116309633A
Gray code binarization method based on boundary line detection technology
CN118229970A