Digital human image correction method, electronic device and storage medium

By performing high-definition amplification and color correction on the digital human video, the distortion problem caused by the increase in pixel spacing during the amplification process of the digital human video is solved, and the clarity of the image and user experience are improved.

CN118365517BActive Publication Date: 2024-10-18LUOTANGSHI (BEIJING) SAFETY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410549048.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-10-18
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

During the digital human video amplification process, the amplification of video pixels will cause the pixel spacing to increase, resulting in distortion and affecting clarity and user experience.

Method used

Through high-definition amplification processing of the digital human image to be processed, the enlarged pixel area of ​​adjacent pixels is determined, equalization and color mean calculation are performed to determine whether color correction is needed, and the color of the initial pixel area is filled into the target pixel point to achieve color Correction.

Benefits of technology

It improves the clarity of high-definition digital human images, reduces the occurrence of color distortion, and improves the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365517B_ABST
    Figure CN118365517B_ABST
Patent Text Reader

Abstract

The present invention provides a digital human image correction method, electronic device and storage medium. The method comprises: performing high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image; determining a number of average magnified pixel areas corresponding to each high-definition digital human image; determining whether the average magnified pixel area needs to be color corrected according to the pixel mean of each average magnified pixel area; if the average magnified pixel area needs to be color corrected, determining a target pixel point that needs to be color corrected according to the pixel value of each pixel point in the average magnified pixel area and the pixel mean of an initial pixel area of ​​the digital human image to be processed corresponding to the pixel point, and filling the target pixel point with the color corresponding to the pixel mean of the initial pixel area corresponding to the target pixel point, so as to realize color correction of the high-definition digital human image, so that the clarity of the digital human image obtained after color correction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Digital Human (Digital Human / Meta Human) is a digital character image close to the human image created by digital technology. That is, a character image generated by virtually simulating the human body at different levels of form and function using information science methods. It is widely used in education and teaching, information propaganda and other fields.

[0003] At present, a corresponding digital human image is generated through a recorded video of a real person, and then a digital human video is generated for the generated digital human image according to the corresponding character form, and then the digital human video is magnified to make the obtained digital human video clearer. However, in the process of magnifying the digital human video, the enlargement of the video pixels usually increases the distance between adjacent pixels of the original digital human video, so that the distance between some pixels of the processed digital human video is too large, resulting in distortion, affecting the clarity of the final digital human video and reducing the user's viewing experience. Summary of the invention

[0004] In view of the above technical problems, the technical solution adopted by the present invention is:

[0005] According to one aspect of the present application, a method for correcting a digital human image is provided, comprising the following steps:

[0006] Step S100, performing high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image; the pixels of the high-definition digital human image are larger than the pixels of the digital human image to be processed corresponding to the high-definition digital human image;

[0007] Step S200, determining a number of enlarged pixel areas corresponding to each high-definition digital human image according to the pixel values ​​of each two adjacent pixel points of each high-definition digital human image;

[0008] Step S300: according to the number of pixels included in each enlarged pixel region, each enlarged pixel region is equally divided to obtain a number of average enlarged pixel regions in each enlarged pixel region;

[0009] Step S400, determining whether color correction is required for each average enlarged pixel region according to the pixel mean value of each average enlarged pixel region in each enlarged pixel region;

[0010] Step S500: If any average enlarged pixel region needs to be color corrected, the average enlarged pixel region is determined as a target average enlarged pixel region;

[0011] Step S600, determining a number of initial pixel areas corresponding to each digital human image to be processed according to the pixel values ​​of a number of pixel points of each digital human image to be processed;

[0012] Step S700, determining a target pixel point that needs to be color corrected according to the pixel value of each pixel point in the target average amplified pixel area and the pixel mean value of the initial pixel area corresponding to the pixel point;

[0013] Step S800: Fill the target pixel with the color corresponding to the pixel mean value of the initial pixel area corresponding to the target pixel.

[0014] In an exemplary embodiment of the present application, step S200 includes:

