CN105868816A - Label image generation method and apparatus - Google Patents

Label image generation method and apparatus Download PDF

Info

Publication number
CN105868816A
CN105868816A CN201610218723.8A CN201610218723A CN105868816A CN 105868816 A CN105868816 A CN 105868816A CN 201610218723 A CN201610218723 A CN 201610218723A CN 105868816 A CN105868816 A CN 105868816A
Authority
CN
China
Prior art keywords
label image
label
effective
images
image
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
CN201610218723.8A
Other languages
Chinese (zh)
Other versions
CN105868816B (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.)
Jiangsu Mumeng Intelligent Technology Co Ltd
Original Assignee
Jiangsu Mumeng Intelligent Technology 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 Jiangsu Mumeng Intelligent Technology Co Ltd filed Critical Jiangsu Mumeng Intelligent Technology Co Ltd
Priority to CN201610218723.8A priority Critical patent/CN105868816B/en
Publication of CN105868816A publication Critical patent/CN105868816A/en
Application granted granted Critical
Publication of CN105868816B publication Critical patent/CN105868816B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a label image generation method and apparatus. The method comprises the following steps: if the quantity of effective labels in an effective label image set is smaller than a first preset quantity, randomly generating a first label image; calculating a distance between the first label image and the effective label image set; and if the distance between the first label image and the effective label image set is greater than a preset distance threshold, determining that the first label image is an effective label image, and adding the first label image to the effective label image set. Therefore, there are certain distances between label images in the effective label image set, and there are quite large differences between the label images.

Description

