Image processing method and device, electronic equipment and storage medium

By determining the high-brightness area in the image and adding rainbow dispersion effect, combined with the fusion of the original image, the problem of limited types of special effects in the existing technology is solved, diversified special effects addition of images is achieved, and the ornamentality and artisticity of the image is improved.

CN119251124APending Publication Date: 2025-01-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281328.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, the types of special effects provided by image processing software are limited, and it is difficult to meet the diverse needs of users.

Method used

By determining the target area (brightness value is greater than or equal to the set threshold) in the original image and adding a dispersion effect to it, the dazzling rainbow-like dispersion effect in the sunlight is simulated, and combined with the original image to generate the target image.

Benefits of technology

It realizes automation to add new special effects to images, making the images more ornamental and artistic, and meets users' diverse special effects addition needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251124A_ABST
    Figure CN119251124A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an original image; determining a target area in the original image; the brightness value of the pixel point in the target area is greater than or equal to a set brightness threshold value; adding a dispersion effect to the target area in the original image to obtain a first image; and fusing the first image with the original image to obtain a target image. The essence of the method is that a method capable of automatically adding a brand new special effect to an original image is provided, the special effect simulates a dazzling rainbow-like dispersion effect in the sun, and diversified special effect adding requirements of a user can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of digital image technology, people have put forward higher requirements for the visual effects of images. In order to increase the appreciation and artistry of images, adding special effects to images has become an important technical means. Special effects can bring richer visual effects to images, making them more attractive and valuable to watch.

[0003] However, although there are some software or applications on the market that provide the function of adding special effects, the types of special effects they provide are limited and it is difficult to meet the diverse needs of users. Summary of the invention

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides an image processing method, device, electronic device and storage medium.

[0005] In a first aspect, the present disclosure provides an image processing method, comprising:

[0006] Get the original image;

[0007] Determine a target area in the original image; the brightness value of the pixel point in the target area is greater than or equal to a set brightness threshold;

[0008] Adding a dispersion effect to the target area in the original image to obtain a first image;

[0009] The first image is fused with the original image to obtain a target image.

[0010] In a second aspect, the present disclosure further provides an image processing device, comprising:

[0011] An acquisition module, used for acquiring the original image;

[0012] A determination module, configured to determine a target area in the original image; the brightness value of a pixel point in the target area is greater than or equal to a set brightness threshold;

[0013] A determination module, configured to add a dispersion effect to the target area in the original image to obtain a first image;

[0014] The fusion module is used to fuse the first image with the original image to obtain a target image.

[0015] In a third aspect, the present disclosure further provides an electronic device, the electronic device comprising:

[0016] one or more processors;

[0017] A storage device for storing one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described above.

[0019] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the image processing method as described above when executed by a processor.

[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0021] The technical solution provided by the embodiment of the present disclosure determines the target area in the original image by setting; adds a dispersion effect to the target area in the original image to obtain a first image; and fuses the first image with the original image to obtain a target image. In essence, it provides a method that can automatically add a new special effect to the original image. This special effect simulates the dazzling rainbow-like dispersion effect under the sun, which can meet the user's diverse special effect addition needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0023] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

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

[0025] Figure 2-Figure 9 A schematic diagram of the entire process of processing an image using an image processing method provided by an embodiment of the present disclosure;

[0026] Fig.10 is a structural schematic diagram of an image processing device in an embodiment of the present disclosure;

[0027] Fig.11 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0030] Figure 1 This is a flowchart of an image processing method provided in an embodiment of the present disclosure. This embodiment is applicable to the case where image processing is performed in a client. The method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a terminal, specifically including but not limited to a smart phone, a PDA, a tablet computer, a wearable device with a display screen, a desktop computer, a laptop computer, an all-in-one machine, a smart home device, etc. Alternatively, this embodiment is applicable to the case where image processing is performed in a server. The method can be executed by an image processing device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server.

[0031] like Figure 1 As shown, the method may specifically include:

[0032] S110: Acquire an original image.

[0033] The original image may be, for example, an image to which special effects need to be added. The original image may be specified by the user. Specifically, it may be an image taken by the user or an image downloaded from the network.

[0034] Optionally, the original image may be, for example, a static image, a dynamic image, or an image frame in a video.

[0035] The special effect that the technical solution of this application hopes to present is to simulate the dazzling rainbow-like dispersion effect under the sun.

[0036] S120: Determine a target area in the original image.

[0037] The target area is the area to which special effects need to be added. This application does not limit which area is used as the target area.

