Image processing method and apparatus, and electronic device and storage medium
View Patent ↗Image processing method and apparatus, and an electronic device and a storage medium are provided. The method comprises: acquiring a plurality of images to be processed; in response to acquiring a fusion instruction, performing fusion processing on the plurality of images to be processed and one or more first preset images, so as to obtain one or more fused target images, wherein the target images comprise objects to be processed, which respectively correspond to the plurality of images to be processed; and displaying the one or more fused target images.
1 . A method for image processing, comprising:
acquiring a plurality of images;
in response to acquiring a fusion instruction, fusing the plurality of images and one or more first preset images, to obtain one or more target images subjected to fusion, wherein the target image comprises objects respectively corresponding to the plurality of images; and
displaying the one or more target images subjected to fusion,
wherein the plurality of images comprise a first image and a second image, and before acquiring the plurality of images, the method further comprises:
upon detecting a trigger operation on a preset identification, displaying a user interface, wherein the user interface comprises a first area and a second area, the first area is configured to display the first image, the second area is configured to display the second image, and the second image comprises an image captured by a photographing device.
2 . The method according to claim 1 , wherein one or more second preset images are further displayed in the user interface; and
before acquiring the first image and the second image, the method further comprises:
displaying the first image in the one or more second preset images in the first area.
3 . The method according to claim 2 , wherein when displaying the user interface, a third preset image is displayed in the first area; and
the displaying the first image in the one or more second preset images in the first area comprises:
replacing the third preset image displayed in the first area with the first image in the one or more second preset images.
4 . The method according to claim 1 , wherein before acquiring the first image and the second image, the method further comprises:
acquiring a captured image of the photographing device, wherein the captured image comprises a first object and a second object;
acquiring the first image corresponding to the first object and the second image corresponding to the second object from the captured image; and
displaying the first image in the first area and displaying the second image in the second area.
5 . The method according to claim 4 , wherein when displaying the user interface, a third preset image is displayed in the first area; and
the displaying the first image in the first area comprises:
replacing the third preset image displayed in the first area with the first image.
6 . The method according to claim 1 , wherein if a plurality of objects enter a capture range of the photographing device, a second object in the second image comprises an object that meets a preset condition in the plurality of objects.
7 . The method according to claim 1 , further comprising:
if a second object in the second image moves out of a capture range of the photographing device, determining an object that meets a preset condition in remaining of a plurality of objects captured by the photographing device except the second object as the second object.
8 . The method according to claim 4 , wherein the first object in the first image comprises an object that meets a preset condition in remaining of a plurality of objects captured by the photographing device except the second object, and the second object comprises an object in the second image.
9 . The method according to claim 5 , further comprising:
if the first object moves out of a capture range of the photographing device, resuming to display the third preset image in the first area.
10 . The method according to claim 5 , further comprising:
if the second object moves out of a capture range of the photographing device, displaying the first image in the second area, and resuming to display the third preset image in the first area.
11 . The method according to claim 6 , wherein the object that meets the preset condition comprises at least one of:
an object that first enters the capture range of the photographing device;
an object with a largest size in a captured image of the photographing device;
an object with a highest definition in a captured image of the photographing device; and
an object of which an angle is at a smallest difference from a present angle.
12 . The method according to claim 1 , wherein the fusing the plurality of images and one or more first preset images to obtain one or more target images subjected to fusion comprises:
acquiring a first object from the first image, and acquiring a second object from the second image; and
fusing the first object and the second object into the one or more first preset images to obtain the one or more target images subjected to fusion, wherein the target image comprises the first object subjected to fusion and the second object subjected to fusion.
13 . The method according to claim 12 , wherein the fusing the first object and the second object into the one or more first preset images to obtain the one or more target images subjected to fusion comprises:
selecting a target preset image from a plurality of first preset images, wherein the target preset image comprises a third object and a fourth object; and
replacing one of the third object and the fourth object with the first object, and replacing the other of the third object and the fourth object with the second object, to obtain the target image subjected to fusion.
14 . The method according to claim 12 , wherein the fusing the first object and the second object into the one or more first preset images to obtain the one or more target images subjected to fusion comprises:
displaying a plurality of first preset images; and
in response to acquiring a selection instruction for a target preset image in the plurality of first preset images, replacing one of a third object and a fourth object in the target preset image with the first object, and replacing the other of the third object and the fourth object with the second object, to obtain the target image subjected to fusion.
15 . The method according to claim 12 , wherein the fusing the first object and the second object into the one or more first preset images to obtain the one or more target images subjected to fusion comprises:
for each of a plurality of first preset images, replacing one of a third object and a fourth object in the first preset image with the first object, and replacing the other of the third object and the fourth object with the second object, to obtain a plurality of target images subjected to fusion.
16 . The method according to claim 13 , wherein after displaying the one or more target images subjected to fusion, the method further comprises:
in response to acquiring an exchange instruction, exchanging the first object and the second object in the target image subjected to fusion.
17 . An electronic device, comprising:
one or more processors; and
a storage apparatus configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement:
acquiring a plurality of images;
in response to acquiring a fusion instruction, fusing the plurality of images and one or more first preset images, to obtain one or more target images subjected to fusion, wherein the target image comprises objects respectively corresponding to the plurality of images; and
displaying the one or more target images subjected to fusion,
wherein the plurality of images comprise a first image and a second image, and before acquiring the plurality of images, the one or more processors are further caused to implement:
upon detecting a trigger operation on a preset identification, displaying a user interface, wherein the user interface comprises a first area and a second area, the first area is configured to display the first image, the second area is configured to display the second image, and the second image comprises an image captured by a photographing device.
18 . A non-transitory computer readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements:
acquiring a plurality of images;
in response to acquiring a fusion instruction, fusing the plurality of images and one or more first preset images, to obtain one or more target images subjected to fusion, wherein the target image comprises objects respectively corresponding to the plurality of images; and
displaying the one or more target images subjected to fusion,
wherein the plurality of images comprise a first image and a second image, and before acquiring the plurality of images, the program, when executed by the processor, further implements:
upon detecting a trigger operation on a preset identification, displaying a user interface, wherein the user interface comprises a first area and a second area, the first area is configured to display the first image, the second area is configured to display the second image, and the second image comprises an image captured by a photographing device.