CN109190740A - Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code - Google Patents

Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code Download PDF

Info

Publication number
CN109190740A
CN109190740A CN201810943202.8A CN201810943202A CN109190740A CN 109190740 A CN109190740 A CN 109190740A CN 201810943202 A CN201810943202 A CN 201810943202A CN 109190740 A CN109190740 A CN 109190740A
Authority
CN
China
Prior art keywords
color
pixel
sub
point set
code
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.)
Pending
Application number
CN201810943202.8A
Other languages
Chinese (zh)
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.)
Sen Da (shenzhen) Technology Co Ltd
Senda Shenzhen Technology Co Ltd
Original Assignee
Sen Da (shenzhen) 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 Sen Da (shenzhen) Technology Co Ltd filed Critical Sen Da (shenzhen) Technology Co Ltd
Priority to CN201810943202.8A priority Critical patent/CN109190740A/en
Publication of CN109190740A publication Critical patent/CN109190740A/en
Pending legal-status Critical Current

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
    • 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/06046Constructional details

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses generation method, device, equipment and the storage mediums of a kind of subregion gradual change color 2 D code, the method passes through first obtains the corresponding lattice pixels point set of black and white two dimensional code, the pixel collection is divided into N one's share of expenses for a joint undertaking pixel collection, N is the integer more than or equal to 1;Then the color change starting point for setting each sub-pixel point set establishes mapping relations of each of the same sub-pixel point set pixel at a distance from the color change starting point between filling color;The color that pixel each in each sub-pixel point set fills upper corresponding concentration is finally obtained into the subregion gradual change color 2 D code according to the mapping relations.Subregion gradual change color 2 D code of the invention has the advantages that rich in color changeable, solves the problems, such as that current two dimensional code color is single.

Description

Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code
Technical field
The present invention relates to planar bar code technology field more particularly to a kind of generation methods of subregion gradual change color 2 D code, dress It sets, equipment and storage medium.
Background technique
Under the historical background that internet high speed development, mobile terminal constantly upgrade, two dimensional code relies on geometry as a kind of Graphic recording data information, the communication technology that information fast processing can be realized using relevant device, are nowadays widely answered Various aspects for people's daily life.For enterprise, two dimensional code is even more a unlatching O2O (Online to Offline) the key of marketing model allows the operation of online and offline to become simpler convenience.Therefore, more and more businessmans Start the place that any user can contact in newspaper, magazine, advertisement, website etc. by every means with enterprises and institutions to put up certainly Oneself two dimensional code, it is desirable to be able to allow more clients go active scan they, the entrance of publicity is opened with this.However, present Two dimensional code is machine-made black and white cube mould mostly, and style sheet one lacks individuality, it is difficult to visually generate foot to audient Enough attractions.
Summary of the invention
The embodiment of the invention provides a kind of generation method of subregion gradual change color 2 D code, device, equipment and storages to be situated between Matter, to solve the problems, such as that two dimensional code color is single in the prior art.
In a first aspect, the embodiment of the invention provides a kind of generation method of subregion gradual change color 2 D code, the method Include:
The corresponding lattice pixels point set of black and white two dimensional code is obtained, the pixel collection is divided into N one's share of expenses for a joint undertaking pixel point set It closes, N is the integer more than or equal to 1;
The color change starting point for setting each sub-pixel point set is established in the same sub-pixel point set Mapping relations of each pixel at a distance from the color change starting point between filling color, wherein the filling color Including color category and color concentration, the color category is more than or equal to 2, and the color category does not include black or white;
Pixel each in each sub-pixel point set is filled to the face of upper corresponding concentration according to the mapping relations Color obtains the subregion gradual change color 2 D code.
Preferably, the lattice pixels point set is combined into rectangular lattice set, and the sub-pixel point set is combined into rectangular lattice collection It closes.
Preferably, described to establish each of the same sub-pixel point set pixel and the color change The distance of starting point and the mapping relations filled between color include:
Search pixel farthest with the color change starting point linear distance in the sub-pixel point set, determine described in Farthest pixel is to the farthest linear distance between the color change starting point;
Determine the color category filled in the sub-pixel point set, according to the color category and the farthest straight line away from From the distance range for determining each color variation;
The sequence for determining color change in the sub-pixel point set, according to the sequence of the color change and every kind described The distance range of color change obtains the mapping relations by the first fitting of a polynomial.
Preferably, the distance range of each color variation is equal in magnitude, and setting the color category has MnKind, it is described Farthest linear distance is d, sets the distance range of each color variation as a, d/M≤a < d.
Preferably, the mapping relations include:
Wherein, y indicates the concentration of pixel Fill Color, and x indicates pixel at a distance from coordinate origin.
Preferably, the lattice pixels point set is combined into circular dot battle array set, and the sub-pixel point set is combined into fan-shaped dot matrix collection It closes.
Preferably, described to establish each of the same sub-pixel point set pixel and the color change The distance of starting point and the mapping relations filled between color include:
The center of circle of the fan-shaped sub-pixel point set is set as color change starting point, according to the color category and described The radius of sub-pixel point set determines the distance range of each color variation;
The sequence for determining color change in the sub-pixel point set, sequence and each color according to the color change The distance range of variation obtains the mapping relations by the second fitting of a polynomial.
Second aspect, the embodiment of the invention provides a kind of generating means of subregion gradual change color 2 D code, described devices Include:
Sub-pixel point set obtains module, for obtaining the corresponding lattice pixels point set of black and white two dimensional code, by the picture Vegetarian refreshments set is divided into N one's share of expenses for a joint undertaking pixel collection, and N is the integer more than or equal to 1;
Mapping relations establish module, for setting the color change starting point of each sub-pixel point set, establish same Mapping of each pixel at a distance from the color change starting point between filling color in a sub-pixel point set Relationship, wherein the filling color includes color category and color concentration, and the color category is more than or equal to 2, the color kind Class does not include black or white;
Color 2 D code generation module, for according to the mapping relations by each picture in each sub-pixel point set The color that vegetarian refreshments fills upper corresponding concentration obtains the subregion gradual change color 2 D code.
The third aspect, the embodiment of the invention provides a kind of generating devices of subregion gradual change color 2 D code, comprising: at least One processor, at least one processor and computer program instructions stored in memory, work as computer program instructions The method such as first aspect in above embodiment is realized when being executed by processor.
Fourth aspect, the embodiment of the invention provides a kind of storage mediums, are stored thereon with computer program instructions, work as meter The method such as first aspect in above embodiment is realized when calculation machine program instruction is executed by processor.
In conclusion the generation method of subregion gradual change color 2 D code provided in an embodiment of the present invention, device, equipment and depositing Storage media, the method passes through first obtains the corresponding lattice pixels point set of black and white two dimensional code, by the pixel collection point At N one's share of expenses for a joint undertaking pixel collection;Then according to the color category and color change for needing to fill in each sub-pixel point set Direction determines the mapping relations in each sub-pixel point set between each pixel and filling color, final according to described in The color that pixel each in each sub-pixel point set fills upper corresponding concentration is obtained the subregion by mapping relations Gradual change color 2 D code, the subregion gradual change color 2 D code is rich in color changeable, and it is single to solve current two dimensional code color Problem.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described, for those of ordinary skill in the art, without creative efforts, also Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 is the flow chart of the generation method of the subregion gradual change color 2 D code of first embodiment of the invention.
Fig. 2 is the flow chart of the generation method of the subregion gradual change color 2 D code of second embodiment of the invention.
Fig. 3 is the two dimensional code subregion schematic diagram of the embodiment of the present invention.
Fig. 4 is the mapping relations schematic diagram of one embodiment of the invention.
Fig. 5 is the mapping relations schematic diagram of another embodiment of the present invention.
Fig. 6 is the flow chart of the generation method of the subregion gradual change color 2 D code of third embodiment of the invention.
Fig. 7 is the structural schematic diagram of the generating means of the subregion gradual change color 2 D code of the embodiment of the present invention.
Fig. 8 is the structural schematic diagram of the generating device of the subregion gradual change color 2 D code of the embodiment of the present invention.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention , technical solution and advantage be more clearly understood, with reference to the accompanying drawings and embodiments, the present invention is further retouched in detail It states.It should be understood that specific embodiment described herein is only configured to explain the present invention, it is not configured as limiting the present invention. To those skilled in the art, the present invention can be real in the case where not needing some details in these details It applies.Below the description of embodiment is used for the purpose of better understanding the present invention to provide by showing example of the invention.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including There is also other identical elements in the process, method, article or equipment of the element.
The embodiment of the invention provides a kind of generation method of subregion gradual change color 2 D code, two generated by this method It is rich in color changeable to tie up code, solves the problems, such as that current two dimensional code color is single.
Referring to Fig. 1, the method mainly comprises the steps that
S1, the corresponding lattice pixels point set of black and white two dimensional code is obtained, the pixel collection is divided into N one's share of expenses for a joint undertaking pixel Set, N are the integer more than or equal to 1;
The color change starting point of S2, each sub-pixel point set of setting, establish the same sub-pixel point set In each pixel at a distance from the color change starting point filling color between mapping relations;
S3, pixel each in each sub-pixel point set is filled into upper corresponding concentration according to the mapping relations Color obtains the subregion gradual change color 2 D code.
Wherein, the filling color includes color category and color concentration, and the color category is more than or equal to 2, the face Color type does not include black or white, and the lattice pixels point set can may be round dot matrix collection for rectangular lattice set It closes, the concrete shape of the lattice pixels point set is it is not limited here;When the lattice pixels point set is combined into rectangular lattice collection When conjunction, the sub-pixel point set is also rectangular lattice set;When the lattice pixels point set is combined into circular dot battle array set, institute Stating sub-pixel point set can may be ring shaped dot matrix set for fan-shaped dot matrix set, and the shape of the sub-pixel point set exists This is not specifically limited.
Referring to Fig. 2, the step S2 is specifically included when the lattice pixels point set is combined into rectangular lattice set:
S211, pixel farthest with the color change starting point linear distance in the sub-pixel point set is searched, really The farthest pixel is determined to the farthest linear distance between the color change starting point;
S212, it determines the color category filled in the sub-pixel point set, is determined according to the farthest linear distance every The distance range of kind color change;
S213, the sequence for determining color change in the sub-pixel point set, sequence and institute according to the color change The distance range for stating each color variation obtains the mapping relations by the first fitting of a polynomial.
Specifically, referring to Fig. 3, the rectangular pixels point set is divided into 4 parts of sub-pixel point sets, respectively First sub-pixel point set A1, the second sub-pixel point set A2, third sub-pixel point set A3, the 4th sub-pixel point set A4. A vertex O of the rectangle of the first sub-pixel point set A1 is set as color change starting point, then is risen with the color change The farthest pixel of point linear distance is another vertex on the rectangle diagonal line opposite with vertex O, with the color change Linear distance between the farthest pixel of starting point linear distance is pair of the rectangle where the first sub-pixel point set A1 Diagonal length.Catercorner length according to the color category and the rectangle of the first sub-pixel point set A1 determines every kind of face The distance range of color change, such as the color category number be 4 be respectively the first colors, the second color, third color and 4th color, the catercorner length of the rectangle where the first sub-pixel point set A1 are L, then the range of the first color filling It is 0~2L/5, the range of the second color filling is L/5~3L/5, and the range of third color filling is 2L/5~4L/5, the 4th face The range of color filling is 3L/5~L.Wherein, the color category number can be 3 kinds and be also possible to 5 kinds, the color category Specific number it is not limited here.The sequence for determining color change in the sub-pixel point set, according to the color change Sequence and each color variation distance range the concentration and pixel of each color are obtained by fitting of a polynomial With the corresponding relationship of starting point distance.Wherein, the multinomial can be quadratic polynomial and be also possible to an order polynomial, herein not It is specifically limited.
Preferably, the distance range of each color variation is equal in magnitude, and setting the color category has M kind, described Linear distance in sub-pixel point set between the pixel farthest with the color change starting point linear distance is d, then described The distance range of each color variation is a, d/M≤a < d.
Referring to Fig. 4, in the present embodiment, the multinomial is quadratic polynomial, the mapping relations are as follows:
Wherein, y indicates the concentration of pixel Fill Color, and x indicates pixel at a distance from coordinate origin, and a indicates every kind The distance range of color change.In the present embodiment, the number of the color category be 4, and respectively yellow Y, red R, Green G, blue B, and the sequence of color change is yellow Y, red R, green G, blue in the first sub-pixel point set A1 B, the sub-pixel point set are combined into rectangle, then the catercorner length of rectangle is 50 units, then the range of yellow Y filling be 0~ 20, the range of red R filling is 10~30, and the range of green G filling is 20~40, and the range of blue B filling is 30~50, then It is yellow Y that concentration is 100% apart from color of pixel its filling that color change starting point linear distance is 10, apart from color Color of pixel its filling of variation starting point linear distance when being 20 is the red R that concentration is 100%, apart from color change The linear distance of starting point be 10~20 in the range of pixel its filling color include yellow Y and red R.
Referring to Fig. 5, in another embodiment, the multinomial is an order polynomial, the mapping relations are as follows:
Wherein, y indicates the concentration of pixel Fill Color, and x indicates pixel at a distance from coordinate origin, and a indicates every kind The distance range of color change.In the present embodiment, the number of the color category be 4, and respectively black K, red R, Green G, blue B, and the sequence of color change is black K, red R, green G, blue in the first sub-pixel point set A1 B, the sub-pixel point set are combined into rectangle, then the catercorner length of rectangle is 40 units, then the range of black K filling be 0~ 10, the range of red R filling is 10~20, and the range of green G filling is 20~30, and the range of blue B filling is 30~40, then It is black K that concentration is 100% apart from color of pixel its filling that color change starting point linear distance is 10, apart from color Color of pixel its filling of variation starting point linear distance when being 20 is the red R that concentration is 100%, apart from color change The linear distance of starting point be 10~20 in the range of pixel its filling color be red R.The above mapping relations be only with One order polynomial and quadratic polynomial are illustrated as a preferred embodiment, can also be that multinomial more than three times is constituted, this A little mapping relations can be according to needing to set, all within the scope of the present invention.
In the present embodiment, the number of the color category is 4, and respectively yellow Y, red R, green G, white W, Other are identical as the content of embodiment 5, and details are not described herein.
Referring to Fig. 6, the sub-pixel point set is combined into sector when the lattice pixels point set is combined into circular dot battle array set Dot matrix set, then the step S2 specifically comprises the following steps:
S221, the center of circle of the fan-shaped sub-pixel point set is set as color change starting point, according to the color category The distance range of each color variation is determined with the radius of the sub-pixel point set;
S222, the sequence for determining color change in the sub-pixel point set, according to the sequence of the color change and every The distance range of kind color change obtains the mapping relations by the second fitting of a polynomial.
Specifically, with the center of circle of the fan-shaped sub-pixel point set for the color change starting point, with the color Change the same color that starting point fills upper same concentrations apart from identical pixel, wherein the sequence of color change and it is each in The concentration of color changes according to match colors into row stochastic selection, is not specifically limited herein.
Referring to Fig. 7, the embodiment of the invention provides a kind of generating means of subregion gradual change color 2 D code, described device Include:
Sub-pixel point set obtains module 10, will be described for obtaining the corresponding lattice pixels point set of black and white two dimensional code Pixel collection is divided into N one's share of expenses for a joint undertaking pixel collection, and N is the integer more than or equal to 1;
Mapping relations establish module 20, for setting the color change starting point of each sub-pixel point set, establish same Each pixel in one sub-pixel point set reflecting between filling color at a distance from the color change starting point Penetrate relationship, wherein the filling color includes color category and color concentration, and the color category is more than or equal to 2, the color Type does not include black or white;
Color 2 D code generation module 30, being used for will be in each sub-pixel point set each according to the mapping relations The color that pixel fills upper corresponding concentration obtains the subregion gradual change color 2 D code.
Preferably, the lattice pixels point set is combined into rectangular lattice set, and the sub-pixel point set is combined into rectangular lattice collection It closes.
Preferably, described to establish each of the same sub-pixel point set pixel and the color change The distance of starting point and the mapping relations filled between color include:
Search pixel farthest with the color change starting point linear distance in the sub-pixel point set, determine described in Farthest pixel is to the linear distance between the color change starting point;
It determines the color category filled in the sub-pixel point set, determines each color according to the farthest linear distance The distance range of variation;
The sequence for determining color change in the sub-pixel point set, according to the sequence of the color change and every kind described The distance range of color change obtains the mapping relations by the first fitting of a polynomial.
Preferably, the distance range of each color variation is equal in magnitude, and setting the color category has M kind, described Farthest linear distance is d, then the distance range of each color variation is a, d/M≤a < d.
Preferably, the mapping relations are as follows:
Wherein, y indicates the concentration of pixel Fill Color, and x indicates pixel at a distance from coordinate origin.
Preferably, the lattice pixels point set is combined into circular dot battle array set, and the sub-pixel point set is combined into fan-shaped dot matrix collection It closes.
Preferably, described to establish each of the same sub-pixel point set pixel and the color change The distance of starting point and the mapping relations filled between color include:
The center of circle of the fan-shaped sub-pixel point set is set as color change starting point, according to the color category and described The radius of sub-pixel point set determines the distance range of each color variation;
The sequence for determining color change in the sub-pixel point set, sequence and each color according to the color change The distance range of variation obtains the mapping relations by the second fitting of a polynomial.
In addition, the generation method in conjunction with the subregion gradual change color 2 D code of Fig. 1 embodiment of the present invention described can be by dividing The generating device of area's gradual change color 2 D code is realized.Fig. 8 shows subregion gradual change color 2 D provided in an embodiment of the present invention The hardware structural diagram of the generating device of code.
The generating device of subregion gradual change color 2 D code may include processor 401 and be stored with computer program instructions Memory 402.
Specifically, above-mentioned processor 401 may include central processing unit (CPU) or specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention One or more integrated circuits of example.
Memory 402 may include the mass storage for data or instruction.For example it rather than limits, memory 402 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or logical With the combination of universal serial bus (Universal Serial Bus, USB) driver or two or more the above.It is closing In the case where suitable, memory 402 may include the medium of removable or non-removable (or fixed).In a suitable case, it stores Device 402 can be inside or outside data processing equipment.In a particular embodiment, memory 402 is nonvolatile solid state storage Device.In a particular embodiment, memory 402 includes read-only memory (ROM).In a suitable case, which can be mask ROM, programming ROM (PROM), erasable PROM (EPROM), the electric erasable PROM (EEPROM), electrically-alterable ROM of programming (EAROM) or the combination of flash memory or two or more the above.
Processor 401 is by reading and executing the computer program instructions stored in memory 402, to realize above-mentioned implementation The generation method of any one subregion gradual change color 2 D code in example.
In one example, the generating device of subregion gradual change color 2 D code may also include communication interface 403 and bus 410.Wherein, as shown in figure 8, processor 401, memory 402, communication interface 403 are connected by bus 410 and completed each other Communication.
Communication interface 403 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment Communication.
Bus 410 includes hardware, software or both, by the component of the generating device of subregion gradual change color 2 D code coupling each other It is connected together.For example it rather than limits, bus may include accelerated graphics port (AGP) or other graphics bus, enhancing industry Standard architecture (EISA) bus, front side bus (FSB), super transmission (HT) interconnection, Industry Standard Architecture (ISA) bus, infiniband Wide interconnection, low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral component interconnection (PCI) are total Line, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association part (VLB) combination of bus or other suitable buses or two or more the above.In a suitable case, bus 410 may include one or more buses.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention considers to appoint What suitable bus or interconnection.
In addition, in conjunction with the generation method of the subregion gradual change color 2 D code in above-described embodiment, the embodiment of the present invention can be mentioned It is realized for a kind of computer readable storage medium.Computer program instructions are stored on the computer readable storage medium;It should The life of any one subregion gradual change color 2 D code in above-described embodiment is realized when computer program instructions are executed by processor At method.
In conclusion the generation method of subregion gradual change color 2 D code provided in an embodiment of the present invention, device, equipment and depositing Storage media, the method passes through first obtains the corresponding lattice pixels point set of black and white two dimensional code, by the pixel collection point At N one's share of expenses for a joint undertaking pixel collection;Then according to the color category and color change for needing to fill in each sub-pixel point set Direction determines the mapping relations in each sub-pixel point set between each pixel and filling color, final according to described in The color that pixel each in each sub-pixel point set fills upper corresponding concentration is obtained the subregion by mapping relations Gradual change color 2 D code, the subregion gradual change color 2 D code is rich in color changeable, and it is single to solve current two dimensional code color Problem.
It should be clear that the invention is not limited to specific configuration described above and shown in figure and processing. For brevity, it is omitted here the detailed description to known method.In the above-described embodiments, several tools have been described and illustrated The step of body, is as example.But method process of the invention is not limited to described and illustrated specific steps, this field Technical staff can be variously modified, modification and addition after understanding spirit of the invention, or suitable between changing the step Sequence.
Functional block shown in structures described above block diagram can be implemented as hardware, software, firmware or their group It closes.When realizing in hardware, it may, for example, be electronic circuit, specific integrated circuit (ASIC), firmware appropriate, insert Part, function card etc..When being realized with software mode, element of the invention is used to execute program or the generation of required task Code section.Perhaps code segment can store in machine readable media program or the data-signal by carrying in carrier wave is passing Defeated medium or communication links are sent." machine readable media " may include any medium for capableing of storage or transmission information. The example of machine readable media includes electronic circuit, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), soft Disk, CD-ROM, CD, hard disk, fiber medium, radio frequency (RF) link, etc..Code segment can be via such as internet, inline The computer network of net etc. is downloaded.
It should also be noted that, the exemplary embodiment referred in the present invention, is retouched based on a series of step or device State certain methods or system.But the present invention is not limited to the sequence of above-mentioned steps, that is to say, that can be according in embodiment The sequence referred to executes step, may also be distinct from that the sequence in embodiment or several steps are performed simultaneously.
The above description is merely a specific embodiment, it is apparent to those skilled in the art that, For convenience of description and succinctly, the system, module of foregoing description and the specific work process of unit can refer to preceding method Corresponding process in embodiment, details are not described herein.It should be understood that scope of protection of the present invention is not limited thereto, it is any to be familiar with Those skilled in the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or substitutions, These modifications or substitutions should be covered by the protection scope of the present invention.

Claims (10)

1. a kind of generation method of subregion gradual change color 2 D code, which is characterized in that the described method includes:
The corresponding lattice pixels point set of black and white two dimensional code is obtained, the pixel collection is divided into N one's share of expenses for a joint undertaking pixel collection, N For the integer more than or equal to 1;
The color change starting point for setting each sub-pixel point set establishes each of same described sub-pixel point set Mapping relations of the pixel at a distance from the color change starting point between filling color, wherein the filling color includes Color category and color concentration, the color category are more than or equal to 2, and the color category does not include black or white;
It is by the color that pixel each in each sub-pixel point set fills upper corresponding concentration according to the mapping relations Obtain the subregion gradual change color 2 D code.
2. the generation method of subregion gradual change color 2 D code according to claim 1, which is characterized in that the lattice pixels Point set is combined into rectangular lattice set, and the sub-pixel point set is combined into rectangular lattice set.
3. the generation method of subregion gradual change color 2 D code according to claim 2, which is characterized in that it is described establish it is same Each of a sub-pixel point set pixel is at a distance from the color change starting point between filling color Mapping relations include:
Pixel farthest with the color change starting point linear distance in the sub-pixel point set is searched, is determined described farthest Pixel to the farthest linear distance between the color change starting point;
Determine the color category filled in the sub-pixel point set, it is true according to the color category and the farthest linear distance Determine the distance range of each color variation;
The sequence for determining color change in the sub-pixel point set, sequence and each color according to the color change The distance range of variation obtains the mapping relations by the first fitting of a polynomial.
4. the generation method of subregion gradual change color 2 D code according to claim 3, which is characterized in that each color The distance range of variation is equal in magnitude, and setting the color category has MnKind, the farthest linear distance is d, is set described every The distance range of kind color change is a, d/M≤a < d.
5. the generation method of subregion gradual change color 2 D code according to claim 4, which is characterized in that the mapping relations Include:
Wherein, y indicates the concentration of pixel Fill Color, and x indicates pixel at a distance from coordinate origin.
6. the generation method of subregion gradual change color 2 D code according to claim 1, which is characterized in that the lattice pixels Point set is combined into circular dot battle array set, and the sub-pixel point set is combined into fan-shaped dot matrix set.
7. the generation method of subregion gradual change color 2 D code according to claim 6, which is characterized in that it is described establish it is same Each of a sub-pixel point set pixel is at a distance from the color change starting point between filling color Mapping relations include:
The center of circle of the fan-shaped sub-pixel point set is set as color change starting point, according to the color category and the sub- picture The radius of vegetarian refreshments set determines the distance range of each color variation;
The sequence for determining color change in the sub-pixel point set, sequence and each color according to the color change change Distance range the mapping relations are obtained by the second fitting of a polynomial.
8. a kind of generating means of subregion gradual change color 2 D code, which is characterized in that described device includes:
Sub-pixel point set obtains module, for obtaining the corresponding lattice pixels point set of black and white two dimensional code, by the pixel Set is divided into N one's share of expenses for a joint undertaking pixel collection, and N is the integer more than or equal to 1;
Mapping relations establish module, for setting the color change starting point of each sub-pixel point set, establish the same institute Mapping relations of each pixel in sub-pixel point set at a distance from the color change starting point between filling color are stated, Wherein, the filling color includes color category and color concentration, and the color category is more than or equal to 2, and the color category is not Including black or white;
Color 2 D code generation module, for according to the mapping relations by each pixel in each sub-pixel point set The color of corresponding concentration obtains the subregion gradual change color 2 D code in filling.
9. a kind of generating device of subregion gradual change color 2 D code characterized by comprising at least one processor, at least one The computer program instructions of a memory and storage in the memory, when the computer program instructions are by the processing Such as method of any of claims 1-7 is realized when device executes.
10. a kind of storage medium, is stored thereon with computer program instructions, which is characterized in that when the computer program instructions Such as method of any of claims 1-7 is realized when being executed by processor.
CN201810943202.8A 2018-08-17 2018-08-17 Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code Pending CN109190740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810943202.8A CN109190740A (en) 2018-08-17 2018-08-17 Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810943202.8A CN109190740A (en) 2018-08-17 2018-08-17 Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code

