Target image capturing method and device and computer readable storage medium
By acquiring user operation behavior data and image entropy sorting, the problem of difficulty in accurately capturing target images in the prior art is solved, and accurate target image recognition and backloading in the fields of AR/VR and software testing is achieved.
Patent Information
- Application Number
- CN202310524226.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art is difficult to accurately judge and assist users in finding the target image they want, especially when there are clear operational guidelines.
By obtaining user's operation behavior data, obtaining specified coordinates, obtaining background screenshots, capturing target images, and setting point-selecting coordinates, returning target images and point-selecting coordinates, using image entropy to sort and identify candidate images to ensure accurate capture Take the target image the user wants.
It accurately captures the target image that the user wants, which is suitable for the AR/VR field and software testing field, and effectively judges the target image that the user really wants to choose.
Smart Images

Figure CN118939161A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a target image capturing method, device and computer storage medium. Background Art
[0002] Using image analysis, data analysis, and artificial intelligence algorithms to capture images from pictures or videos has become one of the commonly used technologies, but there is no appropriate processing method for determining whether the image is the target image that the user wants.
[0003] In addition, even if there are clear user operation instructions, such as mouse click coordinates or eye tracking focus coordinates, there is currently no relevant technology that can assist in finding the target image that the user wants. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a target image capturing method, device and computer-readable storage medium, which can be used to capture a target image desired by a user.
[0005] An embodiment of the present invention provides a target image capture method, comprising the following steps: obtaining user operation behavior data; obtaining specified coordinates based on the operation behavior data, and obtaining a background screenshot based on the specified coordinates; capturing a target image based on the background screenshot, wherein the target image includes a target object; setting point selection coordinates based on the target image; and returning the target image and the point selection coordinates.
[0006] An embodiment of the present invention further provides a device for target image capture, characterized in that it includes a processor; and a memory for storing a computer program, when the computer program is executed by the processor, the processor implements the target image capture method.
[0007] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the target image capturing method is implemented.
[0008] Compared with the prior art, the target image capturing method, device and computer-readable storage medium provided by the present invention can accurately capture the target image desired by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 FIG. 4 is a flow chart of a target image capturing method according to an embodiment of the present invention.
[0010] Figure 2 FIG. 4 is a flowchart of capturing a target image according to an embodiment of the present invention.
[0011] Figure 3FIG. 4 is a block diagram of a device for target image capture according to an embodiment of the present invention.
[0012] Figure 4 FIG. 4 is a block diagram of a computer-readable storage medium for target image capture according to an embodiment of the present invention.
[0013] Main component symbols
[0014]
[0015] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0016] In order to facilitate the understanding and implementation of the present invention by those skilled in the art of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the present invention provides many applicable inventive concepts, which can be implemented in a variety of specific forms. Those skilled in the art of the present invention can use the details described in these embodiments or other embodiments and other available structural, logical and electrical changes to implement the invention without departing from the spirit and scope of the present invention.
[0017] The present invention specification provides different embodiments to illustrate the technical features of different implementations of the present invention. Among them, the configuration of each component in the embodiment is for illustrative purposes and is not intended to limit the present invention. And the partial repetition of the figure numbers in the embodiment is to simplify the description and does not mean the correlation between different embodiments. Among them, the same component numbers used in the drawings and the description represent the same or similar components. The drawings in this specification are simplified and are not drawn to exact proportions.
[0018] Furthermore, in describing some embodiments of the present invention, the specification describes the method and (or) program of the present invention in a specific order of steps. However, since the method and program are not necessarily implemented according to the specific order of steps described, they are not limited to the specific order of steps described. A person skilled in the art of the present invention will know that other orders are also possible implementation methods. Therefore, the specific order of steps described in the specification is not used to limit the scope of the patent application. Furthermore, the scope of the patent application for the method and (or) program of the present invention is not limited to the order of execution steps written therein, and a person skilled in the art of the present invention will understand that adjusting the order of execution steps does not deviate from the spirit and scope of the present invention.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items. Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0020] See also Figure 1 , which is a flow chart of a target image capturing method according to an embodiment of the present invention.
[0021] Step S101, obtaining user operation behavior data.
[0022] In a feasible implementation, the user's operation behavior includes sight operation data and / or mouse operation data, wherein the sight operation data further includes sight gaze information, and the mouse operation data further includes mouse click information.
[0023] Step S102, obtaining designated coordinates according to the operation behavior data, and obtaining a background screenshot according to the designated coordinates.
[0024] In a feasible implementation, the user's specified coordinates are obtained according to the user's operation behavior data, and according to the specified coordinates, an image within a default range of the specified coordinates is obtained as the background screenshot. Specifically, the user's specified coordinates are obtained according to the gaze information and / or mouse click information in the user's operation behavior.
[0025] In a feasible implementation, the preset range is in pixels and can be set according to actual needs. For example, starting from the specified coordinates, there are n pixels up, down, left, and right, a total of 4n 2 Set the range to the preset range and get the image within the default range as the background screenshot.
[0026] Step S103, capturing a target image according to the background screenshot, wherein the target image includes a target object.
[0027] Step S104, setting point selection coordinates according to the target image.
[0028] In a feasible implementation, the centroid of the target image is set as the point selection coordinate.
[0029] Step S105, returning the target image and the point coordinates.
[0030] The target image and the point selection coordinates are the target image and the point selection coordinates that the user wants to select, which are determined in this embodiment.
[0031] See also Figure 2, shown is a specific flow chart of step S103 in one embodiment.
[0032] Step S201, obtaining multiple candidate images according to the background screenshot.
[0033] Since the user's target image is usually not too far from the specified coordinates, in this embodiment, a variable m is preset, where m is less than n in step S102. In the background screenshot, multiple 4m 2 The images in the range are used as multiple candidate images.
[0034] In one embodiment, each candidate image may be pre-processed, wherein the pre-processing includes edge extraction.
[0035] Since the candidate images include part of the background, an edge extraction method is used to remove the background to obtain multiple candidate images to avoid the background affecting the subsequent image recognition results.
[0036] Step S202 , sorting the candidate images according to their image information, and selecting the candidate images in order as prediction targets.
[0037] Specifically, the image information includes image entropy. According to the image entropy of each candidate image, the candidate image with the highest image entropy is selected in order as the prediction target.
[0038] Image entropy is an estimate of the complexity of an image. An image with a higher entropy value has more details and changes.
[0039] Since the target image selected by the user is usually a specific icon or a specific target object, and its color change is stronger and more obvious than the surrounding background, the image entropy of the target image will be higher than the image entropy of the surrounding background image. In this embodiment, it is judged that the candidate image with higher image entropy is closer to the target image selected by the user, so the candidate image with the highest image entropy is used as the prediction target.
[0040] Step S203: performing image recognition on the predicted target in the background screenshot.
[0041] Step S204, determining whether the predicted target can be identified in the background screenshot and is identified only once.
[0042] This step is to avoid multiple recognition results from interfering with the determination of the target image.
[0043] When the predicted target is identified in the background screenshot and is identified only once, step S205 is executed.
[0044] When the prediction target cannot be identified in the background screenshot, or is identified more than once, step S206 is executed to select the next candidate image as the prediction target, that is, select the candidate image with the second highest image entropy as the prediction target.
[0045] Step S205: taking the image identified in the background screenshot as the target image.
[0046] See also Figure 3 , which is a block diagram of a device 300 for capturing a target image according to an embodiment of the present invention. The device 300 includes a processor 302, a memory 304, and a computer program 306. The device 300 is an electronic device. Those skilled in the art should understand that Figure 3 The composition of the device 300 shown does not constitute a limitation of the embodiment of the present invention. Figure 3 The device 300 shown in FIG. 3 is simplified for ease of description, and in different embodiments, may include fewer or more components than shown.
[0047] In one embodiment, the processor 302 may be composed of an integrated circuit, such as a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 302 is the control core (Control Unit) of the device 300, and uses various interfaces and lines to connect various components of the entire device 300, and executes or executes the computer program 306 or module stored in the memory 304, and calls the data stored in the memory 304 to execute various functions of the device 300 and process data, such as the target image capture method.
[0048] In one embodiment, the memory 304 is used to store the codes and various data of the computer program 306, such as the target image capture method, and to achieve high-speed and automatic access to the program or data during the operation of the device 300. The memory 304 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable storage medium capable of carrying or storing data.
[0049] See also Figure 4 , which is a block diagram of a computer-readable storage medium 400 for target image capture in one embodiment of the present invention. Figure 4 As shown, the computer-readable storage medium 400 stores a computer program 402. When the computer program 402 is executed by a processor, the target image capturing method is implemented.
[0050] In summary, the target image capture method, device, and computer-readable storage medium of the present invention can be used in the AR / VR field and software testing field to determine the target image desired by the user, and can effectively determine the target image that the user actually wants to select.
[0051] It is worth noting that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A target image capture method, characterized in that: The following steps are involved: Obtain user operation behavior data; Acquire specified coordinates according to the operation behavior data, and acquire a background screenshot according to the specified coordinates; capturing a target image according to the background screenshot, wherein the target image includes a target object; Setting point selection coordinates according to the target image; and The target image and the point selection coordinates are returned.
2. The target image capturing method according to claim 1, wherein: The operation behavior data includes line of sight operation data.
3. The target image capturing method according to claim 1, wherein: The operation behavior data includes mouse operation data.
4. The target image capturing method according to claim 1, wherein: The step of obtaining the specified coordinates according to the operation behavior data and obtaining the background screenshot according to the specified coordinates also includes: An image within a default range from the specified coordinates is obtained as the background screenshot.
5. The target image capturing method according to claim 1, wherein: The step of setting point selection coordinates according to the target image also includes: The centroid of the target image is set as the point selection coordinates.
6. The target image capturing method according to claim 1, wherein: The step of capturing the target image according to the background screenshot also includes: According to the background screenshot, obtaining multiple candidate images; Sort the candidate images according to their image information and select the candidate images in order as prediction targets; In the background screenshot, performing image recognition according to the predicted target; Determine whether the predicted target can be identified in the background screenshot and is only identified once When it is determined that the predicted target can be identified in the background screenshot and is identified only once, the image identified in the background screenshot is used as the target image.
7. The target image capturing method according to claim 6, wherein: The step of capturing the target image according to the background screenshot also includes: Preprocessing is performed on each candidate image, wherein the preprocessing includes edge extraction.
8. The target image capturing method according to claim 6, wherein: The image information includes image entropy, and the sequentially selecting candidate images as prediction targets also includes: A candidate image with the highest image entropy is selected as the prediction target.
9. A device for capturing a target image, characterized in that: include Processor; and A memory for storing a computer program, wherein when the computer program is executed by the processor, the processor implements the target image capture method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the target image capturing method according to any one of claims 1 to 8 is implemented.
