Image processing method, device, electronic device and storage medium

By segmenting and processing face images and superimposing them with texture coordinate data, the image distortion problem of GAN network during high-frequency light sources is solved, and the display effect of face images is significantly improved.

CN112651888BActive Publication Date: 2024-11-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202011346336.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-25
Publication Date
2024-11-01
Estimated Expiration
2040-11-25

AI Technical Summary

Technical Problem

During the rendering process of high-frequency light sources, existing GAN networks are prone to image distortion and cannot effectively improve the display effect of face images.

Method used

By segmenting the face image, highlight image data and non-highlight image data are obtained, and they are processed separately using the trained image processing network, and superimposed processing is performed in combination with the texture coordinate data to generate the processed face image.

Benefits of technology

It avoids the distortion problem of face images, improves the display effect of face images, and significantly improves the rendering effect of highlights and non-highlight parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112651888B_ABST
    Figure CN112651888B_ABST
Patent Text Reader

Abstract

The image processing method, device, electronic device and storage medium provided by the embodiments of the present disclosure obtain a facial image to be processed; input the facial image into a trained image processing network, and output highlight image data, non-highlight image data and texture coordinate data corresponding to the facial image; determine highlight drawing data and non-highlight drawing data based on the highlight image data and the non-highlight image data; and superimpose the texture coordinate data, highlight drawing data and non-highlight drawing data to obtain a processed facial image. The image processing method provided by the embodiment can process the highlight part and non-highlight part of the facial image separately, restore and draw the facial image, avoid the distortion problem of the facial image, and improve the display effect of the facial image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the computer field, and in particular to an image processing method, device, electronic device, and storage medium. Background Art

[0002] Different lighting rendering processes for images will affect the visual effects of the image work.

[0003] Light source reconstruction is a common technology for light effect rendering. It uses the GAN network to simulate the lighting parameters of the light source. Then, the simulated lighting parameters are used to render the image under the ambient lighting to obtain the processed image under the light source.

[0004] However, the existing GAN network can only render low-frequency light sources. When high-frequency light sources need to be rendered, the rendering effect is poor and image distortion is prone to occur. Summary of the invention

[0005] In view of the above problems, the embodiments of the present disclosure provide an image processing method, device, electronic device and storage medium.

[0006] In a first aspect, an embodiment of the present disclosure provides an image processing method, including:

[0007] Obtaining the face image to be processed;

[0008] Inputting the face image into a trained image processing network, and outputting highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image;

[0009] Determine highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0010] The texture coordinate data, the highlight drawing data and the non-highlight drawing data are superimposed to obtain a processed face image.

[0011] In a second aspect, an embodiment of the present disclosure provides an image processing device, comprising:

[0012] A communication module, used for acquiring a face image to be processed;

[0013] A light effect processing module, used for inputting the face image into a trained image processing network, outputting highlight image data, non-highlight image data and texture coordinate data corresponding to the face image; and determining highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0014] The overlay processing module is used to overlay the texture coordinate data, the highlight rendering data and the non-highlight rendering data to obtain a processed face image.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and

[0016] Memory;

[0017] The memory stores computer-executable instructions;

[0018] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method as described in any one of the first aspects.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the image processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0020] The image processing method, device, electronic device and storage medium provided by the embodiments of the present disclosure obtain a facial image to be processed; input the facial image into a trained image processing network, and output highlight image data, non-highlight image data and texture coordinate data corresponding to the facial image; determine highlight drawing data and non-highlight drawing data based on the highlight image data and the non-highlight image data; and superimpose the texture coordinate data, highlight drawing data and non-highlight drawing data to obtain a processed facial image. The image processing method provided by the embodiment can process the highlight image and the non-highlight image separately, restore and draw the facial image, avoid the distortion problem of the facial image, and improve the display effect of the facial image. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 A schematic diagram of a network architecture on which the present disclosure is based;

[0023] Figure 2 A flowchart of an image processing method provided by an embodiment of the present disclosure;

[0024] Figure 3A schematic diagram of a flow chart of another image processing method provided by an embodiment of the present disclosure;

[0025] Figure 4 A schematic diagram of the structure of an image processing network provided by an embodiment of the present disclosure;

[0026] Figure 5 A flowchart of another image processing method provided by an embodiment of the present disclosure;

[0027] Figure 6 A structural schematic diagram of an image processing device provided by an embodiment of the present disclosure;

[0028] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0030] Different lighting rendering processes for images will affect the visual effects of the image work.