Publications (1)

Publication Number Publication Date
CN109190740A true CN109190740A (en) 2019-01-11

Family

ID=64918354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810943202.8A Pending CN109190740A (en) 2018-08-17 2018-08-17 Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code

Country Status (1)

Country Link
CN (1) CN109190740A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978113A (en) * 2019-03-28 2019-07-05 尤尼泰克(嘉兴)信息技术有限公司 A kind of generation method of gradient color two dimensional code
WO2020250803A1 (en) * 2019-06-12 2020-12-17 株式会社バンダイ Toy with identification code
CN117560402A (en) * 2024-01-12 2024-02-13 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978113A (en) * 2019-03-28 2019-07-05 尤尼泰克(嘉兴)信息技术有限公司 A kind of generation method of gradient color two dimensional code
CN109978113B (en) * 2019-03-28 2022-06-10 尤尼泰克(嘉兴)信息技术有限公司 Gradient color two-dimensional code generation method
WO2020250803A1 (en) * 2019-06-12 2020-12-17 株式会社バンダイ Toy with identification code
CN117560402A (en) * 2024-01-12 2024-02-13 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange
CN117560402B (en) * 2024-01-12 2024-04-19 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange

Similar Documents

Publication Publication Date Title
CN109190740A (en) Generation method, device, equipment and the storage medium of subregion gradual change color 2 D code
CN101430768B (en) Two-dimension bar code positioning method
CN108563559A (en) A kind of test method of identifying code, device, terminal device and storage medium
CN111127590B (en) Second-order Bezier curve drawing method and device
CN111353956B (en) Image restoration method and device, computer equipment and storage medium
JP5973808B2 (en) Information processing device, terminal device, information processing system, information processing method, and computer program
CN110544255A (en) method and system for segmenting triangular mesh holes for 3D printing
CN109978571A (en) Source tracing method based on block chain and device of tracing to the source
CN116756836B (en) Tunnel super-undermining volume calculation method, electronic equipment and storage medium
CN105261032A (en) Method and device for processing video frame in video file
CN111915568B (en) Image tampering positioning model generation method, image tampering positioning method and device
JP2023511868A (en) Systems, methods and apparatus for image processing
CN115865607A (en) Distributed training computing node management method and related device
CN111046693B (en) Two-dimensional code scanning method and device, terminal equipment and storage medium
CN114494668A (en) Method, apparatus, device, storage medium, and program product for expanding three-dimensional model
CN111488494B (en) Account funds transfer network diagram coloring method and device
CN114332809A (en) Image identification method and device, electronic equipment and storage medium
KR101919085B1 (en) Apparatus and method for simplification of 3D mesh data
CN116561240A (en) Electronic map processing method, related device and medium
CN113591832B (en) Training method of image processing model, document image processing method and device
US20230418794A1 (en) Data processing method, and non-transitory medium and electronic device
CN113934421A (en) Page path writing method, device and equipment of application program and storage medium
CN107967341A (en) A kind of image display method, terminal device and storage medium
CN111382222B (en) High-precision map frame data edge connecting method and device
CN109460476B (en) Method and device for generating mulberry basic diagram, storage medium and electronic equipment

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