[0015] Step S210: sequentially obtain the pixel value of each pixel point of each high-definition digital human image to obtain a second pixel value list set B = (B1, B2, ..., B i ,...,B n );B i =(B i1 ,B i2 ,...,B ij ,...,B ih(i) ), where i = 1, 2, ..., n; n is the number of high-definition digital human images; B i is the pixel value list corresponding to the i-th high-definition digital human image; j = 1, 2, ..., h(i); h(i) is the number of pixels in the i-th high-definition digital human image; B ij is the pixel value of the jth pixel point of the i-th high-definition digital human image;

[0016] Step S220, traverse the second pixel value list set B, if |B ij -B i(j-1) |≤A0, then B ij The corresponding pixel point, B i(j-1) The area composed of corresponding pixel points is determined as the enlarged pixel area to obtain a number of enlarged pixel areas corresponding to each high-definition digital human image; wherein A0 is a preset pixel difference threshold between similar pixel points.

[0017] In an exemplary embodiment of the present application, step S300 includes:

[0018] Step S310, obtaining the number q of pixels included in any enlarged pixel area;

[0019] Step S320: If q is divisible by t, then execute step S330; otherwise, execute step S340; wherein t is the number of preset average magnified pixel regions;

[0020] Step S330, dividing the enlarged pixel area into t average enlarged pixel areas, so that the number of pixel points in each average enlarged pixel area is q / t;

[0021] Step S340, the enlarged pixel area is evenly divided into t average enlarged pixel areas, so that the number of pixels in the first average enlarged pixel area to the t-1th average enlarged pixel area is q / t, and the number of pixels in the tth average enlarged pixel area is the remainder of q / t.

[0022] In an exemplary embodiment of the present application, step S400 includes:

[0023] Step S410: Obtain pixel values ​​of several pixel points in each average enlarged pixel area in any enlarged pixel area to obtain a fifth pixel value list E=(E1, E2, . . . , E a ,...,E t );E a =(E a1 ,E a2 ,...,E ab ,...,E ac(a) ), where a=1,2,...,t; E a is a list of pixel values ​​corresponding to the ath average enlarged pixel region in the selected enlarged pixel region; b = 1, 2, ..., c(a); c(a) is the number of pixel points included in the ath average enlarged pixel region in the selected enlarged pixel region; E ab is the pixel value of the bth pixel point included in the ath average enlarged pixel area in the selected enlarged pixel area;

[0024] Step S420: Determine the pixel mean corresponding to each average enlarged pixel region according to the fifth pixel value list E, and obtain the first pixel mean list F=(F1, F2, ..., F a ,...,F t ), where F a is the pixel mean corresponding to the ath average amplified pixel area; F a =AVG(E a );AVG() is the preset average value determination function;

[0025] Step S430: If |F a -AVG(E)|≤A0, it is determined that the a-th averagely enlarged pixel region does not need to be color corrected; otherwise, it is determined that the a-th averagely enlarged pixel region needs to be color corrected.

[0026] In an exemplary embodiment of the present application, step S600 includes:

[0027] Step S610: sequentially obtain the pixel value of each pixel point of each digital human image to be processed, and obtain a first pixel value list set A=(A1, A2, ..., A i ,...,A n );A i =(A i1 ,A i2 ,...,A im ,...,A if(i) ), where A i is the pixel value list corresponding to the i-th digital human image to be processed; m=1,2,...,f(i); f(i) is the number of pixels in the i-th digital human image to be processed; A im is the pixel value of the mth pixel point of the i-th digital human image to be processed; A i1 ,A i2 ,...,A im ,...,A if(i) The corresponding pixel points are continuous pixel points; and the i-th high-definition digital human image is a high-definition digital human image after the i-th digital human image to be processed is subjected to high-definition magnification processing;

[0028] Step S620, traverse the first pixel value list set A, if |A im -A i(m-1) |≤A0, then A im The corresponding pixel point, A i(m-1) The area composed of corresponding pixel points is determined as the initial pixel area, so as to obtain a plurality of initial pixel areas corresponding to each digital human image to be processed.