[0031] Light source reconstruction is a common technology for light effect rendering. It uses the GAN network to simulate the lighting parameters of the light source. Then, the simulated lighting parameters are used to render the image under the ambient lighting to obtain the processed image under the light source.

[0032] However, the existing GAN network can only render low-frequency light sources. When high-frequency light sources need to be rendered, the rendering effect is poor and image distortion is prone to occur.

[0033] In response to these problems, the inventors have discovered that facial images can be segmented to obtain texture data, highlight map data, and non-highlight map data of the facial images, and the highlight map and non-highlight map can be processed separately, and the texture data, processed highlight map data, and non-highlight map can be superimposed to obtain a rendered facial image, which solves the distortion problem of facial images and improves the display effect of facial images.

[0034] refer to Figure 1 , Figure 1 A schematic diagram of a network architecture based on the present disclosure is shown in FIG. Figure 1As shown, a network architecture based on which the present disclosure is based may include a face image processing device 1 and a terminal 2 .

[0035] The face image processing device 1 is hardware or software that can interact with the terminal 2 via a network, and can be used to execute the face image processing methods described in the following embodiments.

[0036] When the face image processing device 1 is hardware, it includes a cloud server with computing functions. When the face image processing device 1 is software, it can be installed in an electronic device with computing functions, including but not limited to a laptop computer and a desktop computer.

[0037] Among them, the terminal 2 can specifically be a hardware device such as a user's mobile phone, smart home device, tablet computer, etc. that can be used to capture facial images and display the captured facial images, and the facial image processing device 1 can be a server integrated or installed on the terminal 2.

[0038] The face image processing device 1 can run on the terminal 2 and provide face image processing services for the terminal 2. In addition, the terminal 1 uses its display or display component to display the face image processed by the face image processing device 1 to the user.

[0039] At the same time, the face image processing device 1 can also use the image shooting function of the terminal 1 to obtain the face image information, location information, scene information and even other information resources of the terminal 1.

[0040] Of course, in other usage scenarios, the face image processing device 1 can also be integrated into a server for processing face images, such as a face server, etc. In this case, the terminal 2 can be a device including a smart phone, a tablet computer, a desktop computer, etc. that can communicate and exchange data with the aforementioned face image processing device 1 through a network. The terminal 2 can send the face image to be processed to the face image processing device 1, so that the face image processing device 1 processes the face image in the manner shown below and returns the processed face image to the terminal.

[0041] The image processing method, device, electronic device and storage medium provided by this application will be further described below:

[0042] Figure 2 The following is a flow chart of an image processing method provided by an embodiment of the present disclosure. Figure 2 As shown, the image processing method provided by the embodiment of the present disclosure includes:

[0043] S101, obtaining a face image to be processed;

[0044] S102, inputting the face image into a trained image processing network, and outputting highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image;

[0045] In this embodiment, the highlight image refers to the part with higher brightness in the image. The input face image is segmented through the trained image processing network to obtain the highlight image data, non-highlight image data and texture coordinate data corresponding to the face image, so as to process and integrate the three different image data separately.

[0046] S103, determining highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0047] In this embodiment, different preset processing methods are used to process the highlight image data and non-highlight image data obtained by the previous step of segmentation respectively, and redraw them to obtain highlight drawing data and non-highlight drawing data. The processed highlight drawing data and non-highlight drawing data will present a better display effect.

[0048] S104: superimpose the texture coordinate data, the highlight rendering data and the non-highlight rendering data to obtain a processed face image.

[0049] In this example, the highlight drawing data, the non-highlight drawing data and the texture coordinate data obtained in the above steps are superimposed to obtain a superimposed face image, which has a more realistic display effect.

[0050] Different from the prior art, in this embodiment, the same network model and basis function are no longer used to process the different light source characteristics of the highlight part and non-highlight part of the facial image. Instead, the facial image is segmented into highlight image data and non-highlight image data, and different processing methods are used to process them separately, thereby avoiding image distortion problems.

[0051] The embodiment of the present application provides an image processing method, which obtains a face image to be processed; inputs the face image into a trained image processing network, and outputs highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image; determines highlight drawing data and non-highlight drawing data based on the highlight image data and the non-highlight image data; and superimposes the texture coordinate data, highlight drawing data, and non-highlight drawing data to obtain a processed face image. The image processing method provided in this embodiment can process the highlight image and the non-highlight image separately, restore and draw the face image, avoid the distortion problem of the face image, and improve the display effect of the face image.

[0052] In an optional embodiment, in the above Figure 2 Based on the examples, Figure 3 A flowchart of another image processing method provided by an embodiment of the present disclosure is shown below. Figure 3 As shown, S102 specifically includes:

[0053] S1021, performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image;

[0054] Specifically, by performing image segmentation on the face image through the image segmentation layer in the trained image processing network, the highlight area image, the non-highlight area image and the texture coordinate data in the face image can be obtained.

[0055] S1022, performing convolution processing on the highlight area image using the highlight processing layer in the trained image processing network to obtain the highlight image data;

[0056] Specifically, based on obtaining the image of the highlight area of ​​the face, the image of the highlight area of ​​the face is further convolved through the highlight processing layer in the trained image processing network to obtain highlight image data.

[0057] S1023, performing convolution processing on the non-highlight area image using the non-highlight processing layer in the trained image processing network to obtain the non-highlight image data.

[0058] Specifically, on the basis of obtaining the non-highlight area image of the face, the non-highlight area image of the face is further convolved through the non-highlight processing layer in the trained image processing network to obtain the non-highlight image data.

[0059] In this embodiment, Figure 4 A schematic diagram of the structure of an image processing network provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown in the figure, the trained image processing network includes an image segmentation layer, a highlight processing layer and a non-highlight processing layer. The face image is first segmented by the image segmentation layer, and then the highlight area image is convolved by the highlight processing layer, and the non-highlight area image is convolved by the non-highlight processing layer.

[0060] Continue to refer Figure 3 ,like Figure 3 As shown, S103 specifically includes:

[0061] First of all, it should be noted that the aforementioned highlight image data includes parallel light parameters, and the aforementioned non-highlight image data includes normal image parameters, color image parameters and light intensity parameters.

[0062] S1031, performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data;

[0063] Specifically, the highlight image and normal image are processed by a convolutional neural network to obtain the parallel light parameters.

[0064] S1032: Perform rendering processing using the normal image parameters, the color image parameters, and the illumination intensity parameters to obtain the non-highlight rendering data.

[0065] Specifically, the non-highlight image is processed through the residual network to obtain the normal image parameters and color image parameters, and the normal image and color image are processed through the convolutional neural network to obtain the light intensity parameters.

[0066] It should be noted that the illumination intensity parameter is a spherical harmonic light parameter.

[0067] In this embodiment, based on the previous embodiment, firstly, parallel light parameters are obtained by processing the previous highlight image and normal image, wherein the normal image is obtained by processing the previous non-highlight image through a residual network, and normal image parameters, color image parameters and light intensity parameters are obtained by processing the non-highlight image; then, drawing processing is performed using the parallel light parameters and normal image parameters to obtain highlight drawing data, and drawing processing is performed using the normal image parameters, color image parameters and light intensity parameters to obtain non-highlight drawing data.

[0068] In an optional embodiment, in the above Figure 2 Based on the examples, Figure 5 A flowchart of another image processing method provided by the embodiment of the present disclosure is shown below. Figure 5 As shown, the image processing method provided by the embodiment of the present disclosure also includes a process of constructing and training an image processing network.

[0069] Specifically, the image processing method further includes:

[0070] S105, establishing an image processing network and obtaining a training data set;

[0071] In this embodiment, the established image processing network is a residual network, which is used to segment and process facial images. The training data set includes highlight image training data, texture coordinate training data, non-highlight image training data, normal image training data, color image training data, light intensity training data and parallel light training data.

[0072] S106: Train the image processing network using the training data set to obtain a trained image processing network.

[0073] In this embodiment, the trained image processing network can segment the face image into highlight area image, non-highlight area image and texture coordinate data, and can process the segmented image to obtain parallel light parameters, normal image parameters, color image parameters and light intensity parameters.

[0074] Corresponding to the image processing method of the above embodiment, Figure 6 The following is a schematic diagram of the structure of an image processing device provided by an embodiment of the present disclosure. For the convenience of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The image processing device includes: a communication module 10, a light effect processing module 20 and a superposition processing module 30.

[0075] The communication module 10 is used to obtain the face image to be processed;

[0076] The light effect processing module 20 is used to input the face image into the trained image processing network, output the highlight image data, the non-highlight image data and the texture coordinate data corresponding to the face image; determine the highlight drawing data and the non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0077] The superposition processing module 30 is used to superimpose the texture coordinate data, the highlight rendering data and the non-highlight rendering data to obtain a processed face image.

[0078] In an optional implementation manner, the light effect processing module 20 is specifically used for:

[0079] Performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image;

[0080] Using the highlight processing layer in the trained image processing network to perform convolution processing on the highlight area image to obtain the highlight image data;

[0081] The non-highlight processing layer in the trained image processing network is used to perform convolution processing on the highlight area image to obtain the non-highlight image data.

[0082] In an optional implementation manner, the highlight image data includes parallel light parameters;

[0083] Furthermore, the non-highlight image data includes normal image parameters, color image parameters, and light intensity parameters.

[0084] In an optional implementation manner, the light effect processing module 20 is further specifically used for:

[0085] Performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data;

[0086] The normal image parameter, the color image parameter and the light intensity parameter are used to perform rendering processing to obtain the non-highlight rendering data.

[0087] In an optional implementation, the light intensity parameter is a spherical harmonic light parameter.

[0088] In an optional embodiment, the image processing device further comprises: a network training module;

[0089] The network training module is specifically used to establish an image processing network and obtain a training data set; and use the training data set to train the image processing network to obtain a trained image processing network.

[0090] The image processing device provided by the embodiment of the present disclosure can obtain a face image to be processed; input the face image into a trained image processing network, and output highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image; determine highlight drawing data and non-highlight drawing data based on the highlight image data and the non-highlight image data; and superimpose the texture coordinate data, highlight drawing data, and non-highlight drawing data to obtain a processed face image. The image processing method provided by the embodiment can process the highlight image and the non-highlight image separately, restore and draw the face image, avoid the distortion problem of the face image, and improve the display effect of the face image.

[0091] The electronic device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0092] refer to Figure 7 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a media library. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0093] like Figure 7 As shown, the electronic device 900 may include a processor 901 for executing the image processing method (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (Read Only Memory, referred to as ROM) 902 or the program loaded from the storage device 908 to the random access memory (Random Access Memory, referred to as RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The image processing method 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0094] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0095] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in each flowchart according to the embodiment of the present disclosure. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the image processing method 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0096] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0097] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0098] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0099] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or media library. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0102] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0103] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0104] The following are some embodiments of the present disclosure.

[0105] In a first aspect, according to one or more embodiments of the present disclosure, an image processing method includes:

[0106] Obtaining the face image to be processed;

[0107] Inputting the face image into a trained image processing network, and outputting highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image;

[0108] Determine highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0109] The texture coordinate data, the highlight drawing data and the non-highlight drawing data are superimposed to obtain a processed face image.

[0110] In an optional embodiment, the step of inputting the face image into a trained image processing network and outputting highlight image data, non-highlight image data and texture coordinate data corresponding to the face image comprises:

[0111] Performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image;

[0112] Using the highlight processing layer in the trained image processing network to perform convolution processing on the highlight area image to obtain the highlight image data;

[0113] The non-highlight processing layer in the trained image processing network is used to perform convolution processing on the highlight area image to obtain the non-highlight image data.

[0114] In an optional embodiment, the highlight image data includes parallel light parameters; and the non-highlight image data includes normal image parameters, color image parameters, and light intensity parameters.

[0115] In an optional embodiment, determining the highlight drawing data and the non-highlight drawing data according to the highlight image data and the non-highlight image data includes:

[0116] Performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data;

[0117] The normal image parameter, the color image parameter and the light intensity parameter are used to perform rendering processing to obtain the non-highlight rendering data.

[0118] In an optional embodiment, the illumination intensity parameter is a spherical harmonic light parameter.

[0119] In an optional embodiment, the image processing method further includes:

[0120] Establish an image processing network and obtain a training data set;

[0121] The image processing network is trained using the training data set to obtain a trained image processing network.

[0122] In an optional embodiment, the image processing network is a residual network.

[0123] In a second aspect, according to one or more embodiments of the present disclosure, an image processing device includes:

[0124] A communication module, used for acquiring a face image to be processed;

[0125] A light effect processing module, used for inputting the face image into a trained image processing network, outputting highlight image data, non-highlight image data and texture coordinate data corresponding to the face image; and determining highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data;

[0126] The overlay processing module is used to overlay the texture coordinate data, the highlight rendering data and the non-highlight rendering data to obtain a processed face image.

[0127] In an optional embodiment, the light effect processing module is specifically used to:

[0128] Performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image;

[0129] Using the highlight processing layer in the trained image processing network to perform convolution processing on the highlight area image to obtain the highlight image data;

[0130] The non-highlight processing layer in the trained image processing network is used to perform convolution processing on the highlight area image to obtain the non-highlight image data.

[0131] In an optional embodiment, the highlight image data includes parallel light parameters; and the non-highlight image data includes normal image parameters, color image parameters, and light intensity parameters.