Label image generation method and device
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a label image generation method and device.
Background
In recent years, various types of label images, such as two-dimensional code label images, have been widely used in people's lives, such as for identifying objects, paying, and the like. The label images are generated by a plurality of coding units according to a certain coding rule, and generally carry data information, which refers to relevant information of an object used for identification of the label images, such as the name of the object, a production lot number and the like.
However, in practical applications, there is also a need for using label images-for positioning. For example, when the robot moves in a room, for example, different tag images are respectively arranged on specific positions of the room, such as four walls, it can be known which wall the robot has moved to, and which direction the robot needs to turn to walk, based on the detection of the tag images. At this time, the label image may not carry data information, but only a different label image needs to be generated.
In the practical application of the above positioning type, how to generate a label image with robustness to ensure that a large number of generated label images have large differences, so as to facilitate accurate identification of the label image in practical application, is a problem to be solved urgently.
Disclosure of Invention
In view of the above problems, the present invention provides a label image generating method and apparatus for generating a plurality of label images with greater differences.
The invention provides a label image generation method, which comprises the following steps:
if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image;
calculating a distance between the first label image and the set of active label images;
if the distance between the first label image and the effective label image set is larger than a preset distance threshold value, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
The present invention provides a label image generating apparatus, including:
the system comprises a processor and a memory, wherein the processor and the memory are connected through a bus;
wherein, a group of program codes are stored in the memory, and the processor calls the program codes stored in the memory to execute the following processing procedures:
if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image;
calculating a distance between the first label image and the set of active label images;
if the distance between the first label image and the effective label image set is larger than a preset distance threshold value, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
According to the method and the device for generating the label images, provided by the invention, if the number of the effective labels in the current effective label image set is smaller than a first preset number required to be generated, one label image is randomly generated, the distance between the label image and the effective label image set is calculated, when the distance between the label image and the effective label image set is larger than a certain distance threshold value, the generated label image is proved to have obvious difference with other existing effective label images in the effective label image set, the generated label image is determined to be the effective label image at the moment, and the effective label image set is added into the effective label image set, so that a certain distance exists between the label images in the effective label image set, and the difference exists between the label images.
Drawings
FIG. 1 is a flowchart of a first embodiment of a label image generation method according to the present invention;
FIG. 2 is a flowchart of a second embodiment of a label image generation method according to the present invention;
fig. 3 is a schematic structural diagram of a first embodiment of a label image generating apparatus according to the present invention.
Detailed Description
Fig. 1 is a flowchart of a first embodiment of a tag image generation method according to the present invention, as shown in fig. 1, the method includes the following steps:
step 101, if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image.
When a user needs to generate a first preset number of label images, an effective label image set D may be defined first for storing the generated effective label images. Initially, the active label image set D is empty, and when a first label image is randomly generated, the first generated label image is directly added to the active label image set. The first label image is not limited to the first label image to be generated.
In this embodiment, taking the generation of any first label image as an example, when the first label image needs to be generated, it is first determined whether the number of valid label images in the valid label image set D has reached a first preset number, and if not, one first label image is randomly generated.
Before specifically describing the random generation method of the tag image, first, the definition of the tag image is described:
suppose with mgRepresents any one of the first label images, then mg=(w0,w1,...,wn),wiFor the first label image mgI is taken from 0 to n. Wherein, wi=(b0,b1,,,bn|bj∈{0,1}),bjThe pixel value of the jth coding unit in the vector is coded for the ith column.
That is, any one of the label images is an image matrix composed of n rows and n columns of coding units, each of which is an element in the image matrix. This image matrix is composed of n column vectors, i.e., n columns of encoded vectors, each column of encoded vectors is composed of n encoding units, and each encoding unit corresponds to a pixel value of 0 or 1, i.e., a black or white binary pixel. Therefore, each coding unit corresponds to a coding cell, and is filled with black or white. Therefore, generating the label image corresponds to generating the image matrix, and then filling each coding unit in the generated image matrix with a corresponding color according to the pixel value, thereby forming the label image.
Therefore, when generating the tag image, in this embodiment, the tag image is generated in a manner of randomly generating each column of coding vectors in the tag image, and it is understood that if the tag image is supposed to be represented as being composed of n rows of coding vectors, each row of coding vectors is composed of n coding units, and the principle of randomly generating each row of coding vectors is similar to that, and is not repeated herein.
Specifically, randomly generating a first label image includes:
determining a first label image m according to equation (1)gThe generation probability P of each column of code vectors(w=wi) To generate a probability P (w ═ w) according toi) Generating a first label image mg
p ( w = w i ) = T ( w i ) O ( w i , D ) Σ w γ ∈ Z T ( w γ ) O ( w γ , D ) - - - ( 1 )
Wherein, wγFor any column of coded vectors, Z represents 2nAnd (4) a coding mode. It is worth mentioning that wγFor any column, vector is encoded, without limitation, by wγFor the first label image mgAny column in (2) encodes a vector, but refers to: if any column of code vectors consists of n code units, and the total number of the n code units is Z, Z code vectors are corresponding to the n code units, namely w in the columnγIs any one of the Z code vectors. The above generation probability refers to the code vector wiFor the first label image mgOne column encodes the probability of the vector.
Wherein, T (w)i) Is wiIs determined according to equation (2); o (w)iD) is wiThe probability of having occurred in the set of active label images D is determined according to equation (3):
T ( w i ) = 1 - Σ q = 0 n - 2 δ ( w i q + 1 , w i q ) n - 1 - - - ( 2 )
O ( w i , D ) = 1 - Σ m g ∈ D Σ w γ ∈ m g δ ( w γ , w i ) n | D | | D | ≠ 0 1 | D | = 0 - - - ( 3 )
wherein,is wiThe q-th edition in (1)Code unit whenWhen (w)γ,wi) Is equal to 0, whenWhen (w)γ,wi) Equal to 1, | D | is the number of valid label images in D.
The following explains the meaning of the conversion rate expressed by the above formula (2) by way of example, assuming that wiIs a coded vector consisting of 5 coding units, the coding mode of the 6 coding units is 010110, then T (010110) ═ 4/5, wherein the conversion rate represents the wiIn this example, the first coding unit is 0, the second coding unit is 1, the number of changes from the first coding unit to the second coding unit is 1; correspondingly, the change from the second coding unit to the third coding unit is 1 to 0, the change is changed, and the change quantity is increased by 1 to 2; changing from 0 to 1 from the third coding unit to the fourth coding unit, and changing the change quantity plus 1 to 3; changing from 1 to 1 from the fourth coding unit to the fifth coding unit without changing, and keeping the change number unchanged at 3; from the fifth coding unit to the sixth coding unit, 1 is changed to 0, and the change amount plus 1 is changed to 4. Theoretically, the 6 coding units can have a variation number of 5 at most, so T (010110) ═ 4/5. The higher the conversion rate of any column of coded vectors, the higher the identifiability of the label images, and the more accurate the identification can be ensured.
Based on the meaning of the above-mentioned formula (2) and formula (3), it should be understood for formula (1): if w isiThe higher the conversion rate of (c), it is in the label image mgThe higher the probability generated in (1), and conversely, the lower the probability generated; if w isiThe higher the probability of occurrence in other label images already generated in the set of active label images, the higher it is in label image mgShould the probability generated inThe lower and vice versa the higher the probability of generation should be.
In summary, the generation probability expressed by the formula (1) is such that the label image m isgThe label images are different from other label images already generated in the effective label image set as much as possible.
Step 102, calculating the distance between the first label image and the effective label image set.
In the present embodiment, the first label image mgThe distance from the effective label image set D is the minimum distance between the first label image and each other label image in the effective label image set D, and specifically, the first label image m can be calculated by the following formula (4)gDistance L (m) from active label image set Dg,D):
L ( m g , D ) = min m h ∈ D { L ( m g , m h ) } - - - ( 4 )
Wherein m ishFor any valid label image in D, L (m)g,mh) Is mgAnd mhThe distance between the two is determined according to equation (5):
L ( m g , m h ) = min k = { 0 , 1 , 2 , 3 } { H ( m g , R k ( m h ) ) } - - - ( 5 )
wherein H () represents the Hamming distance, Rk(mh) Represents mhRotated k × 90 degrees.
Step 103, if the distance between the first label image and the effective label image set is greater than a preset distance threshold, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
In the present embodiment, if the first label image mgThe distance from the effective label image set D is larger than a preset distance threshold value tau0Then the first label image m is determinedgFor a valid label image, the first label image mgAdded to the active label image set D.
It will be appreciated that when a label image mgAfter adding the effective label image set D, step 101 may be continuously executed, that is, it is determined whether the number of effective labels in the effective label image set D reaches a first preset number, if yes, the label image generation process is ended, and if not, a new label image is continuously generated.
In this embodiment, the minimum difference distance τ (D) of the effective label image set D generated in the above manner can be represented as:
τ ( D ) = min { min m h ∈ D { S ( m h ) } , min m h ≠ m l ∈ D { D ( m h , m l ) } }
wherein,
wherein, S (m)h) For any effective label image m in DhSelf-rotation distance of mlIs any one of D and mhA different active label image.
The minimum difference distance τ (D) means that the generated valid label image set D can have error detection and correction capabilities of floor [ (τ (D) -1)/2], that is, when there are code means of floor [ (τ (D) -1)/2] errors in the generated valid label image, the generated valid label image can be corrected to correspond to a correct label image. Where floor () is a floor function. In addition, the generated label image has rotation, so that the placement direction of the label image can be detected, and the robustness and the accuracy are high in practical application.
Optionally, after step 103, the following step 104 may be further included:
and 104, generating an outer frame image corresponding to the first label image, wherein the first label image is filled in the outer frame represented by the outer frame image.
In practical applications, the generated label image generally needs to be attached to an object, and the generated label image is a binary image having two colors, i.e., black and white, and if the background pattern of the attached object is not easily distinguished from the label image, it may be inconvenient for an identification device, such as an identification device provided on a robot, to be accurately positioned to the label image.
Therefore, in this embodiment, optionally, an outer frame image may also be generated on the periphery of the generated label image, where the outer frame image is formed by, for example, black coding units occupying a certain number of coding units, that is, a circle of black frame image is generated around the label image, so as to facilitate accurate positioning to the label image.
In this embodiment, if the number of active labels in the current active label image set is less than a first preset number that needs to be generated, one label image is randomly generated, and the distance between the label image and the active label image set is calculated, and when the distance between the label image and the active label image set is greater than a certain distance threshold, it indicates that there is significant difference between the generated label image and other active label images already existing in the active label image set, and at this time, it is determined that the generated label image is an active label image, and the active label image set is added to the active label image set, so that there is a certain distance between label images in the active label image set, and there is a large difference between label images.
Fig. 2 is a flowchart of a second embodiment of a label image generation method according to the present invention, as shown in fig. 2, on the basis of the embodiment shown in fig. 1, after the step 102, the following step may be further included:
step 201, if the distance between the first label image and the set of valid label images is not greater than the preset distance threshold, discarding the first label image, and adding one to the number of invalid label images.
On the basis of the embodiment shown in fig. 1, if the first label image m calculated by step 102 is the first label image mgThe distance from the effective label image set D is not more than a preset distance threshold value tau0First label image mgThe first label image m generated may be discarded when the difference from other effective label images in the effective label image set D is not large enoughgThe number of invalid label images ρ is incremented by one.
Step 202, determining whether the number of the invalid label images is less than a second preset number, if so, performing step 203 and 206, otherwise, performing step 207 and 212.
And step 203, randomly generating a second label image.
Step 204, judging whether the distance between the second label image and the effective label image set is greater than a preset distance threshold, if so, executing step 205, otherwise, executing step 206.
Step 205, determining that the second label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of the ineffective label images to be 0.
Step 206, discarding the second label image, and adding one to the number of the invalid label images.
After step 206, the judgment processing of step 202 is executed.
In the present embodiment, when the first label image m is generatedgAnd for the invalid label images, after adding one to the number rho of the invalid label images, judging whether the number of the invalid label images reaches a certain threshold value, namely a second preset number. If the number of the invalid label images is less than the second preset number, the preset distance threshold value tau adopted currently is indicated0Can also be used continuously, i.e. with the distance threshold τ0The criterion is satisfied as to whether the tag image is valid. Wherein the establishment means employing the distance threshold τ0It may still be sufficient for the user to generate a first preset number of active tags with a large difference in distance from each other.
At this time, a next label image, that is, a second label image, is randomly generated according to the formula (1), and further referring to the embodiment shown in fig. 1, the distance between the second label image and the effective label image set D is calculated, if the distance between the second label image and the effective label image set D is greater than the preset distance threshold τ0If the number of the label images is not equal to the preset number, the second label image is a valid label image, the second label image is added into the valid label image set D, and the number of the invalid label images is increasedAnd setting the label number to be 0, further judging whether the number of the effective labels in the effective label image set D reaches a first preset number, and if not, continuing to generate a new label image.
Conversely, if the distance between the second label image and the valid label image set D is not greater than the preset distance threshold τ0And if the second label image is an invalid label image, adding one to the number rho of the invalid label images. If the number p of invalid label images at this time still does not reach the second preset number, the execution continues from step 203 to step 206.
It should be noted that, in this embodiment, the number ρ of invalid label images is actually a statistical number of invalid label images generated continuously, as long as one valid label image is generated before the number ρ of invalid label images does not reach the second preset number, the number ρ of invalid label images is set to 0, and at this time, the preset distance threshold τ is described0The method is also effective, that is, the method can be used as a basis for judging whether the label image is effective or not.
In contrast, if the number ρ of invalid label images has reached the second preset number, the following processing procedure of step 207 and subsequent steps is performed:
and step 207, updating the preset distance threshold, wherein the updated distance threshold is smaller than the preset distance threshold.
And step 208, judging whether the updated distance threshold is larger than a preset cut-off distance threshold, if so, executing step 209, otherwise, ending.
In this embodiment, if the number ρ of invalid label images has reached the second preset number, it indicates that the preset distance threshold τ is set0The second threshold is used as an invalid threshold, so that the generated label images can be guaranteed to have larger difference, but the first preset number of label images required by the user cannot be generated. Therefore, the threshold needs to be updated, e.g. to τ1=τ0-1, with updated distance threshold τ1As a subsequent birthAnd whether the label image is valid or not.
However, it should be noted that the distance threshold is not updated without limitation, because if the distance threshold is updated without limitation, although the requirement of generating a large number of label images by a user may be met, the difference between the label images cannot be better guaranteed, and therefore, in this embodiment, the distance threshold is updated with a certain limitation, if the current updated distance threshold τ is updated, the distance threshold τ is updated at a certain time1The limited cutoff distance threshold has been reached, the tag image generation process is ended.
Conversely, if the limited cutoff distance threshold is not reached, then generation of a new label image, i.e., a third label image, may continue and an updated distance threshold τ may be employed1As a basis for determining whether the third label image is valid.
And step 209, randomly generating a third label image.
Step 210, determining whether the distance between the third label image and the effective label image set is greater than the updated distance threshold, if so, executing step 211, otherwise, executing step 212.
And step 211, determining that the third label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of the ineffective label images to be 0.
Step 212, discarding the third label image, and adding one to the number of invalid label images.
After step 212, the determination process of step 202 is continued.
The processing logic of step 209 to step 212 may refer to the foregoing description, and is not described again.
In this embodiment, by counting the number of invalid labels generated continuously and by using a distance threshold updating mechanism, a larger difference between the generated valid label images is ensured, and a reasonable tradeoff is made between a certain number of label images required by enough users.
Fig. 3 is a schematic structural diagram of a first embodiment of a label image generating apparatus according to the present invention, as shown in fig. 3, the label image generating apparatus includes:
the device comprises a processor 11 and a memory 12, wherein the processor 11 and the memory 12 are connected through a bus 13. Wherein, the memory 12 stores a group of program codes, and the processor 11 calls the program codes stored in the memory 12 to execute the following processing procedures:
if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image;
calculating a distance between the first label image and the set of active label images;
if the distance between the first label image and the effective label image set is larger than a preset distance threshold value, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
Optionally, the processor 11 is further configured to:
if the distance between the first label image and the effective label image set is not larger than the preset distance threshold, discarding the first label image, and adding one to the number of the ineffective label images;
if the number of the invalid label images is smaller than a second preset number, randomly generating a second label image;
if the distance between the second label image and the effective label image set is larger than the preset distance threshold, determining that the second label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0;
and if the distance between the second label image and the effective label image set is not larger than the preset distance threshold, discarding the second label image, and adding one to the number of the ineffective label images.
Optionally, the processor 11 is further configured to:
if the distance between the first label image and the effective label image set is not larger than the preset distance threshold, discarding the first label image, and adding one to the number of the ineffective label images;
if the number of the invalid label images is larger than a second preset number, updating the preset distance threshold, wherein the updated distance threshold is smaller than the preset distance threshold;
if the updated distance threshold is larger than the preset cut-off distance threshold, randomly generating a third label image;
and if the distance between the third label image and the effective label image set is greater than the updated distance threshold, determining that the third label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0.
The tag image generating apparatus of this embodiment may be used to execute the technical solutions of the method embodiments shown in fig. 1 and fig. 2, and the implementation principles and technical effects thereof are similar and will not be described herein again.
In the above embodiments of the tag identification apparatus, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, an image Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A label image generation method, comprising:
if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image;
calculating a distance between the first label image and the set of active label images;
if the distance between the first label image and the effective label image set is larger than a preset distance threshold value, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
2. The method of claim 1, further comprising:
and if the distance between the first label image and the effective label image set is not larger than the preset distance threshold, discarding the first label image, and adding one to the number of the ineffective label images.
3. The method of claim 2, wherein after said discarding said first label image, said method further comprises:
if the number of the invalid label images is smaller than a second preset number, randomly generating a second label image;
if the distance between the second label image and the effective label image set is larger than the preset distance threshold, determining that the second label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0;
and if the distance between the second label image and the effective label image set is not larger than the preset distance threshold, discarding the second label image, and adding one to the number of the ineffective label images.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
if the number of the invalid label images is larger than a second preset number, updating the preset distance threshold, wherein the updated distance threshold is smaller than the preset distance threshold;
if the updated distance threshold is larger than the preset cut-off distance threshold, randomly generating a third label image;
and if the distance between the third label image and the effective label image set is greater than the updated distance threshold, determining that the third label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0.
5. The method of any of claims 1 to 3, wherein the randomly generating a first label image comprises:
determining a generation probability P (w ═ w) of each column of encoding vectors in the first label image according to formula (1)i) To generate a probability P (w ═ w) from the saidi) Generating the first label image mg
P ( w = w i ) = T ( w i ) O ( w i , D ) Σ w γ ∈ Z T ( w γ ) O ( w γ , D ) - - - ( 1 )
Wherein m isg=(w0,w1,...,wn),wiFor the first label image mgThe ith column of code vectors, wi=(b0,b1,,,bn|bj∈{0,1}),bjEncoding the pixel value of the j encoding unit in the i column of the encoding vector; w is aγFor any column of coded vectors, Z represents 2nA coding mode is planted;
wherein, T (w)i) Is wiIs determined according to equation (2); o (w)iD) is wiThe probability of having occurred in the set of active label images D is determined according to equation (3):
T ( w i ) = 1 - Σ q = 0 n - 2 δ ( w i q + 1 , w i q ) n - 1 - - - ( 2 )
O ( w i , D ) = 1 - Σ m g ∈ D Σ w γ ∈ m g δ ( w γ , w i ) n | D | | D | ≠ 0 1 | D | = 0 - - - ( 3 )
wherein,is wiOf the q-th coding unit whenWhen (w)γ,wi) Is equal to 0, whenWhen (w)γ,wi) Equal to 1, | D | is the number of valid label images in D.
6. The method of any of claims 1-3, wherein said calculating the distance of the first label image from the set of active label images comprises:
calculating the first label image m according to formula (4)gDistance L (m) from the active label image set Dg,D):
L ( m g , D ) = m i n m h ∈ D { L ( m g , m h ) } - - - ( 4 )
Wherein m ishFor any valid label image in D, L (m)g,mh) Is mgAnd mhThe distance between the two is determined according to equation (5):
L ( m g , m h ) = m i n k = { 0 , 1 , 2 , 3 } { H ( m g , R k ( m h ) ) } - - - ( 5 )
wherein H () represents the Hamming distance, Rk(mh) Represents mhRotated k × 90 degrees.
7. The method according to any one of claims 1 to 3, further comprising:
and generating an outer frame image corresponding to the first label image, wherein the first label image is filled in an outer frame represented by the outer frame image.
8. A label image generation apparatus, characterized by comprising:
the system comprises a processor and a memory, wherein the processor and the memory are connected through a bus;
wherein, a group of program codes are stored in the memory, and the processor calls the program codes stored in the memory to execute the following processing procedures:
if the number of the effective labels in the effective label image set is smaller than a first preset number, randomly generating a first label image;
calculating a distance between the first label image and the set of active label images;
if the distance between the first label image and the effective label image set is larger than a preset distance threshold value, determining that the first label image is an effective label image, and adding the first label image to the effective label image set.
9. The tag generation apparatus of claim 8, wherein the processor is further configured to:
if the distance between the first label image and the effective label image set is not larger than the preset distance threshold, discarding the first label image, and adding one to the number of the ineffective label images;
if the number of the invalid label images is smaller than a second preset number, randomly generating a second label image;
if the distance between the second label image and the effective label image set is larger than the preset distance threshold, determining that the second label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0;
and if the distance between the second label image and the effective label image set is not larger than the preset distance threshold, discarding the second label image, and adding one to the number of the ineffective label images.
10. The tag generation apparatus according to claim 8 or 9, wherein the processor is further configured to:
if the distance between the first label image and the effective label image set is not larger than the preset distance threshold, discarding the first label image, and adding one to the number of the ineffective label images;
if the number of the invalid label images is larger than a second preset number, updating the preset distance threshold, wherein the updated distance threshold is smaller than the preset distance threshold;
if the updated distance threshold is larger than the preset cut-off distance threshold, randomly generating a third label image;
and if the distance between the third label image and the effective label image set is greater than the updated distance threshold, determining that the third label image is an effective label image, adding the effective label image into the effective label image set, and setting the number of invalid label images to be 0.
CN201610218723.8A 2016-04-08 2016-04-08 Label image generation method and device Active CN105868816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610218723.8A CN105868816B (en) 2016-04-08 2016-04-08 Label image generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610218723.8A CN105868816B (en) 2016-04-08 2016-04-08 Label image generation method and device

