Image processing method and device, equipment and medium
By combining blurred image transparency information and noise maps to process image edges, the problem of low efficiency in object edge effect processing in existing technologies is solved, and efficient and convenient jagged edge effect generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
Existing image processing software is inefficient at applying special effects to the edges of objects in an image, requiring users to manually define and adjust the object edges.
By acquiring an image and a noise map, the edges of the target object are processed using the transparency information of the blurred image and the noise map to generate a second image whose edges are affected by noise, thus achieving a jagged edge effect.
It can efficiently achieve jagged edge effects without requiring users to manually define the object's edges, thus improving processing efficiency.
Smart Images

Figure CN121746239A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, device and medium. Background Technology
[0002] Nowadays, more and more ordinary users and professional editors need to use multimedia editing software to edit the images they have shot. Most existing multimedia editing software can provide special effects processing functions to enhance the appeal and interest of images.
[0003] The inventors discovered through research that existing methods for applying special effects to the edges of objects in images are inadequate. For example, users need to identify the object edges and manually adjust them to achieve the jagged edge effect, which is inefficient. Summary of the Invention
[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides an image processing method, apparatus, device and medium.
[0005] This disclosure provides an image processing method, the method comprising: acquiring a first image and a first noise map; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer region of the target object's edge; blurring the first image to obtain a blurred image corresponding to the first image; generating a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map; wherein the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image.
[0006] Optionally, generating a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map includes: generating a second noise map based on the transparency information of the blurred image and the first noise map; and obtaining a second image corresponding to the first image based on the second noise map and the first image.
[0007] Optionally, if the transparency of the second pixel in the blurred image corresponding to the first pixel in the first noise image is closer to 0, then the pixel value of the third pixel in the second noise image corresponding to the first pixel is closer to the pixel value of the first pixel; if the transparency of the second pixel corresponding to the first pixel is closer to 1, then the pixel value of the third pixel corresponding to the first pixel is closer to 1; wherein, the coordinate positions of the first pixel, the second pixel, and the third pixel are all the same.
[0008] Optionally, obtaining the second image corresponding to the first image based on the second noise map and the first image includes: obtaining an edge sharpness parameter; performing sharpness adjustment processing on the second noise map based on the edge sharpness parameter to obtain a third noise map; and obtaining the second image corresponding to the first image based on the third noise map and the first image.
[0009] Optionally, obtaining the second image corresponding to the first image based on the third noise map and the first image includes: adjusting the transparency information of the blurred image based on the third noise map to obtain target transparency information; and obtaining the second image corresponding to the first image based on the target transparency information and the first image.
[0010] Optionally, the step of adjusting the sharpness of the second noise map based on the edge sharpness parameter to obtain the third noise map includes: adjusting the sharpness of the second noise map using a smoothing step algorithm based on the edge sharpness parameter to obtain the third noise map.
[0011] Optionally, the step of blurring the first image to obtain a blurred image corresponding to the first image includes: obtaining a blur radius parameter; and performing Gaussian blurring on the first image based on the blur radius parameter to obtain a blurred image corresponding to the first image.
[0012] This disclosure also provides an image processing apparatus, comprising: an image acquisition module for acquiring a first image and a first noise map; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer edge region of the target object; a blurring module for blurring the first image to obtain a blurred image corresponding to the first image; and an image generation module for generating a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map; wherein the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image.
[0013] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the image processing method provided in this disclosure.
[0014] This disclosure also provides a computer-readable storage medium storing a computer program for performing the image processing method provided in this disclosure.
[0015] The technical solution provided in this disclosure takes into account that blurring usually has the greatest impact on the edges of objects with differences in transparency. Therefore, the first image can be cleverly made transparent first, and then the transparency information of the blurred image and the first noise map can be combined to generate a second image whose object edges are affected by noise. That is, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image. This achieves special effects processing for the object edges efficiently and conveniently. Since the object edges affected by noise usually present a rough or broken jagged edge appearance to the user, the above method does not require the user to determine the object edge and manually adjust the object edge to achieve the jagged edge effect, which can effectively improve the efficiency of the jagged edge effect.
[0016] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of an image processing method provided in an embodiment of this disclosure;
[0020] Figure 2 A schematic flowchart of an image processing method provided in an embodiment of this disclosure;
[0021] Figure 3 This is a schematic diagram of image processing provided in an embodiment of the present disclosure;
[0022] Figure 4 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure;
[0023] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0024] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0025] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0026] Figure 1 This is a flowchart illustrating an image processing method provided in an embodiment of the present disclosure. The method can be executed by an image processing device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, the method mainly includes the following steps S102 to S106:
[0027] Step S102: Obtain a first image and a first noise image; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer edge region of the target object.
[0028] For example, the target object in the first image is the foreground object, and the area outside the edge of the target object is the background area. The transparency of the foreground object differs from the transparency of the background area in the first image. For instance, the target object is completely opaque with a transparency of 1, and the area outside the edge of the target object is completely transparent with a transparency of 0. It should be emphasized that the above is merely an illustrative example and should not be considered a limitation. Any image requiring edge effects (such as jagged edges) can be used as the first image. Furthermore, the embodiments of this disclosure do not limit the method of obtaining the first noise image; an existing noise image can be directly obtained, or a noise algorithm can be used to generate the first noise image.
[0029] Step S104: Blur the first image to obtain a blurred image corresponding to the first image.
[0030] This disclosure does not limit the blurring method. For example, the blurring method may include Gaussian blurring. Gaussian blurring typically has a significant impact on areas with differences in transparency. Therefore, although the blurring applies to the first image, the main areas affected by the blurring are the object edges. Specifically, a blurred transition region is usually added between the object edge and the area outside the edge. This transition region can achieve a gradual connection of transparency, color, and other information between the object edge and the area outside the edge, thereby achieving the edge blurring effect. This transition region can be called a connection region or edge region. For example, if the target object is completely opaque and the background area is completely transparent, the transition region can be a gradually semi-transparent area.
[0031] Step S106: Based on the transparency information of the blurred image and the first noise map, a second image corresponding to the first image is generated. The edges of the target object in the second image are obtained by applying the first noise map to the edges of the target object in the first image, based on the transparency information of the blurred image. The edge information of the target object in the second image differs from that in the first image; the edge information may include one or more of sharpness, clarity, and smoothness. By using the transparency information of the blurred image to clearly indicate the object's edge region, and then combining it with the noise map, the target object in the generated second image can have a rough, jagged edge effect.
[0032] The technical solution provided in this disclosure takes into account that blurring usually has the greatest impact on the edges of objects with differences in transparency. Therefore, the first image can be cleverly made transparent first, and then the transparency information of the blurred image and the first noise map can be combined to generate a second image whose object edges are affected by noise. That is, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image. This achieves special effects processing for the object edges efficiently and conveniently. Since the object edges affected by noise usually present a rough or broken jagged edge appearance to the user, the above method does not require the user to determine the object edge and manually adjust the object edge to achieve the jagged edge effect, which can effectively improve the efficiency of the jagged edge effect.
[0033] To ensure that the blurring effect meets the diverse needs of users, in some implementations, step S104 above, i.e., blurring the first image to obtain a blurred image corresponding to the first image, can be performed with reference to steps a and b below:
[0034] Step a, obtain the blur radius parameter. In practical applications, controls can be provided to users to adjust the blur radius parameter, allowing them to flexibly set the blur radius parameter according to their needs.
[0035] Step b: Based on the blur radius parameter, perform Gaussian blur processing on the first image to obtain the blurred image corresponding to the first image. This method allows users to adjust the final blur range according to their needs, thereby improving the blur level of the blurred image. This allows for further adjustment of the blur range of object edges in the resulting second image based on the blurred image. It can be understood that the larger the blur radius, the larger the blur range of the resulting second image.
[0036] In order to efficiently and conveniently apply the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image, thereby obtaining a second image in which the object edge is affected by noise, in some embodiments, the above step S106, that is, generating the second image corresponding to the first image based on the transparency information of the blurred image and the first noise map, can be performed with reference to the following steps A and B:
[0037] Step A: Generate a second noise map based on the transparency information of the blurred image and the first noise map.
[0038] For example, if the transparency of the second pixel in the blurred image corresponding to the first pixel in the first noise image is closer to 0, then the pixel value of the third pixel in the second noise image corresponding to the first pixel is closer to the pixel value of the first pixel; if the transparency of the second pixel corresponding to the first pixel is closer to 1, then the pixel value of the third pixel corresponding to the first pixel is closer to 1; wherein the coordinate positions of the first pixel, the second pixel, and the third pixel are all the same. The pixel value in the noise image is equivalent to the brightness value, and can also be called the grayscale value or noise value.
[0039] For ease of understanding, assume the transparency of the blurred image is 'a', and the pixel value of the first noise image is 'n1'. Then, the pixel value of the second noise image is 'n2' = a + (1-a)*n1. That is, as 'a' changes from 0 to 1, the value of 'n2' changes from 'n1' to 1. The main purpose of this method is to limit the effect of the second noise image to areas where noise doesn't need to be added, such as opaque regions. It should be noted that the noise image typically works by multiplying the transparency of the image to be noised. If a pixel in the noise image has a value of 1, it means that the corresponding pixel in the image to be noised will not be affected by the noise. For example, if the target object is completely opaque with a transparency of 1, the pixel values in the second noise image corresponding to the internal region of the target object will also all be 1. Therefore, the noise image will not affect the internal region of the target object. The above method, by changing the noise value of the noise image based on transparency, avoids the noise image affecting the entire image. Instead, it allows the noise image to only affect the blurred object's edge region, thus achieving a rougher, more jagged edge effect.
[0040] Step B involves obtaining a second image corresponding to the first image based on the second noise map and the first image. In some implementations, the second noise map and the first image can be directly fused, i.e., the second noise map can be applied to the first image to obtain the second image. In other implementations, to further meet diverse user needs, the sharpness of the generated object edges with a jagged effect can be adjusted. For example, step B can be performed with reference to steps B1 to B3 as follows:
[0041] Step B1: Obtain edge sharpness parameters; in practical applications, controls can be provided to users to adjust edge sharpness parameters so that users can flexibly set edge sharpness parameters according to their needs.
[0042] Step B2: Adjust the sharpness of the second noise map based on the edge sharpness parameter to obtain the third noise map.
[0043] In some specific implementation examples, the sharpness of the second noise map can be adjusted using a smoothing step algorithm based on the edge sharpness parameter to obtain the third noise map. The smoothing step algorithm can also be called a smoothing step function.
[0044] For ease of understanding, assuming the pixel value of the second noise map is n2, the pixel value of the third noise map can be obtained as n3 = smoothstep(s*0.5, 1-s*0.5, n2). Here, smoothstep() represents the smoothing step function, and s is the edge sharpness parameter, ranging from 0 to 1. The specific implementation of the smoothing step function can be found in relevant technologies and will not be elaborated here. Using the above method, the noise values can be further adjusted based on the second noise map, so that the resulting third noise map can effectively adjust the sharpness of the object's edges.
[0045] Step B3: Based on the third noise map and the first image, obtain the second image corresponding to the first image.
[0046] In practical applications, the third noise image can be fused with the first image to obtain the second image corresponding to the first image. In some specific embodiments of step B3, the transparency information of the blurred image can be adjusted based on the third noise image to obtain target transparency information; based on the target transparency information and the first image, the second image corresponding to the first image is obtained. Specifically, the transparency of the third noise image can be multiplied by the transparency of the blurred image to obtain the target transparency information, and then the second image can be obtained based on the target transparency information and the color channel information of the first image.
[0047] Based on the foregoing, it can be referred to Figure 2 The flowchart of an image processing method shown mainly includes the following steps S202 to S212:
[0048] Step S202, obtain a first image and a first noise map; wherein, the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the area outside the edge of the target object.
[0049] Step S204, obtain a blur radius parameter, and perform Gaussian blur processing on the first image based on the blur radius parameter to obtain a blurred image corresponding to the first image.
[0050] Step S206, generate a second noise map based on the transparency information of the blurred image and the first noise map.
[0051] Step S208, obtain an edge sharpness parameter, and perform sharpness adjustment processing on the second noise map based on the edge sharpness parameter to obtain a third noise map.
[0052] Step S210, adjust the transparency information of the blurred image based on the third noise map to obtain target transparency information.
[0053] Step S212, obtain a second image corresponding to the first image based on the target transparency information and the first image.
[0054] The specific implementation manners of the above steps can be referred to the foregoing related content and will not be elaborated herein. Through the foregoing manner, without manually determining the object edge and performing manual processing, a second image with a frayed edge effect of the object edge can be efficiently and conveniently generated, and the user can also adjust the frayed edge effect by adjusting the blur radius parameter and the edge sharpness parameter according to the requirements.
[0055] For ease of understanding, a schematic diagram of an image processing as shown in Figure 3 may be simply referred to. It shows that the first image contains letters (ABCD), Chinese characters (one, two, three, four) and graphics (square and circle). The above letters, Chinese characters and graphics can all be used as target objects. For ease of understanding, in Figure 3 the transparency information of the blurred image is mainly presented in the form of a black and white image. Usually, a transparency of 0 means completely transparent, and a transparency of 1 means completely opaque. And black is usually represented by 0, and white is usually represented by 1. Therefore, in the transparency information of the blurred image, the target object is mainly presented in white, the background area is presented in black, and it can be seen from the example diagram used to represent the transparency information of the blurred image that there is a certain degree of blurred transition between the edge of the target object and the background. Then the noise map ( Figure 3The image simply illustrates the final noise map (e.g., the third noise map mentioned above) applied to the blurred image. This allows us to obtain the transparency information of the blurred image after noise treatment (i.e., the aforementioned target transparency information). From the example image corresponding to this information, it is clear that the edges of the target object have a rough, jagged effect. It should also be noted that... Figure 3 All images involved are of the same size. Figure 3 The image shown is only magnified to make the rough edge effect of the target object clearer, and does not mean that the size of the second image is larger than the size of other images.
[0056] In summary, the image processing method provided in this embodiment can efficiently and conveniently obtain a jagged edge effect that applies only to the object's edge by cleverly combining the transparency of the blurred image with the noise image. Furthermore, users can fine-tune the parameters of the blurred image and the noise image according to their needs, thereby allowing the object's edge to obtain different jagged edge shapes, thus meeting the diverse needs of users.
[0057] This disclosure further provides an image processing apparatus. Figure 4 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of the present disclosure. The apparatus can be implemented by software and / or hardware, and is generally integrated into an electronic device, such as... Figure 4 As shown, the image processing apparatus includes:
[0058] Image acquisition module 402 is used to acquire a first image and a first noise image; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer edge region of the target object;
[0059] The blur processing module 404 is used to perform blur processing on the first image to obtain a blurred image corresponding to the first image;
[0060] The image generation module 406 is used to generate a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map; wherein, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image.
[0061] The apparatus provided in this embodiment takes into account that blurring usually has the greatest impact on the edges of objects with differences in transparency. Therefore, it can cleverly perform transparency processing on the first image first, and then combine the transparency information of the blurred image and the first noise map to generate a second image in which the object edges are affected by noise. That is, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image. This achieves special effects processing on the object edges efficiently and conveniently. Since the object edges affected by noise usually present a rough or broken jagged edge appearance to the user, the above method does not require the user to determine the object edge and manually adjust the object edge to achieve the jagged edge effect, which can effectively improve the efficiency of achieving the jagged edge effect.
[0062] In some embodiments, the image generation module 406 is specifically used to: generate a second noise map based on the transparency information of the blurred image and the first noise map; and obtain a second image corresponding to the first image based on the second noise map and the first image.
[0063] In some implementations, if the transparency of the second pixel in the blurred image corresponding to the first pixel in the first noise image is closer to 0, then the pixel value of the third pixel in the second noise image corresponding to the first pixel is closer to the pixel value of the first pixel; if the transparency of the second pixel corresponding to the first pixel is closer to 1, then the pixel value of the third pixel corresponding to the first pixel is closer to 1; wherein the coordinate positions of the first pixel, the second pixel, and the third pixel are all the same.
[0064] In some embodiments, the image generation module 406 is specifically used to: obtain edge sharpness parameters; perform sharpness adjustment processing on the second noise map based on the edge sharpness parameters to obtain a third noise map; and obtain a second image corresponding to the first image based on the third noise map and the first image.
[0065] In some embodiments, the image generation module 406 is specifically used to: adjust the transparency information of the blurred image based on the third noise map to obtain target transparency information; and obtain a second image corresponding to the first image based on the target transparency information and the first image.
[0066] In some embodiments, the image generation module 406 is specifically used to: perform sharpness adjustment processing on the second noise map based on the edge sharpness parameter using a smoothing step algorithm to obtain a third noise map.
[0067] In some embodiments, the blur processing module 404 is specifically used to: obtain a blur radius parameter; and perform Gaussian blur processing on the first image based on the blur radius parameter to obtain a blurred image corresponding to the first image.
[0068] The image processing apparatus provided in this disclosure can execute the image processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
[0069] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device embodiments can be referred to the corresponding process in the method embodiments, and will not be repeated here.
[0070] This disclosure provides an electronic device, which includes: a storage device storing a computer program thereon; and a processing device for executing the computer program in the storage device to implement the steps of any method of this disclosure.
[0071] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device 500 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0072] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0073] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0074] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0075] In addition to the methods and devices described above, embodiments of this disclosure can also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the image processing methods provided in the embodiments of this disclosure. The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0076] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the image processing method provided in embodiments of this disclosure.
[0077] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0078] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the image processing method of this disclosure.
[0079] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0080] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0081] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0082] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0083] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0084] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily 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 this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image processing method, characterized in that, include: Acquire a first image and a first noise map; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer edge region of the target object; The first image is blurred to obtain a blurred image corresponding to the first image; Based on the transparency information of the blurred image and the first noise map, a second image corresponding to the first image is generated; wherein, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image.
2. The method according to claim 1, characterized in that, The step of generating a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map includes: A second noise map is generated based on the transparency information of the blurred image and the first noise map; Based on the second noise map and the first image, a second image corresponding to the first image is obtained.
3. The method according to claim 2, characterized in that, If the transparency of the first pixel in the first noise image corresponding to the second pixel in the blurred image is closer to 0, then the pixel value of the third pixel in the second noise image corresponding to the first pixel is closer to the pixel value of the first pixel. If the transparency of the second pixel corresponding to the first pixel is closer to 1, then the pixel value of the third pixel corresponding to the first pixel is closer to 1; wherein the coordinate positions of the first pixel, the second pixel, and the third pixel are all the same.
4. The method according to claim 2, characterized in that, The step of obtaining the second image corresponding to the first image based on the second noise map and the first image includes: Get the edge sharpness parameter; Based on the edge sharpness parameter, the second noise map is subjected to sharpness adjustment processing to obtain the third noise map; Based on the third noise map and the first image, a second image corresponding to the first image is obtained.
5. The method according to claim 4, characterized in that, The step of obtaining the second image corresponding to the first image based on the third noise map and the first image includes: The transparency information of the blurred image is adjusted based on the third noise map to obtain the target transparency information; Based on the target transparency information and the first image, a second image corresponding to the first image is obtained.
6. The method according to claim 4, characterized in that, The step of adjusting the sharpness of the second noise map based on the edge sharpness parameter to obtain the third noise map includes: Based on the edge sharpness parameter, the second noise map is processed by a smoothing step algorithm to adjust its sharpness, resulting in a third noise map.
7. The method according to any one of claims 1 to 6, characterized in that, The step of blurring the first image to obtain a blurred image corresponding to the first image includes: Obtain the fuzzy radius parameter; Based on the blur radius parameter, the first image is subjected to Gaussian blur processing to obtain the blurred image corresponding to the first image.
8. An image processing apparatus, characterized in that, include: An image acquisition module is used to acquire a first image and a first noise image; wherein the first image contains a target object, and the transparency of the target object in the first image is different from the transparency of the outer edge region of the target object; A blur processing module is used to blur the first image to obtain a blurred image corresponding to the first image. An image generation module is used to generate a second image corresponding to the first image based on the transparency information of the blurred image and the first noise map; wherein, the edge of the target object in the second image is obtained by applying the first noise map to the edge of the target object in the first image based on the transparency information of the blurred image.
9. An electronic device, characterized in that, The electronic device includes: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the image processing method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the image processing method according to any one of claims 1-7.
11. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the image processing method according to any one of claims 1-7.