[0029] In an exemplary embodiment of the present application, step S700 includes:

[0030] Step S710: Obtain the pixel value of each pixel point in the target average magnified pixel area to obtain a sixth pixel value list G=(G1, G2, ..., G u ,...,G v ), where u = 1, 2, ..., v, and v is the number of pixels in the target average magnified pixel area; G u The pixel value of the u-th pixel in the target average amplified pixel area;

[0031] Step S720: Get G u The pixel value of each pixel in the initial pixel area corresponding to the corresponding pixel point is obtained. u The corresponding third pixel value list C u =(C u1 ,C u2 ,...,C ue ,...,C ug(u)); among them, e=1,2,...,g(u); g(u) is G u The number of pixels in the initial pixel area corresponding to the corresponding pixel; C ue G u The pixel value of the e-th pixel in the initial pixel area corresponding to the corresponding pixel;

[0032] Step S730: If |G u -AVG(C u )|>A0, then determine G u The corresponding pixel point is the target pixel point.

[0033] In an exemplary embodiment of the present application, after step S710, the digital human image correction method further includes:

[0034] Step S711: If Then determine G u The corresponding pixel point is the target pixel point; otherwise, execute step S720.

[0035] In an exemplary embodiment of the present application, step S100 includes:

[0036] Step S110, inputting each digital human image to be processed into a preset generative adversarial network model to obtain a corresponding initial digital human image;

[0037] Step S120: Perform high-definition magnification processing on the pixels of each initial digital human image according to a preset magnification factor to obtain a corresponding high-definition digital human image.

[0038] According to one aspect of the present application, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned digital human image correction method.

[0039] According to one aspect of the present application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0040] The present invention has at least the following beneficial effects:

[0041] The digital human image correction method of the present invention first performs high-definition magnification processing on each digital human image to be processed to obtain the corresponding high-definition digital human image, then determines a number of magnified pixel areas corresponding to each high-definition digital human image according to the difference between the pixel values ​​of each two adjacent pixels of each high-definition digital human image, divides each magnified pixel area equally according to the number of pixels included in each magnified pixel area to obtain a number of average magnified pixel areas in each magnified pixel area, determines whether the average magnified pixel area needs to be color corrected according to the pixel mean of each average magnified pixel area in each magnified pixel area, and if the average magnified pixel area needs to be color corrected, determines a target pixel point that needs to be color corrected according to the difference between the pixel value of each pixel point in the average magnified pixel area and the pixel mean of the initial pixel area of ​​the digital human image to be processed corresponding to the pixel point, and finally fills the target pixel point with the color corresponding to the pixel mean of the initial pixel area corresponding to the target pixel point, so as to realize color correction of the high-definition digital human image, so that the clarity of the digital human image obtained after color correction is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 The present invention provides a flowchart of a method for correcting a digital human image. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] The digital human image correction method described in this application is as follows: Figure 1 As shown, the following steps are included:

[0046] Step S100, performing high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image;

[0047] The digital human image to be processed is an image that needs to be processed in high definition. The digital human image to be processed can be acquired frame by frame through a video. The digital human image to be processed includes an image of a digital human. The digital human can be generated by recording a video of a real person.

[0048] The pixels of the high-definition digital human image are larger than the pixels of the digital human image to be processed corresponding to the high-definition digital human image.

[0049] Further, step S100 includes steps S110 to S120:

[0050] Step S110, inputting each digital human image to be processed into a preset generative adversarial network model to obtain a corresponding initial digital human image;

[0051] Generative adversarial network (GAN) is an innovative architecture for deep learning. It learns data distribution through competition between two neural networks (generator and discriminator). The competition between the two drives the continuous evolution of the generative adversarial network model, making the generated data gradually close to the real data distribution.

[0052] Step S120: Perform high-definition magnification processing on the pixels of each initial digital human image according to a preset magnification factor to obtain a corresponding high-definition digital human image.

[0053] The magnification is a value set according to actual needs.

[0054] Step S200, determining a number of enlarged pixel areas corresponding to each high-definition digital human image according to the pixel values ​​of each two adjacent pixel points of each high-definition digital human image;

[0055] A plurality of pixel points in each enlarged pixel region are similar pixel points.

[0056] Further, step S200 includes steps S210 to S220:

[0057] Step S210: sequentially obtain the pixel value of each pixel point of each high-definition digital human image to obtain a second pixel value list set B = (B1, B2, ..., B i ,...,B n );B i =(B i1 ,B i2 ,...,B ij ,...,B ih(i) ), where i = 1, 2, ..., n; n is the number of high-definition digital human images; B iis the pixel value list corresponding to the i-th high-definition digital human image; j = 1, 2, ..., h(i); h(i) is the number of pixels in the i-th high-definition digital human image; B ij is the pixel value of the jth pixel point of the i-th high-definition digital human image;

[0058] Step S220, traverse the second pixel value list set B, if |B ij -B i(j-1) |≤A0, then B ij The corresponding pixel point, B i(j-1) The area composed of corresponding pixel points is determined as the enlarged pixel area, so as to obtain a number of enlarged pixel areas corresponding to each high-definition digital human image;

[0059] Among them, A0 is a preset pixel difference threshold between similar pixels. A0 can be a fixed threshold, such as obtaining a range of pixel differences by performing a large number of similar experiments on a number of historical pixels, and then obtaining a pixel difference threshold between similar pixels by processing the range of pixel differences (such as average value processing, minimum value processing, etc.); in addition, if A0 is a fixed threshold, since the determination of the fixed threshold is obtained through experiments or determined by the work experience of technicians, the determination of the fixed threshold has a certain degree of subjectivity, and it is difficult to adapt to different image processing scenarios, and it is not possible to process the details and texture areas in the image well. Therefore, the threshold of similar pixels can also be adaptively adjusted through methods such as structural similarity index, gradient similarity, multi-scale similarity based on wavelet transform, and deep learning feature similarity in the prior art, so as to more accurately detect the smooth area and detail area of ​​the image, which helps to smooth clutter while retaining important features and obtain better image quality.

[0060] Step S300: according to the number of pixels included in each enlarged pixel region, each enlarged pixel region is equally divided to obtain a number of average enlarged pixel regions in each enlarged pixel region;

[0061] Further, step S300 includes step S310-step S340:

[0062] Step S310, obtaining the number q of pixels included in any enlarged pixel area;

[0063] Step S320: If q is divisible by t, then execute step S330; otherwise, execute step S340; wherein t is the number of preset average magnified pixel regions;

[0064] Step S330, dividing the enlarged pixel area into t average enlarged pixel areas, so that the number of pixel points in each average enlarged pixel area is q / t;

[0065] Step S340, the enlarged pixel area is evenly divided into t average enlarged pixel areas, so that the number of pixels in the first average enlarged pixel area to the t-1th average enlarged pixel area is q / t, and the number of pixels in the tth average enlarged pixel area is the remainder of q / t.

[0066] Each enlarged pixel region is divided into several average enlarged pixel regions to facilitate the subsequent calculation and comparison of the pixel mean value, thereby reducing the computing space occupied by the comparison processing of each pixel point.

[0067] Step S400, determining whether color correction is required for each average enlarged pixel region according to the pixel mean value of each average enlarged pixel region in each enlarged pixel region;

[0068] Further, step S400 includes step S410-step S430:

[0069] Step S410: Obtain pixel values ​​of several pixel points in each average enlarged pixel area in any enlarged pixel area to obtain a fifth pixel value list E=(E1, E2, . . . , E a ,...,E t );E a =(E a1 ,E a2 ,...,E ab ,...,E ac(a) ), where a=1,2,...,t; E a is a list of pixel values ​​corresponding to the ath average enlarged pixel region in the selected enlarged pixel region; b = 1, 2, ..., c(a); c(a) is the number of pixel points included in the ath average enlarged pixel region in the selected enlarged pixel region; E ab is the pixel value of the bth pixel point included in the ath average enlarged pixel area in the selected enlarged pixel area;