Publications (2)

Publication Number Publication Date
CN105868816A true CN105868816A (en) 2016-08-17
CN105868816B CN105868816B (en) 2019-02-01

Family

ID=56637320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610218723.8A Active CN105868816B (en) 2016-04-08 2016-04-08 Label image generation method and device

Country Status (1)

Country Link
CN (1) CN105868816B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389148A (en) * 2018-08-28 2019-02-26 昆明理工大学 A kind of similar determination method of image based on improvement DHash algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080061146A1 (en) * 2006-09-13 2008-03-13 Konica Minolta Business Technologies, Inc. Barcode image generating device, barcode image reading device and barcode image generating and reading system
CN102638761A (en) * 2012-04-24 2012-08-15 北京信息科技大学 WIFI (Wireless Fidelity) positioning method and positioning system thereof
CN103994762A (en) * 2014-04-21 2014-08-20 刘冰冰 Mobile robot localization method based on data matrix code
CN104361379A (en) * 2014-11-28 2015-02-18 天津联云网络技术有限公司 Two-dimensional code label data interaction system with positioning function

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080061146A1 (en) * 2006-09-13 2008-03-13 Konica Minolta Business Technologies, Inc. Barcode image generating device, barcode image reading device and barcode image generating and reading system
CN102638761A (en) * 2012-04-24 2012-08-15 北京信息科技大学 WIFI (Wireless Fidelity) positioning method and positioning system thereof
CN103994762A (en) * 2014-04-21 2014-08-20 刘冰冰 Mobile robot localization method based on data matrix code
CN104361379A (en) * 2014-11-28 2015-02-18 天津联云网络技术有限公司 Two-dimensional code label data interaction system with positioning function

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389148A (en) * 2018-08-28 2019-02-26 昆明理工大学 A kind of similar determination method of image based on improvement DHash algorithm
CN109389148B (en) * 2018-08-28 2021-11-23 昆明理工大学 Image similarity judgment method based on improved DHash algorithm

