Method, apparatus, and computer-readable storage for target image extraction
View Patent ↗A method, an apparatus and a computer-readable storage medium for target image extraction. The method comprises obtaining specified coordinate based on user operation behavior data, capturing a background screenshot based on the specified coordinate, and finally determining the target image that the user wants from the background screenshot.
1 . A target image extraction method, comprising following steps:
obtaining operation behavior data of a user;
obtaining a specified coordinate based on the operation behavior data and obtaining a background screenshot based on the specified coordinate;
extracting a target image from the background screenshot, wherein the target image is provided with a target object and wherein extracting the target image from the background screenshot further comprises:
obtaining multiple candidate images based on the background screenshot;
sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted target, wherein the image information includes an image entropy, and sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted targets further comprises:
selecting the candidate image with highest image entropy as the predicted target;
performing image recognition in the background screenshot based on each predicted target;
determining whether the selected predicted target is recognized in the background screenshot and recognized only once;
using the predicted target with the highest image entropy and recognized only once in the background screenshot as the target image;
setting a target coordinate based on the target image; and
returning the target image and the target coordinate.
2 . The method of claim 1 , wherein the operation behavior data is provided with eye-tracking operation data.
3 . The method of claim 1 , wherein the operation behavior data is provided with mouse operation data.
4 . The method of claim 1 , wherein obtaining the specified coordinate based on the operation behavior data and obtaining a background screenshot based on the specified coordinate further comprises:
obtaining an image within a default range from the specified coordinate as the background screenshot.
5 . The method of claim 1 , wherein setting the target coordinate based on the target image further comprises:
setting a centroid of the target image as the target coordinate.
6 . The method of claim 1 , wherein extracting the target image from the background screenshot further comprises:
performing preprocessing on the candidate images, wherein the preprocessing is provided with edge extraction.
7 . A device for target image extraction, comprising:
a processor; and
a storage unit for storing a computer program, wherein when the computer program is executed by the processor, the processor is configured for:
obtaining operation behavior data from a user;
obtaining a specified coordinate based on the operation behavior data and obtaining a background screenshot based on the specified coordinate;
extracting a target image from the background screenshot, wherein the target image is provided with a target object and wherein extracting the target image from the background screenshot further comprises:
obtaining multiple candidate images based on the background screenshot;
sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted target, wherein the image information includes an image entropy, and sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted targets further comprises:
selecting the candidate image with highest image entropy as the predicted target;
performing image recognition in the background screenshot based on each predicted target;
determining whether the selected predicted target is recognized in the background screenshot and recognized only once;
using the predicted target with the highest image entropy and recognized only once in the background screenshot as the target image;
setting a target coordinate based on the target image; and
returning the target image and the target coordinate.
8 . A non-transitory computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is configured for:
obtaining operation behavior data from a user;
obtaining a specified coordinate based on the operation behavior data and obtaining a background screenshot based on the specified coordinate;
extracting a target image from the background screenshot, wherein the target image is provided with a target object and wherein extracting the target image from the background screenshot further comprises:
obtaining multiple candidate images based on the background screenshot;
sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted target, wherein the image information includes an image entropy, and sorting the candidate images based on image information and sequentially selecting one candidate image as a predicted targets further comprises:
selecting the candidate image with highest image entropy as the predicted target;
performing image recognition in the background screenshot based on each predicted target;
determining whether the selected predicted target is recognized in the background screenshot and recognized only once;
using the predicted target with the highest image entropy and recognized only once in the background screenshot as the target image;
setting a target coordinate based on the target image; and
returning the target image and the target coordinate.