[0070] Step S420: Determine the pixel mean corresponding to each average enlarged pixel region according to the fifth pixel value list E, and obtain the first pixel mean list F=(F1, F2, ..., F a ,...,F t ), where F a is the pixel mean corresponding to the ath average amplified pixel area;

[0071] F a =AVG(E a );AVG() is the preset average value determination function;

[0072] Step S430: If |F a-AVG(E)|≤A0, it is determined that the a-th averagely enlarged pixel region does not need to be color corrected; otherwise, it is determined that the a-th averagely enlarged pixel region needs to be color corrected.

[0073] If F a With F a If the difference between the average values ​​of the corresponding enlarged pixel areas is less than or equal to the similar pixel threshold, it means that F a If there are points with missing pixels or abnormal pixels in the corresponding average amplified pixel area, color correction is required for them.

[0074] Step S500: If any average enlarged pixel region needs to be color corrected, the average enlarged pixel region is determined as a target average enlarged pixel region;

[0075] Step S600, determining a number of initial pixel areas corresponding to each digital human image to be processed according to the pixel values ​​of a number of pixel points of each digital human image to be processed;

[0076] Further, step S600 includes step S610-step S620:

[0077] Step S610: sequentially obtain the pixel value of each pixel point of each digital human image to be processed, and obtain a first pixel value list set A=(A1, A2, ..., A i ,...,A n );A i =(A i1 ,A i2 ,...,A im ,...,A if(i) ), where A i is the pixel value list corresponding to the i-th digital human image to be processed; m=1,2,...,f(i); f(i) is the number of pixels in the i-th digital human image to be processed; A im is the pixel value of the mth pixel point of the i-th digital human image to be processed; A i1 ,A i2 ,...,A im ,...,A if(i) The corresponding pixel points are continuous pixel points; and the i-th high-definition digital human image is a high-definition digital human image after the i-th digital human image to be processed is subjected to high-definition magnification processing;

[0078] Step S620, traverse the first pixel value list set A, if |A im -A i(m-1) |≤A0, then A im The corresponding pixel point, A i(m-1)The area composed of corresponding pixel points is determined as the initial pixel area, so as to obtain a plurality of initial pixel areas corresponding to each digital human image to be processed.

[0079] Step S700, determining a target pixel point that needs to be color corrected according to the pixel value of each pixel point in the target average amplified pixel area and the pixel mean value of the initial pixel area corresponding to the pixel point;

[0080] Further, step S700 includes steps S710 to S730:

[0081] Step S710: Obtain the pixel value of each pixel point in the target average magnified pixel area to obtain a sixth pixel value list G=(G1, G2, ..., G u ,...,G v ), where u = 1, 2, ..., v, and v is the number of pixels in the target average magnified pixel area; G u The pixel value of the u-th pixel in the target average amplified pixel area;

[0082] Step S711: If Then determine G u The corresponding pixel point is the target pixel point; otherwise, execute step S720;

[0083] Step S720: Get G u The pixel value of each pixel in the initial pixel area corresponding to the corresponding pixel point is obtained. u The corresponding third pixel value list C u =(C u1 ,C u2 ,...,C ue ,...,C ug(u) ); among them, e=1,2,...,g(u); g(u) is G u The number of pixels in the initial pixel area corresponding to the corresponding pixel; C ue G u The pixel value of the e-th pixel in the initial pixel area corresponding to the corresponding pixel;

[0084] Step S730: If |G u -AVG(C u )|>A0, then determine G u The corresponding pixel point is the target pixel point.

[0085] Step S800: Fill the target pixel with the color corresponding to the pixel mean value of the initial pixel area corresponding to the target pixel.

