Method and device for triggering gesture recognition function
By generating a depth map on an electronic device and determining the position and duration of the target object based on the depth map, the gesture recognition function is triggered only when specific conditions are met, and the cost increase problem caused by the continuous activation of the gesture recognition function in the prior art is solved, and the cost increase is achieved. More efficient power use and more accurate trigger judgments.
Patent Information
- Application Number
- CN202311016359.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-11
AI Technical Summary
In existing gesture recognition technology, electronic devices need to continuously identify acquired images or depth data, resulting in increased costs.
By generating a depth map on an electronic device equipped with a depth sensor and determining whether there is a target object that meets the triggering conditions based on the depth map, the gesture is triggered only when a specific condition is met (such as being in a preset area and duration reaches the preset duration) is met) Identification function.
It effectively reduces the continuous startup frequency of the gesture recognition function, reduces the power consumption and waste of computing resources, thereby reducing the cost of gesture recognition, and improving the accuracy of trigger judgments.
Smart Images

Figure CN119473087A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of gesture recognition technology, and in particular to a method and device for triggering a gesture recognition function. Background Art
[0002] Gesture recognition refers to the process of using electronic devices to identify the movements of various parts of the human body, generally targeting the movement of the face or hands.
[0003] In the related art, there are two ways to implement gesture recognition: one is based on computer vision technology, using a camera installed on an electronic device to capture an image of an object and identifying features in the image to implement gesture recognition; the other is based on depth data, using a depth sensor installed on an electronic device to collect depth data of an object and identifying the depth data to implement gesture recognition.
[0004] However, when implementing gesture recognition using the above two methods, the electronic device will continue to recognize the collected image or depth data, which increases the cost of gesture recognition. Summary of the invention
[0005] The present disclosure provides a method and device for triggering a gesture recognition function to solve the deficiencies in the related art.
[0006] According to a first aspect of an embodiment of the present disclosure, a method for triggering a gesture recognition function is provided, which is applied to an electronic device equipped with a depth sensor, and the method includes:
[0007] Generating a depth map according to the depth data collected by the depth sensor;
[0008] When it is determined based on the depth map that there is a target object that meets the trigger conditions, the electronic device is triggered to start a gesture recognition function; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time period.
[0009] According to a second aspect of an embodiment of the present disclosure, a triggering device for a gesture recognition function is provided, which is applied to an electronic device equipped with a depth sensor, and the device includes:
[0010] Generating unit: generating a depth map according to the depth data collected by the depth sensor;
[0011] A trigger unit: triggering the electronic device to start a gesture recognition function when it is determined based on the depth map that there is a target object that meets the trigger conditions; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time.
[0012] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including:
[0013] processor;
[0014] a memory for storing processor-executable instructions;
[0015] The processor is configured to implement the method as described in the first aspect.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps in the method described in the first aspect are implemented.
[0017] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0018] It can be seen from the above embodiments that, on the one hand, the present disclosure sets a trigger method for gesture recognition, generates a depth map according to the depth data collected by the depth sensor installed on the electronic device, and triggers the electronic device to start the gesture recognition function when it is determined based on the depth map that there is a target object that meets the trigger conditions, so that the gesture recognition function can be triggered only under certain conditions, thereby avoiding the electronic device from continuously starting the gesture recognition function and reducing the cost of gesture recognition; on the other hand, by setting the trigger condition to be a preset area within the field of view of the depth sensor and the duration of being in the area reaches a preset duration, the triggering of the gesture recognition function will not be too difficult to cause failure to trigger, nor will it be too easy to cause random triggering.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic architecture diagram of triggering a gesture recognition function according to an embodiment of the present disclosure.
[0022] Figure 2 It is a schematic flow chart of a method for triggering a gesture recognition function according to an embodiment of the present disclosure.
[0023] Figure 3aThe figure is a schematic diagram showing movement of a preset area of an object according to an embodiment of the present disclosure.
[0024] Figure 3b is a schematic diagram of a depth map according to an embodiment of the present disclosure.
[0025] Figure 3c is a schematic diagram of another depth map according to an embodiment of the present disclosure.
[0026] Figure 4a It is a schematic diagram of a connected area in a depth map according to an embodiment of the present disclosure.
[0027] Figure 4b It is a schematic diagram of a binary image according to an embodiment of the present disclosure.
[0028] Figure 4c It is a schematic diagram showing a method of calculating centroid coordinates according to an embodiment of the present disclosure.
[0029] Figure 5 It is a schematic diagram of mean filtering according to an embodiment of the present disclosure.
[0030] Figure 6 It is a schematic block diagram of a device for triggering a gesture recognition function according to an embodiment of the present disclosure.
[0031] Figure 7 It is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0033] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "an" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0034] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the disclosed embodiments, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the disclosed embodiments, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0035] For the purpose of brevity and ease of understanding, the terms used herein to characterize size relationships are "greater than" or "less than", "higher than" or "lower than". However, those skilled in the art can understand that the term "greater than" also covers the meaning of "greater than or equal to", and "less than" also covers the meaning of "less than or equal to"; the term "higher than" covers the meaning of "higher than or equal to", and "lower than" also covers the meaning of "lower than or equal to".
[0036] Gesture recognition refers to the process of using electronic devices to identify the movements of various parts of the human body, generally targeting the movement of the face or hands.
[0037] In the related art, there are two ways to realize gesture recognition: one is based on computer vision technology, using a camera installed on an electronic device to capture an image of an object and recognize features in the image to realize gesture recognition; the other is based on depth data, using a depth sensor installed on an electronic device to collect depth data of an object and recognize the depth data to realize gesture recognition. However, when using the above two methods to realize gesture recognition, the electronic device will continue to recognize the collected image or depth data, which increases the cost of gesture recognition.
[0038] In order to solve the deficiencies in the related art, the present disclosure proposes a method for triggering a gesture recognition function.
[0039] Figure 1 FIG. 1 is a schematic diagram showing a triggering structure of a gesture recognition function according to an embodiment of the present disclosure. Figure 1 As shown, the electronic device 10 is equipped with a depth sensor 30, which can obtain depth data of an object 20 within the field of view. The electronic device 10 is configured with processing logic for implementing the technical solution of the present disclosure, and can generate a depth map based on the collected depth data according to the generation function, and trigger the start gesture recognition function when it is determined based on the depth map that the object 20 meets the trigger condition. The specific implementation process of the processing logic will be described below in conjunction with Figure 2-5 Describe in detail.
[0040] Figure 21 is a schematic flow chart of a method for triggering a gesture recognition function according to an embodiment of the present disclosure. The method for triggering a gesture recognition function shown in this embodiment can be executed by an electronic device equipped with a depth sensor, and the electronic device includes but is not limited to a mobile phone, a tablet computer, a wearable device, an Internet of Things device, and other communication devices. Figure 2 As shown, the method for triggering the gesture recognition function may include the following steps:
[0041] In step S202, a depth map is generated according to the depth data collected by the depth sensor.
[0042] The depth sensor may refer to a sensor used to collect depth data, such as a ToF (Time of Flight) sensor, a structured light sensor, a binocular sensor, etc., and the present disclosure is not limited thereto. Taking a ToF sensor as an example, it can emit infrared light, laser light, etc. into the field of view. When the light is reflected back from the object to the sensor, the distance between the sensor and the measured object can be calculated based on the time difference between the emission and reflection of the light.
[0043] A depth map may refer to an image generated based on depth data, in which the pixel value of each pixel represents the distance between a certain point within the field of view and the depth sensor. If there is an object within the field of view of the depth sensor, the pixel value on the depth map may reflect the distance between each point of the object and the depth sensor.
[0044] In step S204, when it is determined based on the depth map that there is a target object that meets the trigger conditions, the electronic device is triggered to start a gesture recognition function; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time.
[0045] The field of view of the depth sensor may refer to the maximum range of depth data that the depth sensor can collect. The preset area may refer to an area within a preset field of view, for example, a cubic area 15-20 cm away from the depth sensor.
[0046] The trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time. This requires the target object to stay in the preset area and for a preset time. In the case of a preset time of 5 seconds, if an object first stays in the preset area for 2 seconds, leaves the preset area halfway, then returns to the preset area and continues to stay for 3 seconds, then the object does not continue to stay in the preset area, and its duration is only 3 seconds, so the object cannot be regarded as a target object and does not meet the trigger conditions; if the object continues to stay in the preset area for 2 seconds, then the duration of the object in the preset area will reach 5 seconds, at which time the object can be regarded as a target object and meets the trigger conditions.
[0047] The electronic device can calculate the duration of the target object in the preset area based on the number of frames of the depth map generated by the depth sensor. Assuming that the depth sensor can generate 10 frames of images per second, the duration is increased by 1 second for every 10 frames of images generated. If the target object is in the preset area for 50 consecutive frames of images, it means that the target object has been in the preset area for 5 seconds.
[0048] Based on the depth map, the position of the object within the field of view can be determined. If the object is in a preset area within the field of view of the depth sensor and has been in the area for a preset time, the object meets the trigger condition, and the electronic device can start the gesture recognition function to perform gesture recognition. The gesture recognition function can be implemented based on computer vision technology or depth data, and the present disclosure does not limit this.
[0049] In this embodiment, on the one hand, a trigger method is set for gesture recognition, a depth map is generated according to the depth data collected by the depth sensor installed on the electronic device, and when it is determined based on the depth map that there is a target object that meets the trigger conditions, the electronic device is triggered to start the gesture recognition function, so that the gesture recognition function can be triggered only under certain conditions, thereby avoiding the electronic device from continuously starting the gesture recognition function and reducing the cost of gesture recognition; on the other hand, by setting the trigger condition to be in a preset area within the field of view of the depth sensor and the duration of being in the area reaches a preset duration, the triggering of the gesture function will not be too difficult or too easy.
[0050] In addition to the trigger conditions mentioned above, the present disclosure also proposes additional trigger conditions to improve the accuracy of trigger determination.
[0051] In one embodiment, the method further includes: determining the moving distance of the target object within the preset time period based on the motion information of the target object; wherein the trigger condition further includes: the moving distance of the target object within the preset time period does not exceed a preset threshold.
[0052] Since the preset area is an area, the target object can move a certain distance even if it is in the preset area. The electronic device can use the pixel values on the generated depth map as the motion information of the target object to determine the moving distance of the target object within the preset time length.
[0053] like Figure 3a As shown in FIG. 3 , sensor 301 is a depth sensor and area 302 is a preset area. Within the preset time period, object 304 moves 3 cm from original position 303 toward sensor 301. That is, object 304 moves from an original distance of 13 cm from sensor 301 to a distance of 10 cm from sensor 301 after the preset time period. The corresponding changes in the depth map are shown in FIG. Figure 3b As shown, the depth map 305 is a depth map generated by the sensor 301 based on the collected depth data. The pixel value of the pixel 306 represents the distance between the object 304 and the sensor 301. The pixel value of the pixel 306 changes from 13 to 10 within the preset time length. Therefore, it can be calculated that the moving distance of the target object within the preset time length is 3 cm. If the preset threshold is less than 3 cm, the object 304 does not meet the trigger condition; if the preset threshold is greater than or equal to 3 cm, the object 304 meets the trigger condition.
[0054] Of course, the movement of the target object in the preset area can also be repeated movement. Figure 3a For example, object 304 may first translate 3 cm from position 303 toward sensor 301 within a preset time period, and then translate back to position 303. At this time, the corresponding change in the depth map is as follows: Figure 3c As shown, the pixel value of pixel 306 changes from 13 to 10 and then to 13, thereby calculating that the translation distance of object 304 is 6 centimeters.
[0055] In this embodiment, by continuing to limit the moving distance of the target object based on the original trigger condition, it is avoided that the gesture recognition function is accidentally triggered by an object moving a short distance against the user's intention, thereby improving the accuracy of the triggering judgment of the gesture recognition function.
[0056] In one embodiment, the method further includes: determining the number of frame losses of the depth sensor within the preset time length based on the depth data collected by the depth sensor; wherein the trigger condition also includes: the number of frame losses of the depth sensor within the preset time length does not exceed a preset number.
[0057] Frame loss can refer to frame loss, that is, the electronic device does not receive the depth data frame sent by the depth sensor, and the number of frame loss refers to the number of depth sensor frame loss within a preset time. If there are too many frame losses within the preset time, it indicates that the depth sensor is faulty or the data transmission link is faulty. At this time, if the triggering of the gesture recognition function is continued, it may lead to an error in the judgment. Therefore, it is necessary to add the measurement of the number of frame losses to the trigger condition.
[0058] The preset number can be set in units of time, such as 2 frames per second. When the preset duration is 10 seconds, if the number of lost frames within the preset duration is 10 frames, then the number of lost frames per second is 1 frame, which is less than the preset 2 frames per second, and the trigger condition is met; if the number of lost frames within the preset duration is 30 frames, then the number of lost frames per second is 3 frames, which exceeds the preset 2 frames per second, and the trigger condition is not met.
[0059] In this embodiment, by adding the measurement of the number of lost frames to the trigger condition, the influence of depth sensor failure and data transmission failure on the trigger determination is eliminated, thereby improving the accuracy of the trigger determination of the gesture recognition function.
[0060] In one embodiment, the method further includes: determining the position of the center of mass of the target object; and determining that the target object meets the trigger condition when the center of mass meets the trigger condition.
[0061] The center of mass refers to the mass center, which is an imaginary point on a material system where the mass is considered to be concentrated. Since the volume of the target object cannot be determined, replacing the position of the target object with the center of mass position of the target object can improve the accuracy of the trigger condition judgment.
[0062] Furthermore, the determination of the position of the center of mass of the target object includes: taking the connected area with the largest area in the depth map as the target connected area corresponding to the target object; converting the depth map into a binary map, and determining the center of mass of the binary map as the center of mass of the target object; wherein the pixel values corresponding to the target connected area in the binary map are non-zero uniform values, and the pixel values of the remaining areas are 0; establishing a coordinate system based on the binary map, and taking the coordinates of the center of mass in the coordinate system as the position of the center of mass of the target object.
[0063] In the depth map, the image area composed of pixels whose pixel values are non-zero and whose positions are adjacent is called a connected area. In general, the connected area with the largest area in the depth map corresponds to the target object, so this connected area can be used as the target connected area. Figure 4a As shown, in the depth map, the palm area composed of multiple adjacent pixels whose pixel values are not 0 is the connected area with the largest area, so this area is determined as the largest connected area.
[0064] In a binary image, each pixel has only two values: 0 or a non-zero uniform value (such as 1 or 2). When the pixel values of the pixels corresponding to the target object are uniform values, the centroid of the target object can better reflect the location of the target object. Figure 4b As shown, it can be Figure 4a The pixel values of the pixels corresponding to the palm area are set to 1, and the pixel values of the pixels corresponding to the rest of the area are set to 0 to obtain a binary image. Figure 4b The coordinate system is established based on the binary image shown in Figure 4c As shown, a coordinate system is established with the lower left corner of the binary image as the origin.
[0065] The specific calculation formula of the centroid coordinates can be:
[0066]
[0067] Among them, n is the length of the binary image on the x-axis (the number of pixels), and m is the length of the binary image on the y-axis (the number of pixels).
[0068] like Figure 4c As shown, the length of the binary image on the x-axis and y-axis is 8, so the calculation formula for the corresponding centroid coordinates is:
[0069]
[0070] according to Figure 4c It can be calculated that cx is (3+5+7+8+8+5+2) / 8=4.75, cy is (3+5+7+8+8+5+2) / 8=19.5, and the center of mass coordinates are (4.75, 4.75).
[0071] In this embodiment, by converting the depth map into a binary map and establishing a coordinate system based on the binary map, the electronic device can regard the calculated center of mass coordinates as the position of the target object, thereby determining whether the target object meets the trigger condition.
[0072] In one embodiment, before converting the depth map into a binary image, the method further includes: determining a minimum acquisition distance based on the depth map, the minimum acquisition distance being the minimum pixel value recorded on the depth map; filtering the depth map, the filtering including: filtering out depth data corresponding to pixel points whose corresponding acquisition distances are not within a preset distance range; wherein the lower boundary of the preset distance range is the minimum acquisition distance and the upper boundary is the sum of the minimum acquisition distance and the estimated thickness of the target object.
[0073] Generally, the electronic device can set an estimated thickness for the target object. For example, if the target object is a palm, the estimated thickness can be 5 cm. The target object is within the preset distance range, so the depth data corresponding to the pixel points whose corresponding acquisition distance is not within the preset distance range is filtered out, and the depth data that does not correspond to the target object can be filtered out, thereby improving the accuracy of the trigger judgment.
[0074] In this embodiment, by setting an estimated thickness for the target object and filtering out depth data corresponding to pixels whose corresponding acquisition distances are not within a preset distance range, depth data that does not correspond to the target object can be filtered out, thereby improving the accuracy of trigger determination.
[0075] In one embodiment, the method further includes: performing mean filtering on the filtered depth map; and re-performing the filtering process on the depth map after the mean filtering.
[0076] Mean filtering is a typical linear filtering algorithm, which means replacing the pixel value of the current pixel with the mean of the pixel values of n×n pixels around the current pixel. This method can be used to traverse and process each pixel in the image to complete the mean filtering of the entire image. Mean filtering can remove noise from the image and make the image clearer.
[0077] like Figure 5 As shown, the pixel values of the pixels corresponding to the black box can be averaged and filtered. Assume that the average of the pixel values of the surrounding 5×5 pixels (i.e., the pixels corresponding to the gray box) is taken. The calculation method is as follows:
[0078] [(197+25+106+156+159)+(149+40+107+5+71)+(163+198+226+223+156)+(222+37+68+193+157)+(42+72+250+41+75)] / 25=126
[0079] After the new value is calculated, it can be used as the pixel value after the mean filter of the current pixel. Figure 5 For each pixel in the depth map shown, the average pixel value in the surrounding 5x5 area is calculated and used as the new value of the current pixel to obtain the mean filtering result of the current image. (For edge pixels, only the average pixel value of the surrounding area points in the image can be taken)
[0080] In this embodiment, by performing mean filtering on the filtered depth map, the electronic device can re-perform the above filtering process on the depth map after the mean filtering, thereby further improving the accuracy of triggering determination of the gesture recognition function.
[0081] Corresponding to the aforementioned embodiment of the method for triggering the gesture recognition function, the present disclosure also provides an embodiment of a device for triggering the gesture recognition function.
[0082] Figure 6 is a schematic block diagram of a device for triggering a gesture recognition function according to an embodiment of the present disclosure. Figure 6 As shown, the device is applied to an electronic device equipped with a depth sensor, and the device includes:
[0083] A generating unit 602, configured to generate a depth map according to the depth data collected by the depth sensor;
[0084] The trigger unit 604 is used to trigger the electronic device to start the gesture recognition function when it is determined based on the depth map that there is a target object that meets the trigger conditions; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time.
[0085] Optionally, the method further includes:
[0086] A first determining unit 606 is used to determine a moving distance of the target object within the preset time period according to the motion information of the target object;
[0087] The trigger condition further includes: the moving distance of the target object within the preset time period does not exceed a preset threshold.
[0088] Optionally, the method further includes:
[0089] A second determining unit 608 is configured to determine the number of frame losses of the depth sensor within the preset time period according to the depth data collected by the depth sensor;
[0090] The trigger condition further includes: the number of frame losses of the depth sensor within the preset time period does not exceed a preset number.
[0091] Optionally, the method further includes:
[0092] A third determining unit 610 is used to determine the position of the center of mass of the target object;
[0093] The determination unit 612 is configured to determine that the target object meets the trigger condition when the centroid meets the trigger condition.
[0094] Optionally, the third determining unit 610 is specifically configured to:
[0095] Taking the connected region with the largest area in the depth map as the target connected region corresponding to the target object;
[0096] Convert the depth map into a binary map, and determine the centroid of the binary map as the centroid of the target object; wherein the pixel values corresponding to the target connected area in the binary map are non-zero uniform values, and the pixel values of the remaining areas are 0;
[0097] A coordinate system is established based on the binary image, and the coordinates of the center of mass in the coordinate system are used as the position of the center of mass of the target object.
[0098] Optionally, before converting the depth map into a binary map, the method further includes:
[0099] A fourth determining unit 614 is configured to determine a minimum acquisition distance according to the depth map, where the minimum acquisition distance is a minimum pixel value recorded on the depth map;
[0100] The first filtering unit 616 is used to filter the depth map, and the filtering process includes: filtering out depth data corresponding to pixel points whose corresponding acquisition distances are not within a preset distance range; wherein the lower boundary of the preset distance range is the minimum acquisition distance and the upper boundary is the sum of the minimum acquisition distance and the estimated thickness of the target object.
[0101] Optionally, the method further includes:
[0102] A filtering unit 618, configured to perform mean filtering on the filtered depth map;
[0103] The second filtering unit 620 is used to re-perform the filtering process on the depth map after the mean filtering.
[0104] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the relevant method, and will not be elaborated here.
[0105] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0106] The present disclosure also provides an electronic device, including:
[0107] processor;
[0108] a memory for storing processor-executable instructions;
[0109] The processor is configured to implement the method described in any of the above embodiments.
[0110] The embodiments of the present disclosure further provide a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in any of the above embodiments when the program is executed by a processor.
[0111] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0112] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.
[0113] The memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0114] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.
[0115] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0116] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0117] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0118] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0119] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0120] In an exemplary embodiment, the device 700 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the method described in any of the above embodiments.
[0121] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, and the instructions can be executed by the processor 720 of the device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0122] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0123] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for triggering a gesture recognition function, characterized in that: Applied to an electronic device equipped with a depth sensor, the method comprises: Generating a depth map according to the depth data collected by the depth sensor; When it is determined based on the depth map that there is a target object that meets the trigger conditions, the electronic device is triggered to start a gesture recognition function; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time period.
2. The method according to claim 1, characterized in that The method further comprises: Determining a moving distance of the target object within the preset time period according to the motion information of the target object; The trigger condition further includes: the moving distance of the target object within the preset time period does not exceed a preset threshold.
3. The method according to claim 1, characterized in that The method further comprises: Determining the number of frame drops of the depth sensor within the preset time period according to the depth data collected by the depth sensor; The trigger condition further includes: the number of frame losses of the depth sensor within the preset time period does not exceed a preset number.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: determining the location of the center of mass of the target object; In the case that the centroid satisfies the trigger condition, it is determined that the target object meets the trigger condition.
5. The method according to claim 4, characterized in that Determining the position of the center of mass of the target object includes: Taking the connected region with the largest area in the depth map as the target connected region corresponding to the target object; Convert the depth map into a binary map, and determine the centroid of the binary map as the centroid of the target object; wherein the pixel values corresponding to the target connected area in the binary map are non-zero uniform values, and the pixel values of the remaining areas are 0; A coordinate system is established based on the binary image, and the coordinates of the center of mass in the coordinate system are used as the position of the center of mass of the target object.
6. The method according to claim 5, characterized in that Before converting the depth map into a binary map, the method further includes: Determining a minimum acquisition distance according to the depth map, the minimum acquisition distance being a minimum pixel value recorded on the depth map; The depth map is filtered, and the filtering process includes: filtering out depth data corresponding to pixel points whose corresponding acquisition distances are not within a preset distance range; wherein the lower boundary of the preset distance range is the minimum acquisition distance and the upper boundary is the sum of the minimum acquisition distance and the estimated thickness of the target object.
7. The method according to claim 6, characterized in that The method further comprises: Performing mean filtering on the filtered depth map; The filtering process is performed again on the depth map after the mean filtering.
8. A triggering device for a gesture recognition function, characterized in that: Applicable to an electronic device equipped with a depth sensor, the device comprises: Generating unit: generating a depth map according to the depth data collected by the depth sensor; A trigger unit: triggering the electronic device to start a gesture recognition function when it is determined based on the depth map that there is a target object that meets the trigger conditions; wherein the trigger conditions include: being in a preset area within the field of view of the depth sensor and being in the area for a preset time.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Man-machine interaction method based on human body gesture recognition
CN103472916A
Skeleton line extracting algorithm based on deep learning, system and storage medium
CN107492108A
Command activation method and system based on gesture recognition
CN110109547A
Depth image processing method and device, electronic equipment and storage medium
CN115456909A
Method, device and equipment for detecting motion state of dynamic obstacle and storage medium
CN116363170A