[0038] In reality, sunlight undergoes multiple refractions and reflections in certain specific objects (such as water droplets and glass), resulting in a colorful rainbow-like dispersion effect when the light is emitted from certain specific angles. In addition, the greater the intensity of the emitted light, the higher the brightness of its emission position, the more obvious the rainbow-like dispersion effect formed, and the easier it is to observe. Based on this, optionally, the brightness value of the pixel point in the target area can be set to be greater than or equal to the set brightness threshold. The essence of this setting is to select a highlight area in the original image as the target area, and then add a special effect of a dazzling rainbow-like dispersion effect in the highlight area, which can make the combination of the special effect and the original image more natural.

[0039] S130: Add a dispersion effect to the target area in the original image to obtain a first image.

[0040] There are many methods for implementing this step, and this application does not limit this. Exemplarily, the implementation method of this step includes: offsetting the color channels of the pixels in the target area of ​​the original image according to a preset offset direction and a preset offset distance to obtain a first image; different preset offset distances corresponding to different color channels of the same pixel are different.

[0041] Exemplarily, the pixels of the highlight area are separated according to the RGB color channels, and then each color channel is shifted to different degrees. For example, the red channel can be shifted to the left by a pixels, the green channel is not shifted, and the blue channel is shifted to the right by a pixels. The shifted color channels are re-fused to obtain a first image with a dispersion effect.

[0042] S140: Fusing the first image with the original image to obtain a target image.

[0043] The above technical solution determines the target area in the original image by setting; adds the dispersion effect to the target area in the original image to obtain the first image; and fuses the first image with the original image to obtain the target image. In essence, it provides a method that can automatically add a new special effect to the original image. This special effect simulates the dazzling rainbow-like dispersion effect under the sun, which can meet the user's diverse special effect adding needs.

[0044] On the basis of the above-mentioned technical solutions, it is possible to further set the color channels of the pixels in the target area of ​​the original image to be offset according to a preset offset direction and a preset offset distance. After obtaining the first image, the method may also include: blurring the first image along the preset offset direction; S140 may include: fusing the blurred first image with the original image to obtain the target image.

[0045] After the color channels of the pixels in the target area are offset, multiple color bands of different colors will appear in the first image, but the transition between these color bands is relatively abrupt. By setting the first image to be blurred along the preset offset direction, the abrupt feeling can be weakened, so that the transition between the color bands of different colors is natural.

[0046] Based on the above technical solution, optionally, the method may also include: determining the gradient direction of each pixel in the original image; blurring the target area along a direction perpendicular to the gradient direction of each pixel; S130 may include: adding a dispersion effect to the target area in the blurred original image to obtain a first image.

[0047] There are many methods for determining the gradient direction of each pixel in the original image, which is not limited in this application. For example, the gradient direction of each pixel can be determined based on the grayscale value of the pixels around each pixel in the original image.

[0048] Furthermore, the grayscale values ​​of the pixels around each pixel in the original image can be substituted into the following formula to obtain the gradient direction n of each pixel:

[0049] n=((gray(x+1,y)-gray(x-1,y)),(gray(x,y+1)-gray(x,y-1)))×f

[0050] Among them, gray(x+1, y) is the gray value of the pixel with coordinates (x+1, y). gray(x-1, y) is the gray value of the pixel with coordinates (x-1, y). gray(x, y+1) is the gray value of the pixel with coordinates (x, y+1). gray(x, y-1) is the gray value of the pixel with coordinates (x, y-1). f is the gradient magnification factor.

[0051] In practice, when light hits the edge of an object, it will form reflected light at the edge of the object, making the edge of the object clearer and easier to observe. The edge of an object in the original image is usually where the grayscale changes dramatically. Blurring along the direction perpendicular to the gradient will not destroy the edge of the object in the original image, but will make the transition between the edge of the object and the surrounding area more natural, making it easier for the observer to perceive the outline and shape characteristics of the object. In addition, in practice, the rainbow bands formed by reflection and refraction at the edge of the object are often located near the clear edge. By setting the target area in the original image to be blurred along the direction perpendicular to the gradient direction of each pixel first, and then adding a dispersion effect to the target area, the edge of the object near the dispersion light band can be made clearer and more natural.

[0052] Furthermore, determining the gradient direction of each pixel in the original image includes: processing the original image into a grayscale image; blurring the grayscale image to obtain a third image; and determining the gradient direction of each pixel in the third image. The essence of such a setting is that before determining the gradient direction of each pixel in the original image, the entire original image is blurred. Optionally, the original image may be Gaussian blurred. In practice, the edges of objects are usually composed of drastic changes in the color or brightness of adjacent pixels. If these changes are very drastic, the edges will appear rough or fragmented. By blurring the original image, the fragmentation of the edges of the object can be reduced, thereby avoiding the subsequent formation of rainbow color bands that are too fragmented, making the overall effect more natural and harmonious.

