Information processing method and electronic device
An information processing method and an electronic device are provided. The method includes: acquiring an instruction for processing an image including a plurality of objects; in response to the instruction for processing the image, obtaining one or more objects, wherein a first object among the one or more objects has an object type consistent with a type of the image; and generating an interactive interface including the one or more objects and the interactive interface being configured for selecting a target object.
1. An information processing method, comprising:
acquiring, by a processor, an instruction for processing a screenshot image including a plurality of sub-images containing corresponding objects;
in response to the instruction for processing the image, dividing the image to a plurality of sub-images, by the processor, by performing an outline detection on the image to obtain at least one outline and obtaining a first object among the objects having an object type consistent with a type of the screenshot image and a second object among the objects having an object type consistent with a type of image of text;
performing an object identification of the objects based on attributes of the objects, including performing a text recognition in response to receiving the second object to obtain at least one text portion;
directly automatically generating, by the processor, after the objects are obtained, an interactive interface including each of the objects corresponding to the screenshot image and each of the plurality of sub-image and the interactive interface being configured for selecting a target object from the corresponding objects and pasting the target object to a desired location; and
displaying results of the object identification along with at least a portion of the target object.
2. The method according to claim 1 , wherein:
the objects include two objects of different types.
3. The method according to claim 2 , wherein:
the interactive interface further includes the screenshot image.
4. The method according to claim 1 , wherein obtaining objects includes:
dividing the screenshot image into a foreground and a background to obtain a foreground image object and a background image object.
5. The method according to claim 1 , wherein the at least one text portion includes different text portions corresponding to different text objects.
6. The method according to claim 1 , further including:
storing the objects in association with the screenshot image.
7. The method according to claim 1 , wherein generating the interactive interface includes:
receiving an input operation from an input area; and
generating the interactive interface including an operation control for a paste instruction.
8. The method according to claim 7 , further including:
in response to the paste instruction, entering the objects into the input area; or
in response to the paste instruction, entering the target object selected from the objects into the input area.
9. An electronic device, comprising:
a display unit;
a memory configured to store a plurality of instructions; and
a processor configured to retrieve and execute the plurality of instructions stored in the memory to:
acquire an instruction for processing a screenshot image including a plurality of sub-images containing corresponding objects;
in response to the instruction for processing the screenshot image, divide the screenshot image to a plurality of sub-images by performing an outline detection on the screenshot image to obtain at least one outline and obtaining a first object of the objects having a type consistent with a type of the image and a second object among the objects having an object type consistent with a type of image of text;
perform an object identification of the objects based on attributes of the objects, including performing a text recognition in response to receiving the second object to obtain at least one text portion;
directly automatically generate, after the objects are obtained, an interactive interface on the display unit, the interactive interface including each of the objects corresponding to the screenshot image and each of the plurality of sub-image and the interactive interface being configured for selecting a target object from the objects and pasting the target object to a desired location; and
display results of the object identification along with at least a portion of the target object.
10. The electronic device according to claim 9 , wherein:
the objects include two objects of different types.