CN114492681A - Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof - Google Patents
Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof Download PDFInfo
- Publication number
- CN114492681A CN114492681A CN202210408602.5A CN202210408602A CN114492681A CN 114492681 A CN114492681 A CN 114492681A CN 202210408602 A CN202210408602 A CN 202210408602A CN 114492681 A CN114492681 A CN 114492681A
- Authority
- CN
- China
- Prior art keywords
- matching
- key point
- distance
- group
- pair
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000004806 packaging method and process Methods 0.000 title claims abstract description 53
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 15
- 239000011159 matrix material Substances 0.000 claims description 21
- 238000013461 design Methods 0.000 claims description 3
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 238000004519 manufacturing process Methods 0.000 abstract description 4
- 238000005457 optimization Methods 0.000 abstract description 2
- 238000004049 embossing Methods 0.000 description 12
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 11
- 239000010931 gold Substances 0.000 description 11
- 229910052737 gold Inorganic materials 0.000 description 11
- 230000008569 process Effects 0.000 description 10
- 238000012856 packing Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000003909 pattern recognition Methods 0.000 description 2
- 230000000087 stabilizing effect Effects 0.000 description 2
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the field of data identification, in particular to a method for identifying a color printing packaging pattern by using electronic equipment and a computer vision system, wherein the method is a method for identifying by using the electronic equipment and comprises the following steps: acquiring a template image and a target image corresponding to the packaging box by using electronic equipment, and completing matching of each first key point of the template image and each second key point of the target image to obtain each matching pair; calculating the matching degree of each matching pair by using a Thiessen polygon algorithm; setting a rotation angle interval, rotating the target image, wherein each matching pair has a corresponding matching degree under each rotation angle; recording the rotation angle corresponding to the maximum matching degree of each matching pair as a first angle; adjusting the packaging box corresponding to the target image according to the first angle, namely adjusting the packaging box by the appropriate method; meanwhile, the method can be used for an artificial intelligence system or an artificial intelligence optimization operation system in the production field, and the package pattern is identified by using computer vision software to realize the identification and adjustment of the position data.
Description
Technical Field
The invention relates to the field of pattern recognition, in particular to a method for recognizing color printing packaging patterns by using electronic equipment and a computer vision system.
Background
Along with the continuous improvement of the living standard of people, the demand of people on the packaging product is no longer single practicability, and the attractiveness, the artistry and the collection value of the packaging product are better emphasized on the basis of the practicability; in recent years, high-grade exquisite packaging products replace the previous simple color type packaging products, the gold stamping embossing is one of high-grade exquisite packaging modes and is an important process for integral decoration after printing, and the gold stamping embossing refers to the mode of packaging products by combining the gold stamping process and the embossing process, so that the mode plays a unique decoration role for the packaging products and is deeply concerned and favored by people.
The quality and the accuracy and the attractiveness of gold stamping patterns on the packaging box have great influence on the quality of the packaging box, the traditional gold stamping pattern embossing process of the packaging box is manually operated, the method determines whether the gold stamping patterns are correctly placed by means of judgment of human eyes, the embossing effect of the gold stamping patterns is completely determined by subjective judgment of workers, the gold stamping patterns have great randomness and errors, meanwhile, psychological factors, visual fatigue, the surrounding environment and the like of the operators influence the final embossing effect, and the stability and the reliability of the quality of the whole batch of products cannot be guaranteed.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method for identifying a color-printed packaging pattern by using an electronic device, which adopts the following technical solutions:
respectively acquiring a template image and a target image corresponding to the packaging box;
respectively acquiring each first key point on the template image and a first feature descriptor corresponding to the first key point, and each second key point on the target image and a second feature descriptor corresponding to the second key point by using a sift algorithm;
calculating the matching distance between each first key point and each second key point according to the first feature descriptors and the second feature descriptors to obtain corresponding matching distance matrixes;
according to the matching distance matrix, matching of each first key point and each second key point is completed, and each matching pair is obtained;
based on the matching distance, respectively obtaining Thiessen polygons corresponding to the first key points and the second key points through a Thiessen polygon algorithm;
respectively calculating the distance from each first key point and each second key point to all edge pixel points on the corresponding Thiessen polygon, wherein the distance is used for calculating the matching degree of each matching pair;
setting a rotation angle interval, performing rotation operation on the target image, and obtaining a new distance corresponding to each second key point at each rotation angle; recalculating the matching degree of each matching pair according to the new distance; obtaining a rotation angle corresponding to the maximum matching degree of each matching pair; and denote it as a first angle;
and adjusting the packaging box corresponding to the target image according to the first angle.
Further, the matching distance is:
wherein,for the a-dimensional feature of the first feature descriptor,dimension a second feature describes the a-th dimension feature of the child.
Further, the method for acquiring each matching pair comprises: forming a matching pair by the first key point and the second key point corresponding to the minimum matching distance in the matching distance matrix; and deleting the numerical values of the corresponding rows and columns of the matching pair in the matching distance matrix, updating the matching distance matrix to obtain a new matching distance matrix, forming a matching pair by a first key point and a second key point corresponding to the minimum matching distance in the new matching distance matrix, and so on to obtain each matching pair.
Further, the matching degree is:
wherein,the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;to getAndis taken as the smaller value ofThe value of (a) is selected,to take a sum of 0The greater of the number of the first to the second,to take a sum of 0The larger of these.
Further, grouping the matching pairs according to the maximum matching degree, and the specific steps are as follows: and setting a first threshold and a second threshold, wherein the first threshold is smaller than the second threshold, the matching pair corresponding to the maximum matching degree larger than the second threshold is recorded as a 1 st group, the matching pair corresponding to the maximum matching degree larger than the first threshold and smaller than the second threshold is recorded as a 2 nd group, and the matching pair corresponding to the maximum matching degree smaller than the first threshold is recorded as a 3 rd group.
Furthermore, when the packaging box corresponding to the target image is adjusted, the method also comprises the steps of calculating the corner of the target image,
the turning angle is as follows:
wherein,for the total number of matched pairs in group 1,for the total number of matched pairs in group 2,the total number of matched pairs in group 3;for the first angle corresponding to the tth matching pair in group 1,for the first angle corresponding to the jth matching pair in group 2,a first angle corresponding to the kth matching pair in the 3 rd group;for the minimum matching distance of each matching pair in group 1,for the minimum matching distance of each matching pair in group 2,the minimum matching distance of each matching pair in the 3 rd group;are normalized coefficients.
Further, when the Thiessen polygon is obtained, the expanding speed is calculated, and the expanding speed is obtained based on the matching distance.
The invention also provides a computer vision system comprising a processor and a memory, the processor executing a program stored in the memory for identifying a method for color printing a packaging design using an electronic device.
The embodiment of the invention at least has the following beneficial effects:
the invention relates to the field of pattern recognition, in particular to a method and a system for recognizing color printing packaging patterns by using electronic equipment, wherein the method is a method for recognizing by using the electronic equipment and comprises the following steps: acquiring a template image and a target image corresponding to the packaging box by using electronic equipment, and completing matching of each first key point of the template image and each second key point of the target image to obtain each matching pair; calculating the matching degree of each matching pair by utilizing a Thiessen polygon algorithm; setting a rotation angle interval, rotating the target image, wherein each matching pair has a corresponding matching degree under each rotation angle; recording the rotation angle corresponding to the maximum matching degree of each matching pair as a first angle; adjusting the packaging box corresponding to the target image according to the first angle; the method can accurately match each first key point of the template image with each second key point of the target image, and the packaging box corresponding to the target image is placed at the appointed position through the first angle to complete the embossing operation. Meanwhile, the method can be used for an artificial intelligence system or an artificial intelligence optimization operation system in the production field, and the package pattern is identified by using computer vision software to realize the adjustment of the position of the package pattern. The invention ensures the stability, reliability and high precision of the gold stamping pattern embossing quality of the packing box, can realize high-efficiency and high-quality production of products and improves the economic benefit for enterprises.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart illustrating steps of a method for recognizing a color-printed packaging pattern using an electronic device according to the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method and a system for identifying color-printed packaging patterns by using electronic equipment according to the present invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The specific scenes aimed by the invention are as follows: and (3) embossing the packaging box, putting the packaging box which is subjected to the gold stamping process at a specified position to complete the embossing operation, wherein the packaging box to be subjected to the embossing operation already contains gold stamping patterns.
Referring to fig. 1, a flowchart illustrating steps of a method for identifying a color-printed packaging pattern by using an electronic device according to an embodiment of the present invention is shown, the method including the steps of:
step 1, respectively obtaining a template image and a target image corresponding to the packaging box.
Specifically, the template image is the image information corresponding to the packaging box at the designated position, so that the embossing operation can be accurately completed, and the target image is the image information corresponding to the packaging box at any position within a certain range.
Acquiring a template image and a target image corresponding to the packaging box through a camera arranged at a specific position of a production line; the light source used in the image acquisition of the present embodiment is a blue strip light, and the package box is illuminated from the side surface.
It should be noted that, because the gilt pattern of the hardcover box has the characteristics of high brightness and high light reflection, when the light source irradiates the gilt pattern of the packing box, the obtained image information may have the phenomena of local highlight, blurred edge, and the like, which is not favorable for the pattern collection of the packing box and the identification of the gilt pattern. Therefore, the invention adopts blue strip light as the illumination light source to illuminate from the side surface of the packaging box, thereby effectively avoiding the conditions of local highlight, blurred edge and the like of the obtained image.
And 2, respectively acquiring each first key point on the template image and a first feature descriptor corresponding to the first key point, and each second key point on the target image and a second feature descriptor corresponding to the second key point by using a sift algorithm.
The specific process of acquiring each first key point and the corresponding first feature descriptor by using the sift algorithm is as follows:
1. generating a Gaussian difference pyramid according to the template image to complete the construction of a scale space; 2. detecting a spatial extreme point, namely performing primary investigation on a first key point; 3. stabilizing the accurate positioning of the first key point, and 4, stabilizing the direction information distribution of the first key point; 5. acquiring a first feature descriptor corresponding to the first key point; wherein the first feature descriptor is a 128-dimensional vector having 128-dimensional features; each first key point and the corresponding feature descriptor on the template image cover most information of the template image. The specific operation process of sift is a known technique, and this embodiment is only briefly described and will not be described in detail.
Similarly, each second key point and the corresponding second feature descriptor are obtained by the steps through the sift algorithm.
And 3, calculating the matching distance between each first key point and each second key point according to the first feature descriptors and the second feature descriptors to obtain a corresponding matching distance matrix.
The matching distance is as follows:
wherein,for the a-dimensional feature of the first feature descriptor,dimension a of the second feature descriptor
The matching distance represents the similarity between the first key point and the second key point, and when any two first feature descriptors are similar to the second feature descriptor, the similarity between the corresponding first key point and the corresponding second key point is higher, and the matching distance is smaller.
And 4, completing the matching of each first key point and each second key point according to the matching distance matrix, and further obtaining each matching pair.
Specifically, the method for acquiring each matching pair comprises the following steps: forming a matching pair by the first key point and the second key point corresponding to the minimum matching distance in the matching distance matrix; and deleting the numerical values of the corresponding rows and columns of the matching pair in the matching distance matrix, updating the matching distance matrix to obtain a new matching distance matrix, forming a matching pair by a first key point and a second key point corresponding to the minimum matching distance in the new matching distance matrix, and so on to obtain each matching pair.
And according to the description, continuously updating the matching distance matrix, acquiring the matching pairs until all the second key points find the first key points matched with the second key points or all the first key points finish matching, and stopping updating the matching distance matrix.
And 5, respectively obtaining the Thiessen polygons corresponding to the first key points and the second key points through the Thiessen polygon algorithm based on the matching distance.
Specifically, the thiessen polygon is a group of continuous polygons composed of perpendicular bisectors connecting two adjacent point line segments, and in the prior art, the method for obtaining the thiessen polygon is as follows: the characteristic points are obtained in a mode of expanding outwards at the same speed, because the characteristic points expand outwards at the same speed, the meeting point is the middle point of the connecting line of the corresponding two characteristic points, the line which passes through the middle point and is vertical to the connecting line of the two characteristic points is the boundary line of the two characteristic points, and a plurality of boundary lines around the characteristic points form a Thiessen polygon of the characteristic points.
Preferably, the feature point of the template image is a first key point, the feature point of the target image is a second key point, the tesson polygon corresponding to the first key point and the second key point in this embodiment does not adopt the same speed to expand outward, but calculates the expansion speed corresponding to the first key point and the second key point according to the matching distance corresponding to the matching, specifically, the calculation formula of the expansion speed is:,to match the expansion velocities of the first and second keypoints corresponding to pair r,to match the matching distance between the first keypoint and the second keypoint corresponding to the pair r,is a coefficient; the smaller the matching distance corresponding to the matching pair is, the greater the expansion speed corresponding to the first key point and the second key point is.
Step 6, respectively calculating the distances from the first key point and the second key point to all edge pixel points on the corresponding Thiessen polygon; and calculating the matching degree of each matching pair according to the distance.
The matching degree is as follows:
wherein,the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;to getAndis taken as the smaller value ofThe value of (a) is selected,to take a sum of 0The greater of the number of the first to the second,to take a sum of 0The larger of these.
In this embodiment, each first key point and each second key point have their corresponding distance sequences, and the method for obtaining the distance sequence of a first key point is as follows: recording the edge pixel point corresponding to the Thiessen polygon right above the first key point as the 1 st edge pixel point, calculating the distance from the first key point to the 1 st edge pixel point corresponding to the Thiessen polygon, and recording the distance as the 1 st edge pixel pointSequentially obtaining the distances from the first key point to all edge pixel points corresponding to the Thiessen polygon according to a clockwise sequence, and further obtaining a distance sequence of the first key point,WhereinCorresponding the total number of edge pixel points of the Thiessen polygon to the first key point; similarly, a distance sequence of the second key point is obtained,Whereinand the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point. Distance sequenceAnd distance sequenceThe more similar, the higher the matching degree of the corresponding matching pair.
Step 7, setting a rotation angle interval, performing rotation operation on the target image, and obtaining a new distance corresponding to each second key point at each rotation angle; recalculating the matching degree of each matching pair according to the new distance; obtaining a rotation angle corresponding to the maximum matching degree of each matching pair; and this is denoted as the first angle.
In the embodiment, the rotation angle interval is set to 5 degrees, and the rotation angles of the target image are respectively completed asAnd rotating operation is carried out according to the clockwise direction, and then a first angle corresponding to each matching pair is obtained. The target image is rotated, so that the distance sequence corresponding to each second key point is changed, and the new distance corresponding to each second key point is the distance sequence with the changed corresponding.
Further, in order to judge the accuracy of each matching pair, each matching pair is grouped according to the maximum matching degree corresponding to each matching pair, and the method specifically comprises the following steps: and setting a first threshold and a second threshold, wherein the first threshold is smaller than the second threshold, the matching pair corresponding to the maximum matching degree larger than the second threshold is recorded as a 1 st group, the matching pair corresponding to the maximum matching degree larger than the first threshold and smaller than the second threshold is recorded as a 2 nd group, and the matching pair corresponding to the maximum matching degree smaller than the first threshold is recorded as a 3 rd group.
The calculation formula of the first threshold value isThe second threshold is calculated by the formula,And the minimum matching distance corresponding to all the matching pairs.
Further, in order to obtain more accurate grouping, for the angle of the group 1, the present embodiment further performs repartitioning, specifically: calculating the average value of the first angle corresponding to each matching pair in the 1 st groupAnd standard deviation ofThen will beOrThe corresponding matching pairs are grouped into group 2, wherein,a first angle corresponding to each matching pair in the 1 st group.
Further, by the method from step 3 to step 7, the first key point and the second key point corresponding to the group 3 are matched again to obtain a new matching result; in the process of performing the re-matching, each re-acquired matching pair may be classified into the 1 st group or the 2 nd group, resulting in a change in the number of corresponding matching pairs in the 1 st group and the 2 nd group. This embodiment does not change until the number of corresponding matching pairs in the 1 st group and the 2 nd group is no longer changed, or the number of matching pairs in the 3 rd group is less than that in the first groupIn the above-mentioned order, wherein,the number of all matched pairs; and stopping the operation of carrying out the re-matching.
It should be noted that, in this embodiment, the matching between each first key point on the template image and each second key point on the target image is not completed by using the conventional sift algorithm, and when the matching is performed by using the conventional sift algorithm, a threshold is usually set by a worker according to experience to further determine a matching result, and although the method is simple and easy to operate, the accuracy completely depends on the experience of the worker, and the matching result is easily affected; therefore, the embodiment abandons the traditional sift algorithm, and the matching result is continuously corrected through the matching distance and the Thiessen polygon, so that more accurate matching is realized.
And 8, adjusting the packaging box corresponding to the target image according to the first angle.
This embodiment adopts horizontal many joints robotic arm to adjust the packing carton that the target image corresponds, and specific adjustment process is: if the packaging box cannot be placed at the designated position in a simple translation mode, firstly, calculating a corner of the packaging box corresponding to the target image, performing rotation operation on the packaging box at the original position to enable the packaging box to be placed at the designated position in a translation mode, then calculating the moving distance and the moving direction of the mechanical arm, and placing the packaging box at the designated position; if the packaging box can be placed at the designated position in a simple translation mode, the rotation angle of the packaging box corresponding to the target image does not need to be calculated.
The turning angle in the above is:
wherein,for the total number of matched pairs in group 1,for the total number of matched pairs in group 2,the total number of matched pairs in group 3;for the first angle corresponding to the tth matching pair in group 1,for the first angle corresponding to the jth matching pair in group 2,a first angle corresponding to the kth matching pair in the 3 rd group;for the minimum matching distance of each matching pair in group 1,for the minimum matching distance of each matching pair in group 2,the minimum matching distance of each matching pair in the 3 rd group;are normalized coefficients.
The method for calculating the moving distance comprises the steps of obtaining four corner points of a template image by using a harris algorithm, establishing a coordinate system by taking the corner point at the left lower part of the template image as a coordinate origin, wherein the right side of the coordinate origin is the positive direction of an x axis, and the upper side of the coordinate origin is the positive direction of a y axis; calculating the distance between the first key point and the second key point corresponding to each matching pair, and further obtaining the moving distance; the harris algorithm is a well-known technique and is not described in detail.
Specifically, the calculation formula of the movement distance is:
wherein,for the total number of matching pairs in group 1,for the total number of matched pairs in group 2,the total number of matched pairs in group 3;the distance between the first key point and the second key point corresponding to the t-th matching pair in the 1 st group,the distance between the first key point and the second key point corresponding to the jth matching pair in the 2 nd group;the distance between the first key point and the second key point corresponding to the kth matching pair in the 3 rd group;for the minimum matching distance of each matching pair in group 1,for the minimum matching distance of each matching pair in group 2,the minimum matching distance of each matching pair in the 3 rd group;are normalized coefficients.
The moving direction is as follows:
wherein,for the total number of matched pairs in group 1The number of the first and second groups is,for the total number of matched pairs in group 2,the total number of matched pairs in group 3;is the included angle between the straight line formed by the first key point and the second key point corresponding to the t-th matching pair in the 1 st group and the x axis,is the included angle between the straight line formed by the first key point and the second key point corresponding to the jth matching pair in the group 2 and the x axis,is the included angle between the straight line formed by the first key point and the second key point corresponding to the kth matching pair in the 3 rd group and the x axis,for the minimum matching distance corresponding to each matching pair in group 1,for the minimum matching distance corresponding to each matching pair in group 2,the minimum matching distance corresponding to each matching pair in the 3 rd group;are normalized coefficients.
To be provided withFor example, the included angle between the straight line formed by the first key point and the second key point corresponding to each matching pair and the x-axis is calculatedFor the purpose of illustration, the first and second components,in the formula, the coordinate of the first key corresponding to the tth matching pair in the 1 st group isThe coordinate of the second key corresponding to the tth matching pair in the 1 st group is。
The invention also provides a computer vision system comprising a processor and a memory, the processor executing a program stored in the memory for identifying a method of color printing a packaging design using an electronic device. Since the specific implementation of the method for identifying the color printing packaging pattern by using the electronic device is given in detail in the above step 1 to step 8, redundant description is omitted.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
Claims (8)
1. A method for identifying a color-printed packaging pattern by using electronic equipment is characterized by comprising the following steps:
respectively acquiring a template image and a target image corresponding to the packaging box;
respectively acquiring each first key point on the template image and a first feature descriptor corresponding to the first key point, and each second key point on the target image and a second feature descriptor corresponding to the second key point by using a sift algorithm;
calculating the matching distance between each first key point and each second key point according to the first feature descriptors and the second feature descriptors to obtain corresponding matching distance matrixes;
matching each first key point with each second key point according to the matching distance matrix to obtain each matching pair;
based on the matching distance, respectively obtaining a Thiessen polygon corresponding to each first key point and each second key point by utilizing a Thiessen polygon algorithm;
respectively calculating the distance from each first key point and each second key point to all edge pixel points on the corresponding Thiessen polygon, and calculating the matching degree of each matching pair according to the distance;
setting a rotation angle interval, performing rotation operation on the target image, and obtaining a new distance corresponding to each second key point at each rotation angle; recalculating the matching degree of each matching pair according to the new distance; obtaining a rotation angle corresponding to the maximum matching degree of each matching pair; and denote it as a first angle;
and adjusting the packaging box corresponding to the target image according to the first angle.
3. The method for identifying a color-printed packaging pattern using an electronic device as claimed in claim 1, wherein each of said matched pairs is obtained by: forming a matching pair by the first key point and the second key point corresponding to the minimum matching distance in the matching distance matrix; and deleting the numerical values of the corresponding rows and columns of the matching pair in the matching distance matrix, updating the matching distance matrix to obtain a new matching distance matrix, forming a matching pair by a first key point and a second key point corresponding to the minimum matching distance in the new matching distance matrix, and so on to obtain each matching pair.
4. The method of claim 1, wherein the method comprises identifying the pattern of the color-printed package,
the matching degree is as follows:
wherein,the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;to getAndis taken as the smaller value ofThe value of (a) is selected,to take a sum of 0The greater of the number of the first to the second,to take a sum of 0The larger of these.
5. The method for identifying a color-printed packaging pattern using an electronic device as claimed in claim 1, further comprising grouping the matching pairs according to a maximum degree of matching, the steps of: and setting a first threshold and a second threshold, wherein the first threshold is smaller than the second threshold, the matching pair corresponding to the maximum matching degree larger than the second threshold is recorded as a 1 st group, the matching pair corresponding to the maximum matching degree larger than the first threshold and smaller than the second threshold is recorded as a 2 nd group, and the matching pair corresponding to the maximum matching degree smaller than the first threshold is recorded as a 3 rd group.
6. The method according to claim 1 or 5, further comprising calculating a corner of the target image when adjusting the package box corresponding to the target image,
the turning angle is as follows:
wherein,for the total number of matched pairs in group 1,for the total number of matched pairs in group 2,the total number of matched pairs in group 3;for the first angle corresponding to the tth matching pair in group 1,for the first angle corresponding to the jth matching pair in group 2,a first angle corresponding to the kth matching pair in the 3 rd group;is each in group 1The minimum matching distance of the matched pair is,for the minimum matching distance of each matching pair in group 2,the minimum matching distance of each matching pair in the 3 rd group;are normalized coefficients.
7. The method of claim 1, wherein obtaining the Thiessen polygon further comprises calculating an expansion rate, wherein the expansion rate is obtained based on the matching distance.
8. A computer vision system comprising a processor and a memory, wherein the processor executes a program stored in the memory for use in a method of identifying a color printed packaging design using an electronic device as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210408602.5A CN114492681B (en) | 2022-04-19 | 2022-04-19 | Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210408602.5A CN114492681B (en) | 2022-04-19 | 2022-04-19 | Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114492681A true CN114492681A (en) | 2022-05-13 |
CN114492681B CN114492681B (en) | 2022-06-28 |
Family
ID=81489529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210408602.5A Active CN114492681B (en) | 2022-04-19 | 2022-04-19 | Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114492681B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115063617A (en) * | 2022-08-16 | 2022-09-16 | 南通卓越数码科技有限公司 | Advertisement image recognition method and advertisement image recognition system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111340109A (en) * | 2020-02-25 | 2020-06-26 | 深圳市景阳科技股份有限公司 | Image matching method, device, equipment and storage medium |
CN112101475A (en) * | 2020-09-22 | 2020-12-18 | 王程 | Intelligent classification and splicing method for multiple disordered images |
CN112733748A (en) * | 2021-01-14 | 2021-04-30 | 西安中科星图空间数据技术有限公司 | Voronoi constraint image uniform matching method considering textures |
CN113762280A (en) * | 2021-04-23 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Image category identification method, device and medium |
-
2022
- 2022-04-19 CN CN202210408602.5A patent/CN114492681B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111340109A (en) * | 2020-02-25 | 2020-06-26 | 深圳市景阳科技股份有限公司 | Image matching method, device, equipment and storage medium |
CN112101475A (en) * | 2020-09-22 | 2020-12-18 | 王程 | Intelligent classification and splicing method for multiple disordered images |
CN112733748A (en) * | 2021-01-14 | 2021-04-30 | 西安中科星图空间数据技术有限公司 | Voronoi constraint image uniform matching method considering textures |
CN113762280A (en) * | 2021-04-23 | 2021-12-07 | 腾讯科技(深圳)有限公司 | Image category identification method, device and medium |
Non-Patent Citations (1)
Title |
---|
逄博: "基于特征的SAR图像配准技术研究", 《中国优秀博硕士学位论文全文数据库信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115063617A (en) * | 2022-08-16 | 2022-09-16 | 南通卓越数码科技有限公司 | Advertisement image recognition method and advertisement image recognition system |
CN115063617B (en) * | 2022-08-16 | 2022-12-13 | 南通卓越数码科技有限公司 | Advertisement image recognition method and advertisement image recognition system |
Also Published As
Publication number | Publication date |
---|---|
CN114492681B (en) | 2022-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112070818B (en) | Robot disordered grabbing method and system based on machine vision and storage medium | |
CN111738261B (en) | Single-image robot unordered target grabbing method based on pose estimation and correction | |
CN108717531B (en) | Human body posture estimation method based on Faster R-CNN | |
JP4785880B2 (en) | System and method for 3D object recognition | |
CN109102547A (en) | Robot based on object identification deep learning model grabs position and orientation estimation method | |
CN111768447B (en) | Monocular camera object pose estimation method and system based on template matching | |
CN106951840A (en) | A kind of facial feature points detection method | |
CN111640157A (en) | Checkerboard corner detection method based on neural network and application thereof | |
CN103221977A (en) | Orientation state estimation device and orientation state estimation method | |
CN115609591B (en) | Visual positioning method and system based on 2D Marker and compound robot | |
CN106127258B (en) | A kind of target matching method | |
CN114492681B (en) | Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof | |
CN115816471B (en) | Unordered grabbing method, unordered grabbing equipment and unordered grabbing medium for multi-view 3D vision guided robot | |
CN107490346A (en) | A kind of RFID multi-tags Network Three-dimensional measurement modeling method of view-based access control model | |
CN114882109A (en) | Robot grabbing detection method and system for sheltering and disordered scenes | |
CN110852186A (en) | Visual identification and picking sequence planning method for citrus on tree and simulation system thereof | |
JP2020179441A (en) | Control system, information processing device and control method | |
CN109255801A (en) | The method, apparatus, equipment and storage medium of three-dimension object Edge Following in video | |
CN116188763A (en) | Method for measuring carton identification positioning and placement angle based on YOLOv5 | |
CN114689038A (en) | Fruit detection positioning and orchard map construction method based on machine vision | |
CN107328371A (en) | Sub-pix contours extract based on Gaussian and the optimization using Softmax recurrence in the case where metal plate detects scene | |
CN103136513B (en) | A kind of ASM man face characteristic point positioning method of improvement | |
Azad et al. | Accurate shape-based 6-dof pose estimation of single-colored objects | |
CN110660092A (en) | Log-Polar transform-based image fast matching algorithm | |
Lin | 3D object detection and 6D pose estimation using RGB-D images and mask R-CNN |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |