CN111627089B - User head portrait picture processing method, device and system and readable storage medium - Google Patents

User head portrait picture processing method, device and system and readable storage medium Download PDF

Info

Publication number
CN111627089B
CN111627089B CN202010748027.4A CN202010748027A CN111627089B CN 111627089 B CN111627089 B CN 111627089B CN 202010748027 A CN202010748027 A CN 202010748027A CN 111627089 B CN111627089 B CN 111627089B
Authority
CN
China
Prior art keywords
image
pixel points
user
acquiring
adjustment
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
CN202010748027.4A
Other languages
Chinese (zh)
Other versions
CN111627089A (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.)
Sincere Letter Science And Technology Ltd
Original Assignee
Sincere Letter Science And Technology 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 Sincere Letter Science And Technology Ltd filed Critical Sincere Letter Science And Technology Ltd
Priority to CN202010748027.4A priority Critical patent/CN111627089B/en
Publication of CN111627089A publication Critical patent/CN111627089A/en
Application granted granted Critical
Publication of CN111627089B publication Critical patent/CN111627089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel

Abstract

The invention discloses a method, equipment and a system for processing a user head portrait picture and a readable storage medium, which belong to the field of computers and image processing. By acquiring the adjustment request initiated by the user for the first image, the first image comprises the user avatar, so that the user can select the area to be adjusted according to personal interest and aesthetic value, and the user experience is further improved on the basis of ensuring the safety of the user avatar data.

Description

