Image processing method, device, electronic device and readable storage medium
Through cutting and pasting technology in image processing, background blurred images with spot effects are directly generated, which solves the problem of complex user operations, simplifies operations and improves efficiency.
Patent Information
- Application Number
- CN202011166446.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-27
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-10-27
AI Technical Summary
When users shoot background blurred images with spot effects, they need to adjust parameters such as background composition, object distance, and image distance, resulting in complicated operations.
By receiving the user's material image input, the target object is cropped and pasted into the selected target image, and a background blurred image with a spot effect is generated based on the pasted image without the need to adjust the object distance and image distance.
Simplifying user operations, users only need to select the target object and target image to obtain a background blurred image with a spot effect, which reduces the complexity of the cropping algorithm and improves efficiency.
Smart Images

Figure CN112270728B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, electronic device and readable storage medium. Background Art
[0002] With the continuous development of electronic technology, electronic devices are no longer limited to the single function of communication, but have become devices that integrate communication and photography functions. For example, general mobile phones are equipped with cameras to meet users' needs for taking photos or videos.
[0003] In the process of realizing this application, the inventors found that there are at least the following problems in the prior art: Currently, if a user needs to take a background blur image with a spot effect, he or she needs to not only consider the background composition, but also adjust the object distance and image distance, and adjust the aperture and other parameters. Therefore, in the process of obtaining a background blur image with a spot effect, there is a problem of complex user operation. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and readable storage medium, which can solve the problem of complex user operations in the current process of obtaining a background blurred image with a light spot effect.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:
[0007] receiving a first input of a material image from a user, and in response to the first input, cropping a target object on the material image;
[0008] Pasting the target object into the target image selected by the user to obtain a pasted target image;
[0009] According to the pasted target image, a background blur image with a light spot effect is obtained.
[0010] In a second aspect, an embodiment of the present application provides an image processing device, including:
[0011] A cropping module, configured to receive a first input of a material image from a user, and crop a target object on the material image in response to the first input;
[0012] A pasting module, used for pasting the target object into the target image selected by the user to obtain a pasted target image;
[0013] The obtaining module is used to obtain a background blurred image with a light spot effect according to the pasted target image.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In the embodiment of the present application, a first input of a material image by a user is received, and in response to the first input, a target object on the material image is cropped, and the target object is pasted into a target image selected by the user to obtain a pasted target image, and a background blurred image with a light spot effect is obtained according to the pasted target image. The user does not need to adjust the size of the object distance and the image distance, nor does he need to adjust the aperture, but directly crops the target object selected by the user, and pastes the cropped target object into the target image selected by the user to obtain a pasted target image, and a background blurred image with a light spot effect is obtained according to the pasted target image, that is, the user only needs to select the target object and the target image to obtain the background blurred image with a light spot effect, thereby simplifying the user operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of the steps of an image processing method provided in an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of a material image provided in an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a target image after pasting provided by an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of a background blur image with a light spot effect provided in an embodiment of the present application;
[0022] Figure 5 is a flowchart of another image processing method provided by an embodiment of the present application;
[0023] Figure 6 is a schematic diagram of another target image after pasting provided by an embodiment of the present application;
[0024] Figure 7 is a schematic diagram of a background blur image with another light spot effect provided by an embodiment of the present application;
[0025] Figure 8 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0026] Fig. 9 is a structural schematic diagram of another image processing device provided in an embodiment of the present application;
[0027] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0028] Fig.11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0032] Reference Figure 1 , Figure 1 : is a flowchart of an image processing method provided in an embodiment of the present application, and the method may include the following steps:
[0033] Step 101: receiving a first input of a material image from a user, and in response to the first input, cropping a target object on the material image.
[0034] The first input is, for example, an operation in which a user circles a background object in a favorite material image, for example, as follows: Figure 2 As shown, Figure 2 It is a schematic diagram of a material image provided in an embodiment of the present application. A flower is circled from the material image, for example, the flower is used as a background object in the material image. The first input is, for example, an operation of a user circling a flower. The electronic device responds to the first input, takes the flower on the material image as a target object, and crops the flower.
[0035] Step 102: Paste the target object into the target image selected by the user to obtain a pasted target image.
[0036] In combination with the above example, the electronic device pastes the flower into the target image selected by the user to obtain the pasted target image. Figure 3 , Figure 3 It is a schematic diagram of a target image after pasting provided in an embodiment of the present application.
[0037] Step 103: Obtain a background blurred image with a light spot effect according to the pasted target image.
[0038] Combined with the above examples, the background image in the pasted target image can be blurred. The background image in the pasted target image includes background objects such as mountains, trees, and flowers. The background image is blurred to obtain a background blurred image with a light spot effect. Figure 4 , Figure 4 It is a schematic diagram of a background blurred image with a light spot effect provided in an embodiment of the present application.
[0039] The image processing method provided in this embodiment receives a first input of a material image from a user, and in response to the first input, crops out a target object on the material image, and pastes the target object into a target image selected by the user to obtain a pasted target image, and obtains a background blurred image with a light spot effect based on the pasted target image. The user does not need to adjust the object distance and the image distance, nor does the user need to adjust the aperture. Instead, the target object selected by the user is directly cropped out, and the cropped target object is pasted into a target image selected by the user to obtain a pasted target image, and obtains a background blurred image with a light spot effect based on the pasted target image, that is, the user only needs to select the target object and the target image to obtain a background blurred image with a light spot effect, thereby simplifying the user operation.
[0040] It should be noted that, since the present embodiment allows the user to select the target object and the target image, the user can customize the background subject of the blurred light spot. For example, in the above example, the user selects flowers as the background subject of the blurred light spot, thereby obtaining a background blurred image that meets the user's needs and has a light spot effect.
[0041] Reference Figure 5 , Figure 5: is a flowchart of another image processing method provided by an embodiment of the present application, the method comprising the following steps:
[0042] Step 501: Receive a first input of a material image from a user, and in response to the first input, crop a target object on the material image.
[0043] Step 502: Paste the target object into the target image selected by the user to obtain a pasted target image.
[0044] Wherein, step 502 can be implemented in the following manner:
[0045] When the target object is a background object or a blurred light spot object on the material image, the target object is pasted into the background image area in the target image as the background object in the target image to obtain a pasted target image;
[0046] In the case where the target object is a foreground object on the material image, the target object is pasted to the target area in the target image as the foreground object in the target image to obtain a pasted target image.
[0047] In the case where the target object is a background object on the material image, for example, the background object is Figure 2 Flowers in the Figure 3 Before the pasted target image shown in the figure, there is no flower on the target image selected by the user. The user long presses Figure 3 In the case of the target area in the figure, the flowers are pasted to the target area, so as to obtain the following Figure 3 The target image after pasting is shown as Figure 3 The area where the flowers are shown is the target area.
[0048] It should be noted that, when the target object is a blurred light spot object on the material image, the target object is used as a background object in the target image and pasted into the background image area in the target image to obtain a pasted target image. When the target object is a blurred light spot object on the material image, the pasting process is the same as when the target object is a background object on the material image, and no further examples are given here.
[0049] When the target object is a foreground object on the material image, the target object is pasted as the foreground object in the target image to the target area in the target image to obtain a pasted target image. Figure 2 , if the target object is Figure 2 The foreground object in Figure 2, the person is used as the foreground object in the target image and pasted to the target area in the target image. The target image can be an image with a relatively ideal overall background style selected by the user, such as a starry sky image, a treetop image, etc. Figure 2 The selected person is pasted into, for example, a starry sky image. Figure 2 The target image after pasting is shown as follows: Figure 6 As shown, Figure 6 is a schematic diagram of another target image after pasting provided in an embodiment of the present application, that is, a starry sky image is selected as the target image, and the target image after pasting is obtained as shown in FIG. Figure 6 shown.
[0050] It should be noted that the above-mentioned target area can be an area selected by the user from the target image, so that the target object can be pasted to the target area of interest to the user. For example, the user can click on an area in the starry sky image. In this case, the electronic device receives the user's input on the area in the target image, and in response to the input, pastes the target object to the area to obtain the pasted target image. The input is, for example, a long press operation of the user on the area in the target image. If the user needs to paste the target object to the area, the user can long press the area, and the electronic device responds to the user's long press of the area and pastes the target object to the area, wherein the area is the above-mentioned target area.
[0051] It should be noted that, when the target object is a foreground object on the material image, the target object can also be blurred first, and the blurred target object can be used as the background image in the target image and pasted into the background image area of the target image to obtain the pasted target image.
[0052] Step 503: Receive a second input from the user regarding the target object in the pasted target image.
[0053] Step 504: In response to the second input, adjust at least one of the position, size, and direction of the target object in the pasted target image.
[0054] The user can adjust at least one of the position, size, and direction of the target object in the pasted target image according to his / her needs. Figure 6 Take the little girl in the video as an example, and we get Figure 6 After pasting the target image shown, you can adjust the little girl in Figure 6 At least one of the position, size, and direction.
[0055] It should be noted that, when the target object is a background object or a blurred light spot object on a material image, and the size of the target object in the target image after pasting is adjusted, the distance between each target object and the foreground target in the target image after pasting can be determined according to the size of the target object in the target image after pasting, and the background image of the target image after pasting can be blurred according to the distance between each target object and the foreground target in the target image after pasting, wherein the background image includes each target object, thereby obtaining a background blurred image with a light spot effect.
[0056] Step 505: Obtain a background blurred image with a light spot effect according to the adjusted target image.
[0057] The adjusted target image is an image obtained after adjusting the target object in the pasted target image.
[0058] Among them, step 505, obtaining a background blurred image with a light spot effect according to the pasted target image can be achieved in the following way:
[0059] In the case where the target object is a blurred light spot object, the pasted target image is used as a blurred background image of the light spot effect, or the background image of the pasted target image is blurred to obtain a blurred background image of the light spot effect;
[0060] In the case where the target object is a foreground object or a background object on the material image, the background image in the pasted target image is blurred to obtain a background blurred image with a light spot effect.
[0061] It should be noted that, when the target object is a background object, after the target object is cropped and pasted into the background image area in the target image, the background image in the target image needs to be blurred later, and the blurring includes processing the background image. Therefore, the complexity of the cropping algorithm can be reduced, and even if the cropped target image has defects, they will be weakened during the blurring process. Since the complexity of the cropping algorithm is reduced, the efficiency of obtaining a background blurred image with a light spot effect can be improved to a certain extent.
[0062] Among them, in the target object, for example Figure 2 In the case of a foreground object on the material image shown, the target image after pasting is, for example, Figure 6 The image shown is Figure 6 After the background image in the pasted target image is blurred, the background blurred image with a light spot effect is obtained as shown in FIG. Figure 7 As shown, Figure 7 It is a schematic diagram of a background blurred image with another light spot effect provided in an embodiment of the present application.
[0063] The image processing method provided in this embodiment allows the user to select a target object and a target image of his / her preference, so that the electronic device can process the target object and the target image selected by the user to obtain a background blurred image with a light spot effect, so that the background blurred image with the light spot effect obtained has a more layered feel.
[0064] Optionally, before obtaining a background blur image with a light spot effect according to the pasted target image, the following steps may also be included:
[0065] In the case where the target object is a background object, determining a contour shape of the target object;
[0066] According to the pasted target image, a background blur image with a spot effect can be obtained by the following methods:
[0067] According to the pasted target image and the contour shape of the target object, a background blur image with a light spot effect is obtained.
[0068] In the prior art, the general spot shape is limited to a circle or a regular polygon. This embodiment can provide a richer spot shape. For example, by allowing the user to select a background object in the material image, the outline shape of the background object is taken as the shape of the blurred spot, such as Figure 2 In the case where the outline shape of the flowers in the image is used as the shape of the blurred light spot, or when objects such as leaves and shells are used as background objects, the outline shape of objects such as leaves and shells is used as the shape of the blurred light spot.
[0069] Reference Figure 8 , Figure 8 is a structural diagram of an image processing device provided in an embodiment of the present application. The window position adjustment device 800 includes:
[0070] The cropping module 810 is used to receive a first input of a material image from a user, and crop a target object on the material image in response to the first input;
[0071] A pasting module 820, configured to paste the target object into the target image selected by the user to obtain a pasted target image;
[0072] The obtaining module 830 is used to obtain a background blurred image with a light spot effect according to the pasted target image.
[0073] The image processing device provided in this embodiment receives a first input of a material image from a user, and in response to the first input, crops out a target object on the material image, pastes the target object into the target image selected by the user to obtain a pasted target image, and obtains a background blurred image with a light spot effect based on the pasted target image. The user does not need to adjust the object distance and the image distance, nor does he need to adjust the aperture. Instead, the target object selected by the user is directly cropped out, and the cropped target object is pasted into the target image selected by the user to obtain a pasted target image, and a background blurred image with a light spot effect is obtained based on the pasted target image, that is, the user only needs to select the target object and the target image to obtain the background blurred image with a light spot effect, thereby simplifying the user operation.
[0074] Optionally, the pasting module 820 is specifically configured to, in response to the second input, paste the target object as a background object in the target image into a background image area in the target image when the target object is a background object or a blurred light spot object on the material image, so as to obtain a pasted target image, wherein the target area is the background image area;
[0075] In the case where the target object is a foreground object on the material image, in response to the second input, the target object is pasted into a target area in the target image as a foreground object in the target image to obtain a pasted target image.
[0076] Optionally, the obtaining module 830 is specifically configured to, when the target object is a blurred light spot object, use the pasted target image as a blurred background image of the light spot effect, or perform a blurring process on the background image of the pasted target image to obtain a blurred background image of the light spot effect;
[0077] In the case where the target object is a foreground object or a background object on the material image, the background image in the pasted target image is blurred to obtain a background blurred image with the light spot effect.
[0078] Optional, see Fig. 9 , Fig. 9 900 is a schematic diagram of the structure of another image processing device provided in an embodiment of the present application. The device 900 includes:
[0079] A receiving module 910, configured to receive a second input from the user on a target object in the pasted target image;
[0080] An adjustment module 920, configured to adjust at least one of the position, size, and direction of the target object in the pasted target image in response to the second input;
[0081] The obtaining module 830 is specifically used to obtain a background blurred image with a light spot effect according to the adjusted target image.
[0082] Optionally, also include:
[0083] A determination module 930, configured to determine a contour shape of the target object when the target object is a background object;
[0084] The obtaining module 830 is specifically used to obtain the background blurred image with the light spot effect according to the pasted target image and the contour shape of the target object.
[0085] The image processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0086] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0087] The image processing device provided in the embodiment of the present application can achieve Figure 1 , Figure 5 To avoid repetition, the various processes implemented by the image processing device in the method embodiment will not be described here.
[0088] Optionally, the present application embodiment further provides an electronic device, such as Fig.10 As shown, Fig.101 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device 1000 includes a processor 1001, a memory 1002, and a program or instruction stored in the memory 1002 and executable on the processor 1001. When the program or instruction is executed by the processor 1001, each process of the above-mentioned information processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0089] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0090] Fig.11 A schematic diagram of the hardware structure of another electronic device to implement an embodiment of the present application.
[0091] The electronic device 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, and a processor 1110 and other components.
[0092] Those skilled in the art will appreciate that the electronic device 1100 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1110 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0093] The processor 1110 is configured to receive a first input of a material image from a user, and in response to the first input, crop a target object on the material image;
[0094] Pasting the target object into the target image selected by the user to obtain a pasted target image;
[0095] According to the pasted target image, a background blur image with a light spot effect is obtained.
[0096] By receiving a first input of a material image from a user and responding to the first input, a target object on the material image is cropped, and the target object is pasted into a target image selected by the user to obtain a pasted target image, and a background blurred image with a light spot effect is obtained according to the pasted target image. The user does not need to adjust the object distance and the image distance, nor does he need to adjust the aperture. Instead, the target object selected by the user is directly cropped out, and the cropped target object is pasted into a target image selected by the user to obtain a pasted target image, and a background blurred image with a light spot effect is obtained according to the pasted target image, that is, the user only needs to select the target object and the target image to obtain a background blurred image with a light spot effect, thereby simplifying the user operation.
[0097] The processor 1110 is further configured to, in response to the second input, paste the target object as a background object in the target image into a background image area in the target image to obtain a pasted target image, when the target object is a background object or a blurred light spot object on the material image, wherein the target area is the background image area;
[0098] In the case where the target object is a foreground object on the material image, in response to the second input, the target object is pasted into a target area in the target image as a foreground object in the target image to obtain a pasted target image.
[0099] The processor 1110 is further configured to, when the target object is a blurred light spot object, use the pasted target image as a blurred background image of the light spot effect, or perform a blurring process on the background image of the pasted target image to obtain a blurred background image of the light spot effect;
[0100] In the case where the target object is a foreground object or a background object on the material image, the background image in the pasted target image is blurred to obtain a background blurred image with the light spot effect.
[0101] The processor 1110 is further configured to receive a second input from the user regarding the target object in the pasted target image;
[0102] In response to the second input, adjusting at least one of the position, size, and direction of the target object in the pasted target image;
[0103] The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises:
[0104] According to the adjusted target image, a background blur image with a light spot effect is obtained.
[0105] The processor 1110 is further configured to determine a contour shape of the target object when the target object is a background object;
[0106] The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises:
[0107] A background blurred image with the light spot effect is obtained according to the pasted target image and the contour shape of the target object.
[0108] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0109] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0110] It should be understood that in the embodiment of the present application, the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042, and the graphics processor 11041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1106 may include a display panel 11061, and the display panel 11061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1107 includes a touch panel 11071 and other input devices 11072. The touch panel 11071 is also called a touch screen. The touch panel 11071 may include two parts: a touch detection device and a touch controller. Other input devices 11072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 11011 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1110 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1110.
[0111] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0112] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0113] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes 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 one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0115] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: receiving a first input of a material image from a user, and in response to the first input, cropping a target object on the material image, wherein the target object is a background object, a foreground object, or a blurred light spot object on the material image; Pasting the target object into the target image selected by the user to obtain a pasted target image; According to the pasted target image, a background blur image with a light spot effect is obtained; Wherein, before obtaining a background blur image with a light spot effect according to the pasted target image, the method further comprises: In the case where the target object is a background object, determining a contour shape of the target object; The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises: According to the pasted target image and the contour shape of the target object, a background blur image with a light spot effect is obtained; Wherein, pasting the target object into the target image selected by the user to obtain the pasted target image includes: When the target object is a foreground object on the material image, the target object is pasted as a foreground object in the target image to a target area in the target image to obtain a pasted target image; the target area is an area selected by a user from the target image.
2. The method according to claim 1, characterized in that Pasting the target object into the target image selected by the user to obtain the pasted target image includes: In the case where the target object is a background object or a blurred light spot object on the material image, the target object is used as a background object in the target image and pasted into a background image area in the target image to obtain a pasted target image.
3. The method according to claim 1, characterized in that The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises: In the case where the target object is a blurred light spot object, the pasted target image is used as a blurred background image of the light spot effect, or the background image of the pasted target image is blurred to obtain a blurred background image of the light spot effect; In the case that the target object is not a blurred light spot object, the background image in the pasted target image is blurred to obtain a background blurred image with the light spot effect.
4. The method according to claim 1, characterized in that: After pasting the target object into the target image selected by the user to obtain the pasted target image, the method further includes: receiving a second input from the user regarding the target object in the pasted target image; In response to the second input, adjusting at least one of the position, size, and direction of the target object in the pasted target image; The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises: According to the adjusted target image, a background blur image with a light spot effect is obtained.
5. An image processing device, characterized in that: The device comprises: A cropping module, configured to receive a first input of a material image from a user, and in response to the first input, crop a target object on the material image, wherein the target object is a background object, a foreground object or a blurred light spot object on the material image; A pasting module, used for pasting the target object into the target image selected by the user to obtain a pasted target image; An acquisition module, used for acquiring a background blur image with a light spot effect according to the pasted target image; The device is also used for: In the case where the target object is a background object, determining a contour shape of the target object; The step of obtaining a background blur image with a light spot effect according to the pasted target image comprises: According to the pasted target image and the contour shape of the target object, a background blur image with a light spot effect is obtained; Wherein, pasting the target object into the target image selected by the user to obtain the pasted target image includes: When the target object is a foreground object on the material image, the target object is pasted as a foreground object in the target image to a target area in the target image to obtain a pasted target image; the target area is an area selected by a user from the target image.
6. The device according to claim 5, characterized in that The pasting module is specifically used to respond to a second input and paste the target object as a background object in the target image into a background image area in the target image when the target object is a background object or a blurred light spot object on the material image, so as to obtain a pasted target image, wherein the target area is the background image area.
7. The device according to claim 5, characterized in that The obtaining module is specifically used to use the pasted target image as the background blurred image of the light spot effect, or to perform blurring processing on the background image of the pasted target image, so as to obtain the background blurred image of the light spot effect, when the target object is a blurred light spot object; In the case that the target object is not a blurred light spot object, the background image in the pasted target image is blurred to obtain a background blurred image with the light spot effect.
8. The device according to claim 5, characterized in that Also includes: A receiving module, configured to receive a second input from the user regarding the target object in the pasted target image; an adjustment module, configured to adjust at least one of the position, size and direction of the target object in the pasted target image in response to the second input; The obtaining module is specifically used to obtain a background blur image with a light spot effect according to the adjusted target image.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the image processing method according to any one of claims 1 to 4.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the image processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Multiple cameras-based image synthesis method and apparatus
CN106534689A
Method and device for displaying image in application
CN107493440A
Image processing method and device, electronic apparatus and storage medium
CN109191414A
Image processing method and device, electronic device and storage medium
CN109559272A
Image editing method and terminal equipment
CN110853071A
