CN110738084B - Anilox picture generation method and device, storage medium and electronic equipment - Google Patents

Anilox picture generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110738084B
CN110738084B CN201810803872.XA CN201810803872A CN110738084B CN 110738084 B CN110738084 B CN 110738084B CN 201810803872 A CN201810803872 A CN 201810803872A CN 110738084 B CN110738084 B CN 110738084B
Authority
CN
China
Prior art keywords
reticulate pattern
reticulate
initial
waveform
target
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
Application number
CN201810803872.XA
Other languages
Chinese (zh)
Other versions
CN110738084A (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.)
Mashang Xiaofei Finance Co Ltd
Original Assignee
Mashang Xiaofei Finance 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 Mashang Xiaofei Finance Co Ltd filed Critical Mashang Xiaofei Finance Co Ltd
Priority to CN201810803872.XA priority Critical patent/CN110738084B/en
Publication of CN110738084A publication Critical patent/CN110738084A/en
Application granted granted Critical
Publication of CN110738084B publication Critical patent/CN110738084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Abstract

The invention provides a reticulate pattern picture generation method, which comprises the following steps: when a reticulate pattern generation request is received, generating an initial reticulate pattern waveform; generating a target texture based on the initial texture waveform; and overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture. According to the reticulate pattern picture generation method, when the reticulate pattern generation request sent by a user is received, the initial reticulate pattern waveform required by obtaining the reticulate pattern picture is generated, then the target reticulate pattern is generated based on the initial reticulate pattern waveform, and the target reticulate pattern is superimposed on the selected image, so that the reticulate pattern picture can be obtained.

Description

Anilox picture generation method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of image processing, and in particular, to a method and apparatus for generating an anilox picture, a storage medium, and an electronic device.
Background
With the development of information technology, people can reach more and more fields. In whatever field, face alignment is the most straightforward and efficient method in processes involving user authentication. The common practice is to compare the collected face photos of the user with the second generation ID card photos of the user pulled from the public security system. As reticulate patterns are added in the second-generation identity card photos provided by the public security system, in the actual comparison process, the second-generation identity card photos pulled from the public security system are required to be identified by means of a trained deep learning model, and the acquired reticulate patterns are used as training samples by the aid of the deep learning model to be trained by a machine learning algorithm.
The inventor finds that the existing training samples are generally obtained from a public security system through research on the obtaining process of the existing training samples, and due to the privacy of the public security system, the quantity of the acquired reticulate pattern pictures for training is limited, so that the diversity of training data is insufficient, the recognition precision of the finally trained deep learning model is low, and the accuracy of user identity verification is further reduced.
Disclosure of Invention
The invention aims to solve the technical problem of providing the reticulate pattern picture generation method which can generate a large number of reticulate pattern pictures, further enrich training samples of a deep learning model, improve the recognition precision of the model and improve the accuracy of user identity verification.
The invention also provides a reticulate pattern picture generating device which is used for ensuring the realization and the application of the method in practice.
A method of generating a moire image, comprising:
When a reticulate pattern generation request is received, generating an initial reticulate pattern waveform;
generating a target texture based on the initial texture waveform;
and overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture.
The method, optionally, the generating an initial reticulate pattern waveform includes:
acquiring a pre-established objective function;
And generating the initial reticulate pattern waveform according to the objective function.
The method, optionally, the pre-establishing process of the objective function includes:
selecting a basic function and analyzing reticulate pattern attributes of the acquired sample reticulate pattern;
and adjusting the function parameters of the basic function according to the reticulate pattern attribute of the acquired sample reticulate pattern to obtain the objective function.
In the above method, optionally, the basis function is a linear combination function of trigonometric functions; the trigonometric function is a sine function or a cosine function;
the function parameters of the basis function include the amplitude, angular frequency, and initial phase of each trigonometric function included in the basis function.
The method, optionally, generating the target texture based on the initial texture waveform, includes:
generating an initial reticulate pattern unit according to the initial reticulate pattern waveform;
In the initial reticulate pattern unit, a plurality of reticulate pattern sub-units are intercepted, and the reticulate pattern sub-units are combined according to a preset combination mode to obtain the target reticulate pattern; the width value of each of the reticulate sub-units is the same as the width value of the selected image.
In the above method, optionally, the generating an initial reticulation unit according to the initial reticulation waveform includes:
Copying the initial reticulate pattern waveform to obtain a first reticulate pattern waveform corresponding to the initial reticulate pattern waveform; moving the first reticulate pattern waveform from the current position of the initial reticulate pattern waveform by a first displacement according to a preset first vector direction to obtain an initial reticulate pattern unit formed by combining the initial reticulate pattern waveform and the first reticulate pattern waveform;
Or (b)
Copying the initial reticulate pattern waveform to obtain a second reticulate pattern waveform corresponding to the initial reticulate pattern waveform; moving the second reticulate pattern from the current position of the initial reticulate pattern to a second displacement according to a preset second vector direction to obtain a combined reticulate pattern formed by combining the initial reticulate pattern and the second reticulate pattern; rotating the combined reticulate pattern by 180 degrees by taking the horizontal axis as a rotating shaft to obtain the initial reticulate pattern unit;
Or (b)
Generating a third reticulate pattern waveform according to the initial reticulate pattern waveform; the initial phase difference between the third reticulate pattern waveform and the initial reticulate pattern waveform is k pi, and k is an odd number; and obtaining an initial reticulate unit formed by combining the initial reticulate waveform and the third reticulate waveform.
The method, optionally, wherein in the initial reticulation unit, intercepting a plurality of reticulation sub-units includes:
acquiring a width value of the selected image;
In the initial anilox unit, a plurality of anilox sub-units having the same width value as the selected image are randomly truncated.
In the above method, optionally, the combining the plurality of reticulate sub-units according to a preset combination mode to obtain the target reticulate includes:
Sequentially arranging the reticulate pattern subunits in the first target area from the top to the bottom of the first target area in the determined first target area so as to obtain the target reticulate pattern; in the first target area, the intervals between any two adjacent reticulate pattern subunits are equal; the first target area is the same size as the selected image.
In the above method, optionally, the combining the plurality of reticulate sub-units according to a preset combination mode to obtain the target reticulate includes:
Sequentially setting reticulate sub-units intercepted from the initial reticulate unit at each target position in a determined second target area until the reticulate sub-units are arranged at each target position in the second target area, so as to obtain the target reticulate; the second target area is the same size as the selected image.
The method, optionally, further comprises:
Selecting a random number;
And randomly adjusting the reticulate pattern attribute of the target reticulate pattern overlapped on the selected image according to the random number.
An anilox picture generation device comprising:
The first generation unit is used for generating an initial reticulate pattern waveform when receiving a reticulate pattern generation request;
a second generation unit configured to generate a target texture based on the initial texture waveform;
and the overlapping unit is used for overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device in which the storage medium is located to perform the above-described method of generating an anilox picture.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform the above-described anilox picture generation method by one or more processors.
Compared with the prior art, the invention has the following advantages:
The invention provides a reticulate pattern picture generation method, which comprises the following steps: when a reticulate pattern generation request is received, generating an initial reticulate pattern waveform; generating a target texture based on the initial texture waveform; and overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture. According to the reticulate pattern picture generation method, when the reticulate pattern generation request sent by a user is received, the initial reticulate pattern waveform required by obtaining the reticulate pattern picture is generated, then the target reticulate pattern is generated based on the initial reticulate pattern waveform, and the target reticulate pattern is superimposed on the selected image, so that the reticulate pattern picture can be obtained.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flow chart of a method for generating an anilox picture;
FIG. 2 is a flowchart of another method of generating an anilox picture according to the present invention;
FIG. 3 is a diagram illustrating an exemplary method for generating an anilox picture according to the present invention;
FIG. 4 is a diagram illustrating another embodiment of a method for generating an anilox picture according to the present invention;
FIG. 5 is a diagram illustrating another embodiment of a method for generating an anilox picture according to the present invention;
FIG. 6 is a diagram illustrating another embodiment of a method for generating an anilox picture according to the present invention;
fig. 7 is a schematic structural diagram of an anilox picture generating device according to the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor devices, distributed computing environments that include any of the above devices or devices, and the like.
The embodiment of the invention provides a method for generating an anilox picture, which can be applied to various system platforms, wherein an execution subject of the method can be a computer terminal or processors of various mobile devices, and a flow chart of the method is shown in fig. 1, and specifically comprises the following steps:
s101: when a reticulate pattern generation request is received, generating an initial reticulate pattern waveform;
In the method provided by the embodiment of the invention, when a user needs to generate an reticulate pattern picture, an reticulate pattern generation request is sent to a processor, and when the processor receives the reticulate pattern generation request sent by the user, an initial reticulate pattern waveform needed by the reticulate pattern picture is generated.
S102: generating a target texture based on the initial texture waveform;
In the method provided by the embodiment of the invention, the initial reticulate pattern waveform is used as a basic waveform, the basic transformation is carried out on the initial reticulate pattern waveform, and finally the target reticulate pattern which can be combined on the image is generated.
S103: and overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture.
In the method provided by the embodiment of the invention, the generated target reticulate pattern is superimposed on the selected image, and the reticulate pattern picture formed by combining the target reticulate pattern with the selected image is obtained. The selected image is a sample picture which is selected in advance when the anilox picture is generated.
According to the reticulate pattern image generation method provided by the embodiment of the invention, a user can send a reticulate pattern generation request to the processor according to actual requirements in the process of obtaining the reticulate pattern image, so that the processor generates an initial reticulate pattern waveform required by obtaining the reticulate pattern image when receiving the reticulate pattern generation request, then generates a target reticulate pattern based on the initial reticulate pattern waveform, and superimposes the target reticulate pattern on the selected image to obtain the reticulate pattern image.
The reticulate pattern image generation method provided by the embodiment of the invention can be applied to various fields, for example, in the field of face recognition, and can generate a plurality of face images with overlapping reticulate patterns for face recognition; before the method provided by the embodiment of the invention is applied, a plurality of face images are selected in advance, after the selection is completed, a user can send an reticulation generation request to a processor, when the reticulation generation request is received by the processor, an initial reticulation waveform is generated, then a target reticulation which can be overlapped on the face images is generated based on the initial reticulation waveform, the generated target reticulation is respectively overlapped on each face image, a plurality of face images overlapped with reticulation are obtained, the face images overlapped with reticulation are used for training samples, and a deep learning model for face recognition is trained, so that training samples are enriched, and the recognition precision of the deep learning model can be improved.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, the process of generating the initial reticulate pattern waveform can comprise the following steps:
acquiring a pre-established objective function;
And generating the initial reticulate pattern waveform according to the objective function.
The method provided by the embodiment of the invention can be used for training samples of the deep learning model to improve the recognition precision of the deep learning model, and in order to achieve a better recognition effect, the reticulate patterns in the generated reticulate pattern image can be very similar to the reticulate patterns in the previous sample reticulate pattern image of the deep learning model in terms of the form, the line thickness, the depth/transparency, the line angle and the like of the reticulate pattern, and the sample reticulate pattern image can be a human face reticulate pattern image obtained from a public security system.
In the method provided by the embodiment of the invention, after the objective function is acquired, the objective function is applied to generate the initial reticulate pattern waveform, the initial reticulate pattern waveform is stored in the memory in the form of an array, and when the initial reticulate pattern waveform needs to be called, the numerical value in the array corresponding to the initial reticulate pattern waveform is read from the memory.
In order to make the reticulate pattern image generation method provided by the embodiment of the invention have the characteristics that the reticulate pattern in the generated reticulate pattern image is similar to the reticulate pattern in the previous sample reticulate pattern image, the embodiment of the invention is pre-established with an objective function, and waveform elements such as waveform lines, thickness, frequency, wavelength and the like of an initial reticulate pattern waveform generated by applying the objective function can be similar to each element of the reticulate pattern in the human face reticulate pattern image acquired from a public security system.
In the method provided by the embodiment of the invention, after a pre-established objective function is acquired, an initial reticulate pattern waveform is generated by applying the objective function. In the method provided by the embodiment of the present invention, as shown in fig. 2, the pre-establishment process of the objective function may specifically include:
s201: selecting a basic function and analyzing reticulate pattern attributes of the acquired sample reticulate pattern;
S202: and adjusting the function parameters of the basic function according to the reticulate pattern attribute of the acquired sample reticulate pattern to obtain the objective function.
In the method provided by the embodiment of the invention, in order to enable the reticulate patterns in the generated reticulate patterns to be more similar to the reticulate patterns in the human face reticulate patterns acquired from the public security system in multiple aspects of morphology, line thickness, depth/transparency, line angle of the reticulate patterns and the like in the process of generating the reticulate patterns, the acquired human face reticulate patterns in the human face reticulate patterns can be taken as sample reticulate patterns in the public security system in advance, and basic functions are selected from a function library according to sample reticulate pattern waveforms in the human face reticulate patterns, wherein the function library comprises sine functions, cosine functions and other basic function forms. For example, when the acquired moire waveform in the face moire picture is a sine wave, a basis function capable of generating the sine wave may be selected.
In the reticulate pattern image generation method provided by the embodiment of the invention, the basis function is a linear combination function of a trigonometric function; the trigonometric function is a sine function or a cosine function;
the function parameters of the basis function include the amplitude, angular frequency, and initial phase of each trigonometric function included in the basis function.
In the method provided by the embodiment of the invention, in the process of generating the reticulate pattern picture, the sample reticulate pattern in the selected sample reticulate pattern picture can be used as a reference, a corresponding trigonometric function is selected, specifically, when the sample reticulate pattern picture is a human face reticulate pattern picture selected from a public security system, the reticulate pattern in the human face reticulate pattern picture is a sine wave or a waveform close to the sine wave, a sine function can be correspondingly selected, and the sine function can be in the form of sinx or Asinx. Based on the selected sine function, referring to the waveform shape in the facial reticulate waveform, performing multiple test operations on the sine function to obtain a basis function corresponding to the sine function, wherein the basis function can have a functional form as follows:
Trigonometric function Bsin (ωx+ψ)
Or a linear combination of trigonometric functions B1sin (ω 1x+ψ1)+B2sin(ω2x+ψ2)+…Bnsin(ωnx+ψn), where n is a positive integer.
In the method provided by the embodiment of the invention, the reticulate lines generated by the selected basic function can be similar to the target reticulate in the target reticulate picture, so that the generated reticulate is better close to the target reticulate, and the amplitude, the angular frequency and the initial phase of each trigonometric function contained in the basic function can be adjusted according to the reticulate attribute of the sample reticulate on the basis of the basic function. In the trigonometric function Bsin (ωx+ψ), B is the amplitude of the trigonometric function, ω is the angular frequency of the trigonometric function, and ψ is the initial phase of the trigonometric function.
When specifically adjusting each parameter of the base function, the amplitude, the angular frequency and the initial phase in each trigonometric function included in the base function may be adjusted at the same time, for example, in the form of B1sin (ω 1x+ψ1)+B2sin(ω2x+ψ2)+…Bnsin(ωnx+ψn), the B1, ω 1、ψ1、B2、…Bn、ωn and ψ n may be adjusted at the same time, or some parameters may be kept unchanged, and other parameters may be adjusted. In the functional form Bsin (ωx+ψ), B, ω, ψ may be adjusted at the same time, or ω, ψ may be adjusted while B is kept unchanged. Regardless of the function form or the parameter adjustment mode, the parameter value of each trigonometric function in the finally determined objective function is a set of fixed parameter values, and the reticulate pattern generated by the objective function with the determined parameter values is closest to the reticulate pattern of the sample. In the process of generating the reticulate pattern picture, generating an initial reticulate pattern waveform directly according to the objective function.
In the method provided by the embodiment of the invention, when the reticulate pattern in the facial reticulate pattern picture is a cosine wave or a waveform close to the cosine wave, a cosine function can be correspondingly selected, and the form of the cosine function can be cosx or Acosx. Based on the selected cosine function, referring to the waveform shape in the facial reticulate waveform, performing multiple test operations on the cosine function to obtain a basic function corresponding to the cosine function, wherein the basic function can have a functional form as follows:
trigonometric function Bco (ωx+ψ)
Or a form of a linear function B1cos (ω 1x+ψ1)+B2cos(ω2x+ψ2)+…Bncos(ωnx+ψn) of a trigonometric function, where n is a positive integer.
In the method provided by the embodiment of the invention, the basic function in the form Asinx + Bcosx can be obtained by performing experimental operation on the cosine function or the sine function, and the specific function forms are all obtained by performing experimental operation for a plurality of times.
In the reticulate pattern image generation method provided by the embodiment of the invention, reticulate patterns in the selected reticulate pattern image sample can have various forms, for example, the inventor finds that reticulate patterns in the certificate photo selected from the public security system can be divided into 4 forms, the reticulate patterns in the 4 forms of the certificate photo can be integrally corresponding to the same basic function, and the reticulate patterns of the certificate photo of each form correspond to a group of function parameters on the basis of the basic function. When the reticulate pattern picture generation method provided by the embodiment of the invention is applied, reticulate patterns in each form in the certificate photo can be respectively used as training samples, and 4 groups of function parameters can be correspondingly generated. In the method provided by the embodiment of the invention, the generated 4 groups of function parameters can be stored, when the corresponding target reticulate pattern is required to be generated aiming at the reticulate pattern in the certificate, the corresponding calling function parameters aiming at the certificate of which type in the certificate can be determined first, the target function is obtained by substituting the calling function parameters into the basic function, and the initial reticulate pattern waveform is generated by applying the target function, so that the reticulate pattern to be obtained is obtained.
The reticulate pattern picture generation method provided by the embodiment of the invention can generate reticulate patterns very similar to reticulate patterns in the certificate in the public security system, has very high fitting degree with the reticulate patterns of the certificate, and can be used as a deep learning model trained by training samples of the deep learning model to identify the face image in the certificate well with very high identification precision.
In the reticulate pattern image generation method provided by the embodiment of the invention, after a plurality of experimental operations are carried out on the sine function, the function form of the obtained basic function can be as follows
Or alternatively
In the method provided by the embodiment of the invention, after the basic function is obtained, the reticulate pattern attribute of the sample reticulate pattern is further analyzed and obtained, for example, the shape, the line thickness, the depth/transparency, the line angle and the like of the reticulate pattern of the sample reticulate pattern are obtained, and then the selected function parameters are adjusted according to the obtained reticulate pattern attribute of the sample reticulate pattern, so that the establishment process of the objective function is completed. For example, for the two basis functions determined above, for the first basis function, the values of A1, ω 1、ψ1、A2、ω2、ψ2 in the basis functions may be adjusted simultaneously according to the texture attribute of the sample texture, so as to achieve the purpose of establishing the objective function. The different values of A1, ω 1、ψ1、A2、ω2、ψ2 ultimately result in different line shapes of the initial moire waveform generated by applying the objective function, as shown in fig. 3 and 4, with different line thicknesses.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, a process for generating the target reticulate pattern based on the initial reticulate pattern waveform specifically comprises the following steps:
generating an initial reticulate pattern unit according to the initial reticulate pattern waveform;
In the initial reticulate pattern unit, a plurality of reticulate pattern sub-units are intercepted, and the reticulate pattern sub-units are combined according to a preset combination mode to obtain the target reticulate pattern; the width value of each of the reticulate sub-units is the same as the width value of the selected image.
In the method provided by the embodiment of the invention, based on the initial reticulate pattern, an initial reticulate pattern unit can be generated, and the initial reticulate pattern unit can be an interlaced pattern of two identical initial reticulate pattern waveforms, and the pattern is specifically shown in fig. 5. In the method provided by the embodiment of the invention, the generated initial reticulate pattern waveform is infinitely extended, so that the generated initial reticulate pattern unit is also infinitely extended based on the initial reticulate pattern waveform, and the initial reticulate pattern unit shown in fig. 5 is a part of the whole initial reticulate pattern unit which is infinitely extended.
In the method provided by the embodiment of the invention, a plurality of reticulate sub-units are intercepted in the initial reticulate unit, and as the initial reticulate unit is infinitely extended, in the method provided by the embodiment of the invention, as shown in fig. 6, the reticulate sub-units can be intercepted randomly at any position of the infinitely extended initial reticulate unit, and the width value of the intercepted reticulate sub-units is the same as the width value of the selected image. For example, the selected image is an image with a width of 2cm, and the width of the truncated reticulate subunit is 2cm. In the method provided by the embodiment of the invention, each intercepted reticulate pattern subunit is combined in a certain combination mode, and finally, the target reticulate patterns which can be overlapped on the selected image are formed by combination. In the method provided by the embodiment of the invention, preferably, the shapes of the intercepted reticulate sub-units are the same, and the interception can be performed from different positions in the initial reticulate units which extend infinitely.
In the method for generating an anilox picture provided by the embodiment of the present invention, the specific process of generating an initial anilox unit according to the initial anilox waveform may include:
copying the initial reticulate pattern waveform to obtain a first reticulate pattern waveform corresponding to the initial reticulate pattern waveform;
And moving the first reticulate pattern waveform from the current position of the initial reticulate pattern waveform by a first displacement according to a preset first vector direction to obtain an initial reticulate pattern unit formed by combining the initial reticulate pattern waveform and the first reticulate pattern waveform.
In the method provided by the embodiment of the invention, the initial reticulate pattern waveform is taken as a basis, and the initial reticulate pattern waveform can be duplicated to obtain the first reticulate pattern waveform corresponding to the initial reticulate pattern waveform, wherein the first reticulate pattern waveform and the initial reticulate pattern waveform are the same reticulate pattern waveform. In the method provided by the embodiment of the invention, the first reticulate pattern waveform is moved by a certain displacement according to a certain vector direction from the current position of the initial reticulate pattern waveform, and then the initial reticulate pattern unit formed by combining the first reticulate pattern waveform and the initial reticulate pattern waveform at the moved position can be obtained. In the embodiment of the present invention, the direction of the set vector is preferably understood to be a distance moving in the coordinate system in the negative directions of the square of the X axis and the Y axis.
In the method provided by the embodiment of the invention, the moving distance of the first reticulate pattern waveform in the X-axis direction is the waveform direction along the first reticulate pattern waveform, the translation kT/2 is the minimum period of the waveform, and k is an odd number.
In the method for generating an anilox picture provided by the embodiment of the present invention, the specific process of generating an initial anilox unit according to the initial anilox waveform may further include:
Copying the initial reticulate pattern waveform to obtain a second reticulate pattern waveform corresponding to the initial reticulate pattern waveform;
Moving the second reticulate pattern from the current position of the initial reticulate pattern to a second displacement according to a preset second vector direction to obtain a combined reticulate pattern formed by combining the initial reticulate pattern and the second reticulate pattern;
and rotating the combined reticulate pattern by 180 degrees by taking the horizontal axis as a rotating shaft to obtain the initial reticulate pattern unit.
In the method provided by the embodiment of the invention, based on the initial reticulate pattern waveform, the initial reticulate pattern waveform can be duplicated to obtain the second reticulate pattern waveform corresponding to the initial reticulate pattern waveform, and the second reticulate pattern waveform and the initial reticulate pattern waveform are the same reticulate pattern waveform. In the method provided by the embodiment of the invention, the second reticulate pattern is moved by a displacement from the current position of the initial reticulate pattern in the vertical direction to obtain a combined reticulate pattern image formed by combining the initial reticulate pattern and the second reticulate pattern, and then the obtained combined reticulate pattern image is turned longitudinally by taking the horizontal axis of the combined reticulate pattern image as a rotating shaft, and the initial reticulate pattern unit is obtained after turning 180 degrees.
In the method for generating an anilox picture provided by the embodiment of the present invention, the specific process of generating an initial anilox unit according to the initial anilox waveform may further include:
generating a third reticulate pattern waveform according to the initial reticulate pattern waveform; the initial phase difference between the third reticulate pattern waveform and the initial reticulate pattern waveform is k pi, and k is an odd number;
And obtaining an initial reticulate unit formed by combining the initial reticulate waveform and the third reticulate waveform.
In the method provided by the embodiment of the invention, after the initial reticulate pattern waveform is generated by calling the objective function, the objective function can be called again on the basis of the initial reticulate pattern waveform to generate a third reticulate pattern waveform, wherein the third reticulate pattern waveform is the same as the initial reticulate pattern waveform, and the third reticulate pattern waveform and the initial reticulate pattern waveform are opposite-phase waveforms, namely, odd times of pi of the initial phase difference between the third reticulate pattern waveform and the initial reticulate pattern waveform. And combining the initial reticulate waveform with the third reticulate waveform to obtain an initial reticulate unit formed by combining the initial reticulate waveform with the third reticulate waveform.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, the specific process of intercepting a plurality of reticulate pattern sub-units in the initial reticulate pattern unit comprises the following steps:
acquiring a width value of the selected image;
In the initial anilox unit, a plurality of anilox sub-units having the same width value as the selected image are randomly truncated.
In the method provided by the embodiment of the invention, the selected image has a certain size, a width and a height. In order to better combine the reticulate pattern with the selected image in the process of generating the reticulate pattern superimposed on the selected image, in the embodiment of the invention, in the initial reticulate pattern unit, a plurality of reticulate pattern sub-units with the same width value as the selected image are intercepted, and the intercepted reticulate pattern sub-units are superimposed on the selected image.
In the method provided by the embodiment of the present invention, the specific process of combining the plurality of reticulate pattern sub-units according to a preset combination manner to obtain the target reticulate pattern may be the following steps:
Sequentially arranging the reticulate pattern subunits in the first target area from the top to the bottom of the first target area in the determined first target area so as to obtain the target reticulate pattern; in the first target area, the intervals between any two adjacent reticulate pattern subunits are equal; the first target area is the same size as the selected image.
In the method provided by the embodiment of the invention, in the process of generating the target reticulate pattern, the first target area can be predetermined, the size of the first target area is the same as that of the selected image, and the first target area and the selected image can be completely overlapped. The method comprises the steps that a plurality of reticulate subunits can be intercepted in an initial reticulate unit, the number of reticulate subunits can be determined according to the height value of a first target area, after the plurality of reticulate subunits are intercepted, each selected reticulate subunit can be sequentially arranged in the first target area, the arrangement process can be carried out from the top to the bottom of the first target area, in the arrangement process, the intervals between any two adjacent reticulate subunits are equal, and the specific value of the interval can be determined according to the height value of the first target area. After the setting is completed, a desired target texture is obtained. The first target area may be a transparent picture.
In the method for generating an reticulate pattern picture provided by the embodiment of the present invention, the specific implementation process of obtaining the target reticulate pattern by combining the plurality of reticulate pattern sub-units according to a preset combination mode may also be:
Sequentially setting reticulate sub-units intercepted from the initial reticulate unit at each target position in a determined second target area until the reticulate sub-units are arranged at each target position in the second target area, so as to obtain the target reticulate; the second target area is the same size as the selected image.
In the method provided by the embodiment of the invention, the second target area can be predetermined, the size of the second target area is the same as that of the selected image, and the second target area and the selected image can be completely overlapped. The second target area and the first target area may be the same area, and may be transparent pictures. In the method provided by the embodiment of the invention, a plurality of target positions can be set in the second target area, each time the reticulate pattern subunit intercepted from the initial reticulate pattern unit is set on one target position of the second target area, then a new reticulate pattern subunit is intercepted from the initial reticulate pattern unit until all target positions in the second target area are provided with reticulate pattern subunits, and the second target area provided with the reticulate pattern subunits is taken as a target reticulate pattern. While stopping the continued interception of the anilox subunit from the original anilox unit.
In the method provided by the embodiment of the invention, the reticulation subunit is taken from the initial reticulation unit, and a part taken from the initial reticulation unit can be taken as the reticulation subunit, in other words, a part is cut from the whole initial reticulation unit (namely, the basic reticulation diagram) to be taken as the reticulation subunit.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, after the reticulate pattern picture is generated, in order to meet the training standard of the more complex reticulate pattern picture, the method provided by the embodiment of the invention further comprises the process of processing the target reticulate pattern superimposed on the selected image according to a preset processing mode.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, the specific process of processing the target reticulate pattern superimposed on the selected image according to the preset processing mode comprises the following steps:
Selecting a random number;
And randomly adjusting the reticulate pattern attribute of the target reticulate pattern overlapped on the selected image according to the random number.
In the method provided by the embodiment of the invention, after the target reticulate pattern is overlapped on the selected image, a certain random number can be selected, and the reticulate pattern attribute of the target reticulate pattern overlapped on the selected image can be randomly adjusted, including the adjustment of the frequency, amplitude, direction and other attributes of the target reticulate pattern. The superimposed target reticulate patterns can be subjected to frequency modulation, amplitude modulation, rotation, affine transformation and the like.
In the method for generating the reticulate pattern picture provided by the embodiment of the invention, the reticulate pattern picture can be overlapped on the selected image and then subjected to corresponding random number adjustment, or the target reticulate pattern can be overlapped on the selected image after being subjected to random number adjustment after the target reticulate pattern is generated. The specific implementation manners and the derivative processes of the implementation manners are all within the protection scope of the invention.
Corresponding to the method described in fig. 1, the embodiment of the present invention further provides an anilox image generating device, which is used for implementing the method in fig. 1, where the anilox image generating device provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and the structural schematic diagram of the anilox image generating device is shown in fig. 7, and specifically includes:
a first generation unit 301, configured to generate an initial texture waveform when receiving a texture generation request;
a second generation unit 302, configured to generate a target texture based on the initial texture waveform;
And a superposition unit 303, configured to superimpose the target texture onto the selected image, and obtain the texture picture.
According to the reticulate pattern picture generation device provided by the embodiment of the invention, a user can send a reticulate pattern generation request to the processor according to actual requirements in the process of obtaining the reticulate pattern picture, so that the processor generates an initial reticulate pattern waveform required by obtaining the reticulate pattern picture when receiving the reticulate pattern generation request, then generates a target reticulate pattern based on the initial reticulate pattern waveform, and superimposes the target reticulate pattern on a selected image to obtain the reticulate pattern picture.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein the equipment where the storage medium is located is controlled to execute the anilox picture generation method when the instructions run.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 8, specifically including a memory 401, and one or more instructions 402, where the one or more instructions 402 are stored in the memory 401, and configured to be executed by the one or more processors 403 to perform the following operations by the one or more instructions 402:
When a reticulate pattern generation request is received, generating an initial reticulate pattern waveform;
generating a target texture based on the initial texture waveform;
and overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The above describes in detail a method and apparatus for generating an anilox picture provided by the present invention, and specific examples are applied to illustrate the principles and embodiments of the present invention, and the above description of the examples is only for helping to understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (11)