User head portrait picture processing method, device and system and readable storage medium
Technical Field
The invention relates to the field of computers and image processing, in particular to a method, equipment and a system for processing a user head portrait picture and a readable storage medium.
Background
In various social software, users mostly use real photos as head portraits to increase the social interest and social experience of the users. However, when using real photos, the avatar may be md5 used by the black industry chain to establish correspondence with a specific user, thereby causing leakage of user data and even compromising the user's digital property security.
In the prior art, a head portrait picture is decoded by using an Open Source (Open Source) based cross-platform Computer Vision Library (opencv), some pixel points in the picture are finely adjusted, and then the picture is recoded into a format such as jpeg.
However, with the above solution, there are the following disadvantages: in the process of confusing pictures, operations of encoding and decoding the pictures are required each time, which results in low processing efficiency of the pictures.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method, an apparatus, a system, and a readable storage medium for processing a user avatar picture. The technical scheme is as follows:
in a first aspect, a method for processing a user head portrait picture is provided, and the method includes
Before encoding a first image, acquiring an adjustment request initiated by a user for the first image, wherein the first image comprises a user head portrait;
acquiring a plurality of pixel points in the first image according to the adjustment request;
acquiring a plurality of reference pixel points which are in one-to-one correspondence with the plurality of pixel points;
acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of the reference image;
adjusting parameters of the plurality of reference pixel points according to adjustment parameters to generate a plurality of adjusted reference pixel points, wherein the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generating the second image;
encoding the second image.
Optionally, the obtaining an adjustment request initiated by the user for the first image includes:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
Optionally, the obtaining a plurality of pixel points in the first image according to the adjustment request includes:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Optionally, the obtaining a plurality of reference pixel points according to the plurality of pixel points includes:
generating the reference image according to the first image;
acquiring the byte length of the plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Optionally, before adjusting the parameters of the plurality of reference pixels according to the adjustment parameter and generating the adjusted plurality of reference pixels, the method further includes:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
In a second aspect, a user avatar picture processing device is provided, the device comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an adjustment request initiated by a user aiming at a first image before the first image is coded, and the first image comprises a user head portrait;
the obtaining module is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the obtaining module is further configured to obtain a plurality of reference pixels in one-to-one correspondence with the plurality of pixels;
the obtaining module is further configured to obtain a plurality of reference pixel points satisfying a first preset condition from all pixel points of the reference image;
the adjusting module is used for adjusting the parameters of the plurality of reference pixel points according to the adjusting parameters to generate a plurality of adjusted reference pixel points, and the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
a replacing module, configured to replace the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generate the second image;
and the coding module is used for coding the second image.
Optionally, the obtaining module is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
Optionally, the obtaining module is specifically configured to:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Optionally, the obtaining module is specifically configured to:
generating the reference image according to the first image;
acquiring the byte length of the plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Optionally, the device further includes a setting module, where the setting module is specifically configured to:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
In a third aspect, a system for processing a user avatar picture is provided, the system comprising:
the device comprises an acquisition device, a processing device and a display device, wherein the acquisition device is used for acquiring an adjustment request initiated by a user for a first image before the first image is coded, and the first image comprises a user head portrait;
the obtaining device is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the acquiring device is further configured to acquire a plurality of reference pixels in one-to-one correspondence with the plurality of pixels;
the acquiring device is further used for acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of the reference image;
the adjusting device is used for adjusting the parameters of the plurality of reference pixel points according to the adjusting parameters to generate a plurality of adjusted reference pixel points, and the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
a replacing device, configured to replace the parameters of the multiple pixel points with the adjusted parameters of the multiple reference pixel points, and generate the second image;
encoding means for encoding the second image.
Optionally, the obtaining device is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
Optionally, the obtaining device is specifically configured to:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Optionally, the obtaining device is specifically configured to:
generating the reference image according to the first image;
acquiring the byte length of the plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Optionally, the system further includes a setting device, where the setting device is specifically configured to:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
In a fourth aspect, a computer-readable storage medium is provided, said readable storage medium storing a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspect.
The embodiment of the invention provides a method, equipment and a system for processing a user head portrait picture and a readable storage medium, wherein the method comprises the following steps: before encoding a first image, acquiring an adjustment request initiated by a user for the first image, wherein the first image comprises a user head portrait; acquiring a plurality of pixel points in the first image according to the adjustment request; acquiring a plurality of reference pixel points which are in one-to-one correspondence with the plurality of pixel points; acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of a reference image; adjusting parameters of the plurality of reference pixel points according to the adjustment parameters to generate a plurality of adjusted reference pixel points, wherein the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded; replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generating a second image; the second image is encoded.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
1. by adjusting the pixel points of the image before the first image is coded, the safety of the head portrait data of the user is improved, and the efficiency of processing the image is further improved.
2. By acquiring the adjustment request initiated by the user for the first image, the first image comprises the user avatar, so that the user can select the area to be adjusted according to personal interest and aesthetic value, and the user experience is further improved on the basis of ensuring the safety of the user avatar data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing a user avatar picture according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for processing a user avatar picture according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a user avatar image processing device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a system for processing a user avatar picture according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying 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.
Example one
The embodiment of the invention provides a method for processing a user head portrait picture, which is shown in figure 1 and comprises the following steps:
101. before encoding the first image, an adjustment request initiated by a user for the first image is obtained, the first image including a user avatar.
Specifically, a region to be adjusted selected by a user on an interface at least comprising a first image is obtained;
acquiring an adjustment request initiated by a user in an area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
102. And acquiring a plurality of pixel points in the first image according to the adjustment request.
Specifically, feature data of all pixel points in the first image or the region to be adjusted is obtained, and the feature data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
103. And acquiring a plurality of reference pixel points which are in one-to-one correspondence with the plurality of pixel points.
Generating a reference image from the first image;
acquiring the byte length of a plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
104. And acquiring a plurality of reference pixel points meeting a first preset condition from all the pixel points of the reference image.
105. And setting an adjusting parameter according to a third preset condition met by the characteristic data.
106. And adjusting the parameters of the plurality of reference pixel points according to the adjustment parameters to generate a plurality of adjusted reference pixel points.
Specifically, the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded.
107. And replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generating a second image.
108. The second image is encoded.
Example two
An embodiment of the present invention provides a method for processing a user avatar picture, and as shown in fig. 2, the method includes:
201. and acquiring the area to be adjusted selected by the user on an interface at least comprising the first image.
Specifically, the interface including at least the first image may be a user profile introduction interface or a user avatar editing interface of the software; the system can also be an editing interface of the avatar editing software, and further, the editing interface at least comprises an identifier for indicating the software applying the avatar of the user; the process in step 201 may specifically be:
and acquiring a user head portrait selected by the user through clicking or selecting the gesture on the interface, wherein the area where the user head portrait is located is the area to be adjusted. Or
And acquiring a face image selected by a user through clicking or selecting a gesture in a user head image area of the interface, wherein the area where the face image is located is the area to be adjusted. Or
And acquiring a selection gesture input by a user on the interface, if the area contained by the selection gesture at least comprises a user head portrait, identifying the user head portrait from the area, marking and displaying the user image to the user, and after the user confirms, determining the area where the user head portrait is located as the area to be adjusted. Or
And acquiring a selection gesture input by a user on the interface, if the area contained by the selection gesture at least comprises a facial image, identifying the facial image from the area, labeling and displaying the facial image to the user, and after the user confirms, determining the area where the facial image is located as the area to be adjusted.
Furthermore, besides acquiring the head image and the face image of the user as the area to be adjusted, the images of the five sense organs can be acquired as the area to be adjusted; wherein the five sense organ images comprise eye images and mouth images; the manner of acquiring the images of the five sense organs as the areas to be adjusted is the same as the manner of acquiring the head images and the face images of the user as the areas to be adjusted, and the details are not repeated here.
The above manner of acquiring the area to be adjusted selected by the user on the interface at least including the first image is merely exemplary, and the process may also be implemented in other manners, and the specific implementation manner is not limited in the embodiment of the present invention.
Optionally, before step 201, the following steps may also be performed:
verifying the authority information of the user, and after the verification is successful, executing step 201, where the process may specifically be:
acquiring equipment information of equipment used by a user;
judging whether the current equipment is the frequently-used equipment or not according to the equipment information and the frequently-used equipment list, if so, executing step 201;
and judging whether the current equipment is authorized equipment or not according to the equipment information and the authorized equipment list, and if so, executing step 201.
202. And acquiring an adjustment request initiated by a user in the area to be adjusted.
Specifically, an adjustment request initiated by a user through a gesture or virtual key click is acquired.
Optionally, the following steps may also be performed:
displaying icons indicating the adjustable portions, for example, displaying an eye image and a mouth image;
after the user selects an adjustable portion by clicking on the icon, an adjustment request is initiated, the adjustment request including at least the user selected adjustable portion.
Optionally, the following steps may also be performed:
displaying an icon indicating a degree of adjustment, the degree of adjustment including being unrecognizable by other recognition devices or unrecognizable by human eyes;
and after the user selects the adjustment degree by clicking the icon, initiating an adjustment request, wherein the adjustment request at least comprises the adjustment degree selected by the user.
203. An adjustment request initiated by a user at an interface including at least a first image is obtained.
Specifically, the interface at least comprises an icon for indicating to initiate an adjustment request, and after a user clicks the icon, any one of a head portrait, a face image and a facial image of the user in the first image is identified and displayed;
after the user selects any one of the user's avatar, facial image, and facial image, an adjustment request is initiated, the adjustment request including any one of the user's avatar, facial image, and facial image.
Optionally, the adjustment request may further include an adjustable portion and/or an adjustment degree, and the manner of obtaining the adjustable portion and the adjustment degree is the same as that described in step 202, and is not described herein again.
It should be noted that, in practical applications, step 201 to step 202 may be executed, or step 203 may be executed.
In addition, steps 201 to 202, or step 203 is executed to implement a process of acquiring an adjustment request initiated by a user for a first image before encoding the first image, and the process may be implemented in other ways besides the above-mentioned ways, and a specific implementation manner is not limited in the embodiment of the present invention. In addition, in implementing the process of obtaining an adjustment request initiated by a user for the first image before encoding the first image, the first image includes a user avatar.
204. And acquiring the characteristic data of all pixel points in the first image or the region to be adjusted.
Specifically, after step 201 to step 202, the feature data of all pixel points in the region to be adjusted is obtained;
after step 203, acquiring feature data of all pixel points in the first image;
the characteristic data is used for describing pixel points and comprises gray values, chromatic values and coordinate values in the first image of the pixel points; the embodiment of the present invention does not limit the specific acquisition method.
205. And acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Specifically, the plurality of pixel points meeting the second preset condition are a plurality of pixel points for describing the user face in the user avatar; the process may be:
identifying a first image or a user face image in the area to be adjusted according to the characteristic data;
and acquiring a plurality of pixel points in the user face image.
Alternatively to this, the first and second parts may,
the plurality of pixel points meeting the second preset condition are a plurality of pixel points used for describing the fifth sense organ of the user in the user head portrait; the process may be:
identifying a first image or a user five sense organ image in the area to be adjusted according to the characteristic data;
and acquiring a plurality of pixel points in the user face image.
The above-mentioned identification process may be implemented by a depth identification algorithm, and the embodiment of the present invention does not limit a specific identification algorithm.
It should be noted that, steps 204 to 205 are processes for obtaining a plurality of pixel points in the first image according to the adjustment request, and besides the manners described in the above steps, the processes may also be implemented in other manners, and the specific implementation manner is not limited in the embodiment of the present invention.
206. A reference image is generated from the first image.
Specifically, the average gray value and the average chroma value of a plurality of pixel points used for describing the face of the user in the first image are obtained, and the embodiment of the invention does not limit the specific obtaining mode;
weakening the pixel points with the gray values smaller than the average gray value according to a preset gray adjustment value, wherein the gray value of the pixel points can be set as the original gray value minus the gray adjustment value;
enhancing the pixel points with the gray values larger than the average gray value according to a preset gray adjustment value, wherein the gray value of the pixel points can be set as the original gray value plus the gray adjustment value;
weakening the pixel points with the chroma values smaller than the average chroma value according to a preset chroma adjustment value, wherein the chroma values of the pixel points are set as primary chroma values minus the chroma adjustment value;
enhancing the pixel points with the chromatic values larger than the average value of the chromatic values according to a preset chromatic adjustment value, wherein the process can be that the chromatic values of the pixel points are set as primary chromatic values and the chromatic adjustment value;
setting the gray value and the chromatic value of the pixel point to generate an image which is a reference image;
the embodiment of the present invention does not limit the specific gray scale adjustment value and the specific chromaticity adjustment value.
207. And acquiring the byte length of the plurality of pixel points after being coded.
Specifically, according to an encoding algorithm, the multiple pixel points are pre-encoded, and the byte length of the multiple pixel points after encoding is obtained;
in practical applications, the algorithm may be a huffman coding algorithm.
208. And selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Specifically, the pixel points in the reference image are processed according to a coding algorithm, which may be the same as the algorithm described in step 207.
It should be noted that, steps 206 to 208 are processes for obtaining a plurality of reference pixels corresponding to a plurality of pixels one to one, and the processes may be implemented in other ways besides the ways described in the above steps, and the specific ways are not limited in the embodiment of the present invention.
209. And acquiring a plurality of reference pixel points meeting a first preset condition from all the pixel points of the reference image.
Specifically, the first condition is that the positions of the reference pixels and the positions of the pixels in the first image for describing the five sense organs are in the same region range;
the process in step 209 may specifically be:
acquiring coordinates of all pixel points of a reference image;
coordinates of a plurality of pixel points in the first image for describing the five sense organs;
acquiring a plurality of pixel points of all pixel points of a reference image, wherein the coordinates of the pixel points are in a coordinate range of a plurality of pixel points used for describing the five sense organs in the first image, and the pixel points are taken as reference pixel points;
for any one of all pixel points of the reference image, the coordinate range of the corresponding pixel point in the plurality of pixel points for describing the five sense organs in the first image comprises:
the difference value of the coordinates between the pixel point and the corresponding pixel point is in the interval (0, a), wherein a is a preset value.
Optionally, if the user selects the adjustment degree, and the adjustment degree is not recognizable by other recognition devices, the value of a is smaller, the difference value of the coordinates between the pixel point and the corresponding pixel point is in the interval (0, a), and the difference value is set to be closer to 0;
optionally, if the user selects the adjustment degree, and the adjustment degree is not recognizable by human eyes, the value of a is larger, the difference between the coordinate of the pixel and the coordinate of the corresponding pixel is in the interval (0, a), and the difference is set to be closer to a.
210. And setting an adjusting parameter according to a third preset condition met by the characteristic data.
Specifically, the characteristic data comprises a color average value and a gray average value, and the adjusting parameters comprise a color adjusting value and a gray adjusting value;
the color average value meets a third preset condition, including whether the color average value is smaller than or equal to a color preset value, if so, setting an adjusting parameter to weaken according to a color adjusting value; otherwise, setting the adjustment parameter to be enhanced according to the color adjustment value;
the gray average value meets a third preset condition, including whether the gray average value is smaller than or equal to a gray preset value, if so, setting an adjusting parameter to weaken according to a gray adjusting value; otherwise, setting the adjustment parameter to be enhanced according to the gray adjustment value.
Optionally, the color average value satisfies the third preset condition and further includes an interval where the color average value is located, each interval corresponds to a color adjustment value, whether the color average value is less than or equal to a color preset value or not is judged, if yes, the adjustment parameter is set to be weakened according to the color adjustment value corresponding to the interval where the color average value is located; otherwise, setting the adjustment parameter to be enhanced according to the color adjustment value corresponding to the interval where the color average value is located;
optionally, the gray average value meets the third preset condition and further includes an interval where the gray average value is located, each interval corresponds to a gray adjustment value, whether the gray average value is smaller than or equal to a preset gray value or not is judged, if yes, the adjustment parameter is set to weaken according to the gray adjustment value corresponding to the interval where the gray average value is located; otherwise, setting the adjustment parameter to be enhanced according to the gray adjustment value corresponding to the interval where the gray average value is located.
211. And adjusting the parameters of the plurality of reference pixel points according to the adjustment parameters to generate a plurality of adjusted reference pixel points.
Specifically, the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded; for any one reference pixel point, the process may be:
setting a color value to weaken or strengthen according to the color adjustment value, and setting a gray value to weaken or strengthen according to the gray adjustment value to obtain an adjusted reference pixel point; or
Setting a color value to be weakened or enhanced according to a color adjustment value corresponding to an interval where the color average value is located, and setting a gray value to be weakened or enhanced according to a gray adjustment value corresponding to an interval where the gray average value is located;
obtaining the byte length of the reference pixel points after the adjustment after the encoding, if the byte length of the reference pixel points after the adjustment after the encoding is the same as the byte length of the pixel points after the encoding, executing step 212, otherwise, resetting the adjustment parameters, and continuing executing the process of adjusting the parameters of the reference pixel points according to the adjustment parameters until the byte length of the reference pixel points after the adjustment after the encoding is the same as the byte length of the pixel points after the encoding;
and continuing to execute the operation on other reference pixel points until the operation is finished on all the reference pixel points.
212. And replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generating a second image.
Specifically, the embodiment of the present invention does not limit the specific alternative manner.
213. The second image is encoded.
Specifically, the encoding process is to perform huffman encoding on the second image, and the specific encoding manner is not limited in the embodiment of the present invention.
Optionally, after step 213, step 214 and step 215 may also be performed.
214. And adding identification information and authority information to the encoded second image.
Specifically, the identification information is used to indicate software using the second image and user equipment that can edit the second image, and the permission information is used to indicate supportable operations;
the process of adding the identification information to the encoded second image may be:
adding a software identification character and a user equipment identification character to the verification field, wherein the software identification character is used for indicating software using the second image, and the user equipment identification character is used for indicating user equipment capable of editing the second image;
the authentication field is encrypted.
The process of adding the authority information to the encoded second image may be:
adding a permission identifier in a permission field, wherein the permission identifier is used for indicating supportable operation;
in practical applications, the authority may be:
the first authority is used for indicating the operation supported by the current user, and the supportable operation comprises local saving, editing and the like;
the second permission is used for indicating the operation supported by the friend included in the software address list or the friend appointed by the user, and the supportable operation comprises local storage and can not be edited;
a third permission indicating that other users or other devices are not locally savable and editable;
the rights field is encrypted.
215. And displaying the encoded second image.
Specifically, the displaying step may be performed by user equipment used by the user, or may be performed by user equipment used by a friend included in the software address list or a friend specified by the user, or may be performed by user equipment used by another user, a specific execution subject is not limited in the embodiment of the present invention, and the process may specifically be:
decrypting the verification field and the authority field according to an encryption algorithm or a password;
authenticating a device displaying the second image and software that opens the second image;
if any one of the equipment and the software is not accordant with the equipment and the software indicated in the verification field, returning and displaying error information;
otherwise, the authority of the equipment is verified, and the executable operation is executed according to the authority of the equipment.
EXAMPLE III
An embodiment of the present invention provides a user avatar image processing device 3, and as shown in fig. 3, the device 3 includes:
an obtaining module 31, configured to obtain, before encoding a first image, an adjustment request initiated by a user for the first image, where the first image includes a user avatar;
the obtaining module 31 is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the obtaining module 31 is further configured to obtain a plurality of reference pixels corresponding to the plurality of pixels one to one;
the obtaining module 31 is further configured to obtain a plurality of reference pixels meeting a first preset condition from all pixels of the reference image;
the adjusting module 32 is configured to adjust parameters of the multiple reference pixel points according to the adjustment parameters, and generate a plurality of adjusted reference pixel points, where the length of the encoded bytes of the multiple adjusted reference pixel points is the same as the length of the encoded bytes of the multiple pixel points;
a replacing module 33, configured to replace the parameters of the multiple pixel points with the adjusted parameters of the multiple reference pixel points, and generate a second image;
and an encoding module 34 for encoding the second image.
Optionally, the obtaining module 31 is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by a user in an area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
Optionally, the obtaining module 31 is specifically configured to:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Optionally, the obtaining module 31 is specifically configured to:
generating a reference image from the first image;
acquiring the byte length of a plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Optionally, the device further includes a setting module 35, where the setting module 35 is specifically configured to:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
Example four
An embodiment of the present invention provides a system for processing a user avatar image, and as shown in fig. 4, the system includes:
an obtaining device 41, configured to obtain, before encoding the first image, an adjustment request initiated by a user for the first image, where the first image includes a user avatar;
the obtaining device 41 is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the obtaining device 41 is further configured to obtain a plurality of reference pixels corresponding to the plurality of pixels one to one;
the obtaining device 41 is further configured to obtain a plurality of reference pixels satisfying a first preset condition from all pixels of the reference image;
the adjusting device 42 is configured to adjust parameters of the multiple reference pixels according to the adjustment parameters, and generate multiple adjusted reference pixels, where the length of the encoded bytes of the multiple adjusted reference pixels is the same as the length of the encoded bytes of the multiple pixels;
a replacing device 43, configured to replace the parameters of the multiple pixel points with the adjusted parameters of the multiple reference pixel points, and generate a second image;
encoding means 44 for encoding the second image.
Optionally, the obtaining device 41 is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by a user in an area to be adjusted; or
An adjustment request initiated by a user at an interface including at least a first image is obtained.
Optionally, the obtaining device 41 is specifically configured to:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
Optionally, the obtaining device 41 is specifically configured to:
generating a reference image from the first image;
acquiring the byte length of a plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
Optionally, the system further includes a setting device 45, where the setting device 45 is specifically configured to:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
EXAMPLE five
The embodiment of the invention provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the computer program is used for realizing the steps of the method in the first embodiment and/or the second embodiment when being executed by a processor.
The embodiment of the invention provides a method, equipment and a system for processing a user head portrait picture and a readable storage medium. By acquiring the adjustment request initiated by the user for the first image, the first image comprises the user avatar, so that the user can select the area to be adjusted according to personal interest and aesthetic value, and the user experience is further improved on the basis of ensuring the safety of the user avatar data.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
It should be noted that: when the user avatar image processing apparatus and system provided in the above embodiments execute the user avatar image processing method, only the division of the above functional modules is taken as an example, and in practical applications, the above functions may be distributed to different functional modules according to needs, that is, the internal structures of the apparatus and system are divided into different functional modules to complete all or part of the above described functions. In addition, the embodiments of the method, the device, the system and the readable storage medium for processing the user avatar image provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for processing a user head portrait picture is characterized by comprising the following steps:
before encoding a first image, acquiring an adjustment request initiated by a user for the first image, wherein the first image comprises a user head portrait;
acquiring a plurality of pixel points in the first image according to the adjustment request;
acquiring a plurality of reference pixel points which are in one-to-one correspondence with the plurality of pixel points;
acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of a reference image;
adjusting parameters of the plurality of reference pixel points according to adjustment parameters to generate a plurality of adjusted reference pixel points, wherein the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points, and generating a second image;
encoding the second image;
wherein the acquiring of the adjustment request initiated by the user for the first image comprises:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
Acquiring an adjustment request initiated by a user on an interface at least comprising a first image;
the acquiring of the adjustment request initiated by the user in the area to be adjusted includes:
displaying an icon indicating an adjustable portion, the adjustable portion including an eye image and a mouth image;
displaying an icon indicating a degree of adjustment, the degree of adjustment including being unrecognizable by other recognition devices or unrecognizable by human eyes;
initiating the adjustment request after a user selects the adjustable portion by clicking on an icon of the adjustable portion and selects an adjustment degree by clicking on an icon of the adjustment degree, the adjustment request including at least the adjustable portion and the adjustment degree.
2. The method of claim 1, wherein obtaining a plurality of pixel points in the first image according to the adjustment request comprises:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
3. The method of claim 2, wherein obtaining a plurality of reference pixels according to the plurality of pixels comprises:
generating the reference image according to the first image;
acquiring the byte length of the plurality of pixel points after being coded;
and selecting a plurality of reference pixel points with the same byte length as the coded pixel points from the reference image.
4. The method of claim 3, wherein before adjusting the parameters of the plurality of reference pixels according to the adjustment parameters and generating the adjusted plurality of reference pixels, the method further comprises:
and setting an adjusting parameter according to a third preset condition met by the characteristic data.
5. A user avatar image processing apparatus, the apparatus comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an adjustment request initiated by a user aiming at a first image before the first image is coded, and the first image comprises a user head portrait;
the obtaining module is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the obtaining module is further configured to obtain a plurality of reference pixels in one-to-one correspondence with the plurality of pixels;
the acquisition module is further used for acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of the reference image;
the adjusting module is used for adjusting the parameters of the plurality of reference pixel points according to the adjusting parameters to generate a plurality of adjusted reference pixel points, and the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
the replacing module is used for replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points and generating a second image;
an encoding module for encoding the second image;
wherein the obtaining module is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
Acquiring an adjustment request initiated by a user on an interface at least comprising a first image;
the acquiring of the adjustment request initiated by the user in the area to be adjusted includes:
displaying an icon indicating an adjustable portion, the adjustable portion including an eye image and a mouth image;
displaying an icon indicating a degree of adjustment, the degree of adjustment including being unrecognizable by other recognition devices or unrecognizable by human eyes;
initiating the adjustment request after a user selects the adjustable portion by clicking on an icon of the adjustable portion and selects an adjustment degree by clicking on an icon of the adjustment degree, the adjustment request including at least the adjustable portion and the adjustment degree.
6. The device of claim 5, wherein the obtaining module is specifically configured to:
acquiring characteristic data of all pixel points in the first image or the region to be adjusted, wherein the characteristic data is used for describing the pixel points;
and acquiring a plurality of pixel points meeting a second preset condition from all the pixel points according to the characteristic data.
7. A system for processing a user avatar picture, the system comprising:
the device comprises an acquisition device, a processing device and a display device, wherein the acquisition device is used for acquiring an adjustment request initiated by a user for a first image before the first image is coded, and the first image comprises a user head portrait;
the obtaining device is further configured to obtain a plurality of pixel points in the first image according to the adjustment request;
the acquiring device is further configured to acquire a plurality of reference pixels in one-to-one correspondence with the plurality of pixels;
the acquiring device is further used for acquiring a plurality of reference pixel points meeting a first preset condition from all pixel points of the reference image;
the adjusting device is used for adjusting the parameters of the plurality of reference pixel points according to the adjusting parameters to generate a plurality of adjusted reference pixel points, and the byte length of the plurality of adjusted reference pixel points after being encoded is the same as the byte length of the plurality of pixel points after being encoded;
the replacing device is used for replacing the parameters of the plurality of pixel points with the adjusted parameters of the plurality of reference pixel points and generating a second image;
encoding means for encoding the second image;
wherein the obtaining device is specifically configured to:
acquiring a region to be adjusted, which is selected by a user on an interface at least comprising a first image;
acquiring an adjustment request initiated by the user in the area to be adjusted; or
Acquiring an adjustment request initiated by a user on an interface at least comprising a first image;
the acquiring of the adjustment request initiated by the user in the area to be adjusted includes:
displaying an icon indicating an adjustable portion, the adjustable portion including an eye image and a mouth image;
displaying an icon indicating a degree of adjustment, the degree of adjustment including being unrecognizable by other recognition devices or unrecognizable by human eyes;
initiating the adjustment request after a user selects the adjustable portion by clicking on an icon of the adjustable portion and selects an adjustment degree by clicking on an icon of the adjustment degree, the adjustment request including at least the adjustable portion and the adjustment degree.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202010748027.4A 2020-07-30 2020-07-30 User head portrait picture processing method, device and system and readable storage medium Active CN111627089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010748027.4A CN111627089B (en) 2020-07-30 2020-07-30 User head portrait picture processing method, device and system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010748027.4A CN111627089B (en) 2020-07-30 2020-07-30 User head portrait picture processing method, device and system and readable storage medium

