Interaction method and device based on image recognition
By identifying the associated patterns of preset card objects and pointer objects in the image to be recognized, and executing corresponding operation instructions, the problem of low recognition accuracy and efficiency in existing gesture recognition technology is solved, and more efficient and accurate gesture recognition is achieved. Effect.
Patent Information
- Application Number
- CN202010088309.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-12
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-08-27
AI Technical Summary
Existing human-computer interaction methods based on gesture recognition have shortcomings in recognition accuracy and efficiency, making it difficult to achieve high-precision image recognition.
By acquiring the image to be recognized, identify the associated pattern between the preset card object and the indicator object, and execute the operation instructions corresponding to the pattern, and use the preset actions to identify the displacement information and relative position relationship of the pattern to improve recognition accuracy and efficiency. .
The recognition efficiency and accuracy of gesture recognition are improved, making image recognition easier to implement and more feasible than traditional gesture recognition.
Smart Images

Figure CN112307865B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and specifically to an interaction method and device based on image recognition. Background Art
[0002] With the development of computer vision technology, the way of human-computer interaction has gradually changed from contact interaction such as mouse, keyboard, and remote control to non-contact interaction, for example, human-computer interaction based on voice recognition and gesture recognition.
[0003] In the prior art, the human-computer interaction method based on gesture recognition usually requires gesture recognition based on the image to be recognized, and the recognition accuracy and efficiency are low. Summary of the invention
[0004] The embodiments of the present application provide an interactive method and device based on image recognition.
[0005] In the first aspect, an embodiment of the present application provides an interactive method based on image recognition, including: obtaining an image to be identified, the image to be identified including a preset card object and a preset indicator object, the preset indicator object being used to associate a pattern in the preset card object through a preset action; according to the preset action, identifying a pattern associated with the preset indicator object in the image to be identified; and executing a preset operation instruction corresponding to the pattern.
[0006] In some embodiments, the above-mentioned identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action includes: identifying different patterns in the preset card objects that are sequentially associated with the preset indicator object in the image to be identified corresponding to the image frame within the first preset time period according to the preset action; and the above-mentioned executing the preset operation instructions corresponding to the pattern includes: executing the preset operation instructions corresponding to the pattern and the association order, and the association order is used to characterize the order of the patterns associated sequentially with the preset indicator objects.
[0007] In some embodiments, the above-mentioned identifying a pattern associated with a preset indicator object in an image to be identified according to a preset action includes: identifying, according to the preset action, the displacement information of the pattern associated with a preset indicator object in the image to be identified corresponding to the image frame within a second preset time period; the above-mentioned executing the preset operation instruction corresponding to the pattern includes: executing the preset operation instruction corresponding to the pattern and the displacement information.
[0008] In some embodiments, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; the preset action is an occluding pattern; the above-mentioned identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action includes: identifying the pattern adjacent to the pattern occluded by the preset indicator object in the image to be identified; determining the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0009] In some embodiments, before the above-mentioned acquisition of the image to be identified including the preset card object and the preset indicator object, it also includes: identifying the user corresponding to the facial image based on the acquired facial image; acquiring the operation mode corresponding to the user, the operation mode is used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instructions.
[0010] In some embodiments, before the above-mentioned identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action, it also includes: identifying whether the action is a valid action.
[0011] In some embodiments, the above-mentioned identification of whether the preset action is a valid action includes: identifying all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; and determining whether the preset action is a valid action based on a comparison result of the proportion of image frames with the same preset action in all image frames and a preset proportion threshold.
[0012] In the second aspect, an embodiment of the present application provides an interactive device based on image recognition, including: an acquisition unit, configured to acquire an image to be recognized, the image to be recognized including a preset card object and a preset indicator object, the preset indicator object being used to associate a pattern in the preset card object through a preset action; an identification unit, configured to identify a pattern associated with the preset indicator object in the image to be recognized according to a preset action; and an execution unit, configured to execute a preset operation instruction corresponding to the pattern.
[0013] In some embodiments, the recognition unit is further configured to recognize different patterns in the preset card objects that are sequentially associated with the preset indicator objects in the image to be recognized corresponding to the image frame within the first preset time period according to a preset action; and the above-mentioned execution of the preset operation instructions corresponding to the pattern includes: executing the preset operation instructions corresponding to the pattern and the association order, and the association order is used to characterize the order of the patterns that are sequentially associated with the preset indicator objects.
[0014] In some embodiments, the recognition unit is further configured to identify, according to a preset action, the displacement information of a pattern associated with a preset indicator object in the image to be recognized corresponding to the image frame within a second preset time period; the above-mentioned execution of the preset operation instructions corresponding to the pattern includes: executing the preset operation instructions corresponding to the pattern and the displacement information.
[0015] In some embodiments, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; the preset action is an occluding pattern; the recognition unit is further configured to recognize a pattern in the image to be recognized that is adjacent to the pattern occluded by the preset indicator object; and determine the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0016] In some embodiments, it also includes a mode selection unit, which is configured to identify the user corresponding to the facial image based on the acquired facial image; obtain the operation mode corresponding to the user, and the operation mode is used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instructions.
[0017] In some embodiments, the method further includes an action determination unit configured to identify whether the action is a valid action.
[0018] In some embodiments, the action determination unit is further configured to identify all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; and determine whether the preset action is a valid action based on the comparison result of the proportion of image frames with the same preset action in all image frames and a preset proportion threshold.
[0019] In a third aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0020] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.
[0021] The interactive method based on image recognition provided by the embodiment of the present application first obtains an image to be recognized, wherein the image to be recognized includes a preset card object and a preset indicator object, and the preset indicator object is used to associate a pattern in the preset card object through a preset action; then, according to the preset action, the pattern associated with the preset indicator object in the image to be recognized is recognized; finally, the preset operation instruction corresponding to the pattern is executed. The present application recognizes the pattern in the preset card and executes the operation command corresponding to the pattern. Compared with gesture recognition, the recognition of the card pattern is easier to implement, thereby improving the recognition efficiency and recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0023] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
[0024] Figure 2 is a flow chart of an embodiment of an interactive method based on image recognition according to the present application;
[0025] Figure 3 is a schematic diagram of an application scenario of the interaction method based on image recognition according to this embodiment;
[0026] Figure 4 is a flow chart of another embodiment of the interactive method based on image recognition according to the present application;
[0027] Figure 5 is a flow chart of another embodiment of the interactive method based on image recognition according to the present application;
[0028] Figure 6 is a structural diagram of an embodiment of an interactive device based on image recognition according to the present application;
[0029] Figure 7 It is a structural diagram of a computer system suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION
[0030] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] Figure 1 An exemplary architecture 100 is shown to which the image recognition-based interaction method and apparatus of the present application can be applied.
[0033] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0034] Terminal devices 101, 102, 103 may be hardware devices or software that support network connection for image data interaction and data processing. When terminal devices 101, 102, 103 are hardware, they may be various electronic devices that support functions such as information interaction, network connection, image capture, etc., including but not limited to smart phones, tablet computers, smart TVs, e-book readers, laptop computers, and desktop computers, etc. When terminal devices 101, 102, 103 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software or software modules, for example, for providing distributed services, or they may be implemented as a single software or software module. No specific limitation is made here.
[0035] The server 105 may be a server that provides various services, such as providing image recognition, data analysis and processing, data transmission and other functions to the terminal devices 101, 102, 103. The server may store or process various received data and feed back the processing results to the terminal device.
[0036] It should be noted that the interactive method based on image recognition provided in the embodiments of the present disclosure can be executed by the terminal devices 101, 102, 103, or by the server 105, or a part of it can be executed by the terminal devices 101, 102, 103 and another part can be executed by the server 105. Accordingly, the interactive device based on image recognition can be set in the terminal devices 101, 102, 103, or in the server 105, or a part of it can be set in the terminal devices 101, 102, 103 and another part can be set in the server 105. No specific limitation is made here.
[0037] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules for providing distributed services, or it can be implemented as a single software or software module. No specific limitation is made here.
[0038] It should be understood that Figure 1 The number of terminal devices and servers in the embodiment is only for illustration. Any number of terminal devices and servers may be provided according to implementation requirements.
[0039] Continue to refer Figure 2 , shows a process 200 of an embodiment of an interactive method based on image recognition, comprising the following steps:
[0040] Step 201: Obtain an image to be recognized.
[0041] In this embodiment, the execution subject (for example Figure 1 The terminal device in the system can obtain the image to be recognized in real time. The image to be recognized includes a preset card object and a preset indicator object, and the preset indicator object is used to associate the pattern in the preset card object through a preset action.
[0042] The preset card object may be cards of various styles, for example, a heart-shaped card, a circular card, a rectangular card, and the like.
[0043] One or more patterns are set on the preset card object, and the pattern can be various patterns used for image recognition. In terms of shape, for example, it can be a pattern represented by a geometric figure, a pattern composed of multiple geometric figures, or a pattern composed of lines; in terms of style, for example, it can be a flat pattern, a hollow pattern, a relief pattern, etc.; in terms of color, for example, it can be a monochrome pattern, a colorful pattern, etc.
[0044] The preset indicator object may be a variety of indicators, such as a finger, a pen, a stick, etc. The preset indicator object may be associated with a pattern in a preset card object through a preset action. The preset action may be a variety of actions indicating a pattern in a preset card object, such as a blocking pattern, a pointing pattern, etc. By associating the preset indicator object with the pattern in the preset card object, it can be used to indicate the target pattern to be recognized.
[0045] Step 202: According to a preset action, a pattern associated with a preset indicator object in the image to be recognized is identified.
[0046] In this embodiment, the execution subject can identify the pattern associated with the preset indicator object in the image to be identified according to the instruction of the preset action.
[0047] For example, the preset card objects in the image to be identified include multiple patterns such as circles, squares, triangles, etc., and the user points to the circular pattern with his finger to establish an association with the circular pattern. The execution subject can first identify the user's finger in the image to be identified based on the finger features, and further identify the circular pattern pointed to by the finger according to the finger's indication.
[0048] In some optional implementations, a pattern associated with a preset indicator object in an image to be identified can be identified by a pre-trained pattern recognition model. Using a machine learning method, the image to be identified in a pattern training set is used as the input of the pattern recognition model, and the pattern associated with the preset indicator object is used as the target output of the pattern recognition model to train the pattern recognition model. Specifically, the execution subject can use a convolutional neural network, a deep learning model, a naive Bayesian model (NBM) or a support vector machine (SVM) and other models, use the pattern training set as the input of the model, and use the pattern associated with the preset indicator object as the target output of the pattern recognition model to train the pattern recognition model.
[0049] In some optional implementations, the user can use a preset indicator object to sequentially associate multiple patterns in a preset card object through a preset action. For example, within a first preset time period of 1 second, the user can sequentially point to different patterns in the preset card object with a finger to sequentially associate multiple patterns in the preset card object.
[0050] In the case where the user sequentially associates multiple patterns in the preset card object through the preset action, the execution subject can identify different patterns in the preset card object sequentially associated with the preset indicator object in the image to be identified corresponding to the image frame within the first preset time period according to the preset action. The first preset time period can be specifically set according to the actual situation and is not limited here.
[0051] In some optional implementations, the user can use a preset indicator object to associate a pattern in a preset card object through a preset action and move the pattern. For example, within the second preset time period of 1 second, the user can point a finger at a circular pattern in a preset card object and move the circular pattern upward.
[0052] In the case where the user associates a pattern in a preset card object through a preset action and moves the pattern, the execution subject can identify the displacement information of the pattern associated with the preset indicator object in the image to be identified corresponding to the image frame within the second preset time period according to the preset action. The second preset time period can be specifically set according to actual conditions and is not limited here.
[0053] In some optional implementations, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; and the preset action is a blocking pattern.
[0054] With respect to the above-mentioned situation where a blind user indicates a pattern in a preset card object according to an occluding pattern action, the executing entity may identify a pattern in the image to be identified that is adjacent to the pattern occluded by the preset indicator object; and determine the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0055] It should be noted that the execution subject of this step can be a terminal device or a server. When the terminal device has an image recognition function, the execution subject of this step can be a terminal device with an image recognition function; otherwise, the execution subject of this step can be a server with an image recognition function.
[0056] Step 203, executing a preset operation instruction corresponding to the pattern.
[0057] In this embodiment, a corresponding preset operation instruction can be set based on the pattern in the preset card object, and the pattern in the preset card object and the corresponding preset operation instruction are associated and stored. The execution subject can obtain the preset operation instruction corresponding to the pattern according to the correspondence between the pattern and the preset operation instruction, and execute the preset operation instruction. Among them, the preset operation instruction can be specifically limited according to the actual situation, for example, it can be a preset operation instruction for adjusting the brightness of a smart desk lamp, a preset operation instruction for instructing a smart TV to change channels, which is not limited here.
[0058] In view of the situation where the user associates multiple patterns in the preset card object in sequence through preset actions, corresponding preset operation instructions are pre-set according to the patterns and the association order, and the patterns and the association order in the preset card object are associated with the corresponding preset operation instructions and stored.
[0059] In some optional implementations, the execution subject executes preset operation instructions corresponding to the patterns and the association order, and the association order is used to represent the order of the patterns that are sequentially associated with the preset indicator objects.
[0060] For example, according to the object to be identified, it is recognized that the order of patterns associated by the user according to the preset indicator objects is "circular pattern, square pattern", and the preset operation instruction corresponding to the circular pattern, square pattern and their associated order is to turn off the light of the smart desk lamp. The execution subject turns off the light of the smart desk lamp according to the instructions of the preset operation instruction.
[0061] In view of the situation where the user associates a pattern in a preset card object through a preset action and moves the pattern, corresponding preset operation instructions are pre-set according to the pattern and displacement information, and the pattern and displacement information in the preset card object are associated with the corresponding preset operation instructions and stored.
[0062] In some optional implementations, the execution subject executes a preset operation instruction corresponding to the pattern and the displacement information.
[0063] For example, based on the image to be identified, it is recognized that the user moves upward according to the circular pattern associated with the preset indicator object, and the preset operation instruction corresponding to the upward movement of the circular pattern is to increase the volume. The execution subject controls the smart TV to increase the output volume according to the instructions of the preset operation instruction.
[0064] It should be noted that the execution subject of this step can be a terminal device or a server. When the terminal device has a preset operation instruction execution function, the execution subject of this step can be a terminal device with a preset operation instruction execution function; otherwise, the execution subject of this step can be a server with a preset operation instruction execution function.
[0065] In this embodiment, the execution subject executes the operation command corresponding to the pattern by identifying the pattern associated with the preset indicator object in the card. The recognition of the preset card object pattern is easier to achieve than gesture recognition, which improves the recognition efficiency and recognition accuracy.
[0066] Figure 3 An application scenario of the interactive method based on image recognition of the present embodiment is schematically shown. User 301 is playing a game on a smart TV 302. A camera 303 is matched on the smart TV 302 to obtain an image of the user 301 in a preset area. User 301 points to the pattern "Δ" in the preset card object 304 with his finger. The camera 303 obtains the above-mentioned image to be recognized. The image to be recognized includes a preset card object and a preset indicator object. The user 301 points to the pattern through the preset indicator object to associate the preset indicator object with the pattern. The smart TV 302 recognizes the pattern associated with the preset indicator object in the image to be recognized according to the preset action of pointing to the pattern; then, the preset operation instruction corresponding to the pattern "Δ" is obtained to walk forward, and the character in the game interface is controlled to walk forward.
[0067] Continue to refer Figure 4 , shows a schematic process 400 of another embodiment of the interactive method based on image recognition according to the present application, comprising the following steps:
[0068] Step 401: Identify a user corresponding to the facial image based on the acquired facial image.
[0069] In this embodiment, the execution subject can obtain the user's face image through the camera, and identify the user corresponding to the face image according to the obtained face image. In some optional implementations, the user in the face image can be identified through a pre-trained face recognition model.
[0070] It should be noted that the execution subject of this step can be a terminal device or a server. When the terminal device has a face recognition function, the execution subject of this step can be a terminal device with a face recognition function; otherwise, the execution subject of this step can be a server with a face recognition function.
[0071] Step 402: Acquire the operation mode corresponding to the user.
[0072] In this embodiment, different operation modes can be set according to the user's preferences or operation habits, and the user information is stored in association with the corresponding operation mode. The operation mode is used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instruction. For example, the preset card object includes a circular pattern, corresponding to the operation mode of user A, the preset operation instruction corresponding to the circular pattern is to increase the volume of the smart TV, and corresponding to the operation mode of user B, the preset operation instruction corresponding to the circular pattern is to lower the volume of the smart TV.
[0073] In this embodiment, the execution subject obtains the operation mode corresponding to the user in the face image according to the recognition result of the face image.
[0074] It should be noted that the execution subject of this step can be a terminal device or a server. When the terminal device stores the operation mode corresponding to each user, the execution subject of this step can be the terminal device storing the operation mode corresponding to each user; otherwise, the execution subject of this step can be the server storing the operation mode corresponding to each user.
[0075] Step 403: Obtain the image to be recognized.
[0076] In this embodiment, step 403 is performed in a manner similar to step 201 and will not be described in detail herein.
[0077] Step 404: According to a preset action, a pattern associated with a preset indicator object in the image to be recognized is identified.
[0078] In this embodiment, step 404 is performed in a manner similar to step 202 and will not be described in detail herein.
[0079] Step 405, executing a preset operation instruction corresponding to the pattern.
[0080] In this embodiment, step 405 is performed in a manner similar to step 203 and will not be described in detail herein.
[0081] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiment, the process 400 of the interaction method based on image recognition in this embodiment specifically illustrates obtaining the operation mode corresponding to the user in the face image according to the recognition result of the acquired face image. The operation mode suitable for the user can be set according to the user's preferences or operation habits to enhance the matching degree with the user, so as to further improve the user experience.
[0082] Continue to refer Figure 5 , shows a schematic process 500 of another embodiment of the interactive method based on image recognition according to the present application, comprising the following steps:
[0083] Step 501: Obtain an image to be recognized.
[0084] In this embodiment, step 501 is performed in a manner similar to step 201 and will not be described in detail herein.
[0085] Step 502: Identify whether the preset action is a valid action.
[0086] In this embodiment, in order to improve the recognition efficiency and accuracy of the pattern in the preset card object, it is possible to pre-identify whether the preset action is a valid action. For example, it is possible to identify whether the preset action is a valid action based on the clarity of the preset action of the acquired image to be recognized.
[0087] In some optional implementations, first, all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified can be identified. The third preset time period can be specifically set according to actual conditions, for example, it can be 1 second, which is not limited here.
[0088] Then, according to the comparison result of the ratio of image frames with the same preset action in all image frames and the preset ratio threshold, it is determined whether the preset action is a valid action. In response to determining that the ratio of image frames with the same preset action is greater than the preset ratio threshold, it is determined that the preset action is a valid action; otherwise, it is determined that the preset action is not a valid action.
[0089] In response to determining that the preset action is a valid action, subsequent steps are executed.
[0090] Step 503: According to a preset action, a pattern associated with a preset indicator object in the image to be recognized is identified.
[0091] In this embodiment, step 503 is performed in a manner similar to step 202 and will not be described in detail herein.
[0092] Step 504, executing a preset operation instruction corresponding to the pattern.
[0093] In this embodiment, step 504 is performed in a manner similar to step 203 and will not be described in detail herein.
[0094] It can be seen from this embodiment that Figure 2 Compared with the corresponding embodiment, the process 500 of the interactive method based on image recognition in this embodiment specifically describes the pre-identification of whether the preset action is a valid action, and in response to determining that the preset action is a valid action, the recognition of the pattern in the preset card object is performed. In this way, the misidentification of the group caused by invalid actions can be prevented, and the recognition efficiency and accuracy of pattern recognition can be improved.
[0095] Continue to refer Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an interactive device based on image recognition, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0096] like Figure 6 As shown, the interactive device based on image recognition includes: an acquisition unit 601, configured to acquire an image to be recognized, wherein the image to be recognized includes a preset card object and a preset indicator object, and the preset indicator object is used to associate a pattern in the preset card object through a preset action; an identification unit 602, configured to identify the pattern associated with the preset indicator object in the image to be recognized according to a preset action; and an execution unit 603, configured to execute a preset operation instruction corresponding to the pattern.
[0097] In some embodiments, the recognition unit 602 is further configured to recognize different patterns in the preset card objects that are sequentially associated with the preset indicator objects in the image to be recognized corresponding to the image frame within the first preset time period according to a preset action; and the above-mentioned execution of the preset operation instructions corresponding to the pattern includes: executing the preset operation instructions corresponding to the pattern and the association order, and the association order is used to characterize the order of the patterns that are sequentially associated with the preset indicator objects.
[0098] In some embodiments, the recognition unit 602 is further configured to recognize, according to a preset action, the displacement information of a pattern associated with a preset indicator object in the image to be recognized corresponding to the image frame within a second preset time period; the above-mentioned execution of the preset operation instruction corresponding to the pattern includes: executing the preset operation instruction corresponding to the pattern and the displacement information.
[0099] In some embodiments, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; the preset action is an occluding pattern; the recognition unit 602 is further configured to recognize a pattern in the image to be recognized that is adjacent to the pattern occluded by the preset indicator object; determine the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0100] In some embodiments, a mode selection unit (not shown in the figure) is also included, which is configured to identify the user corresponding to the facial image based on the acquired facial image; obtain the operation mode corresponding to the user, and the operation mode is used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instructions.
[0101] In some embodiments, an action determination unit (not shown in the figure) is further included, which is configured to identify whether the action is a valid action.
[0102] In some embodiments, the action determination unit (not shown in the figure) is further configured to identify all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; and determine whether the preset action is a valid action based on the comparison result of the proportion of image frames with the same preset action in all image frames and a preset proportion threshold.
[0103] The device recognizes the pattern in the card and executes the operation command corresponding to the pattern. Compared with gesture recognition, card pattern recognition is easier to implement, which improves recognition efficiency and recognition accuracy.
[0104] Reference below Figure 7 , which shows a device suitable for implementing the embodiments of the present application (eg Figure 1 Schematic diagram of the structure of a computer system 700 of the devices 101, 102, 103, 105 shown. Figure 7 The device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0105] like Figure 7 As shown, the computer system 700 includes a processor (e.g., CPU, central processing unit) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0106] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0107] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 709, and / or installed from a removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the method of the present application are executed.
[0108] It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0109] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the client computer, partially on the client computer, as a separate software package, partially on the client computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the client computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] According to one or more embodiments of the present disclosure, the present disclosure provides an interactive method based on image recognition, including: obtaining an image to be recognized, the image to be recognized including a preset card object and a preset indicator object, the preset indicator object being used to associate a pattern in the preset card object through a preset action; according to the preset action, recognizing the pattern associated with the preset indicator object in the image to be recognized; and executing a preset operation instruction corresponding to the pattern.
[0112] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, according to a preset action, a pattern associated with a preset indicator object in an image to be identified, including: according to a preset action, identifying different patterns in a preset card object to which a preset indicator object is sequentially associated in an image to be identified corresponding to an image frame within a first preset time period; and the above-mentioned execution of a preset operation instruction corresponding to the pattern includes: executing a preset operation instruction corresponding to the pattern and an association order, the association order being used to characterize the order of patterns associated sequentially with the preset indicator object.
[0113] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, a pattern associated with a preset indicator object in an image to be identified is identified according to a preset action, including: according to the preset action, displacement information of a pattern associated with a preset indicator object in an image to be identified corresponding to an image frame within a second preset time period is identified; the above-mentioned execution of a preset operation instruction corresponding to the pattern includes: executing a preset operation instruction corresponding to the pattern and the displacement information.
[0114] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; the preset action is an occluding pattern; according to the preset action, the pattern associated with the preset indicator object in the image to be identified is identified, including: identifying a pattern in the image to be identified that is adjacent to the pattern occluded by the preset indicator object; determining the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0115] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, before the above-mentioned acquisition of the image to be identified including the preset card object and the preset indicator object, it also includes: identifying the user corresponding to the facial image based on the acquired facial image; acquiring the operation mode corresponding to the user, the operation mode being used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instructions.
[0116] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, before identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action, it also includes: identifying whether the action is a valid action.
[0117] According to one or more embodiments of the present disclosure, in the image recognition-based interaction method provided by the present disclosure, identifying whether a preset action is a valid action includes: identifying all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; and determining whether the preset action is a valid action based on a comparison result of the proportion of image frames with the same preset action in all image frames with a preset proportion threshold.
[0118] According to one or more embodiments of the present disclosure, the present disclosure provides an interactive device based on image recognition, including: an acquisition unit, configured to acquire an image to be recognized, the image to be recognized including a preset card object and a preset indicator object, the preset indicator object being used to associate a pattern in the preset card object through a preset action; an identification unit, configured to identify a pattern associated with the preset indicator object in the image to be recognized according to a preset action; and an execution unit, configured to execute a preset operation instruction corresponding to the pattern.
[0119] According to one or more embodiments of the present disclosure, in the image recognition-based interaction device provided by the present disclosure, the recognition unit is further configured to recognize different patterns in the preset card objects that are sequentially associated with the preset indicator objects in the image to be recognized corresponding to the image frame within the first preset time period according to a preset action; and the above-mentioned execution of the preset operation instructions corresponding to the pattern includes: executing the preset operation instructions corresponding to the pattern and the association order, and the association order is used to characterize the order of the patterns that are sequentially associated with the preset indicator objects.
[0120] According to one or more embodiments of the present disclosure, in the image recognition-based interaction device provided by the present disclosure, the recognition unit is further configured to recognize, according to a preset action, the displacement information of a pattern associated with a preset indicator object in the image to be recognized corresponding to the image frame within a second preset time period; the above-mentioned execution of the preset operation instruction corresponding to the pattern includes: executing the preset operation instruction corresponding to the pattern and the displacement information.
[0121] According to one or more embodiments of the present disclosure, in the image recognition-based interaction device provided by the present disclosure, the pattern in the preset card object is a pattern representing Braille; the preset indicator object is a finger; the preset action is an occluding pattern; the recognition unit is further configured to recognize a pattern in the image to be recognized that is adjacent to the pattern occluded by the preset indicator object; and determine the pattern occluded by the preset indicator object based on the patterns adjacent to the pattern occluded by the preset indicator object and the relative position relationship of the patterns in the pre-stored preset card object.
[0122] According to one or more embodiments of the present disclosure, the image recognition-based interaction device provided by the present disclosure also includes a mode selection unit, which is configured to identify the user corresponding to the facial image based on the acquired facial image; and obtain the operation mode corresponding to the user, and the operation mode is used to characterize the correspondence between the pattern in the preset card object set for different users and the preset operation instructions.
[0123] According to one or more embodiments of the present disclosure, the image recognition-based interaction device provided by the present disclosure further includes an action determination unit configured to identify whether an action is a valid action.
[0124] According to one or more embodiments of the present disclosure, in the image recognition-based interaction device provided by the present disclosure, the action determination unit is further configured to identify all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; and determine whether the preset action is a valid action based on a comparison result of the proportion of image frames with the same preset action in all image frames and a preset proportion threshold.
[0125] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor comprising an acquisition unit, an identification unit, and an execution unit. The names of these units do not constitute limitations on the units themselves in certain circumstances, for example, the identification unit may also be described as a unit that "identifies, according to a preset action, a pattern associated with a preset indicator object in an image to be identified".
[0126] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the computer device: obtains an image to be identified, the image to be identified includes a preset card object and a preset indicator object, and the preset indicator object is used to associate a pattern in the preset card object through a preset action; identifies the pattern associated with the preset indicator object in the image to be identified according to the preset action; and executes a preset operation instruction corresponding to the pattern.
[0127] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. An interactive method based on image recognition, the method comprising: Acquire an image to be identified, wherein the image to be identified includes a preset card object and a preset indicator object, wherein the preset indicator object is used to associate a pattern in the preset card object through a preset action; According to the preset action, identifying the pattern associated with the preset indicator object in the image to be identified; Executing a preset operation instruction corresponding to the pattern; Wherein, when there are multiple patterns associated with the preset action, identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action includes: According to the preset action, identifying different patterns in the preset card objects sequentially associated with the preset indicator objects in the image to be identified corresponding to the image frames within the first preset time period; and The executing a preset operation instruction corresponding to the pattern includes: Execute a preset operation instruction corresponding to the pattern and the association order, wherein the association order is used to represent the order of the patterns that are sequentially associated with the preset indicator objects.
2. The method according to claim 1, wherein: When there is only one pattern associated with the preset action, identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action includes: According to the preset action, identifying the displacement information of the pattern associated with the preset indicator object in the image to be identified corresponding to the image frame within the second preset time period; The executing a preset operation instruction corresponding to the pattern includes: Execute a preset operation instruction corresponding to the pattern and the displacement information.
3. The method according to claim 1, wherein: When the pattern in the preset card object is a pattern representing Braille; When the preset indicator object is a finger and the preset action is to cover the pattern, The step of identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action includes: Identifying a pattern in the image to be identified that is adjacent to the pattern blocked by the preset indicator object; The pattern blocked by the preset indicator object is determined according to patterns adjacent to the pattern blocked by the preset indicator object and the pre-stored relative position relationship of the patterns in the preset card object.
4. The method according to claim 1, wherein: Before obtaining the image to be recognized including the preset card object and the preset indicator object, the method further includes: Identify the user corresponding to the facial image according to the acquired facial image; An operation mode corresponding to the user is obtained, where the operation mode is used to characterize a correspondence between a pattern in the preset card object and the preset operation instruction set for different users.
5. The method according to any one of claims 1 to 4, wherein: Before identifying the pattern associated with the preset indicator object in the image to be identified according to the preset action, the method further includes: Identify whether the action is a valid action.
6. The method according to claim 5, wherein: The identifying whether the preset action is a valid action includes: Identify all image frames of the video within a third preset time period after the current frame image corresponding to the image to be identified; Whether the preset action is a valid action is determined according to a comparison result of a ratio of image frames having the same preset action in all the image frames and a preset ratio threshold.
7. An interactive device based on image recognition, the device comprising: an acquisition unit, configured to acquire an image to be recognized, wherein the image to be recognized includes a preset card object and a preset indicator object, wherein the preset indicator object is used to associate a pattern in the preset card object through a preset action; a recognition unit configured to recognize the pattern associated with the preset indicator object in the image to be recognized according to the preset action; an execution unit, configured to execute a preset operation instruction corresponding to the pattern; When there are multiple patterns associated with the preset action, the recognition unit is specifically configured to recognize different patterns in the preset card objects sequentially associated with the preset indicator objects in the image to be recognized corresponding to the image frame within the first preset time period according to the preset action; The execution unit is specifically configured to execute preset operation instructions corresponding to the patterns and the association sequence, wherein the association sequence is used to represent the sequence of the patterns that are sequentially associated with the preset indicator objects.
8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