[0086] The digital human image correction method of the present invention first performs high-definition magnification processing on each digital human image to be processed to obtain the corresponding high-definition digital human image, then determines a number of magnified pixel areas corresponding to each high-definition digital human image according to the difference between the pixel values ​​of each two adjacent pixels of each high-definition digital human image, divides each magnified pixel area equally according to the number of pixels included in each magnified pixel area to obtain a number of average magnified pixel areas in each magnified pixel area, determines whether the average magnified pixel area needs to be color corrected according to the pixel mean of each average magnified pixel area in each magnified pixel area, and if the average magnified pixel area needs to be color corrected, determines a target pixel point that needs to be color corrected according to the difference between the pixel value of each pixel point in the average magnified pixel area and the pixel mean of the initial pixel area of ​​the digital human image to be processed corresponding to the pixel point, and finally fills the target pixel point with the color corresponding to the pixel mean of the initial pixel area corresponding to the target pixel point, so as to realize color correction of the high-definition digital human image, so that the clarity of the digital human image obtained after color correction is improved.

[0087] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

[0088] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0089] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0090] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0091] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0092] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0093] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).

[0094] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0095] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).

[0096] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0097] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0098] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter.

[0099] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0100] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0101] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The 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 (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.

[0102] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a 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.

[0103] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0104] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Python, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0105] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0106] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0107] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A digital human image correction method, characterized in that: The method comprises the following steps: Step S100, performing high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image; the pixels of the high-definition digital human image are larger than the pixels of the digital human image to be processed corresponding to the high-definition digital human image; Step S200, determining a plurality of enlarged pixel regions corresponding to each high-definition digital human image according to the pixel values ​​of each two adjacent pixel points of each high-definition digital human image; Step S300: according to the number of pixels included in each of the enlarged pixel regions, each of the enlarged pixel regions is equally divided to obtain a number of average enlarged pixel regions in each of the enlarged pixel regions; Step S400, determining whether color correction is required for each average enlarged pixel region in each of the enlarged pixel regions according to the pixel mean value of the average enlarged pixel region; Step S500: If any of the average enlarged pixel regions needs to be color corrected, the average enlarged pixel region is determined as a target average enlarged pixel region; Step S600: determining a plurality of initial pixel regions corresponding to each of the digital human images to be processed according to the pixel values ​​of a plurality of pixel points of each of the digital human images to be processed; Step S700, determining a target pixel point that needs to be color corrected according to the pixel value of each pixel point in the target average amplified pixel area and the pixel mean value of the initial pixel area corresponding to the pixel point; Step S800: Fill the target pixel with the color corresponding to the pixel mean value of the initial pixel area corresponding to the target pixel.

2. The method according to claim 1, characterized in that The step S200 includes: Step S210: sequentially obtain the pixel value of each pixel point of each high-definition digital human image to obtain a second pixel value list set B = (B1, B2, ..., B i ,...,B n );B i =(B i1 ,B i2 ,...,B ij ,...,B ih(i) ); wherein i=1, 2, ..., n; n is the number of the high-definition digital human images; B i is a list of pixel values ​​corresponding to the i-th high-definition digital human image; j=1, 2, ..., h(i); h(i) is the number of pixel points in the i-th high-definition digital human image; B ij is the pixel value of the jth pixel point of the i-th high-definition digital human image; Step S220, traverse the second pixel value list set B, if |B ij -B i(j-1) |≤A0, then B ij The corresponding pixel point, B i(j-1) The area composed of corresponding pixel points is determined as the enlarged pixel area to obtain a plurality of enlarged pixel areas corresponding to each high-definition digital human image; wherein A0 is a preset pixel difference threshold between similar pixel points.

3. The method according to claim 2, characterized in that The step S300 includes: Step S310, obtaining the number q of pixels included in any of the enlarged pixel regions; Step S320: If q is divisible by t, then execute step S330; otherwise, execute step S340; wherein t is the number of preset average magnified pixel regions; Step S330, dividing the enlarged pixel area into t average enlarged pixel areas, so that the number of pixel points in each average enlarged pixel area is q / t; Step S340: divide the enlarged pixel area into t average enlarged pixel areas on average, so that the number of pixels in the first average enlarged pixel area to the t-1th average enlarged pixel area is q / t, and the number of pixels in the tth average enlarged pixel area is the remainder of q / t.

