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 PDF

Info

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
Application number
CN202210408602.5A
Other languages
Chinese (zh)
Other versions
CN114492681B (en
Inventor
陆逸平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong People Color Printing Co ltd
Original Assignee
Nantong People Color Printing Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nantong People Color Printing Co ltd filed Critical Nantong People Color Printing Co ltd
Priority to CN202210408602.5A priority Critical patent/CN114492681B/en
Publication of CN114492681A publication Critical patent/CN114492681A/en
Application granted granted Critical
Publication of CN114492681B publication Critical patent/CN114492681B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining 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

Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof
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:
Figure 100002_DEST_PATH_IMAGE001
wherein,
Figure 271373DEST_PATH_IMAGE002
for the a-dimensional feature of the first feature descriptor,
Figure 213922DEST_PATH_IMAGE003
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:
Figure 651856DEST_PATH_IMAGE004
wherein,
Figure 100002_DEST_PATH_IMAGE005
the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,
Figure 10156DEST_PATH_IMAGE006
the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,
Figure 482726DEST_PATH_IMAGE007
the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,
Figure 783126DEST_PATH_IMAGE008
the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;
Figure 708357DEST_PATH_IMAGE009
to get
Figure 932665DEST_PATH_IMAGE005
And
Figure 994162DEST_PATH_IMAGE006
is taken as the smaller value of
Figure 216196DEST_PATH_IMAGE010
The value of (a) is selected,
Figure 628722DEST_PATH_IMAGE011
to take a sum of 0
Figure 656721DEST_PATH_IMAGE012
The greater of the number of the first to the second,
Figure 526720DEST_PATH_IMAGE013
to take a sum of 0
Figure 716392DEST_PATH_IMAGE014
The 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:
Figure 616215DEST_PATH_IMAGE015
wherein,
Figure 182326DEST_PATH_IMAGE016
for the total number of matched pairs in group 1,
Figure 100002_DEST_PATH_IMAGE017
for the total number of matched pairs in group 2,
Figure 421677DEST_PATH_IMAGE018
the total number of matched pairs in group 3;
Figure 782251DEST_PATH_IMAGE019
for the first angle corresponding to the tth matching pair in group 1,
Figure 169370DEST_PATH_IMAGE020
for the first angle corresponding to the jth matching pair in group 2,
Figure 726123DEST_PATH_IMAGE021
a first angle corresponding to the kth matching pair in the 3 rd group;
Figure 616718DEST_PATH_IMAGE022
for the minimum matching distance of each matching pair in group 1,
Figure 413773DEST_PATH_IMAGE023
for the minimum matching distance of each matching pair in group 2,
Figure 22609DEST_PATH_IMAGE024
the minimum matching distance of each matching pair in the 3 rd group;
Figure 133784DEST_PATH_IMAGE025
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:
Figure 144466DEST_PATH_IMAGE026
wherein,
Figure 112422DEST_PATH_IMAGE002
for the a-dimensional feature of the first feature descriptor,
Figure 208554DEST_PATH_IMAGE003
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:
Figure 605644DEST_PATH_IMAGE027
Figure 408514DEST_PATH_IMAGE028
to match the expansion velocities of the first and second keypoints corresponding to pair r,
Figure DEST_PATH_IMAGE029
to match the matching distance between the first keypoint and the second keypoint corresponding to the pair r,
Figure 734322DEST_PATH_IMAGE030
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:
Figure 317751DEST_PATH_IMAGE031
wherein,
Figure 567466DEST_PATH_IMAGE005
the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,
Figure 490423DEST_PATH_IMAGE006
the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,
Figure 800182DEST_PATH_IMAGE007
the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,
Figure 870906DEST_PATH_IMAGE008
the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;
Figure 924312DEST_PATH_IMAGE009
to get
Figure 452508DEST_PATH_IMAGE005
And
Figure 933168DEST_PATH_IMAGE006
is taken as the smaller value of
Figure 225609DEST_PATH_IMAGE010
The value of (a) is selected,
Figure 82706DEST_PATH_IMAGE011
to take a sum of 0
Figure 714676DEST_PATH_IMAGE012
The greater of the number of the first to the second,
Figure 366237DEST_PATH_IMAGE013
to take a sum of 0
Figure 411554DEST_PATH_IMAGE014
The 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 point
Figure 806763DEST_PATH_IMAGE032
Sequentially 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
Figure 542507DEST_PATH_IMAGE033
Figure 630548DEST_PATH_IMAGE034
Wherein
Figure 897582DEST_PATH_IMAGE005
Corresponding 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
Figure DEST_PATH_IMAGE035
Figure 34165DEST_PATH_IMAGE036
Wherein
Figure 437464DEST_PATH_IMAGE006
and the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point. Distance sequence
Figure 696407DEST_PATH_IMAGE033
And distance sequence
Figure 450737DEST_PATH_IMAGE035
The 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 as
Figure 896672DEST_PATH_IMAGE037
And 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 is
Figure 420057DEST_PATH_IMAGE038
The second threshold is calculated by the formula
Figure 849902DEST_PATH_IMAGE039
Figure 825948DEST_PATH_IMAGE040
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 group
Figure 304334DEST_PATH_IMAGE041
And standard deviation of
Figure 947805DEST_PATH_IMAGE042
Then will be
Figure 282971DEST_PATH_IMAGE043
Or
Figure 11893DEST_PATH_IMAGE044
The corresponding matching pairs are grouped into group 2, wherein,
Figure 277658DEST_PATH_IMAGE045
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 group
Figure 775635DEST_PATH_IMAGE046
In the above-mentioned order, wherein,
Figure 281703DEST_PATH_IMAGE047
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:
Figure 497921DEST_PATH_IMAGE015
wherein,
Figure 318109DEST_PATH_IMAGE016
for the total number of matched pairs in group 1,
Figure 670593DEST_PATH_IMAGE017
for the total number of matched pairs in group 2,
Figure 613141DEST_PATH_IMAGE018
the total number of matched pairs in group 3;
Figure 51076DEST_PATH_IMAGE019
for the first angle corresponding to the tth matching pair in group 1,
Figure 160108DEST_PATH_IMAGE020
for the first angle corresponding to the jth matching pair in group 2,
Figure 632678DEST_PATH_IMAGE021
a first angle corresponding to the kth matching pair in the 3 rd group;
Figure 480548DEST_PATH_IMAGE022
for the minimum matching distance of each matching pair in group 1,
Figure 405779DEST_PATH_IMAGE023
for the minimum matching distance of each matching pair in group 2,
Figure 567770DEST_PATH_IMAGE024
the minimum matching distance of each matching pair in the 3 rd group;
Figure 894846DEST_PATH_IMAGE025
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:
Figure 179197DEST_PATH_IMAGE048
wherein,
Figure 591724DEST_PATH_IMAGE016
for the total number of matching pairs in group 1,
Figure 541094DEST_PATH_IMAGE017
for the total number of matched pairs in group 2,
Figure 722677DEST_PATH_IMAGE018
the total number of matched pairs in group 3;
Figure 177929DEST_PATH_IMAGE049
the distance between the first key point and the second key point corresponding to the t-th matching pair in the 1 st group,
Figure 77752DEST_PATH_IMAGE050
the distance between the first key point and the second key point corresponding to the jth matching pair in the 2 nd group;
Figure 581545DEST_PATH_IMAGE051
the distance between the first key point and the second key point corresponding to the kth matching pair in the 3 rd group;
Figure 617634DEST_PATH_IMAGE022
for the minimum matching distance of each matching pair in group 1,
Figure 243788DEST_PATH_IMAGE023
for the minimum matching distance of each matching pair in group 2,
Figure 630907DEST_PATH_IMAGE024
the minimum matching distance of each matching pair in the 3 rd group;
Figure 420615DEST_PATH_IMAGE025
are normalized coefficients.
The moving direction is as follows:
Figure 576790DEST_PATH_IMAGE052
wherein,
Figure DEST_PATH_IMAGE053
for the total number of matched pairs in group 1The number of the first and second groups is,
Figure 311528DEST_PATH_IMAGE017
for the total number of matched pairs in group 2,
Figure 920363DEST_PATH_IMAGE018
the total number of matched pairs in group 3;
Figure 93856DEST_PATH_IMAGE054
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,
Figure 104537DEST_PATH_IMAGE055
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,
Figure 259444DEST_PATH_IMAGE056
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,
Figure 355576DEST_PATH_IMAGE022
for the minimum matching distance corresponding to each matching pair in group 1,
Figure 801601DEST_PATH_IMAGE023
for the minimum matching distance corresponding to each matching pair in group 2,
Figure 932368DEST_PATH_IMAGE024
the minimum matching distance corresponding to each matching pair in the 3 rd group;
Figure 8908DEST_PATH_IMAGE025
are normalized coefficients.
To be provided with
Figure 592336DEST_PATH_IMAGE054
For 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,
Figure 842052DEST_PATH_IMAGE057
in the formula, the coordinate of the first key corresponding to the tth matching pair in the 1 st group is
Figure 827326DEST_PATH_IMAGE058
The coordinate of the second key corresponding to the tth matching pair in the 1 st group is
Figure 825500DEST_PATH_IMAGE059
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.
2. The method of claim 1, wherein the method comprises identifying the pattern of the color-printed package,
the matching distance is as follows:
Figure DEST_PATH_IMAGE001
wherein,
Figure 892178DEST_PATH_IMAGE002
for the a-dimensional feature of the first feature descriptor,
Figure 996269DEST_PATH_IMAGE003
dimension a second feature describes the a-th dimension feature of the child.
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:
Figure 776006DEST_PATH_IMAGE004
wherein,
Figure DEST_PATH_IMAGE005
the total number of the edge pixel points of the Thiessen polygon corresponding to the first key point,
Figure 108898DEST_PATH_IMAGE006
the total number of the edge pixel points of the Thiessen polygon corresponding to the second key point,
Figure 923271DEST_PATH_IMAGE007
the distance from the first key point to the ith edge pixel point of the corresponding Thiessen polygon,
Figure 371832DEST_PATH_IMAGE008
the distance from the second key point to the ith edge pixel point of the corresponding Thiessen polygon;
Figure 638865DEST_PATH_IMAGE009
to get
Figure 837765DEST_PATH_IMAGE005
And
Figure 506644DEST_PATH_IMAGE006
is taken as the smaller value of
Figure 686958DEST_PATH_IMAGE010
The value of (a) is selected,
Figure 441288DEST_PATH_IMAGE011
to take a sum of 0
Figure 178300DEST_PATH_IMAGE012
The greater of the number of the first to the second,
Figure 701685DEST_PATH_IMAGE013
to take a sum of 0
Figure 69212DEST_PATH_IMAGE014
The 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:
Figure 310838DEST_PATH_IMAGE015
wherein,
Figure 585961DEST_PATH_IMAGE016
for the total number of matched pairs in group 1,
Figure DEST_PATH_IMAGE017
for the total number of matched pairs in group 2,
Figure 914918DEST_PATH_IMAGE018
the total number of matched pairs in group 3;
Figure 250085DEST_PATH_IMAGE019
for the first angle corresponding to the tth matching pair in group 1,
Figure 979006DEST_PATH_IMAGE020
for the first angle corresponding to the jth matching pair in group 2,
Figure 995504DEST_PATH_IMAGE021
a first angle corresponding to the kth matching pair in the 3 rd group;
Figure 493481DEST_PATH_IMAGE022
is each in group 1The minimum matching distance of the matched pair is,
Figure 265128DEST_PATH_IMAGE023
for the minimum matching distance of each matching pair in group 2,
Figure 215766DEST_PATH_IMAGE024
the minimum matching distance of each matching pair in the 3 rd group;
Figure 285223DEST_PATH_IMAGE025
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.
CN202210408602.5A 2022-04-19 2022-04-19 Method for identifying color printing packaging pattern by using electronic equipment and computer vision system thereof Active CN114492681B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
逄博: "基于特征的SAR图像配准技术研究", 《中国优秀博硕士学位论文全文数据库信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
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