1. The anilox picture generation method is characterized by comprising the following steps of:
When a reticulate pattern generation request is received, determining a form of reticulate pattern to be generated, calling prestored objective function parameters corresponding to the form, substituting the objective function parameters into a basic function to obtain an objective function, and generating an initial reticulate pattern waveform according to the objective function; the objective function parameters are obtained by adjusting the function parameters of the basic function according to the reticulate pattern attributes of the acquired sample reticulate patterns, wherein the acquired sample reticulate patterns are the reticulate patterns in the acquired sample reticulate pattern pictures;
Generating a target texture corresponding to the form based on the initial texture waveform;
and overlapping the target reticulate pattern on the selected image to obtain a reticulate pattern picture.
2. The method of claim 1, wherein the basis function is a linear combination function of trigonometric functions; the trigonometric function is a sine function or a cosine function;
the function parameters of the basis function include the amplitude, angular frequency, and initial phase of each trigonometric function included in the basis function.
3. The method of claim 1, wherein the generating a target texture based on the initial texture waveform comprises:
generating an initial reticulate pattern unit according to the initial reticulate pattern waveform;
In the initial reticulate pattern unit, a plurality of reticulate pattern sub-units are intercepted, and the reticulate pattern sub-units are combined according to a preset combination mode to obtain the target reticulate pattern; the width value of each of the reticulate sub-units is the same as the width value of the selected image.
4. A method according to claim 3, wherein said generating an initial anilox unit from said initial anilox waveform comprises:
Copying the initial reticulate pattern waveform to obtain a first reticulate pattern waveform corresponding to the initial reticulate pattern waveform; moving the first reticulate pattern waveform from the current position of the initial reticulate pattern waveform by a first displacement according to a preset first vector direction to obtain an initial reticulate pattern unit formed by combining the initial reticulate pattern waveform and the first reticulate pattern waveform;
Or (b)
Copying the initial reticulate pattern waveform to obtain a second reticulate pattern waveform corresponding to the initial reticulate pattern waveform; moving the second reticulate pattern from the current position of the initial reticulate pattern to a second displacement according to a preset second vector direction to obtain a combined reticulate pattern formed by combining the initial reticulate pattern and the second reticulate pattern; rotating the combined reticulate pattern by 180 degrees by taking the horizontal axis as a rotating shaft to obtain the initial reticulate pattern unit;
Or (b)
Generating a third reticulate pattern waveform according to the initial reticulate pattern waveform; the initial phase difference between the third reticulate pattern waveform and the initial reticulate pattern waveform is k pi, and k is an odd number; and obtaining an initial reticulate unit formed by combining the initial reticulate waveform and the third reticulate waveform.
5. A method according to claim 3, wherein said intercepting a plurality of reticulate sub-units in said initial reticulate unit comprises:
acquiring a width value of the selected image;
In the initial anilox unit, a plurality of anilox sub-units having the same width value as the selected image are randomly truncated.
6. The method according to claim 3 or 5, wherein said combining the plurality of reticulate sub-units in a preset combination to obtain the target reticulate pattern comprises:
Sequentially arranging the reticulate pattern subunits in the first target area from the top to the bottom of the first target area in the determined first target area so as to obtain the target reticulate pattern; in the first target area, the intervals between any two adjacent reticulate pattern subunits are equal; the first target area is the same size as the selected image.
7. The method according to claim 3 or 5, wherein said combining the plurality of reticulate sub-units in a preset combination to obtain the target reticulate pattern comprises:
Sequentially setting reticulate sub-units intercepted from the initial reticulate unit at each target position in a determined second target area until the reticulate sub-units are arranged at each target position in the second target area, so as to obtain the target reticulate; the second target area is the same size as the selected image.
8. The method as recited in claim 1, further comprising:
Selecting a random number;
And randomly adjusting the reticulate pattern attribute of the target reticulate pattern overlapped on the selected image according to the random number.
9. An anilox picture generation apparatus, comprising:
The first generation unit is used for determining a form of the reticulate pattern to be generated when receiving a reticulate pattern generation request, calling prestored objective function parameters corresponding to the form, substituting the objective function parameters into a basic function to obtain an objective function, and generating an initial reticulate pattern waveform according to the objective function; the objective function parameters are obtained by adjusting the function parameters of the basic function according to the reticulate pattern attributes of the acquired sample reticulate patterns, wherein the acquired sample reticulate patterns are the reticulate patterns in the acquired sample reticulate pattern pictures;
A second generation unit configured to generate a target texture corresponding to the form based on the initial texture waveform;
and the overlapping unit is used for overlapping the target reticulate pattern on the selected image to obtain the reticulate pattern picture.
10. A storage medium comprising stored instructions, wherein the instructions, when executed, control a device in which the storage medium is located to perform the anilox picture generation method according to any one of claims 1 to 8.
11. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the anilox picture generation method of any of claims 1-8.
CN201810803872.XA 2018-07-20 2018-07-20 Anilox picture generation method and device, storage medium and electronic equipment Active CN110738084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810803872.XA CN110738084B (en) 2018-07-20 2018-07-20 Anilox picture generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810803872.XA CN110738084B (en) 2018-07-20 2018-07-20 Anilox picture generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110738084A CN110738084A (en) 2020-01-31
CN110738084B true CN110738084B (en) 2024-04-16

