Digital human image processing method, electronic device and storage medium
By performing high-definition amplification processing and color filling technology on digital human video, the problem of reduced clarity in the amplification processing of digital human video is solved and the high-fidelity effect of the image is achieved.
Patent Information
- Application Number
- CN202410549050.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-05-06
AI Technical Summary
During the digital human video amplification process, the amplification of video pixels will cause the pixel spacing to increase, resulting in a reduction in the clarity of the processed digital human video and distortion, which affects the user's perception.
Convert the digital human video to be processed into the digital human image to be processed, perform high-definition amplification processing, and determine whether color filling is required based on the pixel value of the pixel point and the mean value of the corresponding pixel area, and perform initial image amplification by generating an adversarial network model Processing to ensure image clarity.
Through high-definition amplification processing and color filling technology, the clarity of digital human video is improved, ensuring image fidelity and avoiding distortion problems caused by increased pixel spacing.
Smart Images

Figure CN118365518B_ABST
Abstract
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 processing a digital human image is provided, comprising the following steps:
[0006] Step S100, converting the digital human video to be processed into a number of digital human images to be processed;
[0007] Step S200, 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;
[0008] Step S300, determining a plurality of pixel regions on each digital human image to be processed according to the pixel values of a plurality of pixel points of each digital human image to be processed;
[0009] Step S400: determining whether the pixel needs to be filled with color based on the pixel value of each pixel of each high-definition digital human image and the pixel average value of the pixel area corresponding to the pixel;
[0010] Step S500, traverse each high-definition digital human image, if any pixel point of the high-definition digital human image needs to be filled with color, fill the pixel point with the color corresponding to the pixel mean value of the pixel area corresponding to the pixel point, so as to obtain a plurality of target digital human images.
[0011] In an exemplary embodiment of the present application, step S200 includes:
[0012] Step S210: input each digital human image to be processed into a preset generative adversarial network model to obtain a corresponding initial digital human image;
[0013] Step S220: 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.
[0014] In an exemplary embodiment of the present application, step S300 includes:
[0015] Step S310: 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 i = 1, 2, ..., n; n is the number of digital human images to be processed; 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 pixels are continuous pixels;
[0016] Step S320, 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 to be the same pixel area; wherein A0 is a preset pixel difference threshold between similar pixel points.
[0017] In an exemplary embodiment of the present application, step S400 includes:
[0018] Step S410: 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 ,...,Bih(i) ), where 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 ith high-definition digital human image; the ith high-definition digital human image is the high-definition digital human image after the ith digital human image to be processed is high-definition enlarged;
[0019] Step S420: Get B ij The pixel value of each pixel in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed is obtained. ij The corresponding third pixel value list C ij =(C ij1 ,C ij2 ,...,C ije ,...,C ijg(ij) ), where e=1,2,...,g(ij); g(ij) is B ij The number of pixels in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed; C ije For B ij The pixel value of the e-th pixel in the pixel area where the corresponding pixel is located in the i-th digital human image to be processed;
[0020] Step S430: If |B ij -AVG(C ij )|≤A0, then determine B ij The corresponding pixel does not need to be filled with color; otherwise, determine B ij The corresponding pixel points need to be filled with color; wherein AVG() is a preset average value determination function.
[0021] In an exemplary embodiment of the present application, step S500 includes:
[0022] Step S510: If B ij The corresponding pixel needs to be filled with color, then AVG(C ij ) The corresponding color is filled to B ij The corresponding pixel point.
[0023] In an exemplary embodiment of the present application, after step S410, the digital human image processing method further includes:
[0024] Step S411, traverse the second pixel value list set B, if |B ij -B i(j-1) |≤A0, then B ij The corresponding pixel point, Bi(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;
[0025] Step S412: Get B ij The pixel value of each pixel in the enlarged pixel area where the corresponding pixel is located is obtained by ij The corresponding fourth pixel value list D ij =(D ij1 ,D ij2 ,...,D ijk ,...,D ijr(ij) ), where k = 1, 2, ..., r(ij); r(ij) is B ij The number of pixels in the enlarged pixel area where the corresponding pixel is located; D ijk For B ij The pixel value of the kth pixel in the enlarged pixel area where the corresponding pixel is located;
[0026] Step S413: traverse the fourth pixel value list D ij , if |D ijk -AVG(D ij )|>A0, then D ijk The corresponding pixel point is determined as the target pixel point to obtain B ij The number of target pixels P in the enlarged pixel area where the corresponding pixel is located ij ;
[0027] Step S414: If P ij / r(ij)≤L0, then determine B ij The enlarged pixel area where the corresponding pixel point is located does not need to be filled with color; otherwise, execute step S420; wherein L0 is a preset target pixel point ratio threshold.
[0028] In an exemplary embodiment of the present application, after step S413, the digital human image processing method further includes:
[0029] Step S4131: If ij Among the target pixels, the maximum number of consecutive target pixels is greater than P ij / Q0, execute step S420; otherwise, execute step S414; wherein Q0 is a preset threshold value of the continuous number of target pixels.
[0030] In an exemplary embodiment of the present application, step S100 includes:
[0031] Step S110: determine the image corresponding to each video frame in the digital human video to be processed as the digital human image to be processed, so as to obtain a plurality of digital human images to be processed corresponding to the digital human video to be processed.
[0032] 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, and 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 processing method.
[0033] 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.
[0034] The present invention has at least the following beneficial effects:
[0035] The digital human image processing method of the present invention first converts a digital human video to be processed into a plurality of digital human images to be processed, performs high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image, and then determines a plurality of pixel areas on each digital human image to be processed according to the pixel values of a plurality of pixel points of each digital human image to be processed, and determines whether the pixel point needs to be filled with color according to the difference between the pixel value of each pixel point of each high-definition digital human image and the pixel mean value of the pixel area corresponding to the pixel point, and if any pixel point needs to be filled with color, the color corresponding to the pixel mean value of the pixel area corresponding to the pixel point is filled into the pixel point to obtain a plurality of target digital human images. By comparing the pixel value of each high-definition digital human image obtained after the high-definition magnification processing of the digital human video to be processed with the mean value of the pixel area corresponding to the digital human image to be processed before the high-definition magnification processing, it is determined whether the high-definition digital human image needs to be filled with color, so as to improve the clarity of each high-definition digital human image, so that the image fidelity of the high-definition digital human video obtained after the high-definition magnification processing of the digital human video to be processed is preserved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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.
[0037] Figure 1 The present invention provides a flowchart of a digital human image processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] 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.
[0039] A digital human image processing method described in this application, such as Figure 1 As shown, the following steps are included:
[0040] Step S100, converting the digital human video to be processed into a number of digital human images to be processed;
[0041] 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 from the digital human video to be processed. The digital human image to be processed includes the image of the digital human. The digital human video to be processed can be generated by recording a video of a real person.
[0042] Further, step S100 includes:
[0043] Step S110: determine the image corresponding to each video frame in the digital human video to be processed as the digital human image to be processed, so as to obtain a plurality of digital human images to be processed corresponding to the digital human video to be processed.
[0044] Step S200, 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;
[0045] High-definition magnification processing is a pixel magnification processing performed on the digital human image to be processed to improve the clarity of the digital human image to be processed. In addition, in addition to magnifying the pixels, high-definition magnification processing also performs sharpening, noise suppression and other processing on the digital human image to be processed to improve the visual quality of the digital human image.
[0046] Wherein, step S200 includes steps S210 to S220:
[0047] Step S210: input each digital human image to be processed into a preset generative adversarial network model to obtain a corresponding initial digital human image;
[0048] 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.
[0049] Step S220: 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.
[0050] The magnification is a value set according to actual needs.
[0051] Step S300, determining a plurality of pixel regions on each digital human image to be processed according to the pixel values of a plurality of pixel points of each digital human image to be processed;
[0052] Further, step S300 includes step S310-step S320:
[0053] Step S310: 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 i = 1, 2, ..., n; n is the number of digital human images to be processed; 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 pixels are continuous pixels;
[0054] Step S320, 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 same pixel area;
[0055] 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.
[0056] Step S400: determining whether the pixel needs to be filled with color based on the pixel value of each pixel of each high-definition digital human image and the pixel average value of the pixel area corresponding to the pixel;
[0057] Further, step S400 includes step S410-step S430:
[0058] Step S410: 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 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 ith high-definition digital human image; the ith high-definition digital human image is the high-definition digital human image after the ith digital human image to be processed is high-definition enlarged;
[0059] Step S411, 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;
[0060] Step S412: Get B ij The pixel value of each pixel in the enlarged pixel area where the corresponding pixel is located is obtained by ij The corresponding fourth pixel value list D ij =(D ij1 ,D ij2 ,...,D ijk ,...,D ijr(ij) ), where k = 1, 2, ..., r(ij); r(ij) is B ij The number of pixels in the enlarged pixel area where the corresponding pixel is located; D ijk For B ij The pixel value of the kth pixel in the enlarged pixel area where the corresponding pixel is located;
[0061] Step S413: traverse the fourth pixel value list D ij , if |D ijk -AVG(D ij )|>A0, then D ijk The corresponding pixel point is determined as the target pixel point to obtain B ij The number of target pixels P in the enlarged pixel area where the corresponding pixel is located ij ;
[0062] Step S4131: If ij Among the target pixels, the maximum number of consecutive target pixels is greater than P ij / Q0, then execute step S420; otherwise, execute step S414; wherein Q0 is a preset threshold value of the continuous number of target pixels;
[0063] Step S414: If P ij / r(ij)≤L0, then determine B ij The enlarged pixel area where the corresponding pixel point is located does not need to be filled with color; otherwise, execute step S420; wherein L0 is a preset target pixel point ratio threshold;
[0064] Step S420: Get B ij The pixel value of each pixel in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed is obtained. ij The corresponding third pixel value list C ij =(C ij1 ,C ij2 ,...,C ije ,...,C ijg(ij) ), where e=1,2,...,g(ij); g(ij) is B ijThe number of pixels in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed; C ije For B ij The pixel value of the e-th pixel in the pixel area where the corresponding pixel is located in the i-th digital human image to be processed;
[0065] Step S430: If |B ij -AVG(C ij )|≤A0, then determine B ij The corresponding pixel does not need to be filled with color; otherwise, determine B ij The corresponding pixel points need to be filled with color; wherein AVG() is a preset average value determination function.
[0066] Step S500, traversing each high-definition digital human image, if any pixel point of the high-definition digital human image needs to be filled with color, then fill the pixel point with the color corresponding to the pixel mean value of the pixel area corresponding to the pixel point, so as to obtain a number of target digital human images;
[0067] Further, step S500 includes step S510:
[0068] Step S510: If B ij The corresponding pixel needs to be filled with color, then AVG(C ij ) The corresponding color is filled to B ij The corresponding pixel point.
[0069] The digital human image processing method of the present invention first converts a digital human video to be processed into a plurality of digital human images to be processed, performs high-definition magnification processing on each digital human image to be processed to obtain a corresponding high-definition digital human image, and then determines a plurality of pixel areas on each digital human image to be processed according to the pixel values of a plurality of pixel points of each digital human image to be processed, and determines whether the pixel point needs to be filled with color according to the difference between the pixel value of each pixel point of each high-definition digital human image and the pixel mean value of the pixel area corresponding to the pixel point, and if any pixel point needs to be filled with color, the color corresponding to the pixel mean value of the pixel area corresponding to the pixel point is filled into the pixel point to obtain a plurality of target digital human images. By comparing the pixel value of each high-definition digital human image obtained after the high-definition magnification processing of the digital human video to be processed with the mean value of the pixel area corresponding to the digital human image to be processed before the high-definition magnification processing, it is determined whether the high-definition digital human image needs to be filled with color, so as to improve the clarity of each high-definition digital human image, so that the image fidelity of the high-definition digital human video obtained after the high-definition magnification processing of the digital human video to be processed is preserved.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0074] 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".
[0075] 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.
[0076] 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).
[0077] 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.
[0078] 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).
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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).
[0088] 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.
[0089] 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.
[0090] 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 processing method, It is characterized in that The method comprises the following steps: Step S100, converting the digital human video to be processed into a number of digital human images to be processed; Step S200, performing high-definition magnification processing on each of the digital human images 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 S300, determining a plurality of pixel regions on 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 S400: determining whether the pixel point needs to be filled with color according to the pixel value of each pixel point of each high-definition digital human image and the pixel average value of the pixel area corresponding to the pixel point; Step S500, traverse each of the high-definition digital human images, if any pixel point of the high-definition digital human image needs to be filled with color, fill the pixel point with the color corresponding to the pixel mean value of the pixel area corresponding to the pixel point, so as to obtain a plurality of target digital human images.
2. The method according to claim 1, It is characterized in that The step S200 includes: Step S210, inputting each of the to-be-processed digital human images into a preset generative adversarial network model to obtain a corresponding initial digital human image; Step S220: 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.
3. The method according to claim 2, It is characterized in that The step S300 includes: Step S310: 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=(A 1 ,A 2 ,...,A i ,...,A n );A i =(A i1 ,A i2 ,...,A im ,...,A if(i) ); wherein i=1, 2, ..., n; n is the number of digital human images to be processed; 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 pixels are continuous pixels; Step S320: traverse the first pixel value list set A. If |A im -A i(m-1) |≤A 0 , then A im The corresponding pixel point, A i(m-1) The area composed of corresponding pixel points is determined as the same pixel area; where A 0 is the preset pixel difference threshold between similar pixels.
4. The method according to claim 3, It is characterized in that The step S400 includes: Step S410: 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=(B 1 ,B 2 ,...,B i ,...,B n );B i =(B i1 ,B i2 ,...,B ij ,...,B ih(i) ), where 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 pixels in the i-th high-definition digital human image; B ij is the pixel value of the jth pixel point of the ith high-definition digital human image; the ith high-definition digital human image is the high-definition digital human image after the ith digital human image to be processed is subjected to high-definition magnification processing; Step S420: Get B ij The pixel value of each pixel in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed is obtained. ij The corresponding third pixel value list C ij =(C ij1 ,C ij2 ,...,C ije ,...,C ijg(ij) ), where e=1,2,...,g(ij); g(ij) is B ij The number of pixels in the pixel area where the corresponding pixel point is located in the i-th digital human image to be processed; C ije For B ij The pixel value of the e-th pixel in the pixel area where the corresponding pixel is located in the i-th digital human image to be processed; Step S430: If |B ij -AVG(C ij )|≤A 0 , then determine B ij The corresponding pixel does not need to be filled with color; otherwise, determine B ij The corresponding pixel points need to be filled with color; wherein AVG() is a preset average value determination function.
5. The method according to claim 4, It is characterized in that The step S500 includes: Step S510: If B ij The corresponding pixel needs to be filled with color, then AVG(C ij ) The corresponding color is filled to B ij The corresponding pixel point.
6. The method according to claim 4, It is characterized in that After step S410, the method further includes: Step S411, traverse the second pixel value list set B, if |B ij -B i(j-1) |≤A 0 , 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 plurality of enlarged pixel areas corresponding to each high-definition digital human image; Step S412: Get B ij The pixel value of each pixel in the enlarged pixel area where the corresponding pixel is located is obtained by ij The corresponding fourth pixel value list D ij =(D ij1 ,D ij2 ,...,D ijk ,...,D ijr(ij) ), where k = 1, 2, ..., r(ij); r(ij) is B ij The number of pixels in the enlarged pixel area where the corresponding pixel is located; D ijk For B ij The pixel value of the kth pixel in the enlarged pixel area where the corresponding pixel is located; Step S413: traverse the fourth pixel value list D ij , if |D ijk -AVG(D ij )|>A 0 , then D ijk The corresponding pixel point is determined as the target pixel point to obtain B ij The number of target pixels P in the enlarged pixel area where the corresponding pixel is located ij ; Step S414: If P ij / r(ij)≤L 0 , then determine B ij The enlarged pixel area where the corresponding pixel point is located does not need to be filled with color; otherwise, execute step S420; wherein L 0 It is the preset target pixel ratio threshold.
7. The method according to claim 6, It is characterized in that After step S413, the method further includes: Step S4131: If ij Among the target pixels, the maximum number of consecutive target pixels is greater than P ij / Q 0 , then execute step S420; otherwise, execute step S414; wherein, Q 0 It is the preset threshold value of the continuous number ratio of target pixels.
8. The method according to claim 7, It is characterized in that The step S100 includes: Step S110: determine the image corresponding to each video frame in the to-be-processed digital human video as the to-be-processed digital human image, so as to obtain a plurality of to-be-processed digital human images corresponding to the to-be-processed digital human video.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium. It is 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 processing method as described in any one of claims 1-8.
10. An electronic device, It is characterized in that The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