[0132] In an optional embodiment, the light effect processing module is specifically used for:

[0133] Performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data;

[0134] The normal image parameter, the color image parameter and the light intensity parameter are used to perform rendering processing to obtain the non-highlight rendering data.

[0135] In an optional embodiment, the illumination intensity parameter is a spherical harmonic light parameter.

[0136] In an optional embodiment, the device further comprises: a network training module;

[0137] The network training module is specifically used to establish an image processing network and obtain a training data set; and use the training data set to train the image processing network to obtain a trained image processing network.

[0138] In an optional embodiment, the image processing network is a residual network.

[0139] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device includes: at least one processor; and

[0140] Memory;

[0141] The memory stores computer-executable instructions;

[0142] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method as described in any one of the first aspects.

[0143] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer execution instructions are stored in the computer-readable storage medium. When a processor executes the computer execution instructions, the image processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0144] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0145] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0146] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An image processing method, characterized in that: include: Obtaining the face image to be processed; Inputting the face image into a trained image processing network, and outputting highlight image data, non-highlight image data, and texture coordinate data corresponding to the face image; Determine highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data; The texture coordinate data, the highlight drawing data and the non-highlight drawing data are superimposed to obtain a processed face image; The highlight image data includes parallel light parameters; And, the non-highlight image data includes normal image parameters, color image parameters and light intensity parameters; The determining of highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data includes: Performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data; The normal image parameter, the color image parameter and the light intensity parameter are used to perform rendering processing to obtain the non-highlight rendering data.

2. The image processing method according to claim 1, characterized in that: The face image is input into a trained image processing network, and highlight image data, non-highlight image data and texture coordinate data corresponding to the face image are output, including: Performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image; Using the highlight processing layer in the trained image processing network to perform convolution processing on the highlight area image to obtain the highlight image data; The non-highlight processing layer in the trained image processing network is used to perform convolution processing on the highlight area image to obtain the non-highlight image data.

3. The image processing method according to claim 2, characterized in that: The illumination intensity parameter is a spherical harmonic light parameter.

4. The image processing method according to any one of claims 1 to 3, characterized in that: The image processing method further comprises: Establish an image processing network and obtain a training data set; The image processing network is trained using the training data set to obtain a trained image processing network.

5. The image processing method according to claim 4, characterized in that: The image processing network is a residual network.

6. An image processing device, characterized in that: include: A communication module, used for acquiring a face image to be processed; A light effect processing module, used for inputting the face image into a trained image processing network, and outputting highlight image data, non-highlight image data and texture coordinate data corresponding to the face image; Determine highlight drawing data and non-highlight drawing data according to the highlight image data and the non-highlight image data; An overlay processing module, used for overlaying the texture coordinate data, the highlight drawing data and the non-highlight drawing data to obtain a processed face image; The highlight image data includes parallel light parameters; And, the non-highlight image data includes normal image parameters, color image parameters and light intensity parameters; The light effect processing module is specifically used for: Performing rendering processing using the parallel light parameters and the normal image parameters to obtain highlight rendering data; The normal image parameter, the color image parameter and the light intensity parameter are used to perform rendering processing to obtain the non-highlight rendering data.

7. The image processing device according to claim 6, characterized in that: Light effect processing module, specifically used for: Performing image segmentation processing on the input face image using the image segmentation layer in the trained image processing network to obtain a highlight area image, a non-highlight area image and texture coordinate data in the face image; Using the highlight processing layer in the trained image processing network to perform convolution processing on the highlight area image to obtain the highlight image data; The non-highlight processing layer in the trained image processing network is used to perform convolution processing on the highlight area image to obtain the non-highlight image data.

8. The image processing device according to claim 7, characterized in that: The illumination intensity parameter is a spherical harmonic light parameter.

9. The image processing device according to any one of claims 6 to 8, characterized in that: The device also includes: a network training module; The network training module is specifically used to establish an image processing network and obtain a training data set; and use the training data set to train the image processing network to obtain a trained image processing network.

10. The image processing device according to claim 9, characterized in that: The image processing network is a residual network.

11. An electronic device, wherein: include: at least one processor; as well as Memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the image processing method according to any one of claims 1 to 5.

12. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the image processing method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Face relief geometric modeling method

    CN108492373A

  • Image watermark steganography method and device, medium and electronic equipment

    CN110363697A

  • Three-dimensional face reconstruction method and device based on single-frame image, equipment and medium

    CN110428491A

  • System and method for image processing

    CN110832540A

  • Face recognition method based on structured light frequency domain features

    CN111222472A