Also Published As

Publication number Publication date
CN105868816B (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN108520229B (en) Image detection method, image detection device, electronic equipment and computer readable medium
CN101908125B (en) QR (Quick Response) bar code decoding chip and decoding method thereof
CN108985066B (en) Intelligent contract security vulnerability detection method, device, terminal and storage medium
CN111832484B (en) Loop detection method based on convolution perception hash algorithm
CN108563445B (en) Application program code detection method and server
CN112927279A (en) Image depth information generation method, device and storage medium
JP6660475B2 (en) Method for correcting angle of vehicle damage image, electronic device, and readable storage medium
WO2023279847A1 (en) Cell position detection method and apparatus, and electronic device
CN111985469B (en) Method and device for recognizing characters in image and electronic equipment
AU2017380263B2 (en) Method for detecting and recognising long-range high-density visual markers
US11843395B2 (en) Coding pattern, coding and reading methods for same, calibration board, and calibration method
CN105868816B (en) Label image generation method and device
CN103208112A (en) Multi-part Corresponder For Multiple Cameras
CN113627394A (en) Face extraction method and device, electronic equipment and readable storage medium
CN113643311A (en) Image segmentation method and device for boundary error robustness
JP6011885B2 (en) Code reading apparatus and code reading method
KR102488813B1 (en) Method and apparatus for generating disparity map using edge image
KR20230151962A (en) Method and apparatus for detecting teeth
CN112862703A (en) Image correction method and device based on mobile photographing, electronic equipment and medium
CN110971895A (en) Video jitter detection method and device
CN112183695B (en) Coding method, coding pattern reading method, and photographing apparatus
CN111080734B (en) Method and terminal for processing Positron Emission Tomography (PET) data
CN113743146A (en) Deep learning-based batch graphic code identification method and device and storage medium
TWM614191U (en) Computing device for predicting cancer
CN113283241A (en) Text recognition method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant