CN104751410B - Image and two-dimensional code fusion method and device - Google Patents
Image and two-dimensional code fusion method and device Download PDFInfo
- Publication number
- CN104751410B CN104751410B CN201310754632.2A CN201310754632A CN104751410B CN 104751410 B CN104751410 B CN 104751410B CN 201310754632 A CN201310754632 A CN 201310754632A CN 104751410 B CN104751410 B CN 104751410B
- Authority
- CN
- China
- Prior art keywords
- image
- quick response
- response code
- area
- region
- 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.)
- Active
Links
Landscapes
- Image Processing (AREA)
Abstract
The invention discloses an image and two-dimensional code fusion method and device, and belongs to the technical field of information processing. The method comprises the steps of acquiring an image and a two-dimensional code to be fused; dividing the image into a plurality of image areas according to the unit size of the two-dimensional code; covering the value of the first area in the two-dimensional code to the center of the corresponding image area; covering the value of the second area in the two-dimensional code to the corresponding image area to obtain the image fused two-dimensional code. According to the method, the image and the two-dimensional code to be fused are acquired, the image is divided into the plurality of image areas according to the unit size of the two-dimensional code, the value of the first area in the two-dimensional code covers the corresponding center position of the image area, and the value of the second area in the two-dimensional code covers the corresponding image area, so as to obtain the image fused two-dimensional code; therefore, the display area of the image can be expanded; the display effect of the fused two-dimensional code can be optimized.
Description
Technical field
The present invention relates to technical field of information processing, the fusion method and device of more particularly to a kind of image and Quick Response Code.
Background technology
With continuing to develop for the information processing technology, Quick Response Code with its coding range it is wide, fault-tolerant ability is strong the features such as obtain
It is widely applied.Common Quick Response Code is the black and white by being distributed in two dimensional surface according to certain rules with specific geometric figure
Alternate graphic recording information, the information recorded in Quick Response Code includes data encoding information, error correction information, view finding figure and determines
Bit pattern information and level of error correction information.This Quick Response Code needs to use two-dimensional code scanning software scans Quick Response Code just to can know that
The information recorded in Quick Response Code, and the display of Quick Response Code is single, is unfavorable for the application of Quick Response Code.And image can intuitively show
Show information, merged with Quick Response Code by by image, obtain image in 2 D code, not only increase the sight of Quick Response Code, also without
Scanning Quick Response Code just will appreciate that the information recorded in Quick Response Code.Therefore, how image to be merged with Quick Response Code, becomes and carry
The key of two dimension code performance high.
Prior art is that the viewing area of usual image is not in adding the image to Quick Response Code using the serious forgiveness of Quick Response Code
More than the 10% of whole Quick Response Code viewing area, the process of implementing includes:Downscaled images, and the image after diminution is replaced two
Predeterminable area in dimension code, the predeterminable area is usually the center of Quick Response Code.
Realize it is of the invention during, inventor find prior art at least there is problems with:
Due to needing downscaled images, cause the image of display smaller, be unfavorable for the discovery of image;Further, since serious forgiveness
Restriction, further limit the display size of image, and the effect on driving birds is not good after image is merged with Quick Response Code.
The content of the invention
In order to solve problem of the prior art, the embodiment of the invention provides a kind of image and Quick Response Code fusion method and
Device.The technical scheme is as follows:
On the one hand, there is provided a kind of fusion method of image and Quick Response Code, methods described includes:
Obtain image and Quick Response Code to be fused;
Cell size according to the Quick Response Code divides the image into multiple images region, each image-region and institute
The unit for stating Quick Response Code sets up corresponding relation;
The value of each unit in first area in the Quick Response Code is covered the image that corresponding relation is set up with it
The center in region, and by the value of each unit in second area in the Quick Response Code cover with its set up it is corresponding close
The image-region of system, obtains the Quick Response Code after fused images;
Wherein, the first area is data encoded content and error correction information code region, the second area
It is other regions outside the first area.
On the other hand, there is provided a kind of fusing device of image and Quick Response Code, described device includes:
First acquisition module, for obtaining image to be fused;
Second acquisition module, for obtaining Quick Response Code to be fused;
Division module, for according to the cell size of the Quick Response Code divide the image into multiple images region,
Each image-region sets up corresponding relation with the unit of the Quick Response Code;
First overlay module, sets up for the value of each unit in first area in the Quick Response Code to be covered with it
There is the center of the image-region of corresponding relation;
Second overlay module, sets up for the value of each unit in second area in the Quick Response Code to be covered with it
There is the image-region of corresponding relation, obtain the Quick Response Code after fused images;
Wherein, the first area is data encoded content and error correction information code region, the second area
It is other regions outside the first area.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
By obtaining image and Quick Response Code to be fused, and multiple figures are divided an image into according to the cell size of Quick Response Code
As region, then the value of first area in Quick Response Code is covered the center of corresponding image-region, and by Quick Response Code the
The value in two regions covers corresponding image-region, obtains the Quick Response Code after fused images, so as to expand the viewing area of image
Domain, optimizes the display effect of the Quick Response Code after fusion.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the fusion method flow chart of the image that the embodiment of the present invention one is provided and Quick Response Code;
Fig. 2 is the fusion method flow chart of the image that the embodiment of the present invention two is provided and Quick Response Code;
Fig. 3 is the schematic diagram of the image inputting interface that the embodiment of the present invention two is provided;
Fig. 4 is the schematic diagram of the Quick Response Code mode interface that the embodiment of the present invention two is provided;
Fig. 5 is the schematic diagram of the Quick Response Code that the embodiment of the present invention two is provided;
Fig. 6 is the schematic diagram of the image-region that the embodiment of the present invention two is provided;
Fig. 7 is the schematic diagram of the Quick Response Code after the fused images that the embodiment of the present invention two is provided;
Fig. 8 is the structural representation of the fusing device of the image that the embodiment of the present invention three is provided and Quick Response Code;
Fig. 9 is the structural representation of the first overlay module that the embodiment of the present invention three is provided;
Figure 10 is the structural representation of the first acquisition module that the embodiment of the present invention three is provided;
Figure 11 is the structural representation of the second acquisition module that the embodiment of the present invention three is provided;
Figure 12 is the structural representation of the terminal that the embodiment of the present invention four is provided.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
The embodiment of the invention provides the fusion method of a kind of image and Quick Response Code, in order to improve the clicking rate of Quick Response Code with
And conversion ratio, the present embodiment provide method image is fused in Quick Response Code completely, the fault-tolerance using Quick Response Code makes fusion
The feature of the existing image of Quick Response Code afterwards, and the information comprising Quick Response Code, the resolution for having taken into account Quick Response Code are similar to image
Degree.Referring to Fig. 1, the method flow that the present embodiment is provided includes:
101:Obtain image and Quick Response Code to be fused;
Further, image to be fused is obtained, including:Obtain input image, and to be input into image carry out pre- place
Reason, obtains image to be fused.
Further, the image being input into is pre-processed, obtains image to be fused, including:
Image to being input into carries out Face datection, and facial image to detecting carries out size cutting and scaling treatment,
Obtain image to be fused.
Further, Quick Response Code to be fused is obtained, including:
The character string of input is obtained, and character string is encoded, obtain Quick Response Code to be fused;
Wherein, character string is at least one information correspondence in website information, card information, text message and code information
Character string.
102:Cell size according to Quick Response Code divides an image into multiple images region, each image-region and Quick Response Code
Unit set up corresponding relation;
103:The value of first area in Quick Response Code is covered the center of corresponding image-region, and by Quick Response Code
The value of second area covers corresponding image-region, obtains the Quick Response Code after fused images.
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.
Further, the value of first area in Quick Response Code is covered the center of corresponding image-region, including:
Each image-region in image is divided into the sub-image area of predetermined number, and in the subgraph of each image-region
As determining center sub-image area in region;
The value of first area in Quick Response Code is covered the center sub-image area of corresponding image-region.
Method provided in an embodiment of the present invention, by obtaining image and Quick Response Code to be fused, and according to the list of Quick Response Code
First size divides an image into multiple images region, then the value of first area in Quick Response Code is covered into corresponding image-region
Center, and the value of second area in Quick Response Code is covered into corresponding image-region, the Quick Response Code after fused images is obtained,
So as to expand the viewing area of image, the display effect of the Quick Response Code after fusion is optimized.
Embodiment two
The embodiment of the invention provides the fusion method of a kind of image and Quick Response Code.For convenience of description, with to be fused
As a example by Quick Response Code is black and white Quick Response Code, with reference to the content of above-described embodiment one, to image provided in an embodiment of the present invention and two dimension
The method of melting of code carries out that explanation is explained in detail, and referring to Fig. 2, method flow includes:
201:Obtain image and Quick Response Code to be fused;
Specifically, image to be fused is obtained, including but not limited to:Obtain input image, and to be input into image enter
Row pretreatment, obtains image to be fused.
Mode on obtaining the image of input, the present embodiment is not especially limited.During specific implementation, image can be provided
Inputting interface, user passes through image inputting interface input picture.Certainly, in addition to aforesaid way, other modes can also be used
Obtain the image of input.For example, there is provided multiple images are selected for user, using the image of user's selection as the input for getting
The modes such as image.
In order to make it easy to understand, being illustrated by taking image inputting interface as shown in Figure 3 as an example.Show on the image inputting interface
Show the signal language of " image to be fused please be select ", and show select button;After user's click select button is detected,
Show the catalogue of local file;The catalogue includes 3 directory informations of image, respectively image 1, image 2 and image 3, often
One image of individual directory information correspondence;When it is image 1 to detect the directory information of image of user's selection, by the correspondence of image 1
Image as the image of the input for getting, and the image of input is shown on image inputting interface.
Further, the image being input into is pre-processed, including but not limited to:Image to being input into carries out face inspection
Survey, and facial image to detecting carries out size cutting and scaling treatment, obtains image to be fused.
Preferably, when being pre-processed to the image being input into, the face image processing that will be detected also is included but is not limited to
Into the image to be fused with Quick Response Code size identical.That is, image to be fused can be with identical with the size of Quick Response Code
Can also be different, the present embodiment is not especially limited to this.
The method that the present embodiment is provided carries out Face datection to the image being input into, and realizes melting for facial image and Quick Response Code
Close, the Quick Response Code after fusion is more enriched.For example, the Quick Response Code after fusion can be used for making face Quick Response Code business card etc..
The mode of Face datection can have various, and the present embodiment is not especially limited to this, can be using the side of any one Face datection
Formula.Mode on triggering Face datection, the present embodiment is equally not especially limited, and during specific implementation, can provide option, by
User chooses whether the Quick Response Code that generation is merged with facial image.Certainly, in addition to aforesaid way, can also be input into using obtaining
Image after, directly trigger the other modes such as Face datection.
In order to make it easy to understand, being illustrated by taking Quick Response Code mode interface as shown in Figure 4 as an example.In Quick Response Code mode interface
Upper display Face datection button, after detecting user's click Face datection button, the image to being input into carries out Face datection, and shows
Show the facial image for detecting;Prompting user " detects facial image, if the Quick Response Code that generation is merged with facial image",
And show two buttons of "Yes" and "No".If detecting user clicks on "Yes" button, two merged with facial image are generated
Dimension code;If detecting user clicks on "No" button, the image of the input before Face datection is merged with Quick Response Code.
By carrying out size cutting and scaling treatment to facial image, make the facial image after size cutting and scaling treatment
Size with Quick Response Code is identical, and image being capable of complete fusion with Quick Response Code.Additionally, except size cutting and the treatment side of scaling
Formula, can also carry out other special effect processings to the image being input into, and to expand the application scenarios of Quick Response Code, the present embodiment is not to image
Processing mode makees specific restriction.For example, portrait cartooning etc. is managed.
In order to image is merged with Quick Response Code, in addition it is also necessary to obtain Quick Response Code.Quick Response Code to be fused is obtained, including but is not limited
In:The character string of input is obtained, and character string is encoded, obtain Quick Response Code to be fused;Wherein, character string is network address letter
The corresponding character string of at least one information in breath, card information, text message and code information.
Mode on obtaining the character string of input, the present embodiment is not especially limited.During specific implementation, can use and carry
The character string of input is obtained for the mode of character string inputting interface.Wherein, the need for the content of character string can be according to user
Voluntarily it is input into.After character string is got, character string is encoded, generates corresponding with character string Quick Response Code, and by this two
Dimension code is used as Quick Response Code to be fused.On the mode encoded to character string, the present embodiment is not especially limited, and obtains
Quick Response Code can be as shown in Figure 5.
It should be noted that due to being that image is merged with Quick Response Code, the order of acquisition image to be fused and Quick Response Code
Dividing without priority, image to be fused can be first obtained, then obtain Quick Response Code to be fused;Can also first obtain to be fused
Quick Response Code, then obtain image to be fused.
202:Cell size according to Quick Response Code divides an image into multiple images region, each image-region and Quick Response Code
Unit set up corresponding relation;
In order to image is merged with Quick Response Code, the method that the present embodiment is provided is obtaining image and two dimension to be fused
After code, the cell size according to Quick Response Code divides an image into multiple images region, the list of each image-region and Quick Response Code
Unit sets up corresponding relation.
Wherein, the unit of Quick Response Code refers to the minimum unit of record information in Quick Response Code.With the black and white matrix form of 21*21
As a example by Quick Response Code, the Quick Response Code is made up of 21*21 grid, and each grid is a unit for Quick Response Code.By black, white picture
The distribution of element different grids in a matrix is encoded, in the grid of matrix, appearance side's point, round dot or other shapes point table
Show binary one, the side's of occurring without point, round dot or other shapes point are represented binary " 0 ", the permutation and combination at different grid midpoints
The information that matrix two-dimensional code is included is determined.
When cell size according to Quick Response Code divides an image into multiple images region, the image-region that image is divided into
Quantity can be identical with the element number of Quick Response Code, the image-region on same position is corresponding with the unit of Quick Response Code, i.e., often
Individual image-region sets up corresponding relation with the unit of Quick Response Code.If for example, Quick Response Code is made up of the unit of 21*21, will scheme
As being divided into 21*21 image-region, each image-region with same position on Quick Response Code unit it is corresponding so that often
Individual image-region sets up corresponding relation with the unit of Quick Response Code.For example, if Quick Response Code and image-region are represented with matrix respectively,
Being set up with the image-region for being located at the row of the 1st row the 1st in image positioned at the unit of the row of the 1st row the 1st in Quick Response Code has corresponding relation.Position
The unit of the row of the 1st row the 2nd is set up with the image-region for being located at the row of the 1st row the 2nd in image in Quick Response Code corresponding relation etc..
203:Each image-region in image is divided into the sub-image area of predetermined number, and in each image-region
Center sub-image area is determined in sub-image area;
The present embodiment does not make specific restriction to predetermined number, during specific implementation, each image-region can be divided into list
Several sub-image areas such that it is able to determine one or more center sub-image areas.For example, each image-region is divided into
3*3,5*5 are with the sub-image area of 7*7 etc., sub-image regions centered on one or more sub-image areas at the center of being located at are determined
Domain.Or, even numbers sub-image area can be divided into, centered on one or more sub-image areas at the center of being located at are determined
Sub-image area.For example, each image-region is divided into 2*2,4*4 with the sub-image area of 8*8 etc..In addition, the present embodiment
Equally specific restriction is not made to determining the mode of center sub-image area in the sub-image area of each image-region.
In order to make it easy to understand, being illustrated by taking the image-region as shown in Fig. 6 (1) as an example.Wherein, image-region is divided
It is the sub-image area of 3*3.Each sub-image area of the image-region is numbered, respectively 1 to 9, and is 5 by numbering
Sub-image area as determine center sub-image area.
Again for example, being illustrated by taking the image-region as shown in Fig. 6 (2) as an example.Wherein, image-region is divided into 5*5
Sub-image area.Each sub-image area of the image-region is numbered, respectively 1 to 25, by numbering be 7,8,9,
12nd, 13,14,17,18,19 sub-image area is used as the center sub-image area for determining.
Again for example, being illustrated by taking the image-region as shown in Fig. 6 (3) as an example.Wherein, image-region is divided into 2*2
Sub-image area.Each sub-image area of the image-region is numbered, respectively 1 to 4, will number be 1 subgraph
As region is used as the center sub-image area for determining.
Again for example, being illustrated by taking the image-region as shown in Fig. 6 (4) as an example.Wherein, image-region is divided into 4*4
Sub-image area.Each sub-image area of the image-region is numbered, respectively 1 to 16, by numbering be 6,7,10,
11 sub-image area is used as the center sub-image area for determining.
204:The value of first area in Quick Response Code covers the center sub-image area of corresponding image-region, and by two
The value of second area covers corresponding image-region in dimension code, obtains the Quick Response Code after fused images.
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.First area and second area are constituted by the unit of Quick Response Code in Quick Response Code, thus by Quick Response Code
When the value of middle first area covers the center sub-image area of corresponding image-region, can be by first area in Quick Response Code
The value of each unit cover and set up with the unit and have a center sub-image area of image-region of corresponding relation.For example,
If located in Quick Response Code the 10th row the 10th row unit in first area, the unit be black, and the unit be located at figure
The image-region of the row of the 10th row the 10th is set up and has corresponding relation as in, then will be located at the unit of the row of the 10th row the 10th in Quick Response Code
The center sub-image area of the image-region of the row of the 10th row the 10th in value covering image, will in image the row of the 10th row the 10th figure
As the center sub-image area in region is set to black.Similarly, if located in Quick Response Code the 20th row the 20th row unit first
In region, the unit is white, and the unit has corresponding relation with the image-region foundation for being located at the row of the 20th row the 20th in image,
The center of the image-region of the row of the 20th row the 20th in the value covering image of the unit of the row of the 20th row the 20th in Quick Response Code will be then located at
Sub-image area, will be set to white in the center sub-image area of the image-region of the row of the 20th row the 20th in image.
When the value of second area in Quick Response Code is covered into corresponding image-region, can be by second area in Quick Response Code
The value of each unit cover to be set up with the unit and have the image-region of corresponding relation.For example, if located in Quick Response Code
15 row the 15th row unit in second area, the unit be black, and the unit be located at image in the 15th row the 15th row
Image-region is set up corresponding relation, then will be located at the 15th row in the value covering image of the unit of the row of the 15th row the 15th in Quick Response Code
The image-region of the 15th row, will be set to black by the image-region of the row of the 15th row the 15th in image.Similarly, if located in Quick Response Code
In the 13rd row the 13rd row unit in second area, the unit for white, and the unit be located at image in the 13rd row the 13rd
The image-region of row is set up corresponding relation, then will be located in the value covering image of the unit of the row of the 13rd row the 13rd in Quick Response Code the
The image-region of the row of 13 row the 13rd, will be set to white by the image-region of the row of the 13rd row the 13rd in image.
In order to the whole region of Quick Response Code is all merged with image, and due to be have recorded in the first area of Quick Response Code
Error correction information, then the value of first area in Quick Response Code is covered the center sub-image area of corresponding image-region so that remove
Other overseas image-regions of center sub-image regions can expand the indication range of image with the information of display image, reduce
The capped region of image.
Because the second area of Quick Response Code has been usually noted the information such as positioning, form and the version of Quick Response Code, in order that
Quick Response Code after fusion can be recognized correctly, and the value of second area in Quick Response Code covered into corresponding image-region, and then
Quick Response Code after to fused images.For example, the Quick Response Code after fused images can be Quick Response Code as shown in Figure 7.Fused images
Quick Response Code afterwards gives user more friendly visual experience, improves the clicking rate and conversion ratio of Quick Response Code.
The method that the present embodiment is provided is by obtaining image and Quick Response Code to be fused and big according to the unit of Quick Response Code
It is small to divide an image into multiple images region, then the center that the value of first area in Quick Response Code is covered corresponding image-region
Position, and the value of second area in Quick Response Code is covered into corresponding image-region, the Quick Response Code after fused images is obtained, so that
The viewing area of image is expanded, the display effect of the Quick Response Code after fusion is optimized.
Embodiment three
Referring to Fig. 8, the fusing device of a kind of image and Quick Response Code is the embodiment of the invention provides, the device includes:
First acquisition module 801, for obtaining image to be fused;
Second acquisition module 802, for obtaining Quick Response Code to be fused;
Division module 803, for dividing an image into multiple images region according to the cell size of Quick Response Code, each image
Corresponding relation is set up in region with the unit of Quick Response Code;
First overlay module 804, the center for the value of first area in Quick Response Code to be covered corresponding image-region
Position;
Second overlay module 805, for the value of second area in Quick Response Code to be covered into corresponding image-region, is melted
Close the Quick Response Code after image;
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.
As a kind of preferred embodiment, referring to Fig. 9, the first overlay module 804, including:
Deng subdivision 8041, the sub-image area for each image-region in image to be divided into predetermined number;
Determining unit 8042, for determining center sub-image area in the sub-image area of each image-region;
Capping unit 8043, the center subgraph for the value of first area in Quick Response Code to be covered corresponding image-region
As region.
As a kind of preferred embodiment, referring to Figure 10, the first acquisition module 801, including:
Acquiring unit 8011, the image for obtaining input;
Pretreatment unit 8012, for being pre-processed to the image being input into, obtains image to be fused.
As a kind of preferred embodiment, pretreatment unit 8012, for carrying out Face datection to the image being input into, and to inspection
The facial image for measuring carries out size cutting and scaling treatment, obtains image to be fused.
As a kind of preferred embodiment, referring to Figure 11, the second acquisition module 802, including:
Acquiring unit 8021, the character string for obtaining input;
Coding unit 8022, for being encoded to character string, obtains Quick Response Code to be fused;
Wherein, character string is at least one information correspondence in website information, card information, text message and code information
Character string.
In sum, device provided in an embodiment of the present invention, by obtaining image and Quick Response Code to be fused, and according to two
The cell size for tieing up code divides an image into multiple images region, then the value of first area in Quick Response Code is covered into corresponding figure
As the center in region, and the value of second area in Quick Response Code is covered into corresponding image-region, after obtaining fused images
Quick Response Code, so as to expand the viewing area of image, optimize fusion after Quick Response Code display effect.
Example IV
A kind of terminal is the embodiment of the invention provides, Figure 12 is refer to, it illustrates the end involved by the embodiment of the present invention
The structural representation at end, the terminal can be used for implementing the fusion method of the image and Quick Response Code provided in above-described embodiment.Tool
For body:
Terminal 1200 can include RF (Radio Frequency, radio frequency) circuit 110, include one or more
The memory 120 of computer-readable recording medium, input block 130, display unit 140, sensor 150, voicefrequency circuit 160,
WiFi (Wireless Fidelity, Wireless Fidelity) module 170, include one or the treatment of more than one processing core
The part such as device 180 and power supply 190.It will be understood by those skilled in the art that the terminal structure shown in Figure 12 do not constitute it is right
The restriction of terminal, can include part more more or less than diagram, or combine some parts, or different part cloth
Put.Wherein:
RF circuits 110 can be used to receiving and sending messages or communication process in, the reception and transmission of signal, especially, by base station
After downlink information is received, transfer to one or more than one processor 180 is processed;In addition, will be related to up data is activation to
Base station.Generally, RF circuits 110 include but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, use
Family identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplex
Device etc..Additionally, RF circuits 110 can also be communicated by radio communication with network and other equipment.The radio communication can make
With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely
Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code
Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple
Access, WCDMA), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short
Messaging Service, Short Message Service) etc..
Memory 120 can be used to store software program and module, and processor 180 is by running storage in memory 120
Software program and module, so as to perform various function application and data processing.Memory 120 can mainly include storage journey
Sequence area and storage data field, wherein, the application program (ratio that storing program area can be needed for storage program area, at least one function
Such as sound-playing function, image player function) etc.;Storage data field can be stored and use created number according to terminal 1200
According to (such as voice data, phone directory etc.) etc..Additionally, memory 120 can include high-speed random access memory, can also wrap
Include nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.
Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input block 130 to memory
120 access.
Input block 130 can be used to receive the numeral or character information of input, and generation is set and function with user
The relevant keyboard of control, mouse, action bars, optics or trace ball signal input.Specifically, input block 130 may include to touch
Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, can collect use
Family thereon or neighbouring touch operation (such as user is using any suitable objects such as finger, stylus or annex in touch-sensitive table
Operation on face 131 or near Touch sensitive surface 131), and corresponding attachment means are driven according to formula set in advance.It is optional
, Touch sensitive surface 131 may include two parts of touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used
The touch orientation at family, and the signal that touch operation brings is detected, transmit a signal to touch controller;Touch controller is from touch
Touch information is received in detection means, and is converted into contact coordinate, then give processor 180, and can receiving processor 180
The order sent simultaneously is performed.Furthermore, it is possible to using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves
Realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also include other input equipments 132.Specifically,
Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.),
One or more in trace ball, mouse, action bars etc..
Display unit 140 can be used to showing by user input information or be supplied to the information and terminal 1200 of user
Various graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its any combination.
Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal
Show device), the form such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel
141.Further, Touch sensitive surface 131 can cover display panel 141, when Touch sensitive surface 131 is detected thereon or neighbouring is touched
After touching operation, processor 180 is sent to determine the type of touch event, with preprocessor 180 according to the type of touch event
Corresponding visual output is provided on display panel 141.Although in fig. 12, Touch sensitive surface 131 and display panel 141 are conducts
Two independent parts come realize input and input function, but in some embodiments it is possible to by Touch sensitive surface 131 with display
Panel 141 is integrated and realization is input into and output function.
Terminal 1200 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 141, and proximity transducer can close display when terminal 1200 is moved in one's ear
Panel 141 and/or backlight.As one kind of motion sensor, in the detectable all directions of Gravity accelerometer (generally
Three axles) acceleration size, size and the direction of gravity are can detect that when static, can be used for recognize mobile phone attitude application (ratio
Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely
The other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared ray sensor that be can also configure in terminal 1200, herein
Repeat no more.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the COBBAIF between user and terminal 1200.Sound
Electric signal after the voice data conversion that frequency circuit 160 will can be received, is transferred to loudspeaker 161, is converted to by loudspeaker 161
Voice signal is exported;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, is received by voicefrequency circuit 160
After be converted to voice data, it is such as another to be sent to through RF circuits 110 then after voice data output processor 180 is processed
Terminal, or voice data is exported to memory 120 so as to further treatment.Voicefrequency circuit 160 is also possible that earplug is inserted
Hole, to provide the communication of peripheral hardware earphone and terminal 1200.
WiFi belongs to short range wireless transmission technology, and terminal 1200 can help user to receive and dispatch electricity by WiFi module 170
Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.Although Figure 12 shows
Go out WiFi module 170, but it is understood that, it is simultaneously not belonging to must be configured into for terminal 1200, completely can be according to need
To be omitted in the essential scope for do not change invention.
Processor 180 is the control centre of terminal 1200, using various interfaces and each portion of connection whole mobile phone
Point, by running or performing software program and/or module of the storage in memory 120, and storage is called in memory 120
Interior data, perform the various functions and processing data of terminal 1200, so as to carry out integral monitoring to mobile phone.Optionally, process
Device 180 may include one or more processing cores;Preferably, processor 180 can integrated application processor and modulation /demodulation treatment
Device, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor is mainly located
Reason radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 1200 also includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can be by electricity
Management system is logically contiguous with processor 180, so as to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.Power supply 190 can also include one or more direct current or AC power, recharging system, power supply event
The random component such as barrier detection circuit, power supply changeover device or inverter, power supply status indicator.
Although not shown, terminal 1200 can also will not be repeated here including camera, bluetooth module etc..Specifically at this
In embodiment, the display unit of terminal is touch-screen display, and terminal also includes memory, and one or more than one
Program, one of them or more than one program storage is configured to by one or more than one in memory
Reason device is performed, and one or more than one program bag is containing the instruction for performing following operation:
Obtain image and Quick Response Code to be fused;
Cell size according to Quick Response Code divides an image into multiple images region, each image-region and the Quick Response Code
Unit set up corresponding relation;
The value of first area in Quick Response Code covers the center of corresponding image-region, and by Quick Response Code second
The value in region covers corresponding image-region, obtains the Quick Response Code after fused images;
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.
Assuming that above-mentioned is the first possible implementation method, then provided based on the first possible implementation method
Second possible implementation method in, in the memory of terminal, also comprising the instruction for performing following operation:
The value of first area in Quick Response Code is covered the center of corresponding image-region, including:
Each image-region in image is divided into the sub-image area of predetermined number, and in the subgraph of each image-region
As determining center sub-image area in region;
The value of first area in Quick Response Code is covered the center sub-image area of corresponding image-region.
In the third the possible implementation method provided based on the first possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Image to be fused is obtained, including:Obtain input image, and to be input into image pre-process, treated
The image of fusion.
In the 4th kind of possible implementation method provided based on the third possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Image to being input into is pre-processed, and obtains image to be fused, including:
Image to being input into carries out Face datection, and facial image to detecting carries out size cutting and scaling treatment,
Obtain image to be fused.
In the 5th kind of possible implementation method provided based on the first possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Quick Response Code to be fused is obtained, including:
The character string of input is obtained, and character string is encoded, obtain Quick Response Code to be fused;
Wherein, character string is at least one information correspondence in website information, card information, text message and code information
Character string.
In sum, terminal provided in an embodiment of the present invention, by obtaining image and Quick Response Code to be fused, and according to two
The cell size for tieing up code divides an image into multiple images region, then the value of first area in Quick Response Code is covered into corresponding figure
As the center in region, and the value of second area in Quick Response Code is covered into corresponding image-region, after obtaining fused images
Quick Response Code, so as to expand the viewing area of image, optimize fusion after Quick Response Code display effect.
Embodiment five
The embodiment of the present invention additionally provides a kind of computer-readable recording medium, and the computer-readable recording medium can be
The computer-readable recording medium included in memory in above-described embodiment;Can also be individualism, without allocating end into
Computer-readable recording medium in end.The computer-readable recording medium storage has one or more than one program, and this one
Individual or more than one program is used for performing the side of fusion of an image and Quick Response Code by one or more than one processor
Method, the method includes:
Obtain image and Quick Response Code to be fused;
Cell size according to Quick Response Code divides an image into multiple images region, each image-region and the Quick Response Code
Unit set up corresponding relation;
The value of first area in Quick Response Code covers the center of corresponding image-region, and by Quick Response Code second
The value in region covers corresponding image-region, obtains the Quick Response Code after fused images;
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.
Assuming that above-mentioned is the first possible implementation method, then provided based on the first possible implementation method
Second possible implementation method in, in the memory of terminal, also comprising the instruction for performing following operation:
The value of first area in Quick Response Code is covered the center of corresponding image-region, including:
Each image-region in image is divided into the sub-image area of predetermined number, and in the subgraph of each image-region
As determining center sub-image area in region;
The value of first area in Quick Response Code is covered the center sub-image area of corresponding image-region.
In the third the possible implementation method provided based on the first possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Image to be fused is obtained, including:Obtain input image, and to be input into image pre-process, treated
The image of fusion.
In the 4th kind of possible implementation method provided based on the third possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Image to being input into is pre-processed, and obtains image to be fused, including:
Image to being input into carries out Face datection, and facial image to detecting carries out size cutting and scaling treatment,
Obtain image to be fused.
In the 5th kind of possible implementation method provided based on the first possible implementation method, terminal is deposited
In reservoir, also comprising the instruction for performing following operation:
Quick Response Code to be fused is obtained, including:
The character string of input is obtained, and character string is encoded, obtain Quick Response Code to be fused;
Wherein, character string is at least one information correspondence in website information, card information, text message and code information
Character string.
In sum, computer-readable recording medium provided in an embodiment of the present invention, by obtain image to be fused and
Quick Response Code, and multiple images region is divided an image into according to the cell size of Quick Response Code, then by first area in Quick Response Code
Value covers the center of corresponding image-region, and the value of second area in Quick Response Code is covered into corresponding image district
Domain, obtains the Quick Response Code after fused images, so as to expand the viewing area of image, optimizes the display of the Quick Response Code after fusion
Effect.
Embodiment six
A kind of graphical user interface is provided in the embodiment of the present invention, the graphical user interface with terminal, the terminal
One or more than one place including touch-screen display, memory and for performing one or more than one program
Reason device;The graphical user interface includes:
Obtain image and Quick Response Code to be fused;
Cell size according to Quick Response Code divides an image into multiple images region, each image-region and the Quick Response Code
Unit set up corresponding relation;
The value of first area in Quick Response Code covers the center of corresponding image-region, and by Quick Response Code second
The value in region covers corresponding image-region, obtains the Quick Response Code after fused images;
Wherein, first area is data encoded content and error correction information code region, and second area is the firstth area
Other regions outside domain.
In sum, graphical user interface provided in an embodiment of the present invention, obtains image and Quick Response Code to be fused, and root
Multiple images region is divided an image into according to the cell size of Quick Response Code, then the value of first area in Quick Response Code is covered into correspondence
Image-region center, and the value of second area in Quick Response Code is covered into corresponding image-region, obtain fusion figure
Quick Response Code as after, so as to expand the viewing area of image, optimizes the display effect of the Quick Response Code after fusion.
It should be noted that:The image that above-described embodiment is provided melts by image with the fusing device of Quick Response Code with Quick Response Code
During conjunction, only carried out with the division of above-mentioned each functional module for example, in practical application, can be as needed and by above-mentioned functions
Distribute and completed by different functional module, will the internal structure of device be divided into different functional modules, retouched with completing the above
The all or part of function of stating.In addition, the fusing device of the image of above-described embodiment offer and Quick Response Code and image and two dimension
The fusion method embodiment of code belongs to same design, and it implements process and refers to embodiment of the method, repeats no more here.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware
To complete, it is also possible to instruct the hardware of correlation to complete by program, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all it is of the invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.
Claims (10)
1. the fusion method of a kind of image and Quick Response Code, it is characterised in that methods described includes:
Obtain image and Quick Response Code to be fused;
Cell size according to the Quick Response Code divides the image into multiple images region, each image-region and described two
The unit for tieing up code sets up corresponding relation;
The value of each unit in first area in the Quick Response Code is covered the image-region that corresponding relation is set up with it
Center, and the value of each unit in second area in the Quick Response Code covered set up corresponding relation with it
Image-region, obtains the Quick Response Code after fused images;
Wherein, the first area is data encoded content and error correction information code region, and the second area is institute
State other regions outside first area.
2. method according to claim 1, it is characterised in that described each list by first area in the Quick Response Code
The value of unit covers the center of the image-region for setting up corresponding relation with it, including:
Each image-region in described image is divided into the sub-image area of predetermined number, and in the subgraph of each image-region
As determining center sub-image area in region;
The value of each unit in first area in the Quick Response Code is covered the image-region that corresponding relation is set up with it
Center sub-image area.
3. method according to claim 1, it is characterised in that acquisition image to be fused, including:Obtain input
Image, and to be input into image pre-process, obtain image to be fused.
4. method according to claim 3, it is characterised in that the image of described pair of input is pre-processed, and obtains waiting to melt
The image of conjunction, including:
Image to being input into carries out Face datection, and facial image to detecting carries out size cutting and scaling treatment, obtains
Image to be fused.
5. method according to claim 1, it is characterised in that acquisition Quick Response Code to be fused, including:
The character string of input is obtained, and the character string is encoded, obtain Quick Response Code to be fused;
Wherein, the character string is at least one information correspondence in website information, card information, text message and code information
Character string.
6. the fusing device of a kind of image and Quick Response Code, it is characterised in that described device includes:
First acquisition module, for obtaining image to be fused;
Second acquisition module, for obtaining Quick Response Code to be fused;
Division module, for dividing the image into multiple images region according to the cell size of the Quick Response Code, each figure
As corresponding relation is set up in region with the unit of the Quick Response Code;
First overlay module, has set up right for the value of each unit in first area in the Quick Response Code to be covered with it
The center of the image-region that should be related to;
Second overlay module, has set up right for the value of each unit in second area in the Quick Response Code to be covered with it
The image-region that should be related to, obtains the Quick Response Code after fused images;
Wherein, the first area is data encoded content and error correction information code region, and the second area is institute
State other regions outside first area.
7. device according to claim 6, it is characterised in that first overlay module, including:
Deng subdivision, the sub-image area for each image-region in described image to be divided into predetermined number;
Determining unit, for determining center sub-image area in the sub-image area of each image-region;
Capping unit, corresponding closing has been set up for the value of each unit in first area in the Quick Response Code to be covered with it
The center sub-image area of the image-region of system.
8. device according to claim 6, it is characterised in that first acquisition module, including:
Acquiring unit, the image for obtaining input;
Pretreatment unit, for being pre-processed to the image being input into, obtains image to be fused.
9. device according to claim 8, it is characterised in that the pretreatment unit, for being carried out to the image being input into
Face datection, and facial image to detecting carries out size cutting and scaling treatment, obtains image to be fused.
10. device according to claim 6, it is characterised in that second acquisition module, including:
Acquiring unit, the character string for obtaining input;
Coding unit, for being encoded to the character string, obtains Quick Response Code to be fused;
Wherein, the character string is at least one information correspondence in website information, card information, text message and code information
Character string.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310754632.2A CN104751410B (en) | 2013-12-31 | 2013-12-31 | Image and two-dimensional code fusion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310754632.2A CN104751410B (en) | 2013-12-31 | 2013-12-31 | Image and two-dimensional code fusion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104751410A CN104751410A (en) | 2015-07-01 |
CN104751410B true CN104751410B (en) | 2017-05-24 |
Family
ID=53591033
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310754632.2A Active CN104751410B (en) | 2013-12-31 | 2013-12-31 | Image and two-dimensional code fusion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104751410B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110774787A (en) * | 2019-09-24 | 2020-02-11 | 山东泰宝防伪技术产品有限公司 | Special anti-counterfeiting code pattern paper and preparation method thereof |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105069497B (en) * | 2015-07-27 | 2018-01-23 | 南京风力舰信息技术有限公司 | A kind of method for the Quick Response Code for generating beautification |
CN105095939A (en) * | 2015-09-07 | 2015-11-25 | 郑州普天信息技术有限公司 | Two-dimensional code vision optimization method |
CN108073963B (en) * | 2016-11-18 | 2020-09-29 | 穆亚南 | Fusion two-dimensional code generation method and device |
CN108073964B (en) * | 2016-11-18 | 2020-09-29 | 穆亚南 | Perspective two-dimensional code generation method and device |
CN107123087A (en) * | 2017-03-29 | 2017-09-01 | 深圳市赛亿科技开发有限公司 | The fusion method and device of image and Quick Response Code |
CN107563966A (en) * | 2017-08-01 | 2018-01-09 | 北京诺君安信息技术股份有限公司 | A kind of Quick Response Code and image interfusion method and Quick Response Code |
CN109670427B (en) * | 2018-12-07 | 2021-02-02 | 腾讯科技(深圳)有限公司 | Image information processing method and device and storage medium |
CN110175661A (en) * | 2019-04-17 | 2019-08-27 | 深圳壹账通智能科技有限公司 | The generation method and device in two dimensional code sharing path |
CN110096190B (en) * | 2019-04-22 | 2022-05-27 | 聚好看科技股份有限公司 | Method and terminal for displaying two-dimensional code |
CN112200286B (en) * | 2020-08-25 | 2023-10-03 | 中国物品编码中心 | Character string coding method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968654A (en) * | 2012-10-26 | 2013-03-13 | 吴东杰 | Method and system for producing information recognizable by naked eyes in plane of two-dimensional (2D) code and 2D code |
JP3182350U (en) * | 2013-01-08 | 2013-03-21 | 株式会社 弘久社 | Fusion card of fragrance, music and story |
-
2013
- 2013-12-31 CN CN201310754632.2A patent/CN104751410B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968654A (en) * | 2012-10-26 | 2013-03-13 | 吴东杰 | Method and system for producing information recognizable by naked eyes in plane of two-dimensional (2D) code and 2D code |
JP3182350U (en) * | 2013-01-08 | 2013-03-21 | 株式会社 弘久社 | Fusion card of fragrance, music and story |
Non-Patent Citations (1)
Title |
---|
Halftone QR Codes;Hung-Kuo Chu 等;《ACM Transactions on Graphics (TOG) - Proceedings of ACM SIGGRAPH Asia 2013》;20131101;第32卷(第6期);第1页右栏第1行-第7页左栏倒数第18行 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110774787A (en) * | 2019-09-24 | 2020-02-11 | 山东泰宝防伪技术产品有限公司 | Special anti-counterfeiting code pattern paper and preparation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN104751410A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104751410B (en) | Image and two-dimensional code fusion method and device | |
CN104618217B (en) | Share method, terminal, server and the system of resource | |
CN105005457A (en) | Geographical location display method and apparatus | |
CN103854298A (en) | Method for integrating pictures with two-dimension codes and terminal | |
CN104915091B (en) | A kind of method and apparatus for the prompt information that Shows Status Bar | |
CN106488296B (en) | A kind of method and apparatus showing video barrage | |
CN105022616A (en) | Method and device for generating web page | |
CN103313139A (en) | History display method and device and electronic device | |
CN104199596B (en) | scene interface switching method and device | |
CN105094809A (en) | Combined picture layout modification method and device and terminal equipment | |
CN104216915A (en) | Webpage processing method, device and terminal equipment | |
CN103853819A (en) | Information acquisition method, terminal and system | |
CN104516624B (en) | A kind of method and device inputting account information | |
CN104104656B (en) | Give the method and device of account number for change | |
CN104157007A (en) | Video processing method and apparatus | |
CN104869465A (en) | Video playing control method and device | |
CN104820546B (en) | Function information methods of exhibiting and device | |
CN104965642A (en) | Method and apparatus for generating a drop-down list | |
CN106203459A (en) | Image processing method and device | |
CN106951139A (en) | Message notifying frame display methods and device | |
CN105630517A (en) | Configuration information setting method, configuration information setting device and communication system | |
CN106332023A (en) | Unread information display method and device, and mobile terminal | |
CN105303591A (en) | Method for superposing place information in puzzle, terminal and server | |
CN106504303A (en) | A kind of method and apparatus for playing frame animation | |
CN105635553A (en) | Image shooting method and device |
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 |