Image processing method and device
By adjusting the background and target object in the initial image to generate the target image, it solves the problems of limited viewing range and difficulty in editing of 3D images, realizes the simulation of different shooting scenes, and improves the user experience.
Patent Information
- Application Number
- CN202110971760.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-23
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-08-23
AI Technical Summary
In the existing technology, the viewing range of three-dimensional images is relatively limited, and users cannot edit three-dimensional images, making it difficult to meet the needs of different shooting scenes.
An image processing method and device are provided, which can simulate different shooting environments and postures to meet different shooting needs by receiving user input of an initial image, adjusting the background image and/or target object, and generating a target image.
It realizes the simulation of different shooting scenes and provides a better user experience. Users do not need to take multiple photos in different locations or postures to meet diverse shooting needs.
Smart Images

Figure CN113706723B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and specifically relates to an image processing method and device. Background Art
[0002] Currently, the cameras configured in electronic devices are usually ordinary cameras, and the photos taken by ordinary cameras are flat photos.
[0003] In the related art, an image with a three-dimensional effect can be obtained by adding shadows to a flat image. However, the framing range of the three-dimensional image obtained in this way is relatively limited, and the user cannot edit the three-dimensional image or adjust the framing screen of the three-dimensional image, which makes it difficult to meet the needs of different shooting scenes. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an image processing method that can solve the problem that the framing range of a three-dimensional image obtained in the prior art is relatively limited and the user cannot edit the three-dimensional image.
[0005] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:
[0006] receiving a first input of an initial image from a user, wherein the initial image includes a background image and a target object;
[0007] In response to the first input, adjusting the background image and / or the target object;
[0008] A target image is generated according to the adjusted background image and / or the target object.
[0009] In a second aspect, an embodiment of the present application provides an image processing device, the device comprising:
[0010] A receiving module, configured to receive a first input of an initial image from a user, wherein the initial image includes a background image and a target object;
[0011] an adjustment module, configured to adjust the background image and / or the target object in response to the first input;
[0012] A generating module is used to generate a target image according to the adjusted background image and / or the target object.
[0013] 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.
[0014] 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.
[0015] 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.
[0016] In an embodiment of the present application, a first input of a user to an initial image is received, and in response to the first input, a background image and / or a target object in the initial image is adjusted, and a target image is generated based on the adjusted background image and / or target object. In this way, by adjusting the background image in the initial image, different shooting environments can be simulated, so that the user does not need to take photos at different shooting locations during the shooting process, and by adjusting the background image in the initial image, target images with different shooting backgrounds can be obtained. Also, by adjusting the target object in the initial image, different postures of the shooting object can be simulated, so that the user does not need to take multiple photos with different shooting postures during the shooting process, and by adjusting the target object in the initial image, target images with different shooting postures can be obtained. This embodiment provides a new image editing method, which can realize the simulation of different shooting scenes, can meet different shooting needs, and provide a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of an image processing method provided by an embodiment of the present application;
[0018] Figure 2 is a planar schematic diagram of an initial image provided in an embodiment of the present application;
[0019] Figure 3 is a schematic diagram of an initial image provided in an embodiment of the present application;
[0020] Figure 4 is a schematic diagram of adjusting a target object provided by an embodiment of the present application;
[0021] Figure 5 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;
[0022] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0023] Figure 7 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0025] 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 interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "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.
[0026] 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.
[0027] Please see Figure 1 , which is a flow chart of an image processing method provided in an embodiment of the present application. The method can be applied to an electronic device, which can be a mobile phone, a tablet computer, a laptop computer, etc. Figure 1 As shown, the method may include steps 1100 to 1300, which are described in detail below.
[0028] Step 1100: receiving a first input of an initial image from a user, wherein the initial image includes a background image and a target object.
[0029] The initial image may be an image with a three-dimensional effect or an image captured by an electronic device and provided for preview by a user.
[0030] The target object may be a main object photographed by the electronic device, such as a person, an animal, or an object.
[0031] The background image may be an image portion other than the target object in the initial image. The background image may be an image with a three-dimensional curved surface effect.
[0032] The first input may be an input for adjusting the background image or the target object. For example, the first input may be an input for dragging the background image. For example, the first input may also be an input for dragging the target object.
[0033] In this embodiment, before receiving the first input of the user for the initial image, a step of acquiring the initial image is also included.
[0034] In some embodiments of the present application, before receiving the first input of the user on the initial image, the method may further include: steps 2100 to 2400.
[0035] Step 2100: In a first shooting mode, shoot a target object at an initial position to obtain a first image.
[0036] The first shooting mode can be a mode for shooting a first image with a three-dimensional effect. The initial position is the position of the electronic device when the first shooting mode is turned on.
[0037] The first image may be an image obtained by the electronic device photographing the target object at an initial position. The first image includes the target object.
[0038] Step 2200 , starting from the initial position, continuously photographing the target object along a first direction with different photographing parameters to obtain N second images, where N is a positive integer greater than 1.
[0039] The first direction may be a horizontal direction. Starting from the initial position, the target object is continuously photographed along the first direction with different photographing parameters, which may be starting from the initial position, moving the electronic device to the left, and continuously photographing the target object with different photographing parameters. Starting from the initial position, the target object is continuously photographed along the first direction with different photographing parameters, which may be starting from the initial position, moving the electronic device to the right, and continuously photographing the target object with different photographing parameters.
[0040] The shooting parameters include a shooting position and a shooting angle. In this embodiment, in the process of moving the electronic device, as the shooting parameters change, the second image shot under different shooting parameters can be acquired.
[0041] In this embodiment, before continuously photographing the target object with different photographing parameters along the first direction with the initial position as the starting point to obtain N second images, the method further includes: displaying the first moving track on the preview photographing interface.
[0042] The first moving trajectory is a trajectory moving along the first direction starting from the initial position, for example, a trajectory moving to the right starting from the initial position, or a trajectory moving to the left starting from the initial position.
[0043] It is understandable that in this embodiment, when the first shooting mode is turned on for the first time, the first moving track is displayed on the preview shooting interface. In the subsequent use of the first shooting mode, the first moving track is not displayed.
[0044] In this embodiment, when acquiring N second images continuously shot along a first direction, a first moving track is displayed on the shooting preview interface, which can instruct the user to operate the electronic device, so that the user can acquire an initial image with a three-dimensional effect.
[0045] Step 2300 , starting from the initial position, continuously photographing the target object along the second direction with different photographing parameters to obtain M third images, where M is a positive integer greater than 1.
[0046] The second direction may be a vertical direction. Starting from the initial position, the target object is continuously photographed along the second direction with different photographing parameters, which may be starting from the initial position, moving the electronic device upward, and continuously photographing the target object with different photographing parameters. Starting from the initial position, the target object is continuously photographed along the second direction with different photographing parameters, which may be starting from the initial position, moving the electronic device downward, and continuously photographing the target object with different photographing parameters.
[0047] The shooting parameters include a shooting position and a shooting angle. In this embodiment, in the process of moving the electronic device, as the shooting parameters change, a third image shot under different shooting parameters can be acquired.
[0048] In this embodiment, before taking the initial position as the starting point and continuously photographing the target object along the second direction with different photographing parameters to obtain M third images, the method further includes: displaying the second moving track on the preview photographing interface.
[0049] The second movement trajectory is a trajectory moving along the second direction starting from the initial position, for example, a trajectory moving upward starting from the initial position, or a trajectory moving downward starting from the initial position.
[0050] It is understandable that in this embodiment, when the first shooting mode is turned on for the first time, the second movement track is displayed on the preview shooting interface. In the subsequent use of the first shooting mode, the second movement track is not displayed.
[0051] In this embodiment, when acquiring M third images continuously shot along the second direction, the second moving track is displayed on the shooting preview interface, which can instruct the user to operate the electronic device, so that the user can acquire the initial image with a three-dimensional effect.
[0052] Step 2400: splice the first image, the N second images, and the M third images to obtain an initial image.
[0053] In a specific implementation, before the first image, the N second images and the M third images are stitched together, each second image may be cropped to obtain N first background material images. Specifically, each second image may be cropped according to the image content association relationship of the background images of the plurality of second images. Afterwards, the first background material image corresponding to each second image may be marked according to the shooting position of each second image. Figure 2 Taking the plan schematic diagram of the initial image shown as an example, the two first background material images located on the left side of the first image 201 are marked as L1 and L2 respectively, and the two first background material images located on the right side of the first image 201 are marked as R1 and R2 respectively.
[0054] Before the first image, the N second images and the M third images are stitched together, each third image may be cropped to obtain M second background material images. Specifically, each third image may be cropped according to the image content association relationship of the background images of the plurality of third images. Afterwards, the second background material image corresponding to each third image may be marked according to the shooting position of each third image. Figure 2 Taking the plan schematic diagram of the initial image shown as an example, the two second background material images located above the first image 201 are marked as U1 and U2 respectively, and the two second background material images located below the first image 201 are marked as D1 and D2 respectively.
[0055] After that, see Figure 3 According to the shooting position of the first background material image, N first background material images are spliced on the left and right sides of the first image 301, and according to the shooting position of the second background material image, M second background material images are spliced on the upper and lower sides of the first image 301 to obtain an initial image with a three-dimensional effect.
[0056] In some embodiments of the present application, in the first shooting mode, before shooting the target object at the initial position to obtain the first image, the method further includes: receiving a second input, and starting the first shooting mode in response to the second input.
[0057] The second input may be an input for starting the first shooting mode. The second input may be an input such as a single click, a double click, or a long press, and the embodiment of the present application does not specifically limit this.
[0058] The process of obtaining the initial image is explained below using a specific example.
[0059] Step 301, start the first shooting mode.
[0060] Step 302: photograph the target object at an initial position to obtain a first image.
[0061] Step 303 , determining whether it is the first time to use the first shooting mode, if yes, executing step 304 , otherwise, executing step 305 .
[0062] Step 304 , displaying the first moving trajectory and the second moving trajectory on the shooting preview interface, the first moving trajectory is a left-right moving trajectory, and the second moving trajectory is an up-and-down moving trajectory, and then proceeding to step 305 .
[0063] Step 305 , prompting the user to move the electronic device along the first moving trajectory, and acquiring N second images obtained by continuous shooting.
[0064] Step 306 , determining whether the electronic device is in the initial position, if yes, executing step 308 , otherwise, executing step 307 .
[0065] Step 307 , prompting the user to move the electronic device to an initial position, and executing step 308 .
[0066] Step 308 , prompting the user to move the electronic device along the second moving trajectory, and acquiring M third images obtained by continuous shooting, and then proceeding to step 309 .
[0067] Step 309: Process the N second images to obtain N first background material images. Process the M third images to obtain M second background material images.
[0068] Step 310 , stitching the first image, N first background material images, and M second background material images to obtain an initial image.
[0069] In this embodiment, a new method of presenting an image is provided. By splicing a first image, N first background material images and M second background material images, a background image with a large angle and a wide range can be obtained. The user can select the background part as needed, which provides a better user experience.
[0070] After step 1100 , step 1200 is performed to adjust the background image and / or the target object in response to the first input.
[0071] In some embodiments of the present application, adjusting the background image and / or the target object in response to the first input includes: obtaining an offset angle in response to the first input, and adjusting the background image and / or the target object according to the offset angle.
[0072] The offset angle may be determined according to the movement amplitude of the first input. For example, see Figure 4, when the first input is the user's input to the target object, the angle between the line connecting the reference point O of the target object 401 and the moving start point A and the line connecting the reference point O of the target object 401 and the moving end point B is the offset angle.
[0073] In this embodiment, the greater the angle at which the user moves the target object, the greater the corresponding offset angle. The greater the angle at which the user moves the background image, the greater the corresponding offset angle. Based on this, the offset angle can be determined according to the movement amplitude, and then the background image and / or the target object can be adjusted according to the offset angle, which can improve the accuracy of the movement.
[0074] In some optional embodiments of the present application, the first input is a user's input to the target object, and adjusting the target object according to the offset angle includes: steps 4100 to 4300.
[0075] Step 4100: When the offset angle is less than or equal to a first threshold, rotate the first part of the target object according to the offset angle.
[0076] Step 4200: When the offset angle is greater than a first threshold and less than or equal to a second threshold, rotate the second part of the target object according to the offset angle.
[0077] Step 4300: When the offset angle is greater than a second threshold value and less than a third threshold value, rotate the second part and the third part of the target object according to the offset angle.
[0078] In this embodiment, the first threshold, the second threshold, and the third threshold can be used to measure the rotation range of the target object. The first threshold can be, for example, 15°. The second threshold can be, for example, 45°. The third threshold can be, for example, 90°. The values of the first threshold, the second threshold, and the third threshold can be set by those skilled in the art according to actual conditions, and the embodiments of the present application do not specifically limit this.
[0079] Exemplarily, when the target object is a person, the first part may be the eyes of the target object, the second part may be the head of the target object, and the third part may be a body part of the target object.
[0080] Please continue to see Figure 4, taking the example of a user dragging the target object to the left, when the offset angle is within 15°, the eyes of the target object 401 are fine-tuned according to the offset angle; when the offset angle is greater than 15° and less than or equal to 45°, the head of the target object 401 is fine-tuned according to the offset angle; when the offset angle is greater than 45° and less than or equal to 90°, the head and body of the target object 401 are fine-tuned according to the offset angle. In this embodiment, by adjusting the target object, human behavior can be simulated, such as adjusting the gaze, face direction, body direction, etc. of a person. Furthermore, this embodiment can simulate different postures of a person by adjusting the target object in the initial image, without requiring the user to take photos in different postures, which is more convenient to use.
[0081] In this embodiment, the rotation amplitude of the target object can be adjusted by setting the first threshold, the second threshold, and the third threshold. In this way, when the offset angle is less than or equal to the first threshold, the first part of the target object can be rotated according to the offset angle to achieve fine adjustment of the target object, when the offset angle is greater than the first threshold and less than or equal to the second threshold, the second part of the target object can be rotated according to the offset angle to achieve fine adjustment of the target object, and when the offset angle is greater than the second threshold and less than the third threshold, the second part and the third part of the target object can be rotated according to the offset angle to achieve coarse adjustment of the target object, thereby meeting different shooting scenes.
[0082] In some embodiments of the present application, the first input is a user input to the background image, and adjusting the background image according to the offset angle includes: moving the background image according to the offset angle.
[0083] It can be understood that when the background image is moved, the target object remains unchanged, and when the target object is moved, the background image remains unchanged.
[0084] In this embodiment, when a user takes a photo, there is no need to take photos at different locations. By adjusting the background image in the initial image, different shooting scenes can be simulated, providing a better user experience.
[0085] After step 1200, step 1300 is executed to generate a target image according to the adjusted background image and / or the target object.
[0086] The target object may be a two-dimensional image.
[0087] Exemplarily, when the user adjusts the background image in the initial image, the target image is generated according to the adjusted background image. Exemplarily, when the user adjusts the target object in the initial image, the target image is generated according to the adjusted target object. Exemplarily, when the user adjusts the background image and the target object in the initial image, the target image is generated according to the adjusted background image and the target object.
[0088] In an embodiment of the present application, a first input of a user to an initial image with a 3D effect is received, and in response to the first input, a background image and / or a target object in the initial image is adjusted, and a target image is obtained based on the adjusted background image and / or target object. In this way, by adjusting the background image in the initial image, different shooting environments can be simulated, so that the user does not need to take photos at different shooting locations during the shooting process, and by adjusting the background image in the initial image, target images with different shooting backgrounds can be obtained. Also, by adjusting the target object in the initial image, different postures of the shooting object can be simulated, so that the user does not need to take multiple photos with different shooting postures during the shooting process, and by adjusting the target object in the initial image, target images with different shooting postures can be obtained. This embodiment provides a new image editing method, which can realize the simulation of different shooting scenes, can meet different shooting needs, and provide a better user experience.
[0089] It should be noted that the image processing method provided in the embodiment of the present application can be executed by an image processing device or a control module in the image processing device for executing the image processing method. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the image processing method executed by the image processing device as an example.
[0090] Corresponding to the above embodiment, see Figure 5 The embodiment of the present application further provides an image processing device 500 , which includes a receiving module 501 , an adjustment module 502 and a first acquisition module 503 .
[0091] The receiving module 501 is used to receive a first input of an initial image from a user, wherein the initial image includes a background image and a target object.
[0092] The adjustment module 502 is used to adjust the background image and / or the target object in response to the first input.
[0093] The generating module 503 is used to generate a target image according to the adjusted background image and / or the target object.
[0094] In some embodiments, the device also includes: a first acquisition module, used to shoot the target object at an initial position in a first shooting mode to obtain a first image, wherein the initial position is the position of the electronic device when the first shooting mode is turned on; a second acquisition module, used to take the initial position as the starting point, and continuously shoot the target object along the first direction with different shooting parameters to obtain N second images; a third acquisition module, used to take the initial position as the starting point, and continuously shoot the target object along the second direction with different shooting parameters to obtain M third images; a stitching module, used to stitch the first image, the N second images and the M third images to obtain an initial image; wherein the shooting parameters include shooting position and shooting angle; N and M are both positive integers greater than 1.
[0095] In some embodiments, the adjustment module includes: an acquisition unit, used to acquire an offset angle in response to the first input; and an adjustment unit, used to adjust the background image and / or the target object according to the offset angle.
[0096] In some embodiments, the first input is a user input to the target object, and the adjustment unit is specifically used to: when the offset angle is less than or equal to a first threshold, rotate the first part of the target object according to the offset angle; when the offset angle is greater than the first threshold and less than or equal to a second threshold, rotate the second part of the target object according to the offset angle; when the offset angle is greater than the second threshold and less than a third threshold, rotate the second and third parts of the target object according to the offset angle.
[0097] In some embodiments, the first input is a user input to the background image, and the adjustment unit is specifically used to: move the background image according to the offset angle.
[0098] In an embodiment of the present application, a first input of a user to an initial image is received, and in response to the first input, a background image and / or a target object in the initial image is adjusted, and a target image is generated based on the adjusted background image and / or target object. In this way, by adjusting the background image in the initial image, different shooting environments can be simulated, so that the user does not need to take photos at different shooting locations during the shooting process, and by adjusting the background image in the initial image, target images with different shooting backgrounds can be obtained. Also, by adjusting the target object in the initial image, different postures of the shooting object can be simulated, so that the user does not need to take multiple photos with different shooting postures during the shooting process, and by adjusting the target object in the initial image, target images with different shooting postures can be obtained. This embodiment provides a new image editing method, which can realize the simulation of different shooting scenes, can meet different shooting needs, and provide a better user experience.
[0099] The image processing device in the embodiment of the present application may be a device, or a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may 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., which is not specifically limited in the embodiment of the present application.
[0100] 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.
[0101] The image processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0102] Corresponding to the above embodiment, optionally, as Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0103] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device described above.
[0104] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0105] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0106] Those skilled in the art will appreciate that the electronic device 700 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 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 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.
[0107] Among them, the processor 710 is used to: receive a first input from a user on an initial image through the user input unit 707, wherein the initial image includes a background image and a target object; adjust the background image and / or the target object in response to the first input; and generate a target image based on the adjusted background image and / or the target object.
[0108] Optionally, before receiving the first input of the user for the initial image, the processor 710 is used to: in a first shooting mode, shoot the target object at an initial position to obtain a first image, wherein the initial position is the position of the electronic device when the first shooting mode is turned on; starting from the initial position, continuously shoot the target object along a first direction with different shooting parameters to obtain N second images; starting from the initial position, continuously shoot the target object along a second direction with different shooting parameters to obtain M third images; stitching the first image, the N second images and the M third images to obtain an initial image; wherein the shooting parameters include shooting position and shooting angle; N and M are both positive integers greater than 1.
[0109] Optionally, when adjusting the background image and / or the target object in response to the first input, the processor 710 is used to: obtain an offset angle in response to the first input; and adjust the background image and / or the target object according to the offset angle.
[0110] Optionally, the first input is an input of the user to the target object, and the processor 710, when adjusting the target object according to the offset angle, is used to: rotate the first part of the target object according to the offset angle when the offset angle is less than or equal to a first threshold; rotate the second part of the target object according to the offset angle when the offset angle is greater than the first threshold and less than or equal to a second threshold; and rotate the second and third parts of the target object according to the offset angle when the offset angle is greater than the second threshold and less than a third threshold.
[0111] Optionally, the first input is an input of the background image by a user, and when the processor 710 adjusts the background image according to the offset angle, it is configured to: move the background image according to the offset angle.
[0112] In an embodiment of the present application, a first input of a user to an initial image is received, and in response to the first input, a background image and / or a target object in the initial image is adjusted, and a target image is generated based on the adjusted background image and / or target object. In this way, by adjusting the background image in the initial image, different shooting environments can be simulated, so that the user does not need to take photos at different shooting locations during the shooting process, and by adjusting the background image in the initial image, target images with different shooting backgrounds can be obtained. Also, by adjusting the target object in the initial image, different postures of the shooting object can be simulated, so that the user does not need to take multiple photos with different shooting postures during the shooting process, and by adjusting the target object in the initial image, target images with different shooting postures can be obtained. This embodiment provides a new image editing method, which can realize the simulation of different shooting scenes, can meet different shooting needs, and provide a better user experience.
[0113] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 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 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 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 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.
[0114] 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, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0115] The processor is a processor in the electronic device described 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.
[0116] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, 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.
[0117] 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.
[0118] 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.
[0119] 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 computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0120] 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: Receive a first input of an initial image from a user, wherein the initial image includes a background image and a target object, and the initial image is obtained by splicing a first image, N second images, and M third images, wherein the first image is an image obtained by photographing the target object at an initial position in a first shooting mode, the N second images are images obtained by continuously photographing the target object along a first direction with different shooting parameters starting from the initial position, and the M third images are images obtained by continuously photographing the target object along a second direction with different shooting parameters starting from the initial position, the initial position is a position of the electronic device when the first shooting mode is turned on, the shooting parameters include a shooting position and a shooting angle, and N and M are both positive integers greater than 1; In response to the first input, adjusting the background image and / or the target object; A target image is generated according to the adjusted background image and / or the target object.
2. The method according to claim 1, characterized in that The adjusting the background image and / or the target object in response to the first input includes: In response to the first input, obtaining an offset angle; The background image and / or the target object are adjusted according to the offset angle.
3. The method according to claim 2, characterized in that The first input is an input of the target object by a user, and adjusting the target object according to the offset angle includes: When the offset angle is less than or equal to a first threshold, rotating the first part of the target object according to the offset angle; When the offset angle is greater than a first threshold and less than or equal to a second threshold, rotating a second part of the target object according to the offset angle; When the offset angle is greater than a second threshold value and less than a third threshold value, the second part and the third part of the target object are rotated according to the offset angle.
4. The method according to claim 2, characterized in that: The first input is an input of the background image by a user, and the adjusting the background image according to the offset angle includes: The background image is moved according to the offset angle.
5. An image processing device, characterized in that: The device comprises: a receiving module, configured to receive a first input of an initial image from a user, wherein the initial image includes a background image and a target object, and the initial image is obtained by splicing a first image, N second images, and M third images, wherein the first image is an image obtained by photographing the target object at an initial position in a first shooting mode, the N second images are images obtained by continuously photographing the target object along a first direction with different shooting parameters starting from the initial position, and the M third images are images obtained by continuously photographing the target object along a second direction with different shooting parameters starting from the initial position, the initial position is a position of the electronic device when the first shooting mode is turned on, the shooting parameters include a shooting position and a shooting angle, and N and M are both positive integers greater than 1; an adjustment module, configured to adjust the background image and / or the target object in response to the first input; A generating module is used to generate a target image according to the adjusted background image and / or the target object.
6. The device according to claim 5, characterized in that The device also includes: A first acquisition module is used to photograph a target object at an initial position in a first shooting mode to obtain a first image, wherein the initial position is a position of the electronic device when the first shooting mode is turned on; A second acquisition module is used to continuously shoot the target object along the first direction with different shooting parameters starting from the initial position to obtain N second images; A third acquisition module is used to continuously shoot the target object along the second direction with different shooting parameters starting from the initial position to obtain M third images; a stitching module, configured to stitch the first image, the N second images and the M third images to obtain an initial image; The shooting parameters include shooting position and shooting angle; N and M are both positive integers greater than 1.
7. The device according to claim 5, characterized in that The adjustment module comprises: an acquisition unit, configured to acquire an offset angle in response to the first input; An adjustment unit is used to adjust the background image and / or the target object according to the offset angle.
8. The device according to claim 7, characterized in that The first input is an input of the target object by a user, and the adjustment unit is specifically configured to: When the offset angle is less than or equal to a first threshold, rotating the first part of the target object according to the offset angle; When the offset angle is greater than a first threshold and less than or equal to a second threshold, rotating a second part of the target object according to the offset angle; When the offset angle is greater than a second threshold value and less than a third threshold value, the second part and the third part of the target object are rotated according to the offset angle.
9. The device according to claim 7, characterized in that The first input is an input of the background image by a user, and the adjustment unit is specifically used for: The background image is moved according to the offset angle.