[0053] On the basis of the above-mentioned technical methods, optionally, after S140, the method may further include: adding a preset light spot pattern to the target area of ​​the target image. The present application does not limit the specific type of light spot pattern of the preset light spot pattern. Exemplarily, the preset light spot pattern may be a light spot of a preset shape such as a diamond, a circle, a four-pointed star, etc., which may also be a scattered flash point. By adding a preset light spot pattern to the target area of ​​the target image, the target area can be more easily highlighted.

[0054] Furthermore, it is also possible to add a spot pattern including an angle (such as a diamond, a four-pointed star, etc.) to the target area of ​​the target image, and the angle between the angle bisector of the angle of the spot pattern and the preset offset direction for forming the dispersion effect is less than or equal to the set angle threshold. Exemplarily, the angle bisector of the angle of the spot pattern is parallel to the preset offset direction for forming the dispersion effect. This setting can make the overall effect of the picture more natural and harmonious.

[0055] On the basis of the above-mentioned technical methods, optionally, after S140, the method may further include: adding a ghosting effect and / or a luminous effect to the object in the target area in the target image.

[0056] The object in the target area may be, for example, something in the picture in the target area, such as a person, an animal, an object, etc.

[0057] Among them, there are multiple methods for implementing the ghosting effect for objects in the target area. For example, the objects in the target area can be copied to obtain a copied image, the copied image can be offset along a preset direction, and the transparency of the copied image can be adjusted; the target image can be superimposed with the copied image that has been offset and has transparency adjusted, and in the superimposed image, the objects in the target area show a ghosting effect.

[0058] The following is a description of the entire process of the image processing method provided by this application with reference to specific examples. Figure 2 , Figure 2 An original image is given as an example. The target area is obtained according to whether the brightness value of each pixel in the original image is greater than or equal to the set brightness threshold. Figure 3 The target area is Figure 3 Next, Figure 2 The original image in is Gaussian blurred to obtain the second image. Figure 4 Then, Figure 4 The second image in is processed into a grayscale image, and based on the grayscale values ​​of the pixels around each pixel in the grayscale image, a gradient image corresponding to the second image is obtained. Figure 5 See Figure 5 , the gradient map can reflect the gradient direction of each pixel. According to the gradient map, the target area of ​​the original image is blurred along the direction perpendicular to the gradient direction of each pixel to obtain the third image. Figure 6 Then, according to the preset offset direction and preset offset distance, the color channels of the pixels in the target area in the third image are offset to obtain the first image. The obtained first image is shown in Figure 7 Next, the target area in the first image is blurred along the preset offset direction, and the blurred image is as follows: Figure 8 As shown. Figure 8 (i.e. the first image after blurring) and Figure 2 (i.e. the original image) is fused to obtain the target image. The target image is Fig. 9 shown.

[0059] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0060] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0061] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0062] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0063] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0064] Fig.10 Schematic diagram of the structure of an image processing device in an embodiment of the present disclosure. The image processing device provided in the embodiment of the present disclosure can be configured in a client or in a server. Fig.10 , the image processing device specifically comprises:

[0065] An acquisition module 310 is used to acquire an original image;

[0066] A determination module 320 is used to determine a target area in the original image; the brightness value of the pixel point in the target area is greater than or equal to a set brightness threshold;

[0067] An adding module 330, configured to add a dispersion effect to the target area in the original image to obtain a first image;

[0068] The fusion module 340 is used to fuse the first image with the original image to obtain a target image.

[0069] Furthermore, a module 330 is added for:

[0070] The color channels of the pixels in the target area in the original image are offset according to a preset offset direction and a preset offset distance to obtain a first image; different color channels of the same pixel correspond to different preset offset distances.

[0071] Furthermore, the further step is to add a module 330, which is used to: perform an offset process on the color channels of the pixels in the target area in the original image according to a preset offset direction and a preset offset distance, and after obtaining the first image, perform a blur process on the first image along the preset offset direction;

[0072] The fusion module 340 is used to:

[0073] The blurred first image is fused with the original image to obtain a target image.

[0074] Furthermore, a module 330 is added for:

[0075] Determine the gradient direction of each pixel in the original image;