4. The method according to claim 3, characterized in that The step S400 includes: Step S410: Obtain pixel values ​​of a number of pixel points in each average enlarged pixel area in any of the enlarged pixel areas to obtain a fifth pixel value list E=(E1, E2, ..., E a ,...,E t );E a =(E a1 ,E a2 ,...,E ab ,...,E ac(a) ), where a=1,2,...,t; E a is a list of pixel values ​​corresponding to the ath average enlarged pixel region in the selected enlarged pixel region; b=1, 2, ..., c(a); c(a) is the number of pixel points included in the ath average enlarged pixel region in the selected enlarged pixel region; E ab is the pixel value of the bth pixel point included in the ath average amplified pixel area among the selected amplified pixel areas; Step S420: Determine the pixel mean corresponding to each average enlarged pixel region according to the fifth pixel value list E, and obtain a first pixel mean list F=(F1, F2, ..., F a ,...,F t ), where F a is the pixel mean corresponding to the ath average amplified pixel area; F a =AVG(E a );AVG() is the preset average value determination function; Step S430: If |F a -AVG(E)|≤A0, it is determined that the a-th averagely enlarged pixel region does not need to be color corrected; otherwise, it is determined that the a-th averagely enlarged pixel region needs to be color corrected.

5. The method according to claim 4, characterized in that The step S600 includes: Step S610: sequentially obtain the pixel value of each pixel point of each digital human image to be processed, and obtain a first pixel value list set A=(A1, A2, ..., A i ,...,A n );A i =(A i1 ,A i2 ,...,A im ,...,A if(i) ), where A i is a list of pixel values ​​corresponding to the i-th digital human image to be processed; m=1, 2, ..., f(i); f(i) is the number of pixel points in the i-th digital human image to be processed; A im is the pixel value of the mth pixel point of the i-th digital human image to be processed; i1 ,A i2 ,...,A im ,...,A if(i) The corresponding pixel points are continuous pixel points; and the i-th high-definition digital human image is a high-definition digital human image after high-definition magnification processing is performed on the i-th digital human image to be processed; Step S620: traverse the first pixel value list set A. If |A im -A i(m-1) |≤A0, then A im The corresponding pixel point, A i(m-1) The area composed of corresponding pixel points is determined as the initial pixel area, so as to obtain a plurality of initial pixel areas corresponding to each of the digital human images to be processed.

6. The method according to claim 5, characterized in that The step S700 includes: Step S710: Obtain the pixel value of each pixel point in the target average amplified pixel area to obtain a sixth pixel value list G=(G1, G2, ..., G u ,...,G v ), wherein u=1, 2, ..., v, and v is the number of pixels in the target average magnified pixel area; G u Amplify the pixel value of the u-th pixel in the target pixel area on average; Step S720: Get G u The pixel value of each pixel in the initial pixel area corresponding to the corresponding pixel point is obtained. u The corresponding third pixel value list C u =(C u1 ,C u2 ,...,C ue ,...,C ug(u) ); among them, e=1,2,...,g(u); g(u) is G u The number of pixels in the initial pixel area corresponding to the corresponding pixel; C ue G u The pixel value of the e-th pixel in the initial pixel area corresponding to the corresponding pixel; Step S730: If |G u -AVG(C u )|>A0, then determine G u The corresponding pixel point is the target pixel point.

7. The method according to claim 6, characterized in that After step S710, the method further includes: Step S711: If Then determine G u The corresponding pixel point is the target pixel point; otherwise, execute step S720.

8. The method according to claim 1, characterized in that The step S100 includes: Step S110, inputting each digital human image to be processed into a preset generative adversarial network model to obtain a corresponding initial digital human image; Step S120: Perform high-definition magnification processing on the pixels of each of the initial digital human images according to a preset magnification factor to obtain a corresponding high-definition digital human image.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the digital human image correction method as described in any one of claims 1-8.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.

Citation Information

Patent Citations

  • Method and device for processing image buffing, medium and electronic equipment

    CN110378846A

  • Image super-resolution processing method and computer equipment

    CN114612295A