Publications (2)

Publication Number Publication Date
CN111627089A CN111627089A (en) 2020-09-04
CN111627089B true CN111627089B (en) 2020-11-13

Family

ID=72271540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010748027.4A Active CN111627089B (en) 2020-07-30 2020-07-30 User head portrait picture processing method, device and system and readable storage medium

Country Status (1)

Country Link
CN (1) CN111627089B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4937662A (en) * 1987-01-27 1990-06-26 Konica Corporation Color image processing device having ability to process and record an outside or inside region enclosed with a color marker
CN1489171A (en) * 2002-07-26 2004-04-14 ������������ʽ���� Image display device brightness measuring method, manufacturing method, characteristic adjusting method and characteristic adjusting device
CN102215217A (en) * 2010-04-07 2011-10-12 苹果公司 Establishing a video conference during a phone call

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8269793B2 (en) * 2003-02-18 2012-09-18 Serverside Group Limited Apparatus and method for manipulating images
EP2284800B1 (en) * 2009-07-23 2018-09-05 Samsung Electronics Co., Ltd. Method and system for creating an image
CN103188520B (en) * 2011-12-28 2016-08-03 阿里巴巴集团控股有限公司 A kind of image adjusting method and device
CN104426747B (en) * 2013-09-05 2019-06-25 腾讯科技(深圳)有限公司 Instant communicating method, terminal and system
CN104715445B (en) * 2013-12-13 2018-04-06 腾讯科技(深圳)有限公司 Image processing method and system
CN108696355B (en) * 2017-04-10 2021-06-22 Tcl科技集团股份有限公司 Method and system for preventing head portrait of user from being embezzled
CN111371963B (en) * 2020-05-27 2020-09-01 腾讯科技(深圳)有限公司 Image processing method and apparatus, storage medium, and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4937662A (en) * 1987-01-27 1990-06-26 Konica Corporation Color image processing device having ability to process and record an outside or inside region enclosed with a color marker
CN1489171A (en) * 2002-07-26 2004-04-14 ������������ʽ���� Image display device brightness measuring method, manufacturing method, characteristic adjusting method and characteristic adjusting device
CN102215217A (en) * 2010-04-07 2011-10-12 苹果公司 Establishing a video conference during a phone call

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种改进的颜色共生矩阵纹理描述符;徐少平 等;《模式识别与人工智能》;20130131;第26卷(第1期);第90-98页 *

Also Published As

Publication number Publication date
CN111627089A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN105323065B (en) Security verification method and device
US10439818B2 (en) Captcha image generation method and apparatus, and server
US10313338B2 (en) Authentication method and device using a single-use password including biometric image information
CN107239713B (en) Sensitive content data information protection method and system
US20090293119A1 (en) User authentication method and system and password management system
WO2014140775A2 (en) A method, apparatus and system of encoding content and an image
CN109523611B (en) Verification code picture generation method and device
WO2013153122A1 (en) Method and device for generating a code
CN106503655B (en) A kind of electric endorsement method and sign test method based on face recognition technology
JP2006277239A (en) Electronic document browsing management system
CN104091134A (en) Password inputting method with combination of safety and convenience
CN111860727A (en) Two-dimensional code generation method, verification method, device and computer-readable storage medium
CN112183496A (en) Secondary encryption method, device and equipment for face recognition information and storage medium
CN110634096B (en) Self-adaptive multi-mode information hiding method and device
WO2017133154A1 (en) Anti-counterfeit image generation method and device
CN111627089B (en) User head portrait picture processing method, device and system and readable storage medium
CN109919823A (en) A kind of watermark generation method and device
CN108256360A (en) The display methods and terminal of a kind of sensitive information
JP4504096B2 (en) Image processing apparatus, program, and storage medium
CN115134473B (en) Image encryption method and device
JP2000059604A (en) Method for attaching information to image and method for extracting information from image
CN114900289B (en) Data security processing method, system, device and medium
CN113781287B (en) Watermark image processing method, watermark image processing device, electronic equipment and computer readable storage medium
Corcoran et al. Countermeasure against Deepfake Using Steganography and Facial Detection
CN113868690B (en) Trusted deposit certificate based privacy calculation method and system

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