Family

ID=69234318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810803872.XA Active CN110738084B (en) 2018-07-20 2018-07-20 Anilox picture generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110738084B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794504A (en) * 2015-04-28 2015-07-22 浙江大学 Graphic pattern text detection method based on deep learning
CN105069738A (en) * 2015-07-24 2015-11-18 北京旷视科技有限公司 Watermark superimposing method and device of image
CN107911641A (en) * 2017-10-27 2018-04-13 北京达佳互联信息技术有限公司 Video watermark generation method, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10769745B2 (en) * 2016-01-27 2020-09-08 The Korea Advanced Institute Of Science And Technology Three-dimensional mesh model watermarking method using segmentation and apparatus thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794504A (en) * 2015-04-28 2015-07-22 浙江大学 Graphic pattern text detection method based on deep learning
CN105069738A (en) * 2015-07-24 2015-11-18 北京旷视科技有限公司 Watermark superimposing method and device of image
CN107911641A (en) * 2017-10-27 2018-04-13 北京达佳互联信息技术有限公司 Video watermark generation method, device and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王立国等.《人工合成训练样本》.《高光谱图像处理技术》.2013,119-120. *
邓铭辉.《图像水印信号实验》.《新一代信息隐藏技术:鲁棒数字图像水印技术研究》.黑龙江人民出版社,2010,167-172. *

Also Published As

Publication number Publication date
CN110738084A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN108804884B (en) Identity authentication method, identity authentication device and computer storage medium
US9734379B2 (en) Guided fingerprint enrollment
US10754939B2 (en) System and method for continuous authentication using augmented reality and three dimensional object recognition
CN102831386B (en) Object identification method and recognition device
US20170170967A1 (en) Captcha image generation method and apparatus, and server
US8813184B2 (en) Authentication using mobile devices
CN104246793A (en) Three-dimensional face recognition for mobile devices
WO2017088804A1 (en) Method and apparatus for detecting wearing of spectacles in facial image
KR20150050666A (en) Pattern Inputting Apparatus and Method, and Recording Medium Using the Same
WO2017167159A1 (en) Image positioning method and device
US11238148B2 (en) Location-based, context-aware challenge-response authentication
US9202035B1 (en) User authentication based on biometric handwriting aspects of a handwritten code
US20160283709A1 (en) Pattern-based password with dynamic shape overlay
CN108847941A (en) Identity identifying method, device, terminal and storage medium
CN110738227B (en) Model training method and device, recognition method, storage medium and electronic equipment
CN108269236A (en) A kind of image correcting error method and device
JP6448253B2 (en) Data creation program, data creation method, and data creation device
CN110738084B (en) Anilox picture generation method and device, storage medium and electronic equipment
JP6366420B2 (en) Data creation program, data creation method, and data creation device
US20150026788A1 (en) Authentication by image manipulation
CN108154019A (en) A kind of method and device of image authentication
JP2024018980A (en) Detecting wrapped attacks in facial recognition
CN108388840B (en) Face image registration method and device and face recognition system
CN110738226B (en) Identity recognition method and device, storage medium and electronic equipment
US11507646B1 (en) User authentication using video analysis

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