CN114418048A - Portrait three-dimensional code rapid generation method for enhancing visual effect - Google Patents

Portrait three-dimensional code rapid generation method for enhancing visual effect Download PDF

Info

Publication number
CN114418048A
CN114418048A CN202111670593.9A CN202111670593A CN114418048A CN 114418048 A CN114418048 A CN 114418048A CN 202111670593 A CN202111670593 A CN 202111670593A CN 114418048 A CN114418048 A CN 114418048A
Authority
CN
China
Prior art keywords
portrait
picture
position information
dimensional code
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.)
Granted
Application number
CN202111670593.9A
Other languages
Chinese (zh)
Other versions
CN114418048B (en
Inventor
陈绳旭
马吉良
张梦达
王秋婉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cn3wm Xiamen Network Technology Co ltd
Original Assignee
Cn3wm Xiamen Network 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 Cn3wm Xiamen Network Technology Co ltd filed Critical Cn3wm Xiamen Network Technology Co ltd
Priority to CN202111670593.9A priority Critical patent/CN114418048B/en
Publication of CN114418048A publication Critical patent/CN114418048A/en
Application granted granted Critical
Publication of CN114418048B publication Critical patent/CN114418048B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06K19/06056Constructional details the marking comprising a further embedded marking, e.g. a 1D bar code with the black bars containing a smaller sized 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
    • G06K19/06103Constructional details the marking being embedded in a human recognizable image, e.g. a company logo with an embedded two-dimensional code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a rapid generation method of a portrait three-dimensional code for enhancing visual effect, which comprises the following steps: inputting an original picture with a portrait, and determining the original picture, a target three-dimensional code picture to be generated, coding information and two-dimensional code fault-tolerant level information; carrying out portrait detection and contour identification on the original picture, acquiring position information of a portrait detection frame and a contour of a portrait, and removing pixel points outside the portrait contour in the original picture according to the contour of the portrait to obtain a portrait picture; generating a coding matrix of the two-dimensional code according to the coding information and the two-dimensional code fault tolerance level, and acquiring size data of the coding matrix; determining a face center point and a maximum face area; adjusting the size and the position of a portrait in a portrait picture; and superposing the adjusted portrait picture with the coding matrix, and removing code points in the contour of the portrait in the coding matrix according to the position information of the portrait detection frame to obtain a target three-dimensional code picture.

Description

Portrait three-dimensional code rapid generation method for enhancing visual effect
Technical Field
The invention relates to a rapid generation method of a portrait three-dimensional code for enhancing visual effect, belonging to the technical field of symbol coding generation and image processing.
Background
At present, for the fusion of an image and a two-dimensional bar code, a mode of embedding an icon in the middle (as shown in fig. 1) or performing deformation and beautification on the color and the shape of code points, and a pattern is formed by adding connection and fusion between the code points (as shown in fig. 2) is often adopted.
The two-dimensional bar code fused with the figure image can know part of information contained in the two-dimensional bar code under the condition of not scanning the bar code, so that the two-dimensional bar code is widely applied to the field of customized business cards.
The invention patent with the patent number "CN 104751410A" in the prior art provides a method and a device for fusing an image and a two-dimensional code, which are used for obtaining the image to be fused and the two-dimensional code, dividing the image into a plurality of image areas according to the unit size of the two-dimensional code, covering the value of a first area in the two-dimensional code to the central position of a corresponding image area, and covering the value of a second area in the two-dimensional code to the corresponding image area to obtain the two-dimensional code after the image is fused, so that the display area of the image is enlarged, and the display effect of the two-dimensional code after the image is fused is optimized.
The problem that above-mentioned prior art exists is that, just simply will cover a border position of portrait picture simply to the two-dimensional bar code, does not adjust the position, the display range, the display profile of people's face in the image, leads to visual effect poor, and the degree of distinguishing is lower, is easily scribbled, is lacked to the processing of optimizing visual effect to some extent.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a rapid generation method of a portrait three-dimensional code for enhancing the visual effect, which is used for identifying the position information and the outline information of the portrait in an original picture with the portrait, adjusting the size and the position of the portrait according to the identified information, removing code points in the portrait outline and improving the portrait visual effect of the portrait three-dimensional code.
The technical scheme of the invention is as follows:
a rapid generation method of a portrait three-dimensional code for enhancing visual effect comprises the following steps:
inputting an original picture with a portrait, and determining size data of the original picture; acquiring size data, coding information and two-dimension code fault tolerance levels of a target three-dimension code picture to be generated;
carrying out portrait detection and contour identification on the original picture through a portrait identification technology, acquiring position information of a portrait detection frame and a contour of a portrait, and removing pixel points outside the portrait contour in the original picture according to the contour of the portrait to obtain a portrait picture;
generating a coding matrix of the two-dimensional code according to the coding information and the two-dimensional code fault tolerance level, and acquiring size data of the coding matrix;
determining the position information of a face central point in a target three-dimensional code picture and the maximum face area;
adjusting the size and the position of a portrait in a portrait picture according to the size data of the target three-dimensional code picture, the position information of the face central point and the maximum face area;
and superposing the adjusted portrait picture with the coding matrix, and removing code points in the contour of the portrait in the coding matrix according to the position information of the portrait detection frame to obtain a target three-dimensional code picture.
As a preferred embodiment, the step of acquiring the position information of the portrait detection frame specifically includes:
establishing a first coordinate system for the original picture;
and acquiring the coordinates of one end point of the portrait detection frame in the first coordinate system, and acquiring the size data of the portrait detection frame in the first coordinate system.
As a preferred embodiment, the step of adjusting the size and the position of the portrait in the portrait picture according to the size data of the target three-dimensional code picture, the position information of the face center point, and the maximum face area specifically includes:
establishing a second coordinate system for the target three-dimensional code picture;
calculating the scaling of the original picture according to the size data of the original picture, the size data of the target three-dimensional code picture and the maximum area of the portrait;
calculating the position information of the original image in a second coordinate system according to the scaling of the original image and the position information of the center point of the face;
and adjusting the face position of the portrait picture and adjusting the size of the portrait picture according to the position information of the original picture in the second coordinate system.
As a preferred embodiment, the step of removing the code points located in the contour of the portrait in the coding matrix according to the position information of the portrait detection frame specifically includes:
converting the position information of the portrait detection frame in a first coordinate system into the position information of the portrait detection frame in a second coordinate system according to the scaling of the original picture and the position information of the center point of the face;
establishing a code point coordinate system;
determining the number of side length pixels of each code point according to the size data of the coding matrix and the size data of the target three-dimensional code picture;
converting the position information of the portrait detection frame in the second coordinate system into position information of the portrait detection frame in the code point coordinate system according to the number of side lengths of each code point;
determining whether the code points in the portrait detection frame correspond to the pixel blocks in the adjusted portrait picture or not according to the position information of the portrait detection frame in the code point coordinate system, if so, putting the code points into a hidden code point set, and if not, putting the code points into a displayed code point set;
and superposing the adjusted portrait picture with the coding matrix, and removing code points in the hidden code point set to obtain a target three-dimensional code picture.
As a preferred embodiment, before the step of converting the position information of the portrait detection frame in the first coordinate system into the position information of the portrait detection frame in the second coordinate system, the method further includes a preprocessing step, specifically:
and adjusting the size data of the portrait detection frame in the first coordinate system to enable the portrait detection frame to contain the forehead part of the portrait.
As a preferred embodiment, after the step of converting the position information of the portrait detection frame in the second coordinate system into the position information of the portrait detection frame in the code point coordinate system, the method further includes a post-processing step, specifically:
and adjusting the position information of the portrait detection frame in the code point coordinate system so that the portrait detection frame comprises hair, a neck and shoulder parts.
In a preferred embodiment, the maximum face area is determined according to a two-dimensional code fault tolerance level.
The invention has the following beneficial effects:
1. the invention relates to a rapid generation method of a portrait three-dimensional code for enhancing visual effect, which is used for carrying out face recognition on an original picture with a portrait, adjusting the size and the position of the portrait according to the recognized information, removing code points in the portrait outline and improving the visual effect of the portrait three-dimensional code.
2. The invention relates to a method for quickly generating a portrait three-dimensional code with enhanced visual effect, which solves the problem that a bar code cannot be read due to the fact that facial points are removed when the proportion of a face in an original picture is too large or the position is overlapped with a two-dimensional bar code locator by adjusting the size and the position of the face.
3. According to the rapid generation method of the portrait three-dimensional code for enhancing the visual effect, code points are removed according to the facial contour, neck, shoulder and other details of the person instead of simply removing the code points according to the face detection rectangular frame, so that more character characteristics are reserved, and the visual effect is improved.
4. According to the rapid generation method of the portrait three-dimensional code for enhancing the visual effect, the color of the code points and the color of the picture can be better fused after the transparency of the code points is adjusted, the original picture is blurred and then is superposed with the portrait picture to form a background base picture instead of simply adopting a pure color background or a fixed background, and the problem of background color compensation when the original picture cannot be filled with the final three-dimensional code picture due to the adjustment of the face of a person is solved.
Drawings
FIG. 1 is an exemplary diagram of a three-dimensional code generated by embedding icons in the prior art;
fig. 2 is an exemplary diagram of a two-dimensional code generated in a manner of adding connection and fusion between code points mentioned in the background art;
FIG. 3 is a flowchart of a method according to a first embodiment of the present invention;
FIG. 4 is an exemplary diagram of an original picture in an embodiment of the invention;
FIG. 5 is an exemplary diagram of a portrait photo in an embodiment of the present invention;
FIG. 6 is a diagram illustrating an example of an adjusted portrait picture according to an embodiment of the present invention;
FIG. 7 is an exemplary diagram of a three-dimensional code picture with an oversized face or an improper position;
fig. 8 is an exemplary diagram of a three-dimensional code picture in which code points are simply removed according to a face detection frame and a pure-color background is filled.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that the step numbers used herein are for convenience of description only and are not intended as limitations on the order in which the steps are performed.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The terms "comprises" and "comprising" indicate the presence of the described features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The term "and/or" refers to and includes any and all possible combinations of one or more of the associated listed items.
The first embodiment is as follows:
referring to fig. 3, a method for rapidly generating a portrait three-dimensional code for enhancing visual effect includes the following steps:
inputting an original picture P1 with a portrait, and determining size data of the original picture, wherein the size data comprises a width pixel number PX1 and a height pixel number PY 1; acquiring size data, coding information I and a two-dimensional code fault tolerance level E of a target three-dimensional code picture to be generated; in this embodiment, the target three-dimensional code picture is square, and thus the size data is the number PX6 of side lengths of the square.
Calling a portrait identification module, wherein the portrait identification module is an OPENCV model in the embodiment, identifying an original picture P1 by using a code function module of the OPENCV for portrait detection and contour identification, acquiring position information of a portrait detection frame FR and a contour of a portrait, setting the contour of the portrait as a closed area, marking pixels in the contour of the portrait, and removing unmarked pixels, namely pixels outside the contour of the portrait to obtain a portrait picture P2;
the method for removing the pixel points outside the portrait outline in the original picture specifically sets the ARGB value of the pixel points outside the portrait outline to be (0, 0, 0, 0).
According to the encoding information I and the two-dimensional code fault tolerance level E, an encoding matrix M of the two-dimensional code is generated based on a QR code (or other types of two-dimensional codes) principle, and size data of the encoding matrix is obtained, wherein the size data of the encoding matrix is the width W of the encoding matrix, namely the number of code points on one horizontal row in the matrix.
The position information of the face center point FPO in the target three-dimensional code picture and the maximum face area FPR are determined, in this embodiment, in order to achieve the effect of being as beautiful as possible, the face center point FPO is set to be at the upper golden section point position of the longitudinal axis line of the picture.
And adjusting the size and the position of the portrait in the portrait picture P2 according to the size data of the target three-dimensional code picture, the position information of the face center point FPO and the maximum face area to obtain an adjusted portrait picture P3.
And superposing the adjusted portrait picture P3 with the coding matrix M, and removing code points in the coding matrix M, which are positioned in the silhouette of the portrait, according to the position information of the portrait detection frame FR to obtain a target three-dimensional code picture P6.
As a preferred implementation of this embodiment, the step of acquiring the position information of the portrait detection frame specifically includes:
a first coordinate system CS1 is established by using the left boundary and the upper boundary of an original picture P1, the coordinates of the top left corner vertex of the original picture P1 are (1, 1), the coordinates of the top right corner vertex are (PX1, 1), the coordinates of the bottom left corner vertex are (1, PY1), and the coordinates of the bottom right corner vertex are (PX1, PY 1).
The position information C1 of the human image detection frame FR includes 4 pieces of data x1, y1, w1, and h1, specifically, coordinates (x1, y1) of the vertex at the upper left corner of the human image detection frame FR in the first coordinate system CS1, and the width w1 and the height h1 of the human image detection frame FR.
As a preferred implementation manner of this embodiment, the step of adjusting the size and the position of the portrait in the portrait picture according to the size data of the target three-dimensional code picture, the position information of the face center point, and the maximum face area specifically includes:
a second coordinate system CS6 is established by using the left boundary and the upper boundary of P6, the coordinates of the top left corner vertex of P6 are (1, 1), the coordinates of the top right corner vertex are (PX6, 1), and the coordinates of the bottom left corner vertex are (1, PX6) and the coordinates of the bottom right corner vertex are (PX6 ). The position of the face center point FPO is preset to be (PX6 × 0.5, PX6 × 0.382).
Calculating the scaling scale of the original image according to the size data of the original image, the size data of the target three-dimensional code image and the maximum area FPR of the portrait:
Figure BDA0003452865120000081
according to the scaling scale of the original picture and the position information of the center point of the face, calculating the position information C2, C2 of the original picture P1 in a second coordinate system CS6, wherein the C2 comprises 4 data x2, y2, w2 and h2, which are the coordinates (x2 and y2) of the vertex of the upper left corner of the picture in the second coordinate system CS6, the width w2 of the vertex and the height h2 of the vertex; the specific calculation steps are as follows:
x2=PX6*0.5-w1*scale*0.5-x1*scale
y2=PX6*0.5-h1*scale*0.5-y1*scale-PX6*0.118
w2=PX6*0.5-PX1*scale
h2=PX6*0.5-PY1*scale
according to the position information C2 of the original picture P1 in the second coordinate system, the face position of the portrait picture P2 is adjusted and the size of the portrait picture is adjusted, specifically:
in a second coordinate system CS6, a square transparent picture with a side length pixel number PX6 is placed, the vertex at the upper left corner is located at (1, 1), and the vertex at the lower right corner is located at (PX 6), then the portrait picture P2 is covered on the square transparent picture according to the coordinate position of the position information C2, and the portion with the vertex at the upper left corner being (1, 1) and the vertex at the lower right corner being (PX 6) is cut out, that is, the adjusted portrait picture P3.
As a preferred implementation of this embodiment, the step of removing, according to the position information of the portrait detection frame, a code point located in the contour of the portrait in the coding matrix specifically includes:
converting the position information of the portrait detection frame in a first coordinate system into the position information of the portrait detection frame in a second coordinate system according to the scaling of the original picture and the position information of the center point of the face;
and establishing a code point coordinate system CSM, wherein the coordinate of each code point in the coordinate system is defined as follows, the coordinate of the code point at the leftmost upper corner is (1, 1), the coordinate of the code point at the rightmost lower corner is (W, W), the coordinate of the code point at the rightmost upper corner is (W, 1), and the coordinate of the code point at the leftmost lower corner is (1, W).
Determining the number mul of side length pixels of each code point according to the size data of the coding matrix and the size data of the target three-dimensional code picture as follows:
mul=PX6/W
according to the number of side lengths of each code point, the position information of the portrait detection frame in the second coordinate system is converted into position information C4, where C4 includes four data x41, y41, x42, and y42, specifically, vertex coordinates of the portrait detection frame in the upper left corner (x41, y41) and vertex coordinates of the lower right corner (x42, y42) in the code point coordinate system, and the specific calculation method is as follows:
x41=x3/mul
y41=y3/mul
x42=(x3+w3)/mul
y42=(y3+h3)/mul
determining whether each code point Mi in the portrait detection frame corresponds to a pixel block in the adjusted portrait picture P3 or not according to the position information C4 of the portrait detection frame in the code point coordinate system, namely whether the pixel block exceeds a transparent threshold EA or not; transparency score of single pixel point, namely value Pij of alpha channelalphaIf 0, clear is 0 and opaque is 1. The transparency score of the code point Mi is the sum of the transparency scores of each contained pixel point Pij, if the code point Mi score is larger than EA, the coordinate (xmi, ymi) of Mi is added to the hidden code point set C5, otherwise, the code point Mi score is added to the displayed code point set C6.
Figure BDA0003452865120000101
Figure BDA0003452865120000111
EA=β*mul*mul
And superposing the adjusted portrait picture P3 with the coding matrix M, and removing code points in the hidden code point set C5 to obtain a target three-dimensional code picture P6.
As a preferred embodiment of this embodiment, the maximum face area FPR is determined according to the two-dimensional code fault-tolerant level E, the two-dimensional code fault-tolerant rate EL can be obtained according to the two-dimensional code fault-tolerant level E, and the maximum face area can be calculated according to the fault-tolerant rate EL. Through experiments, the calculation formula for determining the face area in this embodiment is as follows:
FPR=EL/2
in this embodiment, taking the two-dimensional code as the QR code as an example, the table of the maximum face area FPR and the fault-tolerant level E of the two-dimensional code is as follows:
table 1: maximum face area FPR and two-dimensional code fault-tolerant level E corresponding table
Level of fault tolerance E Two-dimensional barcode fault tolerance Maximum face area FPR
L 8% 4%
M 15% 8%
Q 25% 12%
H 30% 15%
Example two:
compared with the first embodiment, the present embodiment has the advantages that the position of the portrait detection frame is adjusted, more character features are retained, and the visual effect is improved, and the specific scheme is as follows:
before the step of converting the position information of the portrait detection frame in the first coordinate system into the position information of the portrait detection frame in the second coordinate system, the method further comprises a preprocessing step, specifically:
adjusting the size data of the portrait detection frame in the first coordinate system to enable the portrait detection frame to contain the forehead part of the portrait:
Figure BDA0003452865120000121
as a preferred embodiment of this embodiment, after the step of converting the position information of the portrait detection frame in the second coordinate system into the position information of the portrait detection frame in the code point coordinate system, the method further includes a post-processing step, specifically:
adjusting the position information of the portrait detection frame in the code point coordinate system to enable the portrait detection frame to comprise hair, neck and shoulder parts, and reducing the calculation complexity as much as possible so as to conveniently and rapidly calculate in combination with the contour information:
x41=max(x41-3,1)
y41=max(y41-6,1)
x42=min(x42+6,W)
y42=min(y42+4,W)
the above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A portrait three-dimensional code rapid generation method for enhancing visual effect is characterized by comprising the following steps:
inputting an original picture with a portrait, and determining size data of the original picture; acquiring size data, coding information and two-dimension code fault tolerance levels of a target three-dimension code picture to be generated;
calling a portrait recognition module to perform portrait detection and contour recognition on the original picture, acquiring position information of a portrait detection frame and a contour of a portrait, and removing pixel points outside the portrait contour in the original picture according to the contour of the portrait to obtain a portrait picture;
generating a coding matrix of the two-dimensional code according to the coding information and the two-dimensional code fault tolerance level, and acquiring size data of the coding matrix;
setting position information of a face central point in a target three-dimensional code picture, and setting the maximum face area according to the two-dimensional code fault-tolerant level;
adjusting the size and the position of a portrait in the portrait picture based on the size data of the target three-dimensional code picture, the position information of the face central point and the maximum face area;
and superposing the adjusted portrait picture with the coding matrix, and removing code points in the contour of the portrait in the coding matrix according to the position information of the portrait detection frame to obtain a target three-dimensional code picture.
2. The method for rapidly generating the portrait three-dimensional code for enhancing the visual effect according to claim 1, wherein the step of obtaining the position information of the portrait detection frame specifically comprises:
establishing a first coordinate system for the original picture;
and acquiring the coordinates of one end point of the portrait detection frame in the first coordinate system, and acquiring the size data of the portrait detection frame in the first coordinate system.
3. The method for rapidly generating the human image three-dimensional code for enhancing the visual effect according to claim 2, wherein the step of adjusting the size and the position of the human image in the human image picture based on the size data of the target three-dimensional code picture, the position information of the center point of the human face and the maximum face area is specifically as follows:
establishing a second coordinate system for the target three-dimensional code picture;
calculating the scaling of the original picture according to the size data of the original picture, the size data of the target three-dimensional code picture and the maximum area of the portrait;
calculating the position information of the original image in a second coordinate system according to the scaling of the original image and the position information of the center point of the face;
and adjusting the face position of the portrait picture and adjusting the size of the portrait picture according to the position information of the original picture in the second coordinate system.
4. The method for rapidly generating the three-dimensional code of the portrait with the enhanced visual effect as claimed in claim 3, wherein the step of removing the code points in the coding matrix located in the silhouette of the portrait according to the position information of the portrait detection frame specifically comprises:
converting the position information of the portrait detection frame in a first coordinate system into the position information of the portrait detection frame in a second coordinate system according to the scaling of the original picture and the position information of the center point of the face;
establishing a code point coordinate system;
determining the number of side length pixels of each code point according to the size data of the coding matrix and the size data of the target three-dimensional code picture;
converting the position information of the portrait detection frame in the second coordinate system into position information of the portrait detection frame in the code point coordinate system according to the number of side lengths of each code point;
determining whether the code points in the portrait detection frame correspond to the pixel blocks in the adjusted portrait picture or not according to the position information of the portrait detection frame in the code point coordinate system, if so, putting the code points into a hidden code point set, and if not, putting the code points into a displayed code point set;
and superposing the adjusted portrait picture with the coding matrix, and removing code points in the hidden code point set to obtain a target three-dimensional code picture.
5. The method for rapidly generating the portrait three-dimensional code with the enhanced visual effect as claimed in claim 4, further comprising a preprocessing step before the step of converting the position information of the portrait detection frame in the first coordinate system into the position information of the portrait detection frame in the second coordinate system, specifically:
and adjusting the size data of the portrait detection frame in the first coordinate system to enable the portrait detection frame to contain the forehead part of the portrait.
6. The method as claimed in claim 4, further comprising a post-processing step after the step of converting the position information of the portrait detection frame in the second coordinate system into the position information of the portrait detection frame in the code point coordinate system, specifically:
and adjusting the position information of the portrait detection frame in the code point coordinate system so that the portrait detection frame comprises hair, a neck and shoulder parts.
7. A portrait three-dimensional code rapid generation device for enhancing visual effect comprises a memory,
Processor and computer program stored on a memory and executable on the processor, characterized in that the processor, when executing the program, implements a method for fast generation of a portrait three-dimensional code with enhanced visual effect according to any one of claims 1 to 6.
CN202111670593.9A 2021-12-31 2021-12-31 Quick portrait three-dimensional code generation method for enhancing visual effect Active CN114418048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111670593.9A CN114418048B (en) 2021-12-31 2021-12-31 Quick portrait three-dimensional code generation method for enhancing visual effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111670593.9A CN114418048B (en) 2021-12-31 2021-12-31 Quick portrait three-dimensional code generation method for enhancing visual effect

Publications (2)

Publication Number Publication Date
CN114418048A true CN114418048A (en) 2022-04-29
CN114418048B CN114418048B (en) 2023-07-18

Family

ID=81271681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111670593.9A Active CN114418048B (en) 2021-12-31 2021-12-31 Quick portrait three-dimensional code generation method for enhancing visual effect

Country Status (1)

Country Link
CN (1) CN114418048B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2898668A1 (en) * 2013-01-28 2014-07-31 Tencent Technology (Shenzhen) Company Limited Realization method and device for two-dimensional code augmented reality
CN104966115A (en) * 2015-06-12 2015-10-07 吴伟和 Method for filling two-dimensional code through image
CN110942126A (en) * 2019-11-08 2020-03-31 广州追溯信息科技有限公司 Method for generating star array three-dimensional code
CN112364963A (en) * 2020-10-19 2021-02-12 三维码(厦门)网络科技有限公司 Three-dimensional code generation method and equipment for enhancing visual effect
CN112418371A (en) * 2019-11-22 2021-02-26 上海巨通电子有限公司 Secure three-dimensional code for blockchains and methods of generating and decoding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2898668A1 (en) * 2013-01-28 2014-07-31 Tencent Technology (Shenzhen) Company Limited Realization method and device for two-dimensional code augmented reality
CN104966115A (en) * 2015-06-12 2015-10-07 吴伟和 Method for filling two-dimensional code through image
CN110942126A (en) * 2019-11-08 2020-03-31 广州追溯信息科技有限公司 Method for generating star array three-dimensional code
CN112418371A (en) * 2019-11-22 2021-02-26 上海巨通电子有限公司 Secure three-dimensional code for blockchains and methods of generating and decoding
CN112364963A (en) * 2020-10-19 2021-02-12 三维码(厦门)网络科技有限公司 Three-dimensional code generation method and equipment for enhancing visual effect

Also Published As

Publication number Publication date
CN114418048B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN103914689B (en) Picture method of cutting out and device based on recognition of face
CN107564080B (en) Face image replacement system
CN109872284A (en) Image information desensitization method, device, computer equipment and storage medium
US20170293992A1 (en) Image code for processing information and device and method for generating and parsing same
KR101759188B1 (en) the automatic 3D modeliing method using 2D facial image
CN110288715A (en) Virtual necklace try-in method, device, electronic equipment and storage medium
CN110084219B (en) Interface interaction method and device
CN111553251A (en) Certificate four-corner incomplete detection method, device, equipment and storage medium
US20150371103A1 (en) System and method for identification of printed matter in an image
CN108734250A (en) Vision two-dimensional code generation method based on Sobel operators
CN114359030B (en) Synthesis method of face backlight picture
CN114418048B (en) Quick portrait three-dimensional code generation method for enhancing visual effect
CN116822548B (en) Method for generating high recognition rate AI two-dimensional code and computer readable storage medium
CN112149605A (en) Face recognition method, device, equipment and storage medium
CN108986181A (en) Image processing method, device and computer readable storage medium based on dot
CN114912557A (en) Three-dimensional code rapid generation method for enhancing portrait effect
CN111027545A (en) Card picture mark detection method and device, computer equipment and storage medium
CN107247984B (en) Coding method of visual two-dimensional code
CN112364963B (en) Three-dimensional code generation method and equipment for enhancing visual effect
CN114241486A (en) Method for improving accuracy rate of identifying student information of test paper
CN110070625B (en) Identification for augmented reality equipment, identification method thereof and augmented reality equipment
CN113223103A (en) Method, device, electronic device and medium for generating sketch
CN111368853A (en) Label construction method, system, device and storage medium
KR100618493B1 (en) The Apparatus and Method for Creating Three-Dimensional Image Automatically
RU2790018C1 (en) Method for generating color protective mask on images of people's faces

Legal Events

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