Fingertip click position detection method and device
By acquiring and processing fingertip click images, combining historical positions and reliability, using cameras and neural network models to detect fingertip positions, the problem of large amounts of calculation and high energy consumption in the existing technology is solved, and detection and detection in the absence of a touch screen are realized. Application scenario expansion.
Patent Information
- Application Number
- CN202111217525.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-10-19
AI Technical Summary
The fingertip click position detection method in the existing technology requires a large amount of calculation, high energy consumption, and cannot be detected in the scenario where the touch screen is missing, which limits the application scenarios.
By obtaining the current fingertip click image, the fingertip position and positioning confidence are identified, and combined with the historical fingertip position and confidence, the effective fingertip click position is determined, and the camera and neural network model are used to achieve detection, avoiding reliance on the touch screen.
Realize fingertip position detection in the absence of a touch screen, expand fingertip interaction application scenarios, and reduce data processing power consumption.
Smart Images

Figure CN113867540B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for detecting a fingertip click position. Background Art
[0002] With the development of computer technology, human-computer interaction has been widely used on various devices. Fingertip clicking is a form of human-computer interaction. Users can click on the target panel of the device with their fingertips, and the device can respond to the user's click operation. Therefore, detecting the user's fingertip click position is an important part of this human-computer interaction process.
[0003] Currently, the method of detecting the user's fingertip click position is often to identify it through the touch detection sensor built into the device's touch screen. This method has a large amount of calculation, high energy consumption, and high device heat. In addition, it cannot be detected in some scenarios where a touch screen is missing, which greatly limits the application scenarios. Summary of the invention
[0004] The present invention provides a fingertip click position detection method and device, which are used to solve the defects of the prior art, such as large amount of calculation, high energy consumption, large equipment heat generation, inability to detect in certain scenarios without a touch screen, and large restrictions on application scenarios. The method can realize the detection of fingertip position in the scenario without a touch screen, expand the application scenarios of fingertip interaction, and reduce data processing power consumption.
[0005] The present invention provides a fingertip click position detection method, which includes: obtaining a current fingertip click image; determining a current fingertip position and a positioning reliability based on the current fingertip click image; determining an effective fingertip click position based on the current fingertip position, historical fingertip positions and the positioning reliability, wherein the historical fingertip positions are determined based on historical fingertip click images.
[0006] According to a fingertip click position detection method provided by the present invention, the effective click position of the fingertip is determined based on the current fingertip position, the historical fingertip position and the positioning reliability, including: determining the effective click position of the fingertip based on the comparison result of the current fingertip position with the historical fingertip position, the comparison result of the positioning reliability with the confidence threshold, and the comparison result of the current fingertip position with the effective position range.
[0007] According to a fingertip click position detection method provided by the present invention, the effective fingertip click position is determined based on the comparison result of the current fingertip position and the historical fingertip positions, the comparison result of the positioning confidence and the confidence threshold, and the comparison result of the current fingertip position and the effective position range, including: confirming that the positioning confidence is greater than the confidence threshold, then determining the reference displacement of the current fingertip position and multiple historical fingertip positions within a target time period before the current moment; confirming that the reference displacement is less than the displacement threshold and the current fingertip position is within the effective position range, and using the current fingertip position as the effective fingertip click position.
[0008] According to a fingertip click position detection method provided by the present invention, the current fingertip position and the positioning reliability are determined based on the current fingertip click image, including: inputting the current fingertip click image into a position matching model, and outputting the current fingertip position and the positioning reliability; wherein the position matching model is pre-trained using the fingertip click sample image as a sample, and using the fingertip position sample data and the positioning reliability sample data corresponding to the fingertip click sample image as sample labels.
[0009] According to a fingertip click position detection method provided by the present invention, the obtaining of the current fingertip click image includes: obtaining a fingertip click color image; and preprocessing the fingertip click color image to obtain the current fingertip click image.
[0010] According to a fingertip click position detection method provided by the present invention, the preprocessing of the fingertip click color image to obtain the current fingertip click image includes: performing color conversion and denoising on the fingertip click color image to obtain the current fingertip click image.
[0011] According to a fingertip click position detection method provided by the present invention, the fingertip click color image is subjected to color conversion and denoising processing to obtain the current fingertip click image, including: mapping the fingertip click color image to the HSV color model to obtain a fingertip click binary image; removing noise points in the fingertip click binary image to obtain the current fingertip click image.
[0012] The present invention also provides a fingertip click position detection device, which includes: an acquisition device for acquiring a current fingertip click image; a first determination device for determining a current fingertip position and a positioning reliability based on the current fingertip click image; and a second determination device for determining an effective fingertip click position based on the current fingertip position, historical fingertip positions and the positioning reliability, wherein the historical fingertip positions are determined based on historical fingertip click images.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for detecting fingertip click positions are implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for detecting fingertip click positions are implemented.
[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned methods for detecting fingertip click positions are implemented.
[0016] The fingertip click position detection method and device provided by the present invention obtain the current fingertip click image, and identify the current fingertip position and positioning reliability from the current fingertip click image, and determine the effective fingertip click position through the current fingertip position, historical fingertip positions and positioning reliability. It can realize the detection of fingertip position in the scenario where a touch screen is missing, expand the application scenarios of fingertip interaction, and reduce data processing power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is one of the flow charts of the fingertip click position detection method provided by the present invention;
[0019] Figure 2 This is the second flow chart of the fingertip click position detection method provided by the present invention;
[0020] Figure 3 It is one of the structural schematic diagrams of an electronic device for executing the fingertip click position detection method provided by the present invention;
[0021] Figure 4 This is the second structural schematic diagram of an electronic device for executing the fingertip click position detection method provided by the present invention;
[0022] Figure 5 This is the third structural schematic diagram of the electronic device for executing the fingertip click position detection method provided by the present invention;
[0023] Figure 6It is a structural schematic diagram of a device for detecting fingertip click positions provided by the present invention;
[0024] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] Combine the following Figure 1-Figure 7 The present invention describes a fingertip click position detection method and device.
[0027] like Figure 1 As shown, the present invention provides a fingertip click position detection method, and the fingertip click position detection method includes the following steps 110 to 130.
[0028] Among them, step 110 is to obtain the current fingertip click image.
[0029] It is understandable that if Figure 2 , Figure 3 and Figure 4 As shown, the fingertip click position detection method can be executed by a processor of an electronic device. The electronic device can have a processor and a target panel 20. An external camera can be installed on the electronic device. Of course, the camera can also be built-in to the electronic device, which is not specifically limited here. The camera is electrically connected to the processor, and the lens of the camera can be facing the target panel 20. The camera can capture the entire image of the target panel 20.
[0030] The camera here may include a customized optical lens 10, and the camera can capture the full view of the interface of the target panel 20. Of course, a combination of a built-in camera of an electronic device and an added optical lens 10 can be used. For example, the shooting direction of the built-in camera of the electronic device is perpendicular to the target panel 20. The optical lens 10 can be added here to convert the shooting angle of the camera to ensure that the camera can capture most areas of the target panel 20. For example, the optical lens 10 can be magnetically adsorbed on the electronic device.
[0031] The user can click the target panel 20 with the fingertip, and the camera can capture the current fingertip click image in real time. The current fingertip click image is the image captured by the camera at the current moment of the user clicking the target panel 20 with the fingertip.
[0032] The electronic device may be a terminal device such as a reading machine, a learning machine, a tablet computer, a laptop computer or a mobile phone. For example, the electronic device is a reading machine, which may not have a touch screen. The user may click on the target panel 20 of the reading machine with his fingers. The target panel 20 of the reading machine may be the display panel of the reading machine. The target panel 20 may also be a book or newspaper placed on the reading machine. For example, a book may be unfolded and placed on the reading machine. The user may click on specific content on the book with his fingertips, so that the camera can capture the image of the user's finger clicking on the target panel 20 of the reading machine.
[0033] Step 120: Determine the current fingertip position and the positioning reliability based on the current fingertip click image.
[0034] It can be understood that image recognition can be performed on the current fingertip click image to detect the position of the fingertip in the current fingertip click image in the image, that is, target detection can be performed, so that the current fingertip position can be obtained. The current fingertip position is the position of the user's fingertip relative to the target panel 20. The positioning reliability refers to the degree of credibility of the current fingertip position, that is, the degree of deviation between the current fingertip position and the actual position of the fingertip relative to the target panel 20.
[0035] like Figure 2 , Figure 3 and Figure 4 As shown, in actual application, the 3D coordinate system can be modeled through the camera shooting angle, with the upper left corner of the fingertip click image captured by the camera as the origin of the coordinate system, the x-axis and y-axis parallel to the lower edge and side edge of the target panel 20 respectively, and the z-axis perpendicular to the target panel 20 upward. The 3D position of the fingertip in the coordinate system is calculated to confirm the current fingertip position.
[0036] Of course, a neural network model can be used to identify the current fingertip position from the current fingertip click image. The neural network model can be a convolutional neural network or a residual neural network, or other types of neural networks. The neural network model can be trained using training samples, such as supervised learning or unsupervised learning, to improve the detection accuracy of the neural network model.
[0037] How to obtain the current fingertip position and the positioning reliability according to the current fingertip clicking image is not specifically limited here, and those skilled in the art can select a feasible method to implement it according to actual conditions.
[0038] Step 130: Determine the effective fingertip click position based on the current fingertip position, the historical fingertip position and the positioning reliability, wherein the historical fingertip position is determined based on the historical fingertip click image.
[0039] It can be understood that the historical fingertip position is detected from the historical fingertip click image, which is an image obtained by the user's fingertip clicking the target panel 20 captured during the target period before the current moment. The only difference between the historical fingertip click image and the current fingertip click image is that the shooting time point is different.
[0040] The effective click position of the fingertip can be obtained by filtering the current fingertip position. In an actual interaction scenario, not every click of the user's fingertip is effective. For example, the user may just swipe the target panel 20 with his finger, or the user's finger may hold the target panel 20 at the edge of the target panel 20. The user does not achieve human-computer interaction by clicking on the target panel 20. The effective click position of the fingertip refers to the click position generated by the user's intention to click the target panel 20 with his fingertip to achieve human-computer interaction.
[0041] The current fingertip position can be compared with the historical fingertip position, and combined with the positioning reliability to determine the effective fingertip click position. For example, the degree of deviation between the current fingertip position and the historical fingertip position can be determined, and the positioning reliability can be compared with the confidence threshold to screen out the effective fingertip click position.
[0042] It is worth noting that the current method of detecting the user's fingertip click position is often through the touch detection sensor built into the device's touch screen. This method requires large computational complexity, high energy consumption, and high device heat generation. In addition, it cannot be detected in certain scenarios where a touch screen is missing, which greatly limits the application scenarios.
[0043] This embodiment uses a camera to capture the current fingertip click image, and identifies the current fingertip position and positioning reliability from the current fingertip click image. The effective fingertip click position is determined through the current fingertip position, historical fingertip positions and positioning reliability. It does not rely on the touch screen of the electronic device and can be applied to scenarios where a touch screen is missing. It can expand the application scenarios of fingertip interaction, and the use of camera shooting can reduce costs and reduce power consumption of data processing.
[0044] The fingertip click position detection method provided by the present invention obtains the current fingertip click image, and identifies the current fingertip position and the positioning reliability from the current fingertip click image, and determines the effective fingertip click position through the current fingertip position, the historical fingertip position and the positioning reliability. It can realize the detection of the fingertip position in the scenario where the touch screen is missing, expand the application scenarios of fingertip interaction, and reduce data processing power consumption.
[0045] like Figure 5 As shown, in some embodiments, the above step 110, obtaining the current fingertip click image includes the following steps 111 and 112.
[0046] Step 111: Obtain a fingertip click color image.
[0047] It is understandable that the original image captured by the camera is a color image, that is, a color image clicked by the fingertip, which is an image of the RGB color model. The RGB color model is a color standard in the industry. Various colors are obtained by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision and is one of the most widely used color systems.
[0048] Step 112: pre-process the fingertip click color image to obtain a current fingertip click image.
[0049] It can be understood that the fingertip click color image can be preprocessed, for example, the fingertip click color image can be color converted, noise can be removed, and compression can be performed on the fingertip click color image. The purpose of preprocessing is mainly to remove redundant features and retain effective features for target recognition. The preprocessing process is not specifically limited here, and technical personnel in this field can adopt feasible solutions to implement the preprocessing process.
[0050] In some embodiments, the above step 112, pre-processing the fingertip click color image to obtain the current fingertip click image includes: performing color conversion and denoising on the fingertip click color image to obtain the current fingertip click image.
[0051] It can be understood that the color conversion of the fingertip click color image is to remove the color features in the fingertip click color image that are not related to position detection and retain the color features related to position detection. For example, the skin color features can be enhanced and other color features can be weakened.
[0052] De-noising is mainly used to remove noise points in the image, remove features irrelevant to position detection, and reduce the interference of noise points on position detection.
[0053] Through color conversion and denoising processing, the interference of irrelevant features can be further eliminated, thereby improving the accuracy and efficiency of position detection.
[0054] In some embodiments, color conversion and denoising are performed on the fingertip click color image to obtain the current fingertip click image, including:
[0055] The fingertip click color image is mapped to the HSV color model to obtain the fingertip click binary image.
[0056] It can be understood that HSV (Hue, Saturation, Value) is a color model created based on the intuitive characteristics of color, also known as the Hexcone Model. The color parameters in the HSV color model are: hue (H), saturation (S) and value (V).
[0057] Hue H is measured in degrees, ranging from 0° to 360°, starting from red and counting counterclockwise, red is 0°, green is 120°, and blue is 240°. Their complementary colors are: yellow is 60°, cyan is 180°, and purple is 300°;
[0058] Saturation S indicates the degree to which a color is close to a spectral color. A color can be seen as the result of a mixture of a certain spectral color and white. The greater the proportion of the spectral color, the closer the color is to the spectral color, and the higher the saturation of the color. The higher the saturation, the deeper and brighter the color. The white light component of the spectral color is 0, and the saturation reaches the highest. The value range is usually 0% to 100%. The larger the value, the more saturated the color.
[0059] Lightness V indicates the brightness of a color. For light source color, the lightness value is related to the brightness of the light source; for object color, this value is related to the transmittance or reflectance of the object. The value range is usually 0% (black) to 100% (white).
[0060] The RGB and CMY color models are hardware-oriented, while the HSV (Hue Saturation Value) color model is user-oriented.
[0061] The three-dimensional representation of the HSV model is derived from the RGB cube. If you imagine looking from the white vertex along the diagonal of the RGB cube to the black vertex, you can see the hexagonal shape of the cube. The hexagonal border represents the color, the horizontal axis represents the purity, and the brightness is measured along the vertical axis.
[0062] In the HSV color model, the H component can well reflect the skin color. In order to better utilize the captured fingertip click color image to effectively detect the fingertip position, this embodiment maps the captured RGB color model color image to the HSV color model, and the specific method is as follows:
[0063] Hue (H) conversion:
[0064]
[0065] Saturation (S) conversion:
[0066]
[0067] Brightness (V) conversion:
[0068] V=C max ;
[0069] Among them, R is the red component of the color image clicked by the fingertip in the RGB color space, G is the green component of the color image clicked by the fingertip in the RGB color space, B is the blue component of the color image clicked by the fingertip in the RGB color space, and mod is the modular operation, which is the remainder in mathematics.
[0070] In some embodiments, a skin color model can be called using an Android-based NPU (Neural network Processing Unit) to map the fingertip click color image to an HSV color model to obtain a fingertip click binary image.
[0071] First, an NPU effect optimization implementation scheme based on Android can be designed and implemented. Android's NPU implementation is based on Google's TensorFlow Lite and has a fixed access standard. It is necessary to ensure that the difference in the fixed-point results of each operator under the same input does not exceed plus or minus 1. This embodiment uses the Pytorch framework to train the skin color model, and fine tunes through Tensorflow Lite to obtain a fixed-point skin color model that is more suitable for the NPU device, ensuring that the effect of the skin color model is consistent with the training.
[0072] Secondly, NPU model calls based on Android NNAPI (Neural Networks API) can be realized. Android's NPU implementation is based on a unified API interface for Google's device access, namely Android NNAPI. Based on this interface, the unified skin color model call implementation method of the Android system is implemented, and three functions are completed based on the device characteristics of the Android system and NPU: operator fusion optimization to improve computing performance, model cache storage to avoid repeated optimization, and resource file mapping to reduce memory usage.
[0073] The ResNet50 skin color model can be called through Android NNAPI for binary classification to obtain a fingertip click binary image based on the HSV color model.
[0074] Remove the noise in the fingertip click binary image to obtain the current fingertip click image.
[0075] It is understandable that there may be some noise points in the edge contour and center position of the binary image processed by the skin color model, which will cause certain interference to the fingertip position positioning. The opening and closing operation model can be used. The opening and closing operation model removes the noise points in the binary image through the opening and closing operations of depthwise convolution and ordinary convolution. First, the isolated small dots and burrs are removed through the opening operation, and then the cracks are filled through the closing operation, thereby removing the noise points in the fingertip click binary image and obtaining the current fingertip click image.
[0076] In some embodiments, the above step 120, based on the current fingertip click image, determines the current fingertip position and the positioning reliability, including: inputting the current fingertip click image into the position matching model, and outputting the current fingertip position and the positioning reliability.
[0077] It is understandable that a position matching model may be used for target detection, that is, the current fingertip click image is input into the position matching model, and the position matching model may output the current fingertip position and the positioning reliability.
[0078] The position matching model can extract the fingertip position features from the current fingertip click image obtained after being processed by the opening and closing operation model through two conv layers, and then send it to two fully connect layers for fingertip position coordinate calculation to obtain the current fingertip position and positioning reliability.
[0079] Among them, the position matching model is pre-trained with fingertip click sample images as samples, and fingertip position sample data corresponding to the fingertip click sample images and fixed-position reliability sample data as sample labels. The fingertip click sample images, fingertip position sample data and fixed-position reliability sample data can be obtained manually, or can be obtained by the position matching model based on historical fingertip click images taken by the camera.
[0080] In some embodiments, the skin color model, opening and closing operation model, and position matching model can be integrated into a fingertip position detection model. Since the skin color model, opening and closing operation model, and position matching model all use neural network operations, they can be integrated into a fingertip position detection model for processing, which is more friendly to NPU processing and has better computing efficiency.
[0081] It is worth noting that the current camera shooting angle can be guaranteed to be consistent with the shooting angle corresponding to the historical fingertip click images used in the training fingertip position detection model. At the same time, the camera parameter settings are adjusted to ensure that the current camera parameters are consistent with the camera parameters corresponding to the historical fingertip click images used in the training fingertip position detection model, thereby reducing interference caused by differences in parameter settings.
[0082] In some embodiments, the above-mentioned step 130 determines the effective click position of the fingertip based on the current fingertip position, the historical fingertip position and the positioning confidence, including: determining the effective click position of the fingertip based on the comparison result of the current fingertip position with the historical fingertip position, the comparison result of the positioning confidence with the confidence threshold, and the comparison result of the current fingertip position with the effective position range.
[0083] It can be understood that the current fingertip position can be compared with the historical fingertip position to obtain a first comparison result, the positioning confidence and the confidence threshold can be compared to obtain a second comparison result, the current fingertip position can be compared with the valid position range to obtain a third comparison result, and the effective click position of the fingertip can be determined based on the first comparison result, the second comparison result and the third comparison result.
[0084] For example, when the first comparison result, the second comparison result and the third comparison result all satisfy the set rules, the current fingertip position is used as the effective fingertip click position. Of course, it can also be freely set that when one or two of the set rules are satisfied in the first comparison result, the second comparison result and the third comparison result, the current fingertip position is used as the effective fingertip click position. The comparison method is not specifically limited here, nor are the specific setting rules and the number of setting rules. Technical personnel in this field can freely set them according to actual conditions.
[0085] In some embodiments, based on the comparison result of the current fingertip position with the historical fingertip position, the comparison result of the positioning confidence with the confidence threshold, and the comparison result of the current fingertip position with the valid position range, determining the effective click position of the fingertip includes:
[0086] If it is confirmed that the positioning confidence is greater than the confidence threshold, a reference displacement between the current fingertip position and a plurality of historical fingertip positions within a target period before the current moment is determined.
[0087] It can be understood that the position confidence must exceed the set confidence threshold before the fingertip is considered to be found. Otherwise, it is determined that the fingertip is not found in the current fingertip click image. At this time, the reference displacement of the current fingertip position and multiple historical fingertip positions within the target period before the current moment is calculated.
[0088] It should be noted that the camera can shoot the target panel 20 in real time at a preset frequency, so that a fingertip click image is obtained at each moment. The current moment corresponds to the current fingertip click image, and there may be multiple historical fingertip click images in the target time period before the current moment. The current fingertip click image corresponds to the identification of the current fingertip position, and the historical fingertip click images correspond to the identification of the historical fingertip positions. The current fingertip position is compared with multiple historical fingertip positions to calculate the reference displacement, and the reference displacement is the distance between every two fingertip positions in the target time period.
[0089] For example, the target period can be 1 second. Then when the camera's shooting frequency is 50fps, 49 historical fingertip click images and 1 current fingertip click image can be obtained, and the reference displacement of these 50 fingertip click images can be calculated.
[0090] Confirm that the reference displacement is less than the displacement threshold and the current fingertip position is within the valid position range, and use the current fingertip position as the valid fingertip click position.
[0091] It can be understood that a displacement threshold can be set, and the reference displacement and the displacement threshold can be compared. When the reference displacement is less than the displacement threshold, it is determined whether the current fingertip position is in a valid position range. The valid position range can be a position range limited by the surface of the target panel 20. When the current fingertip position is in the valid position range, it is considered to meet the three conditions set above, so that the current fingertip position can be used as the effective click position of the fingertip.
[0092] In a specific example, in the first aspect, the positioning confidence is greater than the confidence threshold of 95%. In the second aspect, within the first second of the current moment, it is determined that the fingertip remains substantially stationary on the target panel 20 based on the current fingertip click image and the historical fingertip click image, that is, when the camera shoots at a frequency of 50fps, the fingertip position movement of 50 consecutive image frames does not exceed the coordinate 200 (about 2cm). Of course, a deviation of 5 frames can be allowed. In the third aspect, the three-dimensional position corresponding to the current fingertip position (x, y, z) does not exceed the effective position range limit of the agreed target interface. The target panel 20 can be designed to have an x range of coordinates 0-2436, a y range of coordinates 0-1700, and a z range of coordinates 0-400. When the above three conditions are met, the current fingertip position can be used as the effective fingertip click position.
[0093] It is worth noting that during the research and development process, the inventors discovered that the effective click position of the fingertip can be obtained through a CPU-based visual neural network, but this method is limited by the computing power of the CPU and can usually only select non-computationally intensive model structures, which contain fewer resource parameters. This will lead to poor recognition effects and occupy the CPU computing resources of other software, resulting in higher power consumption and heat levels.
[0094] Here, NPU can be used to execute the fingertip click position detection method, which has made a new matching and process change from training to engine implementation. From the training perspective, this solution completes floating-point training based on Pytorch, and completes the fixed-point training of the NPU forward operation of the adapter device by simulating the fixed-point forward and backward operation process of NNAPI (Android Neural Networks Application Programming Interface), ensuring the consistency of training and reasoning effects. At the same time, the forward operation uses the NNAPI interface common to Android devices for matching reasoning, without the need to implement complex reasoning operator code based on the device chip architecture. With the help of the faster, more efficient and low-power characteristics of the NPU chip for AI computing, you can choose a computationally intensive model structure and a larger number of model parameters. Thereby improving the recognition effect, reducing the CPU resource usage of other software, and reducing power consumption and heat generation levels.
[0095] The fingertip click position detection device provided by the present invention is described below. The fingertip click position detection device described below and the fingertip click position detection method described above can be referenced to each other.
[0096] like Figure 6 As shown, the present invention provides a fingertip click position detection device, which includes: an acquisition device 610, a first determination device 620 and a second determination device 630.
[0097] The acquisition device 610 acquires the current fingertip click image.
[0098] The first determining means 620 determines the current fingertip position and the positioning reliability based on the current fingertip click image.
[0099] The second determining device 630 determines the effective click position of the fingertip based on the current fingertip position, the historical fingertip position and the positioning reliability, and the historical fingertip position is determined based on the historical fingertip click image.
[0100] The fingertip click position detection device provided by the present invention obtains the current fingertip click image, and identifies the current fingertip position and positioning reliability from the current fingertip click image, and determines the effective fingertip click position through the current fingertip position, historical fingertip positions and positioning reliability. It can detect the fingertip position in the scenario where a touch screen is missing, thereby expanding the application scenarios of fingertip interaction.
[0101] In some embodiments, the second determination device is also used to determine the effective click position of the fingertip based on the comparison result of the current fingertip position with the historical fingertip position, the comparison result of the positioning confidence with the confidence threshold, and the comparison result of the current fingertip position with the effective position range.
[0102] In some embodiments, the second determination device is also used to: confirm that the positioning confidence is greater than the confidence threshold, then determine the reference displacement of the current fingertip position and multiple historical fingertip positions within the target time period before the current moment; confirm that the reference displacement is less than the displacement threshold and the current fingertip position is within the valid position range, and use the current fingertip position as the effective click position of the fingertip.
[0103] In some embodiments, the first determination device is also used to input the current fingertip click image into the position matching model, and output the current fingertip position and positioning reliability; wherein the position matching model is pre-trained with the fingertip click sample image as a sample, and the fingertip position sample data corresponding to the fingertip click sample image and the positioning reliability sample data as sample labels.
[0104] In some embodiments, the acquisition device is further used to: acquire a fingertip click color image; and pre-process the fingertip click color image to obtain a current fingertip click image.
[0105] In some embodiments, the acquisition device is further used to: perform color conversion and denoising on the fingertip click color image to obtain the current fingertip click image.
[0106] In some embodiments, the acquisition device is also used to: map the fingertip click color image to the HSV color model to obtain the fingertip click binary image; remove noise in the fingertip click binary image to obtain the current fingertip click image.
[0107] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the fingertip click position detection method, which includes: obtaining the current fingertip click image; determining the current fingertip position and the positioning reliability based on the current fingertip click image; determining the effective fingertip click position based on the current fingertip position, the historical fingertip position and the positioning reliability, wherein the historical fingertip position is determined based on the historical fingertip click image.
[0108] The fingertip click position detection method provided by the present invention obtains the current fingertip click image, and identifies the current fingertip position and the positioning reliability from the current fingertip click image, and determines the effective fingertip click position through the current fingertip position, the historical fingertip position and the positioning reliability. It can realize the detection of the fingertip position in the scenario where the touch screen is missing, expand the application scenarios of fingertip interaction, and reduce data processing power consumption.
[0109] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0110] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fingertip click position detection method provided by the above-mentioned methods, which includes: obtaining a current fingertip click image; determining the current fingertip position and positioning reliability based on the current fingertip click image; determining the effective fingertip click position based on the current fingertip position, historical fingertip positions and positioning reliability, wherein the historical fingertip position is determined based on the historical fingertip click image.
[0111] The fingertip click position detection method provided by the present invention obtains the current fingertip click image, and identifies the current fingertip position and the positioning reliability from the current fingertip click image, and determines the effective fingertip click position through the current fingertip position, the historical fingertip position and the positioning reliability. It can realize the detection of the fingertip position in the scenario where the touch screen is missing, expand the application scenarios of fingertip interaction, and reduce data processing power consumption.
[0112] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the fingertip click position detection method provided by the above-mentioned methods, the method comprising: obtaining a current fingertip click image; determining the current fingertip position and the positioning reliability based on the current fingertip click image; determining the effective fingertip click position based on the current fingertip position, historical fingertip positions and the positioning reliability, the historical fingertip positions being determined based on the historical fingertip click images.
[0113] The fingertip click position detection method provided by the present invention obtains the current fingertip click image, and identifies the current fingertip position and the positioning reliability from the current fingertip click image, and determines the effective fingertip click position through the current fingertip position, the historical fingertip position and the positioning reliability. It can realize the detection of the fingertip position in the scenario where the touch screen is missing, expand the application scenarios of fingertip interaction, and reduce data processing power consumption.
[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fingertip click position detection method, characterized in that: include: Get the current fingertip click image of the target panel clicked by the user with the fingertip; Based on the current fingertip click image, determine the current fingertip position and the positioning reliability; Determine the effective click position of the fingertip based on the current fingertip position, the historical fingertip position and the positioning reliability, wherein the historical fingertip position is determined based on the historical fingertip click image; the current fingertip image and the historical fingertip image are used to determine the fingertip displacement within the target period before the current moment, and when the fingertip displacement is less than the displacement threshold and the positioning reliability is greater than the confidence threshold, use the current fingertip position as the effective click position of the fingertip; The positioning reliability refers to the degree of deviation between the current fingertip position and the real position of the fingertip relative to the target panel; the effective fingertip click position refers to the click position generated by the user's intention to click the target panel with the fingertip to realize human-computer interaction; The determining the current fingertip position and the positioning reliability based on the current fingertip click image includes: Inputting the current fingertip click image into a position matching model, and outputting the current fingertip position and the positioning reliability; The position matching model is pre-trained using fingertip click sample images as samples, and fingertip position sample data corresponding to the fingertip click sample images and positioning reliability sample data as sample labels.
2. The fingertip click position detection method according to claim 1, characterized in that: The determining of the effective fingertip click position based on the current fingertip position, the historical fingertip position and the positioning reliability includes: The effective click position of the fingertip is determined based on the comparison result between the current fingertip position and the historical fingertip position, the comparison result between the positioning confidence and the confidence threshold, and the comparison result between the current fingertip position and the effective position range.
3. The fingertip click position detection method according to claim 2, characterized in that: The determining of the effective fingertip click position based on the comparison result between the current fingertip position and the historical fingertip position, the comparison result between the positioning confidence and the confidence threshold, and the comparison result between the current fingertip position and the effective position range includes: Confirming that the positioning confidence is greater than the confidence threshold, determining a reference displacement between the current fingertip position and a plurality of historical fingertip positions within a target period before the current moment; Confirm that the reference displacement is less than the displacement threshold and that the current fingertip position is within the valid position range, and use the current fingertip position as the fingertip valid click position.
4. The fingertip click position detection method according to any one of claims 1 to 3, characterized in that: The obtaining of the current fingertip click image comprises: Get fingertip click color image; The fingertip click color image is preprocessed to obtain the current fingertip click image.
5. The fingertip click position detection method according to claim 4, characterized in that: The preprocessing of the fingertip click color image to obtain the current fingertip click image includes: performing color conversion and denoising processing on the fingertip click color image to obtain the current fingertip click image.
6. The fingertip click position detection method according to claim 5, characterized in that: The step of performing color conversion and denoising on the fingertip click color image to obtain the current fingertip click image includes: Mapping the fingertip click color image to the HSV color model to obtain a fingertip click binary image; The noise points in the fingertip click binary image are removed to obtain the current fingertip click image.
7. A fingertip click position detection device, characterized in that: include: The acquisition device is used to acquire a current fingertip click image of a user clicking a target panel with a fingertip; A first determining device, for determining a current fingertip position and a positioning reliability based on the current fingertip click image; A second determining device is used to determine the effective click position of the fingertip based on the current fingertip position, the historical fingertip position and the positioning reliability, wherein the historical fingertip position is determined based on the historical fingertip click image; the current fingertip image and the historical fingertip image are used to determine the fingertip displacement in the target time period before the current moment, and when the fingertip displacement is less than the displacement threshold and the positioning reliability is greater than the confidence threshold, the current fingertip position is used as the effective click position of the fingertip; The positioning reliability refers to the degree of deviation between the current fingertip position and the real position of the fingertip relative to the target panel; the effective fingertip click position refers to the click position generated by the user's intention to click the target panel with the fingertip to realize human-computer interaction; The determining the current fingertip position and the positioning reliability based on the current fingertip click image includes: Inputting the current fingertip click image into a position matching model, and outputting the current fingertip position and the positioning reliability; The position matching model is pre-trained using fingertip click sample images as samples, and fingertip position sample data corresponding to the fingertip click sample images and positioning reliability sample data as sample labels.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the fingertip click position detection method as described in any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the fingertip click position detection method according to any one of claims 1 to 6 are implemented.
