Air gesture recognition method, electronic equipment and storage medium
Through the method of staged detection and memory type switching, the problem of high power consumption in the gesture recognition function of intelligent electronic devices is solved, and efficient gesture recognition and low power consumption are achieved.
Patent Information
- Application Number
- CN202410166618.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2024-08-27
AI Technical Summary
When existing smart electronic devices turn on the gesture recognition function, frequent detection results in a large amount of data processing, resulting in high power consumption.
By performing gesture detection in stages in electronic devices, lower resolution images are used to screen out images with user gesture characteristics in the first stage, and higher resolutions are used for specific gesture recognition in the second stage, combining different stages of gesture detection. Memory type (such as TCM and DDR memory) to reduce power consumption and memory space usage.
It achieves a significant reduction in power consumption and memory space occupation during the gesture recognition process while ensuring the accuracy of gesture recognition, and improves the user interaction experience.
Smart Images

Figure CN118550403A
Abstract
Description
[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on February 27, 2023, with application number 202310227031.X and application name "Air gesture recognition method, electronic device and storage medium". Technical Field
[0002] The present application relates to the field of image technology, and in particular to a method for air gesture recognition, an electronic device, and a storage medium. Background Art
[0003] At present, smart electronic devices such as mobile phones can use the always-on camera (AON) function to realize functions such as screen control by gestures in the air. Specifically, when the mobile phone uses the AON function, the front camera of the mobile phone camera is always on and can collect images in real time. The mobile phone performs gesture recognition through image analysis and can respond to user gestures to control the screen. The user can control the mobile phone screen without touching the mobile phone.
[0004] For example, electronic devices can recognize various gestures of users, such as changing from an extended palm to a clenched fist (grasping gesture), which indicates that the display interface of the electronic device is to be captured. When the electronic device recognizes the grasping gesture, it will automatically perform the screenshot operation, and the user can complete the human-computer interaction without touching the electronic device, which greatly improves the convenience of operation.
[0005] At present, when the gesture recognition function is turned on in an electronic device, the electronic device will continuously collect multiple frames of images through the camera, and also need to continuously analyze the images for gesture recognition, so the amount of data is very large. It can be seen that due to the frequent detection of the gesture recognition process, a large amount of data needs to be processed, resulting in high power consumption. Summary of the invention
[0006] The present application provides a method for air gesture recognition, an electronic device and a storage medium, which solve the problem that frequent detection in the gesture recognition process results in a large amount of data to be processed, resulting in high power consumption.
[0007] In order to achieve the above objectives, this application adopts the following technical solutions:
[0008] In a first aspect, the present application provides a method for air gesture recognition, the method comprising: turning on an air gesture function of an electronic device, and after the air gesture function is turned on, a camera module of the electronic device is in a normally-on state; outputting multiple frames of first images of a first size specification through the camera module, and storing the multiple frames of first images in a first memory; when the analysis results of the multiple frames of first images meet a preset gesture trigger condition, outputting multiple frames of second images of a second size specification through the camera module, and storing the multiple frames of second images in a first memory and a second memory; performing gesture recognition according to the multiple frames of second images to obtain a gesture recognition result; responding according to a preset strategy corresponding to the gesture recognition result; wherein the resolution corresponding to the first size specification is lower than the resolution corresponding to the second size specification; when storing the same image, the power consumption caused by the first memory is less than the power consumption caused by the second memory, and the power consumption caused by the first memory and the second memory together is less than the power consumption caused by the second memory.
[0009] Through the air gesture recognition method provided by the embodiment of the present application, the electronic device camera turns on the air gesture function, and the front camera collects images in real time; first outputs continuous multiple-frame images with a lower resolution, and uses low-power memory (such as TCM) for data caching to perform the first stage of detection; when it is detected that the preset gesture trigger conditions are met, then outputs continuous multiple-frame images with a higher resolution, and uses low-power memory and normal power memory (such as DDR) to perform the second stage of specific gesture recognition; after recognizing the specific gesture, respond according to the preset strategy corresponding to the gesture recognition result. The present application performs gesture detection in stages, applies different image resolutions at different stages, and switches the running memory. Therefore, the present application solution can not only ensure the accuracy of gesture recognition, but also effectively reduce the power consumption and memory space required in the gesture recognition process.
[0010] It should be noted that when the camera module of the electronic device is in a normally open state, the camera module collects images of the user's gesture operation to obtain an image frame stream. The camera module can output image frame streams of different resolutions as required. Among them, the preset gesture trigger condition includes that there are hand features and a starting gesture in the multiple frames of the first image.
[0011] In some implementations, the method further includes: determining whether the analysis results of the multiple frames of first images meet the preset gesture trigger condition. The determination that the analysis results of the multiple frames of first images meet the preset gesture trigger condition includes: acquiring N consecutive frames of images from the multiple frames of first images according to a preset first sampling period to analyze whether there are hand features in the multiple frames of first images; after determining that there are hand features in the multiple frames of first images, acquiring M consecutive frames of images from the multiple frames of first images according to a preset second sampling period to analyze whether there is a starting gesture in the multiple frames of first images; if it is determined for S consecutive times that there is a starting gesture in the multiple frames of first images and the starting gesture state changes, it is determined that the analysis results of the multiple frames of first images meet the preset gesture trigger condition.
[0012] Through the above scheme, by judging the specific gesture trigger conditions, images with user gesture features can be accurately screened out to further recognize specific gestures based on the images, thereby improving the accuracy of gesture recognition.
[0013] In some implementations, the gesture recognition is performed based on the multiple frames of the second image to obtain the gesture recognition result, including: acquiring continuous T frames of images from the multiple frames of the second image according to a preset third sampling period to identify the specific gesture in the multiple frames of the first image; identifying the specific gesture within a preset time length; when the specific gesture is determined to be one of the preset multiple gestures, generating a gesture recognition result based on the specific gesture.
[0014] In some implementations, responding according to a preset strategy corresponding to the gesture recognition result includes:
[0015] When the gesture recognition result is the first gesture and the corresponding first preset strategy is remote screenshot, taking a screenshot of the screen display content of the electronic device according to the first preset strategy;
[0016] When the gesture recognition result is the second gesture and the corresponding second preset strategy is sliding the screen in the air, turning the page of the screen display content of the electronic device according to the second preset strategy;
[0017] When the gesture recognition result is the third gesture and the corresponding third preset strategy is to answer the call remotely, when the electronic device receives the incoming call signal, the call is automatically answered according to the third preset strategy;
[0018] When the gesture recognition result is the third gesture and the corresponding fourth preset strategy is wireless payment, when the screen of the electronic device displays the desktop, it automatically jumps from the desktop to the interface containing the payment code according to the fourth preset strategy.
[0019] Through the above scheme, the gesture recognition result is one of the preset multiple gestures, and different gestures correspond to different preset strategies. After the electronic device accurately recognizes the specific gesture, the electronic device infers the user's control intention according to the specific gesture and performs the corresponding action, thereby improving the interactive experience.
[0020] In some implementations, the first memory is a tightly coupled memory TCM, and the second memory is a double data rate synchronous dynamic random access memory DDR.
[0021] In some implementations, the second size specification is QVGA, and the corresponding resolution is 320 × 240; the first size specification is QQVGA, and the corresponding resolution is 160 × 120. The specific size can be determined according to actual use requirements, and the embodiment of the present application is not limited thereto.
[0022] In some implementations, the camera module is a front-facing camera.
[0023] In some implementations, the above method is applied to the system architecture of an electronic device, and the system architecture includes a first algorithm platform and a second algorithm platform; wherein the second algorithm platform is a framework provided by the native chip that supports the camera's always-on AON algorithm, and the first algorithm platform is an AON algorithm integration framework that supports multiple services and is created based on the second algorithm platform; the services supported by the first algorithm platform include air gesture services; and the services supported by the second algorithm platform include face unlocking screen services.
[0024] In some implementations, the method further includes: analyzing the multiple frames of first images through a first algorithm platform; and determining, through the first algorithm platform, whether the analysis results of the multiple frames of first images meet a preset gesture trigger condition.
[0025] In some implementations, performing gesture recognition based on the multiple frames of second images to obtain a gesture recognition result includes: performing gesture recognition based on the multiple frames of second images using a first algorithm platform to obtain a gesture recognition result.
[0026] In some implementations, the system architecture also includes intelligent sensing applications.
[0027] The above-mentioned electronic device enables the air gesture function, including: the smart perception application receives the first operation of the user to enable the air gesture service, and the air gesture service is a service supported by the smart perception application; in response to the first operation, the smart perception application sends a first message to the first algorithm platform, and the first message is used to indicate subscription to the air gesture service; the first algorithm platform responds to the first message and subscribes to the air gesture service.
[0028] In some implementations, after subscribing to the air gesture service, the method further includes: the first algorithm platform sends a second message to the camera module, where the second message is used to request the camera module to output an image according to the first size specification.
[0029] In some implementations, the method further includes: after the first algorithm platform determines that the analysis results of multiple frames of the first image meet a preset gesture trigger condition, the first algorithm platform sends a third message to the camera module, and the third message is used to request the camera module to output the image according to the second size specification.
[0030] In some implementations, the above method also includes: after the first algorithm platform determines that the analysis results of multiple frames of the first image meet the preset gesture trigger condition, the first algorithm platform reports a fourth message to the smart perception application, and the fourth message is used to indicate that the first service supported by the smart perception application is triggered; the smart perception application responds to the fourth message and triggers the electronic device to display prompt information of the first service in a preset area of the screen.
[0031] In some implementations, the prompt information of the first service includes a gesture animation, and the gesture animation is composed of a plurality of frames of first images and a plurality of frames of second images.
[0032] In some implementations, before responding according to a preset strategy corresponding to the gesture recognition result, the method further includes: the first algorithm platform reporting the gesture recognition result to the smart perception application.
[0033] Among them, the above-mentioned responding according to the preset strategy corresponding to the gesture recognition result includes: the intelligent perception application responds according to the preset strategy corresponding to the gesture recognition result.
[0034] In some implementations, the system architecture further includes an intelligent perception interface, and the intelligent perception application and the first algorithm platform perform data exchange via the intelligent perception interface.
[0035] In some implementations, the system architecture further includes a service management module, a distributor, an intelligent perception client, and a native platform client;
[0036] The above method also includes: when the analysis results of multiple frames of the first image meet the preset gesture trigger conditions, the service management module determines the processing task of the air gesture service, and sends the processing task of the air gesture service to the smart perception client through the distributor, and the smart perception client forwards the processing task of the air gesture service to the first algorithm platform.
[0037] In some implementations, the system architecture further includes an algorithm library, which includes a first image processing algorithm and a second image processing algorithm.
[0038] The above-mentioned analyzing the multiple frames of first images by using the first algorithm platform includes: the first algorithm platform calls the first image processing algorithm in the algorithm library to perform image analysis on the multiple frames of first images.
[0039] The above-mentioned performing gesture recognition based on the multiple frames of second images includes: the first algorithm platform calls the second image processing algorithm in the algorithm library to perform image analysis on the multiple frames of second images.
[0040] The requirement of the first image processing algorithm on image resolution is lower than the requirement of the second image processing algorithm on image resolution.
[0041] In a second aspect, the present application provides an image processing device, the device comprising a unit for executing the method in the first aspect. The device may correspond to executing the method described in the first aspect, and the relevant description of the unit in the device can refer to the description of the first aspect, which will not be repeated here for the sake of brevity.
[0042] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0043] In a third aspect, the present application provides an electronic device, comprising a processor, a computer program or instructions stored in the processor and a memory, wherein the processor is configured to execute the computer program or instructions so that the method in the first aspect is executed.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program (also referred to as instructions or codes) for implementing the method in the first aspect is stored. For example, when the computer program is executed by a computer, the computer can perform the method in the first aspect.
[0045] In a fifth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0046] In a sixth aspect, the present application provides a chip system, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip system also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0047] In a seventh aspect, the present application provides a computer program product, which includes a computer program (also referred to as instructions or codes). When the computer program is executed by an electronic device, the electronic device implements the method in the first aspect.
[0048] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of an application scenario of the AON camera provided in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of a method for air gesture recognition provided by the related art;
[0051] Figure 3 A schematic diagram of a method for air gesture recognition provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of a software architecture used in an embodiment of the present application;
[0054] Figure 6 A timing diagram of the interaction between modules in the software architecture provided in the embodiment of the present application;
[0055] Figure 7 A schematic diagram of a flow chart of a method for air gesture recognition provided in an embodiment of the present application;
[0056] Figure 8 A schematic diagram of a software architecture for an air gesture recognition method provided in an embodiment of the present application;
[0057] Fig. 9 A timing diagram of the interaction between modules in the air gesture recognition method provided in an embodiment of the present application;
[0058] Fig.10 A schematic diagram of the function settings of the air gesture recognition method provided in an embodiment of the present application;
[0059] Fig.11 A schematic diagram of an interface of the air gesture recognition method provided in an embodiment of the present application when in application;
[0060] Fig.12 Schematic diagram of the process of the air gesture recognition method provided in the embodiment of the present application Figure 1 ;
[0061] Fig.13Schematic diagram of the process of the air gesture recognition method provided in the embodiment of the present application Figure 2 ;
[0062] Fig.14 A schematic diagram of an interface for a remote screenshot scenario applied in an embodiment of the present application is shown;
[0063] Fig.15 A schematic diagram of an interface for an air sliding screen scenario applied in an embodiment of the present application is shown;
[0064] Fig.16 A schematic diagram of an interface for an air-press-answer call scenario applied in an embodiment of the present application is shown;
[0065] Fig.17 A schematic diagram of the interface of the air press-smart payment scenario applied in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0068] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of objects. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two, for example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0069] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0070] At present, smart electronic devices such as mobile phones can apply the AON function. The AON function allows the camera device (front camera) of the electronic device to be always active, so that the camera can be always on with low power consumption, allowing functions such as scanning codes, controlling the screen with air gestures, and smart always on display (AOD) to be completed faster.
[0071] Figure 1 The following is a schematic diagram showing the application scenarios of the AON function. Figure 1 As shown in (a) in the figure, the phone is in the screen-on state, the front camera of the phone is always on, and it collects images in real time. Figure 1 As shown in (b), the phone is in the screen-off state, the front camera of the phone is always on, and collects images in real time. It should be noted that the air gesture control screen is implemented in the screen-on scenario, and the smart AOD is implemented in the screen-off scenario.
[0072] When the mobile phone uses the AON function, the front camera of the mobile phone is always on and can collect images in real time. The mobile phone performs gesture recognition through image analysis and can respond to user gestures to control the screen. The user can control the mobile phone screen without touching the phone. When the gesture recognition function is turned on in an electronic device, the electronic device will continuously collect multiple frames of images through the front camera, and it also needs to continuously analyze the images and perform gesture recognition, so the amount of data is very large. It can be seen that due to the frequent detection of the gesture recognition process, a large amount of data needs to be processed, resulting in high power consumption.
[0073] For example, Figure 2 FIG. 1 is a schematic diagram showing a gesture recognition process in the related art. Figure 2 As shown in the figure, in the bright screen scene, the front camera dynamically captures images and continuously detects and recognizes gestures based on the captured continuous multi-frame images. The gesture recognition process has the following characteristics:
[0074] (1) The gesture recognition process includes hand feature detection, dynamic gesture recognition, and feature point matching.
[0075] (2) In the gesture recognition process, both dynamic memory and static memory use DDR memory, which is a memory device with high data transmission rate and very large storage space, which will be described in detail below.
[0076] (3) The pathways and processing devices involved in the gesture recognition process include the pathways that implement the AON function and the digital signal processor (DSP).
[0077] (4) Larger images are used in the gesture recognition process, such as 320×240 pixels or 640×480 pixels.
[0078] It can be seen that in the related technology, when performing gesture recognition, after the camera system captures the image, regardless of whether there are gesture features in the image, it will output the image to the intelligent perception algorithm platform with a relatively high resolution. Since this method requires gesture recognition for a large number of images with and without gesture features, and the image resolution is fixed and relatively high, a large number of image processing resources will be called for image analysis, and a large amount of memory will be occupied for image storage. Therefore, the gesture recognition process of the related technology consumes very high power and occupies a large amount of memory. In other words, in the above-mentioned gesture recognition process, since the gesture recognition process is frequently detected, the amount of data is very large, resulting in high power consumption.
[0079] In view of this, the embodiment of the present application provides a method for air gesture recognition and an electronic device, which improves the underlying system of the electronic device and newly builds an honor intelligent camera always-on (honorintelligent always on camera, intelligent perception) algorithm platform (also known as intelligent perception algorithm integration framework) based on the native chip platform, which can support the perception detection algorithm in the low-power domain. Through this perception detection algorithm, power consumption can be greatly reduced while ensuring accurate recognition of gestures to improve user experience.
[0080] In order to better understand the embodiments of the present application, the embodiments of the present application are briefly described below:
[0081] This application newly builds the Smart Perception 1.0 algorithm integration framework based on the native chip platform, establishes its own AON service, supports the development of gesture recognition features for mobile phone products from the platform software infrastructure, and can support perception detection algorithms in the low-power domain. The specific content of the Smart Perception Algorithm Integration Framework will be explained below.
[0082] In the application scenario of the present application, the AON camera (front camera) of the electronic device can be used for image acquisition, and the electronic device performs gesture recognition on the image through the perception detection algorithm supported by the intelligent perception algorithm platform to realize intelligent perception. Specifically, after the electronic device perceives that the AON camera (front camera) has acquired an image, the image is first output to the intelligent perception algorithm platform at a lower resolution for image analysis to determine whether there are gesture features in the image; if it is determined that there are gesture features in the image, the image is then output to the intelligent perception algorithm platform at a higher resolution for image analysis to identify the specific gesture in the image, and the recognition result is reported to the intelligent perception application, which responds according to the preset strategy corresponding to the specific gesture identified.
[0083] refer to Figure 3 As shown, in the embodiment of the present application, the gesture recognition process includes the following two stages:
[0084] The first stage: gesture perception stage, first detect whether there are gesture features and the starting gesture in the image.
[0085] Since it is uncertain whether the captured images contain gesture features, a large number of images do not have gesture features, and only a small number of images contain gesture features. Therefore, it is necessary to preliminarily screen out images with gesture features in the first stage. At this time, there is no need for the camera system to capture images with high resolution and output them to the intelligent perception algorithm platform. Accordingly, there is no need for the intelligent perception algorithm platform to perform image analysis on high-resolution images in the first stage.
[0086] Therefore, the embodiment of the present application proposes: in the first stage, first determine whether there are gesture features in the image, and if there are gesture features, then further determine the starting gesture. In order to avoid unnecessary power consumption, the camera system can output the image at a low resolution to the intelligent perception algorithm platform, and the intelligent perception algorithm platform can accordingly perform image analysis on the low-resolution image, which can reduce unnecessary power consumption.
[0087] If the image is judged to have gesture features and a starting gesture in the first stage, the second stage will be executed. If the image is judged to have no gesture features in the first stage, the second stage will not be executed and the image will be discarded, which can greatly reduce power consumption and memory usage.
[0088] The second stage: the specific gesture recognition stage. After determining that there are gesture features and starting gestures in the image, the image is output to the intelligent perception algorithm platform at a higher resolution. The image is analyzed through the perception detection algorithm supported by the intelligent perception algorithm platform to identify the specific gestures in the image. The recognition results are reported to the intelligent perception application, and the intelligent perception application responds according to the preset strategy corresponding to the specific gesture recognized.
[0089] For example, if the recognition result is an air sliding screen gesture, the electronic device controls the screen display content to turn the page up or down; for another example, if the recognition result is a gripping gesture, the electronic device controls to take a screenshot of the current display interface.
[0090] It is understandable that in the case where it is determined that there are gesture features in the image in the first stage, since it is necessary to analyze the specific gesture in the image, such as performing gesture recognition by matching image feature points, the image needs to be output to the intelligent perception algorithm platform at a higher resolution in the second stage, and the specific gesture is accurately recognized by the intelligent perception algorithm platform. Therefore, the present application solution can not only ensure the accuracy of gesture recognition, but also effectively reduce the power consumption and memory space required in the gesture recognition process.
[0091] like Figure 3 As shown, the first stage has the following characteristics:
[0092] (1) The first stage includes processes such as hand feature detection and initial gesture recognition.
[0093] (2) In the first stage, both dynamic memory and static memory use TCM memory, which is a low-power memory with relatively small storage space, and will be described in detail below.
[0094] (3) In the first stage, the channels and processing devices involved include the channels that implement the AON function and the DSP.
[0095] (4) In the first stage, relatively small-sized images, such as 160 × 120 pixels, are used.
[0096] In the first stage, if no starting gesture is detected N times in succession, the acquired image is considered to be an invalid frame, the invalid frame is discarded, and then the process returns to the first stage. If hand features and starting gestures are detected in the image, the process continues to the second stage.
[0097] like Figure 3 As shown, the second stage has the following characteristics:
[0098] (1) The second stage includes processes such as dynamic gesture recognition and feature point matching.
[0099] (2) In the second stage, the dynamic memory and static memory are switched to: DDR memory + TCM memory.
[0100] (3) In the second stage, the channels and processing devices involved include the channels that implement the AON function and the DSP.
[0101] (4) In the second stage, relatively large-sized images, such as 320 × 240 pixels, are used.
[0102] In the second stage, after the specific gesture is recognized, the recognition result is reported to the intelligent perception application, and the intelligent perception application responds according to the preset strategy corresponding to the specific gesture recognized. If the time taken to recognize the gesture times out, the invalid frame is lost and the first stage is returned to continue.
[0103] Combination Figure 2 and Figure 3 As shown, compared with the related art, the present application scheme has the following beneficial effects:
[0104] On the one hand, by performing gesture recognition in stages, we first determine whether there are gesture features and a starting gesture in the image. If we determine that there are gesture features and a starting gesture in the image, we then identify the specific gesture in the image. For images that do not contain gesture features, there is no need to perform specific gesture recognition. In this way, effective gestures are screened out in stages, reducing unnecessary image analysis and memory usage.
[0105] On the other hand, at different stages, the camera system outputs the collected images with different resolutions to the intelligent perception algorithm platform. Accordingly, the intelligent perception algorithm platform performs gesture recognition on images of different resolutions. In the first stage, lower-resolution images are used to determine whether there are gesture features in the image, and higher-resolution images are used to identify specific gestures in the second stage. Therefore, continuous high-power consumption for gesture recognition can be avoided, power consumption can be reduced, and memory usage can be reduced.
[0106] Through this application solution, the AON camera runs with extremely low power consumption, and the electronic device can accurately identify the user's air interaction gestures, determine the user's intention to control the machine, and quickly complete the device control. For example, the electronic device will automatically perform a screenshot operation when it recognizes a gripping gesture, or the electronic device will automatically perform an up or down sliding screen operation when it recognizes a sliding screen gesture. In this way, users can complete human-computer interaction without touching the electronic device, which greatly improves the convenience of operation.
[0107] The air gesture recognition method provided in the embodiment of the present application can be applied to electronic devices with shooting functions. Electronic devices include various terminal devices, which can also be called terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. The terminal device can be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiment of the present application does not limit the specific technology and specific device form adopted by the terminal device.
[0108] See also Figure 4 , is a structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, and the like.
[0109] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0110] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a DSP, a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. For example, the processor 110 is used to execute the air gesture recognition method in the embodiment of the present application.
[0111] In the embodiment of the present application, the implementation of the AON function depends on the ISP. The ISP can run various algorithm programs to process image signals in real time. The camera module is connected to the ISP through a camera serial interface (CSI), and the ISP is connected to the AP. After the ISP receives the image captured by the camera module, the ISP performs image signal processing on the image captured by the camera module. The AP can control the working mode of the ISP through an inter-integrated circuit (I2C), obtain the working status of the ISP, etc.
[0112] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0113] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0114] The external memory 120 generally refers to an external memory. In the embodiment of the present application, the external memory refers to a memory other than the memory of the electronic device and the cache of the processor, and the memory is generally a non-volatile memory.
[0115] The internal memory 121, which may also be referred to as "memory", may be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
[0116] In the embodiment of the present application, the memory of the electronic device adopts tightly coupled memory (TCM) and DDR memory.
[0117] DDR memory is a double data rate synchronous dynamic random access memory. The full name of DDR memory is DDR SDRAM (double data rate SDRAM). SDRAM is the abbreviation of synchronous dynamic random access memory. The data transfer rate of DDR memory is very high.
[0118] Among them, TCM is included in the address mapping space of the memory and can be accessed as fast memory. TCM is used to provide low-latency memory to the processor, which does not have the unpredictability unique to cache. TCM can be used to store important routines, such as interrupt handling routines or real-time tasks that need to avoid cache uncertainty. In addition, TCM can be used to save temporary register data, data types whose local attributes are not suitable for cache, and important data structures such as interrupt stacks.
[0119] It should be noted that from the perspective of storage capacity, TCM memory capacity is smaller and DDR memory capacity is larger. From the perspective of data transmission rate, the data transmission rate of DDR memory is greater than that of TCM memory. From the perspective of power consumption, the power consumption of DDR memory is greater than that of TCM memory. Electronic devices usually use DDR memory, so the power consumption is relatively large; the embodiments of the present application use TCM memory for data caching in some scenarios, which can reduce power consumption.
[0120] Exemplarily, in an embodiment of the present application, in some scenarios of early pre-perception services, both the dynamic memory and the static memory in the electronic device use TCM memory to store continuous multiple-frame images captured by the front AON camera (front camera), and these images are images of QQVGA image specification, where the QQVGA image specification is a smaller image size, such as 160×120, which can be expressed as QQVGA (160×120) image size. It can be understood that the image resolution of the QVGA image specification is lower, and the image occupies less memory.
[0121] For example, in some later identification scenarios of specific services, the dynamic memory and static memory of the electronic device are combined with DDR memory and TCM memory to jointly store the continuous multi-frame images captured by the AON camera (front camera), which are continuous multi-frame images of QVGA image specifications, wherein, relative to the QQVGA image specification, the QVGA image specification is a larger image size, such as 320×240, which can be expressed as QQVGA (320×240) image size. It can be understood that, relative to the QQVGA image specification, the image resolution of the QVGA image specification is relatively high, and the image occupies a larger memory.
[0122] Among them, VGA (video graphics array) refers to video graphics array, and the corresponding resolution is 640×480 pixels. QVGA refers to 1 / 4 size of VGA resolution, and the corresponding resolution is 320×240 pixels. QQVGA refers to 1 / 4 screen of VGA resolution, and the corresponding resolution is 160×120 pixels.
[0123] It is understandable that QQVGA images have the smallest resolution and occupy the smallest memory.
[0124] In an embodiment of the present application, in the first stage, on the one hand, the AON camera (front camera) captures smaller-sized images of QQVGA specifications and stores them in the TCM memory, thus occupying very little memory space; on the other hand, the processor analyzes multiple consecutive frames of images to determine whether the user has triggered a certain service. For example, if hand features are detected through image analysis and the starting gesture changes, the processor can determine that the user has triggered the air gesture service; for another example, if facial features are detected through image analysis and the screen direction of the electronic device is deflected, it can be determined that the user has triggered the smart horizontal and vertical screen service.
[0125] In the second stage, on the one hand, the AON camera (front camera) captures larger images of QVGA specifications and stores them in the DDR memory and TCM memory; on the other hand, the processor analyzes multiple consecutive frames of images to identify the specific content of the triggered business. For example, if the image analysis detects that the palm changes from an unfolded state to a grasped state, the processor can identify the grasping gesture and use it to trigger a screenshot.
[0126] It can be seen that in the scenario where the AON camera (front camera) is in the normally-on state, although the AON camera (front camera) will continue to collect a large number of images, through the present application scheme, in the process of early pre-perception of the service, by acquiring smaller-sized continuous multi-frame images and storing them in low-power TCM memory, image analysis is performed on the smaller-sized continuous multi-frame images, which can greatly reduce power consumption.
[0127] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be an organic light-emitting diode (OLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0128] The electronic device 100 also includes various sensors that can convert various physical signals into electrical signals. The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The proximity sensor can turn off the display screen 194 and / or the backlight when the electronic device 100 is moved to the ear. The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
[0129] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0130] Exemplarily, in an embodiment of the present application, the touch sensor 180K can detect a user's click operation on an application icon, and transmit the detected click operation to the application processor, determine that the click operation is used to start or run the application, and then execute the running operation of the application.
[0131] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0132] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0133] The above is a specific description of the embodiment of the present application using the electronic device 100 as an example. It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0134] In addition, an operating system is running on the above components, such as the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on the operating system.
[0135] The operating system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0136] Figure 5 It is a software architecture diagram of the electronic device 100 of the embodiment of the present application. The embodiments of the present application will be discussed based on the following technical architecture. It should be noted that, in order to facilitate the explanation of logic, only the business logic relationship is illustrated by a schematic block diagram, and the specific location of the technical architecture where each business is located is not strictly expressed. In addition, the naming of each module in the software architecture diagram is an illustrative example. The embodiment of the present application does not limit the naming of each module in the software architecture diagram. In actual implementation, the specific naming of the module can be determined according to actual needs.
[0137] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes four layers, from top to bottom: application layer (applications), application framework layer (application framework), hardware abstraction layer (HAL), and kernel layer (kernel).
[0138] The application layer may include a series of application packages. For example, the application layer may include applications such as camera, smart perception, etc. (applications may be referred to as applications for short), and the present application embodiment does not impose any restrictions on this.
[0139] The smart perception application provided in the embodiment of the present application supports various services. For example, the services supported by the smart perception application may include air gesture services, smart code recognition services, gaze-unextinguishing services, gaze-reducing volume services, smart horizontal and vertical screen services, auxiliary photo services, and smart AOD services. These services can be collectively referred to as smart perception services.
[0140] It should be noted that the implementation of these services supported by the smart perception application depends on the AON camera (front camera) of the electronic device being in a normally open state, collecting images in real time, and obtaining data related to the smart perception service. When the smart perception application monitors the service-related data, the smart perception application sends the service-related data to the smart perception algorithm platform, which analyzes the collected images and determines whether to execute the relevant services of the smart perception application or which specific service to execute based on the analysis results.
[0141] Among them, the air gesture service refers to the service that electronic devices recognize user gestures and respond according to the preset strategies corresponding to the gestures to achieve human-computer interaction. When the electronic device is in the screen-on state, the electronic device can support the recognition of various preset air gestures. Different gestures can correspond to different preset strategies, such as: air grab gesture → screenshot, air up / down gesture → page turning, air press gesture → answering a call.
[0142] For example, taking the air grabbing gesture as an example, the user changes from an extended palm state to a clenched fist state, and the control method corresponding to the gesture is preset to take a screenshot of the display interface of the electronic device. When the electronic device is in the screen-on state, the electronic device will automatically perform a screenshot operation when the air grabbing gesture is detected through the AON camera (front camera). Among them, the air grabbing gesture can also be called an air screenshot gesture, and the scene can be called an air screenshot scene.
[0143] For example, taking the air up / down gesture as an example, the fingers change from a close and unfolded state to a downward bent state (upward swipe gesture), and the control mode corresponding to the gesture is preset to turn the page up or slide the screen upward, and the fingers change from a close and bent state to an upward unfolded state (downward swipe gesture), and the control mode corresponding to the gesture is preset to turn the page down or slide the screen downward. When the electronic device is in the screen-on state, the electronic device will automatically perform the operation of turning the page up when the upward swipe gesture is detected through the AON camera (front camera), and will automatically perform the operation of turning the page down when the downward swipe gesture is detected, and the human-computer interaction can be completed without the user contacting the electronic device. Among them, the air up / down gesture can also be called an air sliding screen gesture, and the scene can be called an air sliding screen scene. Here, the air sliding screen gesture is explained by taking the upward or downward sliding gesture as an example. It can be understood that in actual implementation, the air sliding screen gesture can also be a left or right sliding gesture.
[0144] For another example, taking the air press gesture as an example, the user's palm approaches the screen of the electronic device from far to near, and the control mode corresponding to the gesture is preset to answer the call. When the electronic device receives the incoming call signal and displays the incoming call interface, the electronic device will automatically answer the call when it recognizes the air press gesture through the AON camera (front camera). This scenario can be called the air press scenario.
[0145] In addition, in an embodiment of the present application, the air gesture service also supports user-defined operations, for example, the user cancels the "air press gesture → answer the call" and resets it to "air press gesture → jump to the payment code interface".
[0146] Exemplarily, when the electronic device is in the screen-on state and the electronic device displays the main desktop, the user can trigger a predefined quick service through an air press gesture, such as quickly jumping from the main desktop to the payment code interface. In this scenario, the payment interface can be quickly called up through an air press gesture, so this scenario can be called a smart payment scenario. It should be noted that the user can also reset it to "air press gesture → jump to the scan interface" or "air press gesture → jump to the ride code interface" and so on.
[0147] It should be noted that the various services supported by the above-mentioned smart sensing application are illustrative examples. It can be understood that in actual implementation, the smart sensing application in the embodiment of the present application can also support other possible services, which can be determined based on actual usage requirements and are not limited by the embodiment of the present application.
[0148] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a camera management module, an AON management module, etc., and the present application embodiment does not impose any restrictions on this. In the present application embodiment, the application framework layer can also be referred to as the system middle platform framework layer.
[0149] The hardware abstraction layer is an encapsulation of the Linux kernel driver, providing an interface to the upper layer, hiding the hardware interface details of a specific platform and providing a virtual hardware platform for the operating system. In the embodiment of the present application, the hardware abstraction layer includes modules such as smart perception interface and service, business management, business conflict management, business capability management, AON camera management, distributor, smart perception client, and native platform client.
[0150] Among them, the intelligent perception interface and service module provides an interface program for the upper-level intelligent perception application to access the intelligent perception algorithm platform, and provides services related to the intelligent perception algorithm platform (also known as the intelligent perception algorithm integration framework). This application adds a set of proprietary AON services in the camera HAL to support the development of gesture recognition features from the platform software infrastructure.
[0151] Among them, the service management module is used to manage multiple services such as air gesture service, smart code recognition service, gaze without turning off the screen service, gaze to reduce the volume service, smart horizontal and vertical screen service, auxiliary photo service, and smart AOD service. In addition, the service management module can call the service conflict management module to make decisions.
[0152] Among them, the service conflict management module is used to make decisions on the services of the screen-on scene and the screen-off scene. The service conflict management module can make service judgments based on the service-related data monitored by the upper-level intelligent perception application: whether the service-related data is an image collected when the screen is on or when the screen is off. In some embodiments, if the service-related data is an image collected when the electronic device is in the screen-on state, the service management module can send the service-related data to the intelligent perception client. If the service-related data is an image collected when the electronic device is in the screen-off state and there are facial features in the image, the service management module can determine that the intelligent AOD service is triggered and send the service-related data to the intelligent perception client. Among them, the intelligent perception client has the functions of proxy and forwarding data.
[0153] Among them, the business capability management module is used to manage the capability information of each business supported by the intelligent perception algorithm platform. In some embodiments, the capability information of the business can be represented by numbers. For example, the capability value of the air gesture business is preset to 1, wherein the capability value of the air screenshot is preset to 1-1, the capability value of the air sliding screen is preset to 1-2, and the capability value of the air pressing is preset to 1-3. It should be noted that the capability information here is an exemplary example and can be set according to actual usage requirements, and the embodiments of this application are not limited thereto.
[0154] The AON camera management module is used to manage the relevant data of the AON camera. The AON camera management module can exchange data with the service conflict management module, and the AON camera management module can also exchange data with the service capability management module.
[0155] Specifically for this application, when a user triggers a service, the smart perception application can obtain the capability information of the service, and then the smart perception application registers and subscribes to the corresponding service with the smart perception algorithm platform according to the capability information of the service. After the service subscription is successful, the smart perception application will monitor in real time whether the service is triggered, and when the smart perception application perceives that the service is triggered, the smart perception application sends the service data to the smart perception algorithm platform, performs algorithm analysis through the smart perception algorithm platform, and then executes the service according to the analysis results.
[0156] The distributor is used to distribute the business-related data according to the instructions of the business management module.
[0157] The kernel layer is a layer between hardware and software. Exemplarily, the kernel layer may include display drivers, camera drivers, and sensor drivers.
[0158] Specific to the present application, the kernel layer may include API interface and sensor interface, intelligent perception algorithm integration framework (i.e., intelligent perception algorithm platform), and native AON algorithm platform.
[0159] The intelligent perception algorithm platform may include a decision unit, a control unit, and an execution unit, etc. These units work together to complete the low-power algorithm analysis of business-related data, obtain image analysis results, and report the image analysis results to the intelligent perception application. The intelligent perception algorithm platform and related functional modules can also be collectively referred to as a low-power subsystem.
[0160] This application makes improvements at the bottom layer of the mobile phone system and builds a new intelligent perception algorithm platform based on the original AON platform. Based on the support of the intelligent perception algorithm platform, the AON function can be applied to the gesture control screen scenario when the mobile phone is in the screen-on state. In the AON intelligent perception scenario, the AON camera (front camera) is always open and collects images to intelligently perceive user gestures and realize air-to-air screen operation, which greatly meets user needs and improves user experience.
[0161] It should be noted that in the embodiment of the present application, in the early preliminary gesture perception stage (first stage), the intelligent perception client performs image analysis on the business-related data to monitor whether the business-related data meets the preset business trigger conditions, so the image quality requirements are relatively low. In the later specific gesture recognition stage (second stage), the intelligent perception algorithm platform performs image analysis on the business-related data that meets the preset business trigger conditions to identify the specific business content, so the image quality requirements are relatively high.
[0162] In the first stage, the business-related data includes multiple consecutive frames of images, all of which are small in size and low in resolution, and the low-power TCM memory described above is used for data caching. In the second stage, the business-related data includes multiple consecutive frames of images, all of which are large in size and high in resolution, and the DDR memory with normal power consumption and the low-power TCM memory described above are used for data caching. The present application scheme can not only accurately monitor the business but also effectively reduce power consumption by performing image analysis in stages.
[0163] It should be noted that in the embodiment of the present application, based on the native AON algorithm platform, the main additions are intelligent perception services and intelligent perception algorithm integration framework. The present application combines the intelligent perception service and intelligent perception algorithm integration framework with the native AON algorithm platform to complete the low-power AON intelligent perception function and business.
[0164] On the one hand, the intelligent perception service provides a unified service interface to the outside world, supporting intelligent perception-related businesses to use the AON capabilities of the native AON algorithm platform; at the same time, the interface of the native AON algorithm platform is shielded, and the native interface is no longer open to the outside world.
[0165] On the other hand, the intelligent perception service relies on the platform communication channel to establish a complete business interaction with the intelligent perception algorithm integration framework to use the low-power computing capabilities of the AON camera and the native AON algorithm platform.
[0166] On the other hand, the intelligent perception algorithm integration framework integrates AON camera resources, traditional sensor data, and integrated business algorithms to build a unified low-power computing platform to support AON services.
[0167] The hardware layer provides various hardware devices, such as the hardware devices involved in the embodiments of this application include AON ISP, camera sensor, and camera head, etc. Among them, the camera head and camera sensor are used to collect images in real time, and AON ISP is used to process the image signals of the collected images. These hardware devices provide hardware support for the intelligent perception algorithm platform.
[0168] It should be noted that Figure 5 Only modules related to the embodiments of the present application are shown. Each layer may also include any other possible modules, and each module may also include one or more sub-modules, which are not limited in the present application.
[0169] It should also be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.
[0170] The following will be Figure 6 A timing diagram describing the interaction of each module in the above-mentioned technical architecture provided in an embodiment of the present application; wherein, the smart perception application, the framework layer module, the smart perception interface and the smart perception service module (collectively referred to as the smart perception interface and service module), the smart perception client, the smart perception algorithm platform and the AON camera (front camera) interact with each other, and exemplarily illustrates the process of an electronic device realizing AON smart perception through an AON camera (front camera).
[0171] S101, after the electronic device is turned on, the intelligent perception service module interacts with the intelligent perception client to start the camera provider process.
[0172] S102, the smart perception service module applies to register with the smart perception client.
[0173] S103: The smart sensing application receives an operation from a user to enable a smart sensing service.
[0174] It should be noted that the smart perception service here can be any of the following: air gesture service, smart code recognition service, staring without turning off the screen service, staring to reduce the volume service, smart horizontal and vertical screen service, auxiliary photo service, smart AOD service. Users can turn on or off one or more of the above functions according to actual usage needs. For the sake of convenience, the following is an example of a user triggering the opening of the air screenshot service.
[0175] S104, the smart perception application responds to the user triggering the operation of starting the air screenshot service, and queries the smart perception client for capability information of the air screenshot service.
[0176] The smart perception application sends a message to the framework layer module to query the service capability, and the framework layer module sends the message to the smart perception interface and service module, which then passes the message to the smart perception client. The smart perception client can call the capability management module to query the capability information of the remote screenshot service.
[0177] Among them, the capability values of different services are different. For example, the capability value of the air screenshot service is 1-1, the capability value of the air sliding screen service is 1-2, and the capability value of the air pressing service is 1-3.
[0178] S105: The smart perception client feeds back the queried business capability information to the smart perception application.
[0179] S106, the smart perception application registers the AON service event to the smart perception algorithm platform according to the business capability value.
[0180] Among them, the registered data flow starts from the intelligent perception application, passes through the framework layer module, the intelligent perception interface and service module, the intelligent perception client, and reaches the intelligent perception algorithm platform.
[0181] S107, the intelligent perception algorithm platform subscribes to the AON service event according to the business capability value.
[0182] For example, assuming that the service capability value is 1-1, as mentioned above, the capability value of the remote screenshot service is 1-1, then the AON service event subscribed by the intelligent perception algorithm platform is the remote screenshot service.
[0183] Among them, when subscribing to AON service events, the intelligent perception algorithm platform will use lower resolution image specifications, such as QQVGA (160×120) in some cases, and higher resolution image specifications, such as QVGA (320×240) in other cases according to needs. And the intelligent perception algorithm platform will use TCM memory for data caching in some cases according to needs, and use DDR memory and TCM memory for data storage in other cases.
[0184] The following S108-S117 is the cyclic execution process of AON intelligent perception.
[0185] S108, the AON camera (front camera) collects multiple continuous frames of images when the device screen is on and off, and transmits the collected multiple continuous frames of images to the intelligent perception algorithm platform.
[0186] S109, the intelligent perception algorithm platform obtains multiple consecutive frames of images with lower resolution, stores the images in the TCM memory, and analyzes the multiple consecutive frames of images.
[0187] For example, the AON camera outputs a relatively low-resolution image according to the QQVGA (160×120) specification. Accordingly, the intelligent perception algorithm platform obtains a relatively low-resolution image of the QQVGA (160×120) specification and performs image analysis.
[0188] S110, the intelligent perception algorithm platform determines whether the preset service triggering conditions are met based on the analysis results.
[0189] Exemplarily, the above-mentioned preset service triggering conditions may include: the image includes hand features, or the image includes QR code features, or the image includes human eye features, or the image includes human face features. It should be noted that the preset service triggering conditions here are exemplary and can be set according to actual usage requirements, and are not limited in the embodiments of this application.
[0190] For example, assuming that the analysis results show that there are hand features in the image and the preset service triggering conditions are met, then it can be determined that the air gesture service is triggered.
[0191] For another example, assuming that the analysis result shows that there are human eye features in the image and the preset service triggering condition is met, it can be determined that the smart gaze service is triggered.
[0192] S111: When it is determined according to the analysis result that the preset service triggering condition is not met, the smart perception client does not respond and releases an invalid frame.
[0193] After it is determined in S110 that the preset service triggering condition is met, S112 - S113 are continued to be executed, and after it is determined in S110 that the preset service triggering condition is met, S114 is continued to be executed.
[0194] S112, the smart perception client reports a message that the service is triggered to the smart perception application.
[0195] S113, the smart perception application displays prompt information corresponding to the triggered service on the screen.
[0196] S114, the intelligent perception algorithm platform obtains continuous multi-frame images with higher resolution, stores the images in DDR memory and TCM memory, and analyzes the continuous multi-frame images to obtain image analysis results.
[0197] For example, the AON camera outputs a high-resolution image in accordance with the QVGA (320×240) specification. Accordingly, the intelligent perception algorithm platform obtains a high-resolution image in the QVGA (320×240) specification and performs image analysis.
[0198] It should be noted that DDR memory and TCM memory run in different hardware cache areas. DDR memory can access data in TCM memory, but TCM memory does not support access to data in DDR memory.
[0199] S115, the intelligent perception algorithm platform reports the image analysis result to the intelligent perception application.
[0200] S116, the intelligent perception application responds according to the preset strategy corresponding to the image analysis result.
[0201] For example, after analyzing multiple consecutive frames of images, it is found that the user's gesture is specifically a grasping gesture, that is, the image analysis result is a grasping gesture, and the preset strategy corresponding to the grasping gesture is air screenshot. Therefore, the smart perception application responds according to the preset strategy corresponding to the grasping gesture, such as air screenshot.
[0202] The above describes the process of the user triggering the opening of the smart perception function and executing the AON smart perception. In some embodiments, the user can trigger the closing of the smart perception service according to the usage requirements. For the specific process, see S117-S119 below.
[0203] S117: The smart sensing application receives an operation from the user to close the smart sensing service.
[0204] The smart perception function here may include any of the following: air gesture service, smart code recognition service, staring without turning off the screen service, staring to reduce the volume service, smart horizontal and vertical screen service, auxiliary photo service, smart AOD service. Users can turn off one or more of the above functions according to actual usage needs. For the sake of convenience, the following is an example of a user triggering the closure of the air screenshot service.
[0205] S118, in response to the user operation, the smart perception application sends a message to the smart perception algorithm platform to cancel the AON service event.
[0206] S119, the intelligent perception algorithm platform stops subscribing to AON service events.
[0207] Exemplarily, the AON service event is the air screenshot service. After stopping the subscription to the air screenshot service, the air screenshot service will not be triggered, that is, the mobile phone will no longer respond to the air screenshot gesture with a screenshot.
[0208] Based on the above Figure 5 The software architecture shown, combined with Figure 6 The timing diagram shown in the figure illustrates the business perception and recognition in the image processing method provided by the embodiment of the present application from the local perspective of the newly added intelligent algorithm platform. Figure 7 The flow chart shown explains the image processing method provided in the embodiment of the present application from the overall perspective of the native AON algorithm platform and the newly added intelligent algorithm platform.
[0209] First of all, it should be noted that the native AON algorithm platform supports processing services including face unlocking screen services, and the newly added smart algorithm platform supports processing services including air gesture services, intelligent code recognition services, staring at the screen without turning off the screen services, staring at the screen to lower the volume services, smart horizontal and vertical screen services, assisted photo taking services, and smart screen off display services.
[0210] S201, collecting multiple continuous frames of images in real time through the AON camera (front camera) of the electronic device.
[0211] S202, acquiring a plurality of continuous image frames of relatively low resolution (eg, QQVGA specification), using a low-power TCM memory for data buffering, and analyzing the plurality of continuous image frames.
[0212] Among them, the AON camera (front camera) outputs high-resolution images according to the QVGA (320×240) specification. Correspondingly, the intelligent perception algorithm platform obtains high-resolution images of the QVGA (320×240) specification and performs image analysis.
[0213] S203: Determine whether a first preset trigger condition is met according to the image analysis result.
[0214] Among them, whether a service is triggered can be determined by judging whether the analysis result meets the first preset trigger condition.
[0215] Exemplarily, the first preset trigger condition may be any one of the following: the image contains the first preset feature, and the image is captured when the screen is on and unlocked; or the image contains the first preset feature, and the image is captured when the screen is off. The first preset feature may include any one of a face feature, an eye feature, a gesture feature, and a QR code feature.
[0216] On the one hand, when S204 determines that the first preset trigger condition is met, the following S204-S207 are continued to be executed. That is, the business data is processed through the newly added intelligent perception algorithm platform. As mentioned above, the preset services supported by the newly added intelligent perception algorithm platform may include air gesture service, intelligent code recognition service, staring without turning off the screen service, staring to reduce the volume service, intelligent horizontal and vertical screen service, auxiliary photography service, and intelligent AOD service.
[0217] S204, acquiring continuous multi-frame images with a relatively high resolution (eg, QVGA specification), and using DDR memory and TCM memory for data buffering.
[0218] S205, analyzing multiple consecutive image frames through the newly added intelligent perception algorithm platform to obtain image analysis result 1.
[0219] S206, the newly added intelligent perception algorithm platform reports the image analysis result 1 to the application layer.
[0220] S207 , responding according to the preset strategy corresponding to the image analysis result 1 .
[0221] For example, multiple frames of continuous images captured by the front camera are analyzed. At this time, the multiple frames of continuous images use low-resolution images and are cached in low-power memory. If it is found that the multiple frames of continuous images meet the first preset trigger condition, it can be determined that a service is triggered. For example, the multiple frames of continuous images include QR code features, so it can be determined that the triggered service is an intelligent code recognition service. Through judgment, it can be known that the intelligent code recognition service is a preset service in the newly added intelligent perception algorithm platform, so the service analysis task is assigned to the newly added intelligent perception algorithm platform, and the newly added intelligent perception algorithm platform performs image analysis on the multiple frames of continuous images. At this time, the multiple frames of continuous images use high-resolution images and are cached in normal power consumption memory and low power consumption memory.
[0222] On the other hand, when S204 determines that the first preset trigger condition is not met, the following S208-S212 are continued to be executed, that is, the business data is processed through the native AON algorithm platform.
[0223] S208: First determine whether a second preset trigger condition is met based on the image analysis result.
[0224] Exemplarily, the second preset trigger condition is that the image contains facial features and the image is captured when the screen is on and locked.
[0225] S209, when it is determined that the second preset trigger condition is met, a plurality of continuous frames of images with a relatively high resolution (eg, VGA specification) are acquired, and DDR memory is used for data caching.
[0226] S210, analyzing multiple consecutive image frames through the native AON algorithm platform to obtain image analysis result 2.
[0227] S211, the native AON algorithm platform reports the image analysis result 2 to the application layer.
[0228] S212, responding according to the preset strategy corresponding to the image analysis result 2.
[0229] For example, the multi-frame continuous images collected by the front camera are analyzed. At this time, the multi-frame continuous images use low-resolution images and are cached in low-power memory. If it is found that the multi-frame continuous images meet the first preset trigger condition, it can be judged that a service is triggered. For example, the multi-frame continuous images collected when the electronic device is on and locked include facial features, so it can be judged that the triggered service is the face unlocking screen service. Through judgment, it can be known that the face unlocking screen service is a preset service in the native AON algorithm platform, so the service analysis task is assigned to the native AON algorithm platform, and the native AON algorithm platform performs image analysis on the multi-frame continuous images. At this time, the multi-frame continuous images use high-resolution images and are cached using normal power consumption memory and low power consumption memory.
[0230] It should be noted that in the embodiment of the present application, when it is determined that neither the first preset trigger condition nor the second preset trigger condition is met, that is, when no service is triggered, the captured continuous multiple frames of images are discarded, and then the above S201 is returned to execute.
[0231] Among them, the embodiment of the present application realizes AON intelligent perception through the newly added intelligent perception algorithm platform and the native AON algorithm platform. Among them, the image processing process completed by the intelligent perception algorithm platform can be divided into two stages:
[0232] The first stage: As in S201-S203 above, a rough analysis is performed on the multiple frames of continuous images captured by the front camera to determine whether the multiple frames of continuous images meet the first preset trigger condition to determine whether a service is triggered. In the first stage, the multiple frames of continuous images are low-resolution images, and low-power memory is used for data caching.
[0233] The second stage: As in S204-S207 above, the multiple frames of continuous images captured by the front camera are precisely analyzed to identify the specific content of the triggered service. In the second stage, the multiple frames of continuous images are high-resolution images, and normal power consumption memory and low power consumption memory are used together for data caching.
[0234] Above Figure 5-Figure 7 The software architecture of the AON function implemented by the newly added intelligent perception algorithm platform in the embodiment of the present application and the timing diagram of the interaction between the modules are introduced from different angles. Figure 8 and Fig. 9 From the perspective of the air gesture business, the software architecture of the air gesture recognition function implemented by the newly added intelligent perception algorithm platform in the embodiment of the present application and the timing diagram of the interaction between the modules are introduced.
[0235] exist Figure 8 In the software framework shown, at the hardware abstraction layer, the smart perception application sends the air gesture service to the service management module, and then the service management module sends the air gesture service to the smart perception client, and then the smart perception client sends the air gesture service to the smart perception algorithm platform.
[0236] With the above Figure 6 The modules embodied in the software framework shown are different in that Figure 8 The kernel layer in the software framework shown in the figure adds the intelligent perception engine module and algorithm library. The intelligent perception engine module includes the intelligent perception decision module (gesture decision) and the gesture control module. The algorithm library provides gesture algorithm 1 and gesture algorithm 2. In implementation, after the intelligent perception algorithm platform receives the air gesture service sent by the upper layer, the intelligent perception algorithm platform instructs the intelligent perception engine module to make gesture decisions, and then the gesture control module performs gesture recognition: calling gesture algorithm 1 to perform image analysis on the continuous multiple frames of images cached in the TCM memory to determine whether there are hand features and starting gestures; if it is determined that there are hand features and starting gestures, then calling gesture algorithm 2 to perform image analysis on the continuous multiple frames of images cached in the DDR memory and TCM memory to identify specific gestures.
[0237] In addition, Figure 6 The modules embodied in the software framework shown are different in that Figure 8The hardware layer in the software framework shown in the figure adds a data acquisition module, which includes an ambient light sensor and a proximity light sensor. The ambient light sensor can be used to sense the brightness of the ambient light, and judge whether the screen of the electronic device is upside down on the desktop according to the perceived brightness of the ambient light. The proximity sensor is used to judge whether the screen of the electronic device is blocked. The data acquisition module can report the collected data of the ambient light sensor and the proximity sensor to the gesture control module, and the gesture control module judges whether to start the gesture recognition service according to the collected data. In some embodiments, the first stage of the detection process is started only when it is determined that the screen of the electronic device is not blocked and the screen of the electronic device is not upside down on the desktop. In other embodiments, the first stage of the detection process is started only when it is determined that the screen of the electronic device is not blocked.
[0238] It should be noted that Figure 8 Only modules related to the embodiments of the present application are shown. Each layer may also include any other possible modules, and each module may also include one or more sub-modules, which are not limited in the present application.
[0239] The following will be combined Fig. 9 describe Figure 8 The timing diagram of the interaction of each module in the technical architecture provided; among them, the interactive modules include smart perception application, smart perception system and smart perception algorithm platform. Among them, the smart perception system includes framework layer module, smart perception interface and smart perception service module and smart perception client. For the convenience of explanation, Fig. 9 Modules such as the AON camera (front camera) are omitted.
[0240] pass Fig. 9 The process of enabling, applying, and disabling the air gesture service in the AON smart sensing scenario is exemplified. Fig. 9 As shown, the process of enabling the air gesture service includes S301-S310, the process of applying the air gesture service includes S311-S314, and the process of disabling the air gesture service includes S318-S323.
[0241] S301, after the electronic device is turned on, the intelligent sensing system is initialized.
[0242] Referring to the above S101, after the electronic device is turned on, the smart perception service module interacts with the smart perception client to start the camera provider process.
[0243] S302, the intelligent perception system and the intelligent perception algorithm platform initialize interaction and complete configuration loading.
[0244] S303: The smart perception application receives an operation from the user to enable the air gesture service.
[0245] For example, Fig.10 The figure shows a schematic diagram of the interactive interface for users to start the air gesture service. Fig.10 As shown in (a) and (b) of FIG. 1 , the electronic device displays the main settings interface in response to the user clicking the settings application icon on the desktop. The auxiliary function options are displayed in the main settings interface. Fig.10 As shown in (b) and (c) of FIG. 1 , the electronic device displays an accessibility interface in response to the user clicking on the accessibility option. The accessibility interface displays a smart perception option. Fig.10 As shown in (c) and (d), the electronic device displays the smart perception setting interface in response to the user clicking the smart perception option.
[0246] like Fig.10 As shown in (d) in the figure, the air gesture setting bar and other setting bars are displayed in the smart perception setting interface. The air gesture setting bar includes a switch for air sliding the screen, a switch for air screenshot, a switch for air pressing, and a switch for smart payment. The electronic device responds to the user clicking the switch in the air gesture setting bar to turn on or off some or all of the sub-services in the air gesture service.
[0247] S304: In response to the user triggering an operation to start the air gesture service, the smart perception application queries the smart perception system for a capability value of the air gesture service.
[0248] The capability values of different services are different. For example, the capability value of the air gesture service is 1, the capability value of the air screenshot service is 1-1, the capability value of the air sliding screen service is 1-2, and the capability value of the air pressing service is 1-3.
[0249] S305: The intelligent perception system feeds back the queried capability value to the intelligent perception application.
[0250] S306, the smart perception application applies to the smart perception system for registration of the air gesture service according to the capability value.
[0251] Accordingly, the intelligent perception system registers the air gesture service.
[0252] S307, the intelligent perception system applies to the intelligent perception algorithm platform for subscription to the air gesture service.
[0253] S308, the intelligent perception algorithm platform subscribes to the air gesture service according to the service capability value.
[0254] Exemplarily, the air gesture service includes sub-services such as air screenshot service, air sliding screen service and air pressing service. Optionally, all sub-services in the air gesture service can be subscribed at one time, or one or more sub-services in the air gesture service can be subscribed.
[0255] For example, when the service capability value is 1-1, the intelligent perception algorithm platform subscribes to the remote screenshot service according to the service capability value.
[0256] For example, when the service capability value is 1-2, the intelligent perception algorithm platform subscribes to the air sliding screen service according to the service capability value.
[0257] For example, when the service capability value is 1-3, the intelligent perception algorithm platform subscribes to the air pressing service according to the service capability value.
[0258] For example, when the service capability value is 1, the intelligent perception algorithm platform subscribes to the air gesture service according to the service capability value. In this case, all air gesture services such as air screenshot service, air sliding screen service and air pressing service will be subscribed.
[0259] Among them, when subscribing to the air gesture service or any sub-service, the intelligent perception algorithm platform will use images and memories of different specifications at different stages. On the one hand, in the first stage, a lower-resolution image of QQVGA (160×120) is obtained; in the second stage, a higher-resolution image of QVGA (320×240) is obtained. On the other hand, in the first stage, the intelligent perception algorithm platform uses TCM memory for data caching; in the second stage, DDR memory and TCM memory are used together for data storage.
[0260] S309, the intelligent perception algorithm platform returns a subscription success message to the intelligent perception system.
[0261] S310, the intelligent perception system feeds back a registration success message to the intelligent perception application.
[0262] The following S311-S317 is a cyclic detection process of the gesture recognition service.
[0263] S311, the intelligent perception algorithm platform obtains multiple consecutive frames of images captured by the front camera.
[0264] The AON camera (front camera) captures multiple consecutive frames of images when the device screen is on. According to the instructions of the intelligent perception algorithm platform, the captured multiple consecutive frames of images are output according to the QQVGA (160×120) specification to obtain lower resolution images, and the images are passed to the intelligent perception algorithm platform.
[0265] S312, the intelligent perception algorithm platform uses low-resolution images to detect whether there is a gesture and the starting gesture, and uses TCM memory for data caching.
[0266] In the implementation of this application, the intelligent perception algorithm platform stores the acquired low-resolution images in the TCM memory, and analyzes the continuous multi-frame low-resolution images to detect whether there is a gesture and the starting gesture.
[0267] Then, the intelligent perception algorithm platform determines whether the preset service triggering condition is met according to the analysis result. For example, the preset service triggering condition may include: the image includes hand features.
[0268] In some embodiments, when it is determined based on the analysis results that the preset service triggering conditions are not met, the intelligent perception algorithm platform does not respond and releases an invalid frame.
[0269] In other embodiments, assuming that the analysis result shows that there are hand features in the image and the preset service triggering conditions are met, it can be determined that the air gesture service is triggered, and then S313 is executed.
[0270] S313, the intelligent perception algorithm platform reports the service triggered message to the intelligent perception application.
[0271] S314, the smart perception application displays prompt information corresponding to the air gesture service on the screen.
[0272] For example, Fig.11 Schematic diagram of the interactive interface when the air gesture service is triggered. Fig.11 As shown in (a) in FIG. 1 , the front camera captures an image of the user's open palm. After image analysis, it can be determined that the air gesture service is triggered. At this time, the mobile phone screen can display an image of the open palm 11. Fig.11 As shown in (b) in the figure, the front camera captures the image of the user's folded and unfolded hands. After image analysis, it can be determined that the air gesture service triggered by the user is specifically the air screenshot service. Accordingly, the mobile phone screen can display an image 12 of the folded palms and a prompt message "screenshot in progress". Therefore, after the user sees the prompt message displayed on the mobile phone, he can know that the air gesture he made is being recognized by the mobile phone, which improves the user's interactive experience.
[0273] In addition, when S312 determines that the air gesture service is triggered, the following S315 will also be executed. Before executing S315, the intelligent perception algorithm platform sends a message to the AON camera, instructing the AON camera to output the collected continuous multi-frame images according to the QVGA (210×240) specification. Correspondingly, the AON camera (front camera) outputs the collected continuous multi-frame images according to the QVGA (210×240) specification according to the instructions of the intelligent perception algorithm platform, obtains a higher resolution image, and passes the image to the intelligent perception algorithm platform.
[0274] S315, the intelligent perception algorithm platform uses high-resolution images to recognize specific gestures, and uses DDR memory and TCM memory for data caching.
[0275] Among them, the intelligent perception algorithm platform obtains continuous multi-frame images with higher resolution of QVGA (320×240) specifications, stores the images in DDR memory and TCM memory, and analyzes the continuous multi-frame images to obtain image analysis results.
[0276] S316, the intelligent perception algorithm platform reports the gesture recognition result to the intelligent perception application.
[0277] S317, the intelligent perception application responds according to the preset strategy corresponding to the gesture recognition result, such as taking a screenshot / turning a page.
[0278] For example, after analyzing multiple consecutive frames of images, it is found that the user's gesture is specifically a grasping gesture, that is, the gesture recognition result is a grasping gesture, and the preset strategy corresponding to the grasping gesture is air screenshot. Therefore, the smart perception application responds according to the preset strategy corresponding to the grasping gesture, that is, air screenshot.
[0279] The above describes the process of the user triggering the opening of the air gesture service and executing the air gesture service. In some embodiments, the user can trigger the closing of the air gesture service according to the usage requirements. For the specific process, see S318-S323 below.
[0280] S318, the smart perception application receives the user's operation to close the air gesture service.
[0281] S319, in response to the user operation, the smart perception application sends a message to the smart perception system requesting to cancel the air gesture service.
[0282] Accordingly, the intelligent perception system cancels the air gesture service.
[0283] S320, the intelligent perception system sends a message to the intelligent perception algorithm platform to cancel the subscription to the air gesture service.
[0284] S321, the intelligent perception algorithm platform stops subscribing to the air gesture service.
[0285] For example, after stopping subscribing to the air screenshot service, the air screenshot service will not be triggered, that is, the mobile phone will no longer respond to the air screenshot gesture with a screenshot.
[0286] For example, after stopping subscribing to the air gesture service, all air gesture services will not be triggered, that is, the mobile phone will no longer take screenshots in response to air gestures.
[0287] S322, the intelligent perception algorithm platform reports the successful cancellation of subscription to the intelligent perception system.
[0288] S322, the smart perception system reports a successful logout message to the smart perception application.
[0289] Based on the above Figure 8 The software architecture shown, combined with Fig. 9 The timing diagram shown in FIG. 1 illustrates the method for air gesture recognition provided by the embodiment of the present application. Fig.12 The flowchart shown further illustrates the specific implementation process of the air gesture recognition method provided in the embodiment of the present application.
[0290] S401, the electronic device starts the air gesture service in response to the user's operation on the air gesture switch.
[0291] S402, the electronic device determines whether the screen is in a light-on and unlocked state.
[0292] Optionally, when it is determined that the screen is in the light screen and unlocked state, continue to execute the following S403, or when it is determined that the screen is in the light screen and unlocked state, continue to execute the following S404. When it is determined that the screen is not in the light screen and unlocked state, return to execute S401.
[0293] S403, the electronic device determines whether the proximity light sensor is not blocked and whether the screen is not inverted.
[0294] The electronic device can determine whether the proximity light sensor is blocked based on the detection data of the proximity light sensor. The electronic device can determine whether the screen is inverted based on the detection data of the ambient light sensor.
[0295] If the electronic device determines that the proximity light sensor is not blocked and the screen is not inverted, it continues to execute the following S404.
[0296] If the electronic device determines that the proximity light sensor is blocked or the screen is turned upside down (facing downward), it returns to execute the above S402.
[0297] S404, the electronic device starts hand presence detection, uses low-resolution images for analysis, and uses TCM memory for data caching.
[0298] S405, the electronic device determines whether there are hand features in the image through hand detection.
[0299] If it is determined that there are hand features in the image, then the following S406 is continued to be executed. If it is determined that there are no hand features in the image, then the following S402 is returned to be executed.
[0300] S406: Whether the electronic device recognizes the starting gesture and whether the gesture changes.
[0301] If the starting gesture is recognized within a certain time and the gesture changes, then continue to execute the following S407. If the starting gesture is not recognized within a certain time, or if the starting gesture is recognized within a certain time but the gesture does not change, then return to execute the above S402.
[0302] S407, the electronic device starts specific gesture recognition, uses high-resolution images for analysis, and uses DDR memory and TCM memory for data cache.
[0303] Among them, electronic devices can use hand key point matching technology to perform specific gesture recognition.
[0304] S408: The electronic device determines whether a specific gesture is recognized within a preset time period.
[0305] If the specific gesture is recognized within the preset time, the following S409 is continued to be executed. If the specific gesture is not recognized within the preset time, the above S402 is returned to be executed.
[0306] S409, the electronic device reports the gesture recognition result to the smart perception application.
[0307] S410, the intelligent perception application responds according to a preset strategy corresponding to the gesture recognition result.
[0308] For example, when the gesture recognition result is an air sliding screen gesture, the electronic device responds by sliding the screen according to the prediction strategy corresponding to the air sliding screen gesture, for example, the electronic device controls the screen display content to turn the page up or down.
[0309] For another example, when the gesture recognition result is a grasping gesture, the electronic device responds with a screenshot according to the prediction strategy corresponding to the grasping gesture.
[0310] Next, combine Fig.13 The flow chart shown further illustrates the air gesture recognition method provided in the embodiment of the present application.
[0311] S501, the system initializes and starts the air gesture service.
[0312] Among them, users can turn on the air gesture switch in the system application to trigger the air gesture function, that is, start the air gesture service.
[0313] It should be noted that the air gesture service is applied to the screen-on unlocking scenario. When it is detected that the screen-on unlocking condition is met, it is determined whether the two conditions in S502 are met.
[0314] S502, determining whether the proximity light sensor is not blocked and whether the screen is not inverted.
[0315] The determination method of S502 mentioned above can refer to the determination method of S503 mentioned above, and will not be described in detail here.
[0316] If it is determined that the proximity light sensor is not blocked and the screen is not inverted, the following S503-S505 are continued to be executed, that is, the hand detection is started, and the AON camera outputs the image at an extremely low frame rate (such as 2fps~5fps).
[0317] S503, the AON camera continuously acquires images, the frame rate is 5fps, and the image size is QQVGA (160×120).
[0318] It should be noted that the frame rate of 5fps is an exemplary example. In actual implementation, other possible frame rates may also be used, such as a frame rate of 30fps.
[0319] S504, performing hand presence detection.
[0320] Exemplarily, three consecutive frames of images are acquired each time and analyzed. That is, hand detection is performed once for every three frames of images. It should be noted that the hand detection is performed once for three consecutive frames as an example. In actual implementation, the number of frames may also take other possible values.
[0321] S505: Determine whether there is a hand feature in the image.
[0322] Among them, whether there are hand features in the image is determined by performing hand detection.
[0323] S506, when it is determined that there are hand features in the image, the frame rate is adjusted to 10fps.
[0324] It should be noted that the frame rate of 10fps is an exemplary example, and other possible frame rates may also be used in actual implementation.
[0325] S507, executing start gesture detection.
[0326] If hand features are detected, the AON camera frame rate is increased to 10fps, and it is determined whether the hand features meet the starting gesture. In some embodiments, if the starting gesture is not recognized for 2 consecutive seconds, the detection is stopped. Exemplarily, the starting gesture is the palm open state, or other possible gesture states.
[0327] Exemplarily, three consecutive frames of images are analyzed to complete one start gesture detection.
[0328] S508: Determine whether the initial gesture state has changed.
[0329] For example, the initial gesture state changes from an open palm state to a grasping state, or other possible gesture state changes.
[0330] S509: When it is determined that the state of the initial gesture has changed, it is determined whether there are changes in three consecutive initial gesture detections.
[0331] It should be noted that, three consecutive start gesture detections are used as an example for description. In actual implementation, the number of detections may also take other possible values.
[0332] S510: When it is determined that there are changes in the initial gesture detections for three consecutive times, a change in the initial gesture is reported.
[0333] Among them, after reporting the change of the starting gesture to the smart perception application, prompt information corresponding to the air gesture service can be displayed on the screen, such as an image of the dynamic change of the user's gesture.
[0334] S511, when it is determined that there are changes in the initial gesture detections for three consecutive times, specific gesture recognition is performed, the frame rate is 10fps, and the image specification is QVGA (320×240).
[0335] Exemplarily, 10 consecutive frames of images are acquired each time, and the consecutive 10 frames of images are analyzed. That is, a specific gesture recognition is performed once for every 10 frames of images. It should be noted that the specific gesture recognition is performed once for 10 consecutive frames as an example. In actual implementation, the number of frames can also take other possible values. It should also be noted that the frame rate of 10fps is an exemplary example. In actual implementation, other possible frame rates can also be used.
[0336] S512: Whether a specific gesture is recognized.
[0337] In some embodiments, if a specific gesture is not recognized for 2 consecutive seconds, detection is stopped.
[0338] S513: When a specific gesture is recognized, feature point matching is performed.
[0339] S514: Verify the gesture recognition result.
[0340] S515: Determine whether the gesture recognition result is a valid gesture.
[0341] S516: When the gesture recognition result is determined to be a valid gesture, the gesture recognition result is reported to the smart perception application.
[0342] The smart perception application then responds based on the preset strategy corresponding to the gesture recognition result.
[0343] Exemplarily, if the gesture recognition result is a grasping gesture, the corresponding preset strategy is screenshot, that is, capturing the current interface. Fig.14 (a), (b) and (c) show interface schematic diagrams of the remote screenshot scenario applied in the embodiments of the present application.
[0344] Exemplarily, if the gesture recognition result is an air sliding screen gesture, the corresponding preset strategy is sliding the screen or turning the page. Fig.15 (a) and (b) show interface diagrams of the air sliding screen scenario applied in an embodiment of the present application.
[0345] Exemplarily, if the gesture recognition result is an air press gesture, the corresponding preset strategy is: when an incoming call signal is received, confirm answering the call through an air press gesture. Fig.16 (a), (b) and (c) show interface diagrams of the air press-answer call scenario applied in an embodiment of the present application.
[0346] Exemplarily, if the gesture recognition result is an air press gesture, the corresponding preset strategy is: when the electronic device displays the desktop, the air press gesture is used to trigger a quick jump to the payment code interface. Fig.17 (a), (b) and (c) show the interface schematic diagrams of the air press-smart payment scenario applied in the embodiments of the present application.
[0347] In an embodiment of the present application, a detection threshold is set to implement timeout detection. If no hand features are detected or no specific gestures are recognized within a continuous period of time, frame detection is stopped to save power consumption.
[0348] In the embodiment of the present application, the triggered service is assigned to the newly added intelligent perception algorithm platform in the screen-on scene, and the newly added intelligent perception algorithm platform performs image analysis to obtain gesture recognition results, and then responds according to the preset strategy corresponding to the gesture recognition results. Therefore, the air gesture recognition method provided in the embodiment of the present application can recognize user gestures more accurately with lower power consumption, thereby improving the user experience.
[0349] The following Table 1 shows the various power consumptions and total power consumption when the present application solution is applied to different services or features. As shown in Table 1, assuming that the output resolution is 320×240 and the frame rate is 10, the total power consumption of the air gesture scene is 19.03 milliamperes (mA). When the relevant technology is used, the total power consumption of the air gesture scene is approximately 100mA. It can be seen that the present application solution has low power consumption when applied to gesture recognition features, realizing low-power gesture recognition services.
[0350] Table 1
[0351]
[0352] In an embodiment of the present application, after the air gesture function is turned on, in the bright screen scene, after the preset gesture trigger condition is recognized to be met, if the query platform gesture recognition service capability is turned on, then enter the smart perception service, load the configuration, enter the integrated framework of the AON camera, request the platform to output image frames of specific image specifications, and then perform gesture recognition through the preset gesture algorithm. It should be noted that the functions of AON camera continuous frame output, gesture algorithm and detection result reporting are integrated in the sensor control center (SensorHub), and run in low power mode at the same time, so as to achieve the low power consumption effect of the whole system. In the algorithm model training, while ensuring the accuracy, first select QQVGA (160 * 120) to detect whether there are hand features and starting gestures, and then use QVGA (320 * 240) to identify specific gestures when hand features and starting gestures are detected.
[0353] After the air gesture service is enabled, the SensorHub starts to collect sensor (Senor) data, and uses data collection modules such as the ambient light sensor and the proximity light sensor to determine whether the current conditions meet the conditions that the proximity light sensor is not blocked and the screen is not inverted. Subscribe to the air gesture service with the minimum frame rate and minimum image resolution that meet the current business requirements, obtain continuous multi-frame images from the platform, and obtain the current frame detection result through gesture recognition algorithm detection.
[0354] In the first stage, it runs in low-power mode on the SensorHub side and on TCM memory. The image specification is QQVGA and the frame rate is 10fps. It is mainly used for hand detection and start gesture detection.
[0355] In the second stage, the specific strategy is that the algorithm integration channel continues to detect for 500ms. If gestures can be detected in N consecutive frames of data during this period, the sensor will switch to the normal power consumption mode on the SensorHub side, running on TCM+DDR memory, with an image specification of QVGA and a frame rate of 10fps, mainly used for specific gesture detection. If the continuous frame detection time exceeds 500ms and gestures cannot be detected in 3 consecutive frames of data, the frame will stop and the result of no gesture detection will be reported.
[0356] It should be noted that, in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or "greater than or equal to" can be replaced by "greater than", and "less than" can be replaced by "less than or equal to".
[0357] The various embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the protection scope of this application.
[0358] The above mainly describes the solution provided by the embodiment of the present application from the perspective of method steps. It is understandable that, in order to achieve the above functions, the electronic device implementing the method includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of protection of the present application.
[0359] The present application also provides a chip, which is coupled to a memory and is used to read and execute computer programs or instructions stored in the memory to execute the methods in the above embodiments.
[0360] The present application also provides an electronic device, which includes a chip, and the chip is used to read and execute a computer program or instruction stored in a memory, so that the method in each embodiment is executed.
[0361] This embodiment also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the air gesture recognition method in the above-mentioned embodiment.
[0362] This embodiment also provides a computer program product, wherein the computer-readable storage medium stores program code. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement the air gesture recognition method in the above-mentioned embodiment.
[0363] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the air gesture recognition method in the above-mentioned method embodiments.
[0364] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0365] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0366] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for air gesture recognition, the method being applied to an electronic device, characterized in that: The method comprises: Receiving a first operation from a user; In response to the first operation, the air gesture function is turned on, wherein after the air gesture function is turned on, the camera module of the electronic device is in a working state; receiving a second operation from the user; After the second operation, controlling the camera module to collect multiple frames of first images of a first size; Analyzing the multiple frames of first images; When the analysis results of the multiple frames of first images meet the preset gesture trigger condition, control the camera module to collect multiple frames of second images of a second size; the multiple frames of second images include images with the same content as the multiple frames of first images but different sizes; Performing gesture recognition according to the multiple frames of second images to obtain a gesture recognition result; Responding based on a preset strategy corresponding to the gesture recognition result; The resolution corresponding to the first size specification is lower than the resolution corresponding to the second size specification.
2. The method according to claim 1, characterized in that The method further comprises: After the control camera module acquires a plurality of frames of first images of a first size, a first memory is used to cache the plurality of frames of first images; After controlling the camera module to capture multiple frames of second images of a second size, using a second memory to cache at least part of the multiple frames of second images; Wherein, in the case of storing the same image, the power consumption caused by the first memory is less than the power consumption caused by the second memory.
3. The method according to claim 2, characterized in that The step of using a second memory to cache at least part of the plurality of frames of second images comprises: All the images in the plurality of frames of second images are stored in the second memory.
4. The method according to claim 2, characterized in that: The step of using a second memory to cache at least part of the plurality of frames of second images comprises: storing a portion of the plurality of frames of second images in the second memory, and storing another portion of the plurality of frames of second images in the first memory; The first memory and the second memory respectively run in different hardware cache areas, and the second memory supports access to data in the first memory.
5. The method according to claim 4, characterized in that The power consumption caused by the first memory and the second memory storing the multiple frames of second images respectively is less than the power consumption caused by the second memory storing all the images of the multiple frames of second images.
6. The method according to any one of claims 2 to 5, characterized in that The first memory is a tightly coupled memory TCM, and the second memory is a double data rate synchronous dynamic random access memory DDR.
7. The method according to any one of claims 1 to 6, characterized in that The second size specification is QVGA, and the corresponding resolution is 320×240; The first size specification is QQVGA, and the corresponding resolution is 160×120.
8. The method according to any one of claims 1 to 7, characterized in that The camera module is a front camera; The controlling the camera module to collect multiple frames of first images of a first size specification includes: controlling the front camera to collect images and outputting the multiple frames of first images of the first size specification at a first frame rate; Controlling the camera module to capture multiple frames of second images of a second size, including: controlling the front camera to capture images and outputting multiple frames of second images of the second size at a second frame rate; The second frame rate is greater than the first frame rate.
9. The method according to any one of claims 1 to 8, characterized in that The second operation is an air gesture operation, and the preset gesture triggering condition includes that there are hand features and a starting gesture in the multiple frames of first images, and the starting gesture state changes.
10. The method according to any one of claims 1 to 9, characterized in that The method further includes: determining whether the analysis results of the plurality of frames of first images meet a preset gesture trigger condition; The step of determining whether the analysis results of the plurality of frames of the first image meet a preset gesture trigger condition includes: Acquire N consecutive frames of images from the plurality of frames of first images according to a preset first sampling period to analyze whether there are hand features in the plurality of frames of first images; After determining that there are hand features in the multiple frames of first images, acquiring M consecutive frames of images from the multiple frames of first images according to a preset second sampling period to analyze whether there is a starting gesture in the multiple frames of first images; If it is determined for S consecutive times that there is a starting gesture in the multiple frames of first images and the state of the starting gesture changes, it is determined that the analysis results of the multiple frames of first images meet the preset gesture trigger condition.
11. The method according to any one of claims 1 to 10, characterized in that The performing gesture recognition according to the plurality of frames of second images to obtain a gesture recognition result includes: Acquire T consecutive frames of images from the plurality of frames of second images according to a preset third sampling period to identify specific gestures in the plurality of frames of first images; Recognize specific gestures within a preset time period; When it is determined that the specific gesture is one of the preset multiple gestures, the gesture recognition result is generated according to the specific gesture.
12. The method according to claim 11, characterized in that The responding based on a preset strategy corresponding to the gesture recognition result includes: When the gesture recognition result is a first gesture and the corresponding first preset strategy is air screenshot, taking a screenshot of the screen display content of the electronic device according to the first preset strategy; When the gesture recognition result is a second gesture and the corresponding second preset strategy is air sliding the screen, turning a page of the screen display content of the electronic device according to the second preset strategy; When the gesture recognition result is a third gesture and the corresponding third preset strategy is to answer the call remotely, when the electronic device receives an incoming call signal, the call is automatically answered according to the third preset strategy; When the gesture recognition result is the third gesture and the corresponding fourth preset strategy is wireless payment, when the screen of the electronic device displays the desktop, it automatically jumps from the desktop to the interface containing the payment code according to the fourth preset strategy.
13. The method according to any one of claims 1 to 12, characterized in that The method is applied to a system architecture of an electronic device, the system architecture comprising a first algorithm platform and a second algorithm platform; Among them, the second algorithm platform is a framework provided by the native chip that supports the camera's always-on AON algorithm, and the first algorithm platform is an AON algorithm integration framework that supports multiple services and is created based on the second algorithm platform; the services supported by the first algorithm platform include air gesture services; and the services supported by the second algorithm platform include face unlocking screen services.
14. The method according to claim 13, characterized in that Analyzing the multiple frames of first images through the first algorithm platform; determining whether the analysis results of the multiple frames of first images meet the preset gesture trigger condition through the first algorithm platform; The gesture recognition result is obtained by performing gesture recognition based on the multiple frames of second images through the first algorithm platform.
15. The method according to claim 14, characterized in that The system architecture also includes a smart perception application; the air gesture function is enabled, including: The smart perception application receives a first operation of a user to enable an air gesture service, where the air gesture service is a service supported by the smart perception application; In response to the first operation, the smart perception application sends a first message to the first algorithm platform, where the first message is used to indicate a subscription to the air gesture service; The first algorithm platform subscribes to the air gesture service in response to the first message; The first algorithm platform sends a second message to the camera module, where the second message is used to request the camera module to capture an image according to the first size specification.
16. The method according to claim 15, characterized in that The method further comprises: After the first algorithm platform determines that the analysis results of the multiple frames of first images meet the preset gesture trigger condition, the first algorithm platform sends a third message to the camera module, and the third message is used to request the camera module to capture images according to the second size specification.
17. The method according to claim 16, characterized in that The method further comprises: After the first algorithm platform determines that the analysis results of the multiple frames of the first image meet the preset gesture trigger condition, the first algorithm platform reports a fourth message to the smart perception application, where the fourth message is used to indicate that the first service supported by the smart perception application is triggered; The smart perception application triggers the electronic device to display prompt information of the first service in a preset area of the screen in response to the fourth message; The prompt information of the first service includes a gesture animation, and the gesture animation is composed of the multiple frames of the first image and the multiple frames of the second image.
18. The method according to any one of claims 15 to 17, characterized in that Before responding based on the preset strategy corresponding to the gesture recognition result, the method further includes: The first algorithm platform reports the gesture recognition result to the smart perception application; Wherein, responding based on a preset strategy corresponding to the gesture recognition result includes: The smart perception application responds based on a preset strategy corresponding to the gesture recognition result.
19. The method according to any one of claims 14 to 18, characterized in that The system architecture also includes an intelligent perception interface; the intelligent perception application and the first algorithm platform interact with each other through the intelligent perception interface.
20. The method according to any one of claims 14 to 19, characterized in that The system architecture also includes a business management module, a distributor, a smart perception client and a native platform client; the method also includes: When the analysis results of the multiple frames of the first image meet the preset gesture trigger conditions, the service management module determines the processing task of the air gesture service, and sends the processing task of the air gesture service to the smart perception client through the distributor, and the smart perception client forwards the processing task of the air gesture service to the first algorithm platform.
21. The method according to any one of claims 14 to 20, characterized in that The system architecture further includes an algorithm library, wherein the algorithm library includes a first image processing algorithm and a second image processing algorithm; Analyzing the multiple frames of first images by using the first algorithm platform includes: the first algorithm platform calls the first image processing algorithm in the algorithm library to perform image analysis on the multiple frames of first images; The performing gesture recognition according to the plurality of frames of second images comprises: the first algorithm platform calls the second image processing algorithm in the algorithm library to perform image analysis on the plurality of frames of second images; The requirement of the first image processing algorithm on image resolution is lower than the requirement of the second image processing algorithm on image resolution.
22. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory, wherein the processor is configured to execute the computer program so that the electronic device implements the method according to any one of claims 1 to 21.
23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 21.
Citation Information
Cited By
Gesture recognition method, and electronic device
WO2026066254A1