[0076] Performing blur processing on the target area of ​​the original image along a direction perpendicular to the gradient direction of each pixel point to obtain a second image;

[0077] A dispersion effect is added to the target area in the second image to obtain a first image.

[0078] Furthermore, a module 330 is added for:

[0079] Processing the original image into a grayscale image;

[0080] Performing blur processing on the grayscale image to obtain a third image;

[0081] Determine the gradient direction of each pixel in the third image.

[0082] Furthermore, the device also includes an optimization module for fusing the first image with the original image to obtain a target image, and then adding a preset spot pattern to the target area of ​​the target image.

[0083] Furthermore, the device also includes an optimization module for fusing the first image with the original image to obtain a target image, and then adding a ghosting effect and / or a luminous effect to the object in the target area in the target image.

[0084] The image processing device provided in the embodiment of the present disclosure can execute the steps executed by the client or server in the image processing method provided in the embodiment of the method of the present disclosure, and has the execution steps and beneficial effects, which will not be repeated here.

[0085] Fig.11 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.11 , which shows a schematic diagram of the structure of an electronic device 1000 suitable for implementing the embodiment of the present disclosure. The electronic device 1000 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Fig.11 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.

[0086] like Fig.11 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003 to implement the image processing method of the embodiment described in the present disclosure. In the RAM 1003, various programs and information required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0087] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange information. Although Fig.11 The electronic device 1000 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.

[0088] 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 non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the image processing method as described above. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0089] 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 an information signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated information signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, 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.

[0090] In some embodiments, the client and the server may communicate using any known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital information communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any known or future developed network.

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

[0092] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0093] The first device detects whether the application has performance problems;

[0094] Get the original image;

[0095] Determine a target area in the original image; the brightness value of the pixel point in the target area is greater than or equal to a set brightness threshold;

[0096] Adding a dispersion effect to the target area in the original image to obtain a first image;

[0097] The first image is fused with the original image to obtain a target image.

[0098] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[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, but not limited to, 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 a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through 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., through 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, wherein the name of a unit does not, in some cases, limit the unit itself.

[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] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0105] one or more processors;

[0106] A memory for storing one or more programs;

[0107] When the one or more programs are executed by the one or more processors, the one or more processors implement any image processing method provided in the present disclosure.

[0108] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image processing method as described in any one of the present disclosure is implemented.

[0109] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the image processing method described above is implemented.

[0110] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0111] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image processing method, characterized in that: include: Get the original image; Determine a target area in the original image; The brightness value of the pixel in the target area is greater than or equal to a set brightness threshold; Adding a dispersion effect to the target area in the original image to obtain a first image; The first image is fused with the original image to obtain a target image.

2. The method according to claim 1, characterized in that The adding a dispersion effect to the target area in the original image to obtain a first image includes: The color channels of the pixels in the target area in the original image are offset according to a preset offset direction and a preset offset distance to obtain a first image; different color channels of the same pixel correspond to different preset offset distances.

3. The method according to claim 2, characterized in that After performing offset processing on the color channels of the pixels in the target area in the original image according to the preset offset direction and the preset offset distance to obtain the first image, the method further includes: Performing blur processing on the first image along the preset offset direction; The step of fusing the first image with the original image to obtain a target image includes: The blurred first image is fused with the original image to obtain a target image.

4. The method according to claim 1, characterized in that: Also includes: Determine the gradient direction of each pixel in the original image; Performing blur processing on the target area of ​​the original image along a direction perpendicular to the gradient direction of each pixel point to obtain a second image; The adding a dispersion effect to the target area in the original image to obtain a first image includes: A dispersion effect is added to the target area in the second image to obtain a first image.

5. The method according to claim 4, characterized in that Determining the gradient direction of each pixel in the original image includes: Processing the original image into a grayscale image; Performing blur processing on the grayscale image to obtain a third image; Determine the gradient direction of each pixel in the third image.

6. The method according to claim 1, characterized in that After fusing the first image with the original image to obtain a target image, the method further includes: A preset light spot pattern is added to the target area of ​​the target image.

7. The method according to claim 1, characterized in that After fusing the first image with the original image to obtain a target image, the method further includes: In the target image, a ghosting effect and / or a glowing effect is added to the object in the target area.

8. An image processing device, characterized in that: include: An acquisition module, used for acquiring the original image; A determination module, used for determining a target area in the original image; The brightness value of the pixel in the target area is greater than or equal to a set brightness threshold; An adding module, used for adding a dispersion effect to the target area in the original image to obtain a first image; The fusion module is used to fuse the first image with the original image to obtain a target image.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.