WO2022126775A1 - Cursor control method and apparatus, device and medium - Google Patents

Cursor control method and apparatus, device and medium Download PDF

Info

Publication number
WO2022126775A1
WO2022126775A1 PCT/CN2020/141781 CN2020141781W WO2022126775A1 WO 2022126775 A1 WO2022126775 A1 WO 2022126775A1 CN 2020141781 W CN2020141781 W CN 2020141781W WO 2022126775 A1 WO2022126775 A1 WO 2022126775A1
Authority
WO
WIPO (PCT)
Prior art keywords
gesture
movement
distance
cursor
video
Prior art date
Application number
PCT/CN2020/141781
Other languages
French (fr)
Chinese (zh)
Inventor
朱理森
Original Assignee
安徽鸿程光电有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 安徽鸿程光电有限公司 filed Critical 安徽鸿程光电有限公司
Publication of WO2022126775A1 publication Critical patent/WO2022126775A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer

Definitions

  • the present application belongs to the field of terminal equipment, and in particular, relates to a cursor control method, apparatus, device and medium.
  • interactive terminals such as interactive electronic whiteboards, video display stands, LCD writing screens, and interactive writing screens
  • users can use external devices such as mice and keyboards, or users can directly or indirectly touch Interactive terminal for manipulation.
  • Embodiments of the present application provide a cursor control method, apparatus, device, and medium, which can control the cursor movement according to the movement speed of the gesture, the reference movement range of the gesture, and the first movement distance of the gesture, so as to improve the control accuracy of the cursor.
  • an embodiment of the present application provides a cursor control method, which includes:
  • the gesture is the gesture of the target object to manipulate the interactive terminal
  • the ratio of the movement distance between the gesture and the cursor is determined according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area, which specifically includes:
  • the moving distance ratio is determined according to the ratio of the size of the display area to the first moving amplitude.
  • the first coefficient is negatively correlated with the moving speed
  • the first coefficient is a fixed value.
  • the first coefficient is negatively correlated with the moving speed, including:
  • the first coefficient decreases proportionally with the increase of the moving speed
  • the first coefficient decreases according to the cosine variation law as the moving speed increases.
  • the first movement distance includes a plurality of gesture movement sub-distances, wherein each gesture movement sub-distance is the movement distance of the gesture between two adjacent moments;
  • the target movement distance includes: a plurality of cursor movement sub-distances corresponding to the plurality of gesture movement sub-distances one-to-one respectively.
  • the first movement distance is obtained according to the position of the gesture in at least two video frames of the video, which specifically includes:
  • the at least three video frames include at least two video frames.
  • the gesture movement sub-distance between every two adjacent first moments is determined, and a plurality of gesture movement sub-distances are obtained.
  • the gesture movement sub-distance between every two adjacent first moments is determined to obtain a plurality of gesture movement sub-distances.
  • the method before obtaining the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video, the method further includes:
  • the position of the gesture in the first video frame is determined based on the position of the gesture in the second video frame ;
  • the preset time period is a preset time period starting from receiving the second video frame including the gesture.
  • the reference movement magnitude is related to the target object
  • the method further includes:
  • the reference movement range corresponding to the body shape information is determined.
  • an embodiment of the present application provides a cursor control device, the device comprising:
  • the first acquisition module is used to acquire the video of the gesture and the size of the display area of the interactive terminal, and the gesture is the gesture of the target object to manipulate the interactive terminal;
  • a first processing module configured to obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video;
  • the second processing module is used for determining the ratio of the movement distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture and the size of the display area, wherein the reference movement range is the reference value of the movement range of the gesture;
  • the third processing module is used for determining the target moving distance of the cursor according to the moving distance ratio and the first moving distance;
  • the cursor control module is used to control the cursor to move in the display area according to the target moving distance.
  • a cursor control device including:
  • the cursor control method provided by the first aspect or any optional implementation manner of the first aspect is implemented.
  • a fourth aspect provides a computer storage medium, where computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the cursor control method provided by the first aspect or any optional implementation manner of the first aspect is implemented .
  • the cursor control method, device, device, and medium of the embodiments of the present application can determine the movement distance ratio of the gesture and the cursor according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and determine the movement distance ratio of the gesture and the cursor according to the movement distance ratio and the first movement distance.
  • Distance to determine the target moving distance of the cursor in the display area. Since the movement speed of the gesture, the reference movement range of the gesture, the first movement distance and other factors can affect the movement distance of the cursor, it is possible to control the movement of the cursor according to the movement speed of the gesture, the reference movement range of the gesture and the first movement distance, and improve the accuracy of the cursor movement. control accuracy.
  • Fig. 1 is a scene schematic diagram of a related cursor control technology
  • FIG. 2 is a schematic diagram of a scenario of a cursor control solution provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a cursor control method provided by the first embodiment of the present application.
  • FIG. 5 is a schematic diagram of an exemplary interpolation position point provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another cursor control method provided by the first embodiment of the present application.
  • FIG. 7 is a specific flowchart of another cursor control method provided by the first embodiment of the present application.
  • FIG. 8 is a schematic diagram of a cursor control scheme provided by an embodiment of the present application when a video frame containing a gesture is not received;
  • FIG. 9 is a flowchart of still another cursor control method provided by the first embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a cursor control device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a cursor control device provided by an embodiment of the present application.
  • the interactive terminal can acquire a video containing gestures through the image acquisition device, and track the movement trajectory of the gesture in the video.
  • the virtual cursor on the display screen of the interactive terminal is controlled to move by using the gesture movement trajectory obtained by the tracking.
  • FIG. 1 is a schematic diagram of a scene related to a cursor control technology.
  • Figure 1 shows an interactive terminal 10, and a cursor 11 on the interactive terminal.
  • the gesture trajectory of the user in the time period t1 to t6 is shown as the curve 21 .
  • the time period t1 to t6 can be specifically divided into the following five sub-time periods with the same time interval: sub-time period t1-t2, sub-time period t2-t3, sub-time period t3-t4, sub-time period t4-t5 and Sub-period t5-t6.
  • a cursor movement track as shown in the curve 22 is obtained, and the cursor is controlled to move along the track 22 .
  • the gesture movement trace 21 is similar to the cursor movement trace 22 , and the cursor movement trace 22 can be regarded as an equal reduction of the gesture movement trace 21 .
  • the control accuracy of the cursor in the related scheme is always consistent, and correspondingly, the control accuracy of the cursor is relatively low.
  • the user sometimes wishes to perform a coarse control over the cursor, and sometimes wishes to perform a finer control over the cursor. For example, when the user wishes to quickly move the cursor from a certain position on the screen to another position, he wishes to perform coarse control over the cursor. And, when the user wants to move little by little from one location to another, he wants fine control over the cursor.
  • the embodiments of the present application provide a cursor control method, apparatus, device, and medium, which can be applied to an application scenario in which an interactive terminal is controlled by using human gestures.
  • it can be specifically applied to a specific application scenario in which a human gesture is used to control a cursor on an interactive terminal such as an electronic whiteboard, a video display stand, and a liquid crystal writing screen to move.
  • the technical solutions of the embodiments of the present application can use factors such as the first movement distance of the gesture, the movement speed of the gesture, and the reference movement range of the gesture to control the cursor, thereby improving the control accuracy of the cursor.
  • FIG. 2 is a schematic diagram of a scenario of a cursor control solution provided by an embodiment of the present application. As shown in FIG. 2 , when the user makes the gesture trajectory 21 in the time period t1 to t6 , the gesture trajectory 21 and the cursor movement trajectory 23 are not completely similar.
  • FIG. 3 is a schematic flowchart of a cursor control method provided by the first embodiment of the present application. As shown in FIG. 3 , the cursor control method 300 includes S310 to S350.
  • the gesture in S310 it is the gesture of the target object to manipulate the interactive terminal.
  • the gesture may refer to a gesture of the target terminal's hand. It should be noted that, the gestures in the embodiments of the present application may be a gesture of making a fist, a gesture of extending five fingers, an OK gesture, a V-shaped gesture, etc., and the specific actions of the gesture are not limited.
  • the target objects may refer to users with interactive terminal control capabilities, and may specifically include different user groups such as the elderly, children, and adults.
  • the video in S310 may be a video obtained by tracking the hand of the target object, which may include multiple video frames.
  • the video in S310 may be obtained by tracking a complete gesture, or may be obtained by tracking multiple gestures, which is not limited.
  • the user when the user is waving his hand, he can track his hand to obtain one or more videos.
  • the display area size of the interactive terminal it is used to indicate the size of the display area.
  • the video frames may be preprocessed.
  • the preprocessing may include at least one of the following: image scaling processing, image enhancement processing, and the like. Wherein, if the image scaling processing is performed on the video frames, the resolution difference between the video frames can be reduced. If image enhancement processing is performed on the video frame, the blur can be removed and the clarity of the video frame can be improved.
  • the position of the gesture in each video frame of the video may also be determined. Specifically, each video frame of the video can be input into the gesture tracking model to obtain the position of the gesture in each video frame.
  • the gesture tracking model may be a deep neural network model.
  • the obtained motion trajectory of the hand may be smoothed. Specifically, it can be smoothed using filtering technology.
  • S320 Obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video.
  • the movement speed Vi of the gesture can be expressed as And, in order to facilitate the control of the cursor, the first moving distance ⁇ L i can be represented by a component in the X direction and a component in the Y direction, such as ( ⁇ Xi, ⁇ Yi). It should be noted that it can also be represented in other forms according to specific scenarios and actual conditions, for example, for a circular screen, it can be represented in the form of polar coordinates, which is not limited.
  • the movement speed Vi of the gesture may be the movement speed between the first position (Xi, Yi) and the second position (Xj, Yj). Accordingly, the first movement distance may represent the movement distance of the gesture between the first position and the second position.
  • the first position may be the position of the gesture in a certain video frame of the video
  • the second position may be the position of the gesture in another video frame of the video.
  • i and j may be any positive integers less than or equal to N.
  • the first position and the second position may be the positions of the gesture in two adjacent video frames. For example, if the first position of the gesture in the fourth video frame is (X4, Y4), the second position of the gesture in the fifth video frame is (X5, Y5).
  • ⁇ L i For the first moving distance ⁇ L i can be expressed as ( ⁇ Xi, ⁇ Yi), where the two components can each satisfy formula (1):
  • the first position is the position of the gesture in the ith video frame
  • the position (X im , Y im ) of the gesture in the ith video frame and the position (X i+m , Y i+m ) of the gesture in the i+m th video frame can be used, Determines the movement speed of the gesture in the ith video frame.
  • m can be any positive integer, for example, m can be equal to 1. It should be noted that i+m should be guaranteed to be less than or equal to the total number of image frames of the video, and im should be greater than or equal to 1.
  • the moving speed Vi can be expressed as The two components can each be expressed as Equation (2):
  • At least three video frames may be used to calculate the moving speed. For example, you can use the position of the gesture on the i-1th video frame and the position of the gesture on the i+1th video frame to calculate a speed value; then use the position of the gesture on the i-2th video frame and the position of the gesture on the i+2 th video frame, calculate a speed value, and then use the average of the two speed values as the movement speed of the gesture in the ith video frame.
  • the movement can be determined according to the position of the gesture in all video frames between the two non-adjacent video frames speed.
  • the movement speed of the gesture in any two adjacent video frames between the two non-adjacent video frames can be calculated, and the average value of the obtained multiple moving speeds can be calculated, and the average value of the multiple speeds can be used as the gesture.
  • the speed of movement between the two non-adjacent video frames can be calculated, and the average value of the obtained multiple moving speeds can be calculated, and the average value of the multiple speeds can be used as the gesture.
  • the gesture is between the third video frame and the fourth video frame.
  • the movement speed V1, and the movement speed V2 of the gesture between the 4th video frame and the 5th video frame, and then the average value of V1 and V2 is determined as the movement speed of the gesture between the 3rd video frame and the 5th video frame. It should be noted that, for the specific implementation manner of calculating the movement speed of the gesture in any two adjacent video frames, reference may be made to the relevant description of the previous embodiment, which will not be repeated here.
  • the gesture reference movement range Span0 corresponding to the gesture, it is a reference value of the movement range of the gesture.
  • the gesture reference movement range may be between 0.4m and 1.6m.
  • the reference movement magnitude Span0 corresponding to the gesture is related to the target object.
  • the reference movement range Span0 of all gestures is the same.
  • the reference movement range of the same gesture is different.
  • the objects may be grouped according to age groups, such as children and adults. For example, for Child A and Child B, the reference amplitude values of their gestures are both 0.4m. For adults C and D, the reference amplitude values of their gestures are both 1.5m.
  • the objects may be grouped according to body size, such as tall users and short users. For example, gesture 1 of tall user E and gesture 1 of short user F have different reference movement ranges. The reference amplitude value of the gesture of the tall user E is 1.6 m, and the reference amplitude value of the gesture of the short user F is both 1.2 m.
  • the movement distance ratio rate of the gesture and the cursor is affected by parameters such as the movement speed Vi and the reference movement range Span0 corresponding to the gesture. Specifically, the larger the value of the movement speed Vi of the gesture, the larger the value of the ratio rate. The smaller the reference movement range Span0 corresponding to the gesture, the larger the value of rate.
  • the embodiments of the present application set certain boundary conditions for the relationship between the movement speed Vi of the gesture and the movement distance ratio rate. That is, when the movement speed Vi of the gesture is less than the preset speed threshold Vu, the movement distance ratio rate increases as the movement speed Vi increases. When the movement speed Vi of the gesture is greater than or equal to the preset speed threshold Vu, as the movement speed Vi increases, the movement distance ratio rate remains unchanged.
  • the preset speed threshold Vu may be set according to specific scenarios and actual needs, for example, may be any value between 2-5 m/s, which is not limited.
  • S340 Determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance.
  • the target moving distance ⁇ li of the cursor it is the moving distance of the cursor in the display area.
  • the relevant description of the first moving distance which will not be repeated here.
  • the target moving distance ⁇ li of the cursor can be expressed as ( ⁇ xi, ⁇ yi), which can satisfy formula (3):
  • control cursor moves from the position at the previous moment in the display area by a distance ⁇ xi in the X direction and a distance ⁇ yi in the Y direction.
  • the ratio of the movement distance between the gesture and the cursor can be determined according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and according to the ratio of the movement distance and the first movement distance, it can be determined that the cursor is displayed on the display.
  • the first movement range Span1 of the gesture may be determined according to the movement speed Vi and the reference movement range Span0. Then, the moving distance ratio rate is determined according to the ratio of the screen size Res to the first moving range Span1.
  • FIG. 4 is a flowchart of another cursor control method provided by the first embodiment of the present application. The difference between FIG. 4 and FIG. 3 is that step S330 in FIG. 3 is specifically refined into steps S331 to S333 in FIG. 4 .
  • the first coefficient ⁇ is inversely related to the movement speed Vi. That is, the first coefficient ⁇ decreases as the moving speed Vi increases.
  • a certain boundary is set for the relationship between the two. That is, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient ⁇ is negatively correlated with the moving speed Vi. When the moving speed Vi is greater than or equal to the preset speed threshold Vu, the first coefficient ⁇ is a fixed value. Specifically, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient ⁇ may decrease proportionally with the increase of the moving speed Vi, or may decrease according to the cosine variation law. The following will be divided into two examples, and the specific relationship between the first coefficient ⁇ and the moving speed Vi will be described in detail.
  • the first coefficient decreases proportionally as the moving speed increases.
  • the first coefficient ⁇ can be expressed as formula (4):
  • is a proportional coefficient, and its value range can be between 0 and 1, and its specific value can be set according to specific scenarios and actual needs, which is not limited.
  • the first coefficient decreases according to a cosine variation law as the moving speed increases.
  • the first coefficient ⁇ can be expressed as formula (5):
  • an appropriate first coefficient ⁇ calculation formula can be selected according to the moving habit of the target object. For example, if the moving speed of the target object is relatively average, formula (4) is selected to calculate the first coefficient ⁇ . If the moving speed of the target object is relatively two-level, that is, whether it is moving at a high speed or moving at a low speed, formula (5) is selected to calculate the first coefficient ⁇ . It should be noted that when formula (5) is selected, since the first coefficient changes in a cosine law, when the moving speed is too fast or too slow, the change of the first coefficient is relatively stable, which improves the control stability.
  • the historical movement speed data of the target user can be used to determine whether the user's speed is relatively average.
  • the moving speed of other gestures that the user has performed in the user history video may be used.
  • parameters such as variance and mean square error of historical moving speed data may be calculated to determine whether the user's moving speed is average. For example, if the variance is greater than the preset variance threshold, it is determined that the speed is divided into two levels, and if it is less than the preset variance threshold, it is determined that the speed is relatively average.
  • S332 Determine the first movement range Span1 of the gesture according to the product of the first coefficient ⁇ and the reference movement range Span0.
  • the first movement range Span1 of the gesture can be expressed as formula (6):
  • the first coefficient ⁇ may be expressed as the above formula (5) or the above formula (6), which will not be repeated here.
  • the reference movement range Span0 may be determined according to the body shape of the target object.
  • the cursor control method may further include steps A and B of determining the reference movement amplitude Span0.
  • Step A acquiring the body shape information H1 of the target object.
  • the body shape information represents information that can reflect the body shape of the target object, for example, height information and/or width information.
  • the body type information H1 may be the height of a person.
  • Step B Determine the reference movement width Span0 corresponding to the body shape information H1.
  • the relationship between the body shape information H1 and the reference movement range Span0 can be set according to specific scenarios and actual needs, and there is a positive correlation between the two.
  • the reference movement width Span0 increases as the body type information H1 increases.
  • the reference movement width Span0 corresponding to the value range is used as the reference movement width Span0 corresponding to the body shape information H1 .
  • different reference movement amplitudes are set for target objects with different heights.
  • a small distance of movement of a short or slender object such as a child, and a larger distance of a tall or wide object such as an adult male, can control the cursor to move the same distance.
  • Short or slender users don't need to perform the same gesture multiple times when moving the cursor in a wide range.
  • Shorter or slender users can move the cursor at a smaller distance, improving fine-grained control of the cursor.
  • S333 Determine the moving distance ratio rate according to the ratio of the display area size res to the first moving range Span1.
  • the moving distance ratio rate can be expressed as formula (7):
  • the target movement distance of the cursor is related to the movement distance of the gesture between two video frames. If the sampling interval of the video frames is large, for example, the sampling interval is 30 frames/second or 15 frames/second, or if the gesture moves fast, it will cause the gesture to move more between two adjacent video frames. Correspondingly, As the cursor moves, it moves one large distance at a time. Visually, the user feels that the movement of the cursor is not coherent, but there is a certain delay, which affects the visual experience.
  • M interpolation position points of the gesture may be inserted between the video frames by means of interpolation.
  • N+M positions of the gesture can be acquired in total. Specifically, it includes the position of the gesture in N video frames, and the position of the gesture in M interpolation position points.
  • M can be any positive integer, and the value of M can be set according to specific scenarios and actual requirements, which is not limited.
  • the distances between the N+M positions are reduced, and the target moving distance of each cursor movement is also reduced accordingly, thereby improving the visual experience and improving the cursor control accuracy.
  • the position corresponding to the gesture at the interpolation moment may be estimated, so that multiple interpolation positions are inserted between video frames.
  • k interpolation positions may be inserted at equal time intervals ⁇ t between two adjacent video frames.
  • the sampling times of any two adjacent video frames are T and T+ ⁇ T respectively, and if an interpolation position point is inserted every interval ⁇ t, the time t corresponding to the k interpolation position points is T+ ⁇ t, T respectively +2 ⁇ t, ..., T+k ⁇ t.
  • the position of the gesture in any two adjacent video frames respectively represents the position of the gesture at time T and the position of the gesture at time T+ ⁇ T
  • the k interpolation position points respectively represent the position of the gesture at time T+ ⁇ T.
  • k is any positive integer.
  • the time interval ⁇ t may be 1/50 second.
  • FIG. 5 is a schematic diagram of an exemplary interpolation position point provided by an embodiment of the present application.
  • 7 interpolation position points can be inserted. Specifically, if the position of the gesture in the i-th video frame is Ai, and the position in the i+1-th video frame is Ai+1, the seven interpolation position points can be represented as Bi1 to Bi7 respectively.
  • the n-th interpolation position point is Ti The estimated gesture position at time +n ⁇ t. where n is any integer between 1 and 7.
  • the first movement distance ⁇ L i may be divided into k+1 sub-distances, that is to say, the first movement distance ⁇ L i includes k gesture movement sub-distances ⁇ L i1 to ⁇ L i (k+1) .
  • each gesture movement sub-distance is the movement distance of the gesture between two adjacent moments.
  • the first moving distance can be subdivided into 8 sub-distances, which are the sub-distances between Ai and Bi1 and between Bi1 and Bi2 The sub-distance of , ..., the sub-distance between Bi7 and Ai+1.
  • the target movement distance includes: k+1 cursor movement sub-distances corresponding to the k+1 gesture movement sub-distances one-to-one respectively.
  • the ratio between any cursor movement sub-distance and its corresponding gesture movement sub-distance is equal to the movement distance ratio rate.
  • FIG. 6 is a schematic flowchart of another cursor control method provided by the first embodiment of the present application. The difference between FIG. 6 and FIG. 3 is that the step S340 of determining the gesture movement distance in FIG. 3 is specifically refined into steps S341 to S343 in FIG. 6 .
  • the acquisition moment of the i-th video frame is Ti
  • the acquisition moment of the i+1-th video frame is Ti+ ⁇ T.
  • the at least three video frames include at least two video frames in S341.
  • FIG. 7 is a specific flowchart of another cursor control method provided by the first embodiment of the present application.
  • S343 may be specifically implemented as S3431 to S3433.
  • S3431 Calculate the movement speed v of the gesture based on the position of the gesture in at least two video frames.
  • the movement speed of the gesture can be represented as (v X , v Y ).
  • the movement speed of the previous video frame in the adjacent two video frames can be determined as the movement calculated in S3431 speed.
  • S3432 Calculate the movement acceleration a of the gesture based on the position of the gesture in at least three video frames.
  • the movement acceleration a of the gesture can be calculated according to the adjacent video frame and the video frame preceding the adjacent video frame. where a can be represented as (ax, aY).
  • the gesture is in the i-th video frame.
  • the position of the gesture and the position of the gesture in the i+1th video frame calculate the movement acceleration of the gesture in the i-th video frame.
  • the calculation formula of the movement acceleration a of the gesture may include formula (8):
  • the calculation formula of the position (Xp, Yp) of the p-th interpolation position point may include formula (9):
  • p can be any positive integer not greater than k.
  • the position difference of every two adjacent interpolation position points is used as a moving sub-distance.
  • the time frame of the video frame is lost. For example, after the i-th video frame is acquired and after the preset time period Ta, the i-th video frame is not received. +1 video frame. Wherein, the preset time period Ta is greater than or equal to the sampling interval ⁇ T. 2. After the preset time period Ta, a video frame is received, but the hand position cannot be determined in the video frame.
  • the applicant also provides a solution capable of performing cursor control without receiving a video frame containing a gesture.
  • FIG. 8 is a schematic diagram of a cursor control solution provided by an embodiment of the present application in a case where a video frame containing a gesture is not received.
  • a cursor control solution provided by an embodiment of the present application in a case where a video frame containing a gesture is not received.
  • Figure 8 after receiving the i-th video frame and the i+1-th video frame, if the i+2-th video frame is lost, it is possible to predict Estimate the position of the gesture in the i+2th video frame.
  • FIG. 9 is a flowchart of still another cursor control method provided by the first embodiment of the present application. The difference between FIG. 9 and FIG. 3 is that step S360 is further included before step S320.
  • the preset time period is a preset time period starting from receiving the second video frame including the gesture.
  • the first video frame can be regarded as the k+2 th insertion position point (the i+1 th video frame is regarded as the k+1 th insertion position point) and substituted into formula (9) to calculate the gesture at the th position within a video frame.
  • the calculation formula of the position (Xi+2, Yi+2) of the gesture in the first video frame may include formula (10):
  • the embodiments of the present application not only provide a cursor control method, but also provide a cursor control device corresponding thereto.
  • FIG. 10 is a schematic structural diagram of a cursor control apparatus provided by an embodiment of the present application.
  • the cursor control apparatus 1000 includes a first acquisition module 1010 , a first processing module 1020 , a second processing module 1030 , a third processing module 1040 and a cursor control module 1050 .
  • the first acquiring module 1010 is configured to acquire the video of the gesture and the size of the display area of the interactive terminal, and the gesture is a gesture by which the target object manipulates the interactive terminal.
  • the first processing module 1020 is configured to obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video.
  • the second processing module 1030 is configured to determine the ratio of the movement distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area.
  • the reference movement range is a reference value of the movement range of the gesture.
  • the third processing module 1040 is configured to determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance.
  • the cursor control module 1050 is configured to control the cursor to move in the display area according to the target moving distance.
  • the cursor control device of the embodiment of the present application can determine the ratio of the movement distance between the gesture and the cursor according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and determine whether the cursor is displayed on the display according to the ratio of the movement distance and the first movement distance. The distance the target moves within the area. Since the movement speed of the gesture, the reference movement range of the gesture, the first movement distance and other factors can affect the movement distance of the cursor, it is possible to control the movement of the cursor according to the movement speed of the gesture, the reference movement range of the gesture and the first movement distance, and improve the accuracy of the cursor movement. control accuracy.
  • the second processing module 730 specifically includes a first obtaining unit, a first processing unit and a second processing unit.
  • a first obtaining unit for obtaining a first coefficient corresponding to the moving speed
  • a first processing unit configured to determine the first movement range of the gesture according to the product of the first coefficient and the reference movement range
  • the second processing unit is configured to determine the moving distance ratio according to the ratio of the size of the display area to the first moving amplitude.
  • the first coefficient is negatively correlated with the movement speed when the movement speed is less than a preset speed threshold.
  • the first coefficient is a fixed value.
  • the first coefficient is negatively related to movement speed, including:
  • the first coefficient decreases proportionally with the increase of the moving speed
  • the first coefficient decreases according to the cosine variation law as the moving speed increases.
  • the first movement distance includes a plurality of gesture movement sub-distances, wherein each gesture movement sub-distance is a movement distance of the gesture between two adjacent moments.
  • the target movement distance includes: a plurality of cursor movement sub-distances corresponding to the plurality of gesture movement sub-distances one-to-one respectively.
  • the first processing module 720 specifically includes: a second obtaining unit, a third processing unit and a fourth processing unit.
  • the second acquiring unit is configured to acquire the respective acquisition moments of the at least two video frames.
  • the third processing unit is configured to determine a plurality of first moments between the respective acquisition moments of the at least two video frames.
  • the fourth processing unit is configured to determine the gesture movement sub-distance between every two adjacent first moments according to the position of the gesture in at least three video frames of the video, and obtain a plurality of gesture movement sub-distances.
  • the at least three video frames include at least two video frames.
  • a gesture movement sub-distance between every two adjacent first moments is determined according to the position of the gesture in at least three video frames, and a plurality of gesture movement sub-distances are obtained, which specifically includes:
  • the gesture movement sub-distance between every two adjacent first moments is determined to obtain a plurality of gesture movement sub-distances.
  • the cursor control apparatus 1000 further includes a fourth processing module.
  • the fourth processing module is used for, in the process of acquiring the multi-frame video frames of the video, if the first video frame containing the gesture is not received within the preset time period, based on the position of the gesture in the second video frame, determine that the gesture is in the first video frame. position within a video frame.
  • the preset time period is a preset time period starting from receiving the second video frame including the gesture.
  • the reference movement magnitude is related to the target object
  • the cursor control apparatus 1000 further includes a second acquiring module and a fifth processing module.
  • the second acquiring module is used for acquiring the body shape information of the target object.
  • the fifth processing module is used for determining the reference movement amplitude corresponding to the body shape information.
  • FIG. 11 shows a schematic diagram of a hardware structure of a cursor control device provided by an embodiment of the present application.
  • the cursor control device may include a processor 1101 and a memory 1102 storing computer program instructions.
  • the above-mentioned processor 1101 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • Memory 1102 may include mass storage for data or instructions.
  • memory 1102 may include a Hard Disk Drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or two or more A combination of more than one of the above.
  • Memory 1102 may include removable or non-removable (or fixed) media, where appropriate. Where appropriate, memory 1102 may be internal or external to the cursor control device. In certain embodiments, memory 1102 is non-volatile solid state memory.
  • Memory may include read only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical/tangible memory storage devices.
  • ROM read only memory
  • RAM random access memory
  • magnetic disk storage media devices e.g., magnetic disks
  • optical storage media devices e.g., magnetic disks
  • flash memory devices e.g., electrical, optical or other physical/tangible memory storage devices.
  • a memory includes one or more tangible (non-transitory) computer-readable storage media (eg, memory devices) encoded with software including computer-executable instructions, and when the software is executed (eg, by a or multiple processors), it is operable to perform the operations described with reference to a method according to an aspect of the present disclosure.
  • the processor 1101 reads and executes the computer program instructions stored in the memory 1102 to implement any one of the cursor control methods in the foregoing embodiments.
  • the cursor control device may also include a communication interface 1103 and a bus 1110 .
  • the processor 1101 , the memory 1102 , and the communication interface 1103 are connected through the bus 1110 and complete the mutual communication.
  • the communication interface 1103 is mainly used to implement communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
  • the bus 1110 includes hardware, software, or both, coupling the components of the online data flow metering device to each other.
  • the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) Interconnect, Industry Standard Architecture (ISA) Bus, Infiniband Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Microchannel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of the above.
  • Bus 310 may include one or more buses, where appropriate. Although embodiments of this application describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
  • the cursor control device may execute the cursor control method in the embodiments of the present application, thereby implementing the cursor control method and apparatus described in conjunction with FIG. 1 to FIG. 10 .
  • the embodiment of the present application may provide a computer storage medium for implementation.
  • Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by the processor, any one of the cursor control methods in the foregoing embodiments is implemented.
  • the functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof.
  • it When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, or the like.
  • ASIC application specific integrated circuit
  • elements of the present application are programs or code segments used to perform the required tasks.
  • the program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communication link by a data signal carried in a carrier wave.
  • a "machine-readable medium” may include any medium that can store or transmit information.
  • machine-readable media examples include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like.
  • the code segments may be downloaded via a computer network such as the Internet, an intranet, or the like.
  • processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It will also be understood that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by special purpose hardware that performs the specified functions or actions, or that special purpose hardware and/or A combination of computer instructions is implemented.

Abstract

A cursor control method and apparatus, a device, and a medium. The method comprises: acquiring a video of a gesture and the size of a display area of an interactive terminal (S310); according to the position of the gesture in at least two video frames of the video, obtaining the moving speed and a first moving distance of the gesture (S320); determining the moving distance ratio of the gesture to a cursor according to the moving speed, the reference movement amplitude corresponding to the gesture, and the size of the display area (S330); determining a target moving distance of the cursor according to the moving distance ratio and the first moving distance (S340); and controlling the cursor to move according to the target moving distance (S350). The movement of the cursor can be controlled according to the moving speed of the gesture, the reference movement amplitude of the gesture, and the first moving distance of the gesture, thereby improving the control accuracy of the cursor.

Description

光标控制方法、装置、设备及介质Cursor control method, device, device and medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求享有于2020年12月14日提交的名称为“光标控制方法、装置、设备及介质”的中国专利申请202011465353.0的优先权,该申请的全部内容通过引用并入本文中。This application claims the priority of Chinese Patent Application No. 202011465353.0 filed on December 14, 2020, entitled "Cursor Control Method, Apparatus, Device and Medium", the entire content of which is incorporated herein by reference.
技术领域technical field
本申请属于终端设备领域,尤其涉及光标控制方法、装置、设备及介质。The present application belongs to the field of terminal equipment, and in particular, relates to a cursor control method, apparatus, device and medium.
背景技术Background technique
随着交互式电子白板、视频展示台、液晶书写屏、交互式书写屏等交互式终端的逐步发展,用户可以借助鼠标、键盘等外接设备,或者用户可以通过直接或间接的触控操作来对交互式终端进行操控。With the gradual development of interactive terminals such as interactive electronic whiteboards, video display stands, LCD writing screens, and interactive writing screens, users can use external devices such as mice and keyboards, or users can directly or indirectly touch Interactive terminal for manipulation.
随着交互技术的进一步发展,现阶段,人们可以通过图像采集装置追踪人体动作,从而利用人体动作对交互式终端进行控制的交互技术也日益成熟。目前,通常采用手势来控制交互式终端上的光标移动,从而实现对交互式终端的操控。With the further development of interactive technology, at this stage, people can track human body movements through an image acquisition device, so that the interactive technology that uses human movements to control the interactive terminal is becoming more and more mature. At present, gestures are usually used to control the cursor movement on the interactive terminal, so as to realize the manipulation of the interactive terminal.
然而,现有技术中采用手势来控制光标移动的方案中,存在对光标的控制准确度较低的技术问题。However, in the solution in the prior art that uses gestures to control the movement of the cursor, there is a technical problem that the control accuracy of the cursor is low.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种光标控制方法、装置、设备及介质,能够根据手势的移动速度、手势的基准移动幅度以及手势的第一移动距离控制光标移动,提高对光标的控制准确度。Embodiments of the present application provide a cursor control method, apparatus, device, and medium, which can control the cursor movement according to the movement speed of the gesture, the reference movement range of the gesture, and the first movement distance of the gesture, so as to improve the control accuracy of the cursor.
第一方面,本申请实施例提供一种光标控制方法,方法包括:In a first aspect, an embodiment of the present application provides a cursor control method, which includes:
获取手势的视频和交互式终端的显示区域尺寸,手势是目标对象操控交互式终端的手势;Get the video of the gesture and the size of the display area of the interactive terminal. The gesture is the gesture of the target object to manipulate the interactive terminal;
根据手势在视频的至少两帧视频帧中的位置,得到手势的移动速度和第一移动距离;Obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video;
根据移动速度、手势对应的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,其中,基准移动幅度是手势的移动幅度的基准值;Determine the movement distance ratio between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture and the size of the display area, wherein the reference movement range is the reference value of the movement range of the gesture;
根据移动距离比例以及第一移动距离,确定光标的目标移动距离;Determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance;
控制光标在显示区域内,按照目标移动距离进行移动Control the cursor in the display area and move according to the target moving distance
在一种可选的实施方式中,根据移动速度、手势对应的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,具体包括:In an optional implementation manner, the ratio of the movement distance between the gesture and the cursor is determined according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area, which specifically includes:
获取与移动速度对应的第一系数;Obtain the first coefficient corresponding to the moving speed;
根据第一系数和基准移动幅度的乘积,确定手势的第一移动幅度;determining the first movement range of the gesture according to the product of the first coefficient and the reference movement range;
根据显示区域尺寸与第一移动幅度的比值,确定移动距离比例。The moving distance ratio is determined according to the ratio of the size of the display area to the first moving amplitude.
在一种可选的实施方式中,在移动速度小于预设速度阈值的情况下,第一系数与移动速度负相关;In an optional implementation manner, when the moving speed is less than a preset speed threshold, the first coefficient is negatively correlated with the moving speed;
在移动速度大于或等于预设速度阈值的情况下,第一系数为固定值。When the moving speed is greater than or equal to the preset speed threshold, the first coefficient is a fixed value.
在一种可选的实施方式中,第一系数与移动速度负相关,包括:In an optional embodiment, the first coefficient is negatively correlated with the moving speed, including:
第一系数随着移动速度的增加而等比例减小;The first coefficient decreases proportionally with the increase of the moving speed;
或者,第一系数随着移动速度的增加,按照余弦变化规律减小。Or, the first coefficient decreases according to the cosine variation law as the moving speed increases.
在一种可选的实施方式中,第一移动距离包括多个手势移动子距离,其中,每个手势移动子距离为手势在相邻两个时刻之间的移动距离;In an optional implementation manner, the first movement distance includes a plurality of gesture movement sub-distances, wherein each gesture movement sub-distance is the movement distance of the gesture between two adjacent moments;
相应地,目标移动距离包括:与多个手势移动子距离分别一一对应的多个光标移动子距离。Correspondingly, the target movement distance includes: a plurality of cursor movement sub-distances corresponding to the plurality of gesture movement sub-distances one-to-one respectively.
在一种可选的实施方式中,根据手势在视频的至少两帧视频帧中的位置,得到第一移动距离,具体包括:In an optional implementation manner, the first movement distance is obtained according to the position of the gesture in at least two video frames of the video, which specifically includes:
获取至少两帧视频帧各自的采集时刻;Obtain the respective acquisition moments of at least two video frames;
在至少两帧视频帧各自的采集时刻之间,确定多个第一时刻;between the respective acquisition moments of the at least two video frames, determining a plurality of first moments;
根据手势在视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离;According to the position of the gesture in at least three video frames of the video, determine the gesture movement sub-distance between every two adjacent first moments, and obtain a plurality of gesture movement sub-distances;
其中,至少三帧视频帧包含至少两帧视频帧。Wherein, the at least three video frames include at least two video frames.
在一种可选的实施方式中,根据手势在视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离,具体包括:In an optional implementation manner, according to the position of the gesture in at least three video frames of the video, the gesture movement sub-distance between every two adjacent first moments is determined, and a plurality of gesture movement sub-distances are obtained. include:
基于手势在至少两帧视频帧中的位置,计算手势的移动速度;Calculate the movement speed of the gesture based on the position of the gesture in at least two video frames;
以及基于手势在至少三帧视频帧中的位置,计算手势的移动加速度;and calculating the movement acceleration of the gesture based on the position of the gesture in at least three video frames;
根据移动速度、移动加速度、以及手势在至少两帧视频帧的任一视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离。According to the movement speed, the movement acceleration, and the position of the gesture in any one of the at least two video frames, the gesture movement sub-distance between every two adjacent first moments is determined to obtain a plurality of gesture movement sub-distances.
在一种可选的实施方式中,根据手势在视频的至少两帧视频帧中的位置,得到手势的移动速度和第一移动距离之前,方法还包括:In an optional implementation manner, before obtaining the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video, the method further includes:
在获取视频的多帧视频帧的过程中,若在预设时间段内未接收到包含手势的第一视频帧,基于手势在第二视频帧的位置,确定手势在第一视频帧中的位置;In the process of acquiring multiple video frames of the video, if the first video frame containing the gesture is not received within the preset time period, the position of the gesture in the first video frame is determined based on the position of the gesture in the second video frame ;
其中,预设时间段为以接收到包含手势的第二视频帧为起点的预设时间段。The preset time period is a preset time period starting from receiving the second video frame including the gesture.
在一种可选的实施方式中,基准移动幅度与目标对象相关;In an optional embodiment, the reference movement magnitude is related to the target object;
根据移动速度、手势对应的基准移动幅度以及显示区域尺寸,确定手势移动距离与光标移动距离的比例之前,方法还包括:Before determining the ratio of the gesture movement distance to the cursor movement distance according to the movement speed, the reference movement range corresponding to the gesture and the display area size, the method further includes:
获取目标对象的体型信息;Get the body shape information of the target object;
确定与体型信息对应的基准移动幅度。The reference movement range corresponding to the body shape information is determined.
第二方面,本申请实施例提供了一种光标控制装置,装置包括:In a second aspect, an embodiment of the present application provides a cursor control device, the device comprising:
第一获取模块,用于获取手势的视频和交互式终端的显示区域尺寸,手势是目标对象操控交互式终端的手势;The first acquisition module is used to acquire the video of the gesture and the size of the display area of the interactive terminal, and the gesture is the gesture of the target object to manipulate the interactive terminal;
第一处理模块,用于根据手势在视频的至少两帧视频帧中的位置,得到手势的移动速度和第一移动距离;a first processing module, configured to obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video;
第二处理模块,用于根据移动速度、手势对应的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,其中,基准移动幅度是手势的移动幅度的基准值;The second processing module is used for determining the ratio of the movement distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture and the size of the display area, wherein the reference movement range is the reference value of the movement range of the gesture;
第三处理模块,用于根据移动距离比例以及第一移动距离,确定光标的目标移动距离;The third processing module is used for determining the target moving distance of the cursor according to the moving distance ratio and the first moving distance;
光标控制模块,用于控制光标在显示区域内,按照目标移动距离进行移动。The cursor control module is used to control the cursor to move in the display area according to the target moving distance.
第三方面,提供一种光标控制设备,包括:In a third aspect, a cursor control device is provided, including:
处理器以及存储有计算机程序指令的存储器;a processor and a memory storing computer program instructions;
处理器执行计算机程序指令时实现第一方面或第一方面的任一可选的实施方式提供的光标控制方法。When the processor executes the computer program instructions, the cursor control method provided by the first aspect or any optional implementation manner of the first aspect is implemented.
第四方面,提供一种计算机存储介质,计算机存储介质上存储有计算机程序指令,计算机程序指令被处理器执行时实现第一方面或第一方面的任一可选的实施方式提供的光标控制方法。A fourth aspect provides a computer storage medium, where computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the cursor control method provided by the first aspect or any optional implementation manner of the first aspect is implemented .
本申请实施例的光标控制方法、装置、设备及介质,可以根据手势的移动速度、手势的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,并根据移动距离比例以及第一移动距离,确定光标在显示区域内的目标移动距离。由于手势的移动速度、手势的基准移动幅度、第一移动距离等因素均能够影响光标移动距离,从而能够根据手势的移动速度、手势的基准移动幅度以及第一移动距离控制光标移动,提高对光标的控制准确度。The cursor control method, device, device, and medium of the embodiments of the present application can determine the movement distance ratio of the gesture and the cursor according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and determine the movement distance ratio of the gesture and the cursor according to the movement distance ratio and the first movement distance. Distance, to determine the target moving distance of the cursor in the display area. Since the movement speed of the gesture, the reference movement range of the gesture, the first movement distance and other factors can affect the movement distance of the cursor, it is possible to control the movement of the cursor according to the movement speed of the gesture, the reference movement range of the gesture and the first movement distance, and improve the accuracy of the cursor movement. control accuracy.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单的介绍,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments of the present application. For those of ordinary skill in the art, without creative work, the Additional drawings can be obtained from these drawings.
图1是一种相关的光标控制技术的场景示意图;Fig. 1 is a scene schematic diagram of a related cursor control technology;
图2是本申请实施例提供的一种光标控制方案的场景示意图;FIG. 2 is a schematic diagram of a scenario of a cursor control solution provided by an embodiment of the present application;
图3是本申请第一实施例提供的一种光标控制方法的流程示意图;3 is a schematic flowchart of a cursor control method provided by the first embodiment of the present application;
图4是本申请第一实施例提供的另一种光标控制方法的流程图;4 is a flowchart of another cursor control method provided by the first embodiment of the present application;
图5是本申请实施例提供的一种示例性的插值位置点的示意图;5 is a schematic diagram of an exemplary interpolation position point provided by an embodiment of the present application;
图6是本申请第一实施例提供的又一种光标控制方法的流程示意图;6 is a schematic flowchart of another cursor control method provided by the first embodiment of the present application;
图7是本申请第一实施例提供的另一种光标控制方法的具体流程图;FIG. 7 is a specific flowchart of another cursor control method provided by the first embodiment of the present application;
图8为本申请实施例提供的一种在未接收到包含手势的视频帧的情况下的光标控制方案的逻辑示意图;8 is a schematic diagram of a cursor control scheme provided by an embodiment of the present application when a video frame containing a gesture is not received;
图9是本申请第一实施例提供的再一种光标控制方法的流程图;FIG. 9 is a flowchart of still another cursor control method provided by the first embodiment of the present application;
图10是本申请实施例提供的一种光标控制装置的结构示意图;FIG. 10 is a schematic structural diagram of a cursor control device provided by an embodiment of the present application;
图11是本申请实施例提供的一种光标控制设备的结构示意图。FIG. 11 is a schematic structural diagram of a cursor control device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将详细描述本申请的各个方面的特征和示例性实施例,为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及具体实施例,对本申请进行进一步详细描述。应理解,此处所描述的具体实施例仅意在解释本申请,而不是限定本申请。对于本领域技术人员来说,本申请可以在不需要这些具体细节中的一些细节的情况下实施。下面对实施例的描述仅仅是为了通过示出本申请的示例来提供对本申请更好的理解。The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. It will be apparent to those skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating examples of the present application.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises" does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.
随着人机交互技术的迅速发展,人们在现阶段可以利用手势对交互式终端进行控制。交互式终端可以通过图像采集装置获取包含手势的视频,对视频中的手势移动轨迹进行跟踪。再利用跟踪得到的手势移动轨迹,控制交互式终端的显示屏上的虚拟光标进行移动。With the rapid development of human-computer interaction technology, people can use gestures to control interactive terminals at this stage. The interactive terminal can acquire a video containing gestures through the image acquisition device, and track the movement trajectory of the gesture in the video. The virtual cursor on the display screen of the interactive terminal is controlled to move by using the gesture movement trajectory obtained by the tracking.
在一种相关技术中,在光标控制过程中,可以将手势的实际移动距离进行固定比例的缩放,得到光标的目标移动距离。为了便于理解,图1是一种相关的光标控制技术的场景示意图。图1示出了交互式终端10,以及交互式终端上的光标11。用户在时间段t1至t6内的手势轨迹如曲线21所示。其中,时间段t1至t6可以具体划分为如下5个时间间隔相同的子时间段:子时间段t1-t2、子时间段t2-t3、子时间段t3-t4、子时间段t4-t5以及子时间段t5-t6。In a related art, during the cursor control process, the actual moving distance of the gesture can be scaled by a fixed ratio to obtain the target moving distance of the cursor. For ease of understanding, FIG. 1 is a schematic diagram of a scene related to a cursor control technology. Figure 1 shows an interactive terminal 10, and a cursor 11 on the interactive terminal. The gesture trajectory of the user in the time period t1 to t6 is shown as the curve 21 . The time period t1 to t6 can be specifically divided into the following five sub-time periods with the same time interval: sub-time period t1-t2, sub-time period t2-t3, sub-time period t3-t4, sub-time period t4-t5 and Sub-period t5-t6.
具体地,交互式终端10对该手势的实际移动距离进行固定比例的缩放后,得到如曲线22所示的光标移动轨迹,并控制光标沿着轨迹22进行移动。由图1可知,手势移动轨迹21和光标移动轨迹22相似,可以将光标移动轨迹22看作是手势移动轨迹21的等幅缩小。Specifically, after the interactive terminal 10 scales the actual moving distance of the gesture by a fixed ratio, a cursor movement track as shown in the curve 22 is obtained, and the cursor is controlled to move along the track 22 . As can be seen from FIG. 1 , the gesture movement trace 21 is similar to the cursor movement trace 22 , and the cursor movement trace 22 can be regarded as an equal reduction of the gesture movement trace 21 .
在这种控制方法中,仅将手势的实际移动距离作为光标移动控制的唯一依据,考虑因素较为单一,相应的,对光标的控制准确度也有待提高。In this control method, only the actual movement distance of the gesture is used as the only basis for the cursor movement control, and the factors to be considered are relatively simple. Accordingly, the control accuracy of the cursor needs to be improved.
因此需要一种能够提高光标的准确控制度的技术方案。Therefore, there is a need for a technical solution that can improve the accurate control of the cursor.
申请人通过研究发现,上述相关方案中,由于手势与光标的移动距离比例始终是 固定的,该相关方案对光标的控制精度始终是一致的,相应的,对光标的控制准确度较低。而在实际过程中,用户有时会希望对光标进行一个粗放的控制,而有时会希望对光标进行一个精细的控制。比如当用户希望光标从屏幕上的某一位置快速移动至另一位置时,其希望对光标进行粗放控制。以及,当用户希望从某一位置一点点地移动至另一位置时,其希望对光标进行精细控制。The applicant found through research that, in the above-mentioned related scheme, since the ratio of the movement distance between the gesture and the cursor is always fixed, the control accuracy of the cursor in the related scheme is always consistent, and correspondingly, the control accuracy of the cursor is relatively low. In the actual process, the user sometimes wishes to perform a coarse control over the cursor, and sometimes wishes to perform a finer control over the cursor. For example, when the user wishes to quickly move the cursor from a certain position on the screen to another position, he wishes to perform coarse control over the cursor. And, when the user wants to move little by little from one location to another, he wants fine control over the cursor.
基于此,本申请实施例提供了一种光标控制方法、装置、设备和介质,可以应用到利用人体手势对交互式终端控制的应用场景中。示例性的,可以具体应用于利用人体手势控制电子白板、视频展示台、液晶书写屏等交互式终端上的光标进行移动的具体应用场景中。与上述相关技术相比,本申请实施例的技术方案可以利用手势的第一移动距离、手势的移动速度以及手势的基准移动幅度等因素对光标进行控制,提高了光标的控制准确度。Based on this, the embodiments of the present application provide a cursor control method, apparatus, device, and medium, which can be applied to an application scenario in which an interactive terminal is controlled by using human gestures. Exemplarily, it can be specifically applied to a specific application scenario in which a human gesture is used to control a cursor on an interactive terminal such as an electronic whiteboard, a video display stand, and a liquid crystal writing screen to move. Compared with the above-mentioned related technologies, the technical solutions of the embodiments of the present application can use factors such as the first movement distance of the gesture, the movement speed of the gesture, and the reference movement range of the gesture to control the cursor, thereby improving the control accuracy of the cursor.
为了便于理解,在开始介绍本申请实施例提供的光标控制方案之前,先结合图2对本申请实施例的光标控制方法的应用场景进行说明。For ease of understanding, before introducing the cursor control solution provided by the embodiment of the present application, an application scenario of the cursor control method of the embodiment of the present application will be described with reference to FIG. 2 .
图2是本申请实施例提供的一种光标控制方案的场景示意图。如图2所示,当用户在时间段t1至t6内做出手势轨迹21时,手势轨迹21和光标移动轨迹23并不完全相似。FIG. 2 is a schematic diagram of a scenario of a cursor control solution provided by an embodiment of the present application. As shown in FIG. 2 , when the user makes the gesture trajectory 21 in the time period t1 to t6 , the gesture trajectory 21 and the cursor movement trajectory 23 are not completely similar.
对图1和图2对比,可以发现如下不同:(1)、子时间段内t1-t2内,手势移动较慢,与图1示出的相关方案中控制光标在t1-t2间实际移动距离相比,本申请实施例的方案中控制光标在t1-t2内实际移动距离较短。(2)、子时间段内t2-t3内,手势移动较快,与图1示出的相关方案中控制光标在t2-t3间实际移动距离相比,本申请实施例的方案中控制光标在t2-t3间实际移动距离较长。Comparing Figure 1 and Figure 2, the following differences can be found: (1) In the sub-time period t1-t2, the gesture moves slowly, and the actual movement distance of the control cursor between t1-t2 in the related scheme shown in Figure 1 In comparison, in the solution of the embodiment of the present application, the actual moving distance of the control cursor within t1-t2 is shorter. (2) In the sub-time period t2-t3, the gesture moves faster. Compared with the actual moving distance of the control cursor between t2-t3 in the related scheme shown in FIG. The actual moving distance between t2-t3 is longer.
在通过附图2示出的本申请实施例的应用场景对本申请实施例提供的光标控制方案有了初步了解之后,本申请实施例的下述部分将首先对本申请实施例所提供的光标控制方法进行介绍。After a preliminary understanding of the cursor control solution provided by the embodiment of the present application is obtained through the application scenario of the embodiment of the present application shown in FIG. 2 , the following part of the embodiment of the present application will firstly describe the cursor control method provided by the embodiment of the present application. Introduce.
图3是本申请第一实施例提供的一种光标控制方法的流程示意图。如图3所示,光标控制方法300包括S310至S350。FIG. 3 is a schematic flowchart of a cursor control method provided by the first embodiment of the present application. As shown in FIG. 3 , the cursor control method 300 includes S310 to S350.
S310,获取手势的视频和交互式终端的显示区域尺寸。S310, acquiring the video of the gesture and the size of the display area of the interactive terminal.
首先,对于S310中的手势,其是目标对象操控交互式终端的手势。手势可以指目标终端的手部的示意动作。需要说明的是,本申请实施例中的手势可以是握拳的手势、五指伸开的手势、OK的手势和V型手势等,对手势的具体动作不作限定。其中,目标对象可以指具备交互式终端操控能力的用户,具体可以包括老人、儿童、成年人等不同用户群体。First, for the gesture in S310, it is the gesture of the target object to manipulate the interactive terminal. The gesture may refer to a gesture of the target terminal's hand. It should be noted that, the gestures in the embodiments of the present application may be a gesture of making a fist, a gesture of extending five fingers, an OK gesture, a V-shaped gesture, etc., and the specific actions of the gesture are not limited. The target objects may refer to users with interactive terminal control capabilities, and may specifically include different user groups such as the elderly, children, and adults.
其次,对于S310中的视频,其可以是对目标对象的手部追踪得到的视频,其可以包括多帧视频帧。具体地,S310中的视频可以是对一个完整手势动作追踪得到的,又或者可以是对多个手势动作追踪得到的,对此不作限定。示例性地,用户在做挥手动作时,可以对其手部进行追踪,得到一个或多个视频。Secondly, for the video in S310, it may be a video obtained by tracking the hand of the target object, which may include multiple video frames. Specifically, the video in S310 may be obtained by tracking a complete gesture, or may be obtained by tracking multiple gestures, which is not limited. Exemplarily, when the user is waving his hand, he can track his hand to obtain one or more videos.
再其次,对于交互式终端的显示区域尺寸,其用于表示显示区域的大小。示例性地,其可以用交互式终端的显示屏幕的分辨率res来表示。例如res=1600×1200。Thirdly, for the display area size of the interactive terminal, it is used to indicate the size of the display area. Exemplarily, it can be represented by the resolution res of the display screen of the interactive terminal. For example res=1600×1200.
在一些实施例中,为了提高图像处理效率,在获取视频的视频帧之后,可以对视频帧进行预处理。示例性地,预处理可以包括以下至少一种:图像缩放处理、图像增强处理等。其中,若对视频帧进行图像缩放处理,可以减小视频帧之间的分辨率差异。若对视频帧进行图像增强处理,可以去除模糊,提高视频帧的清晰程度。In some embodiments, in order to improve the efficiency of image processing, after the video frames of the video are acquired, the video frames may be preprocessed. Exemplarily, the preprocessing may include at least one of the following: image scaling processing, image enhancement processing, and the like. Wherein, if the image scaling processing is performed on the video frames, the resolution difference between the video frames can be reduced. If image enhancement processing is performed on the video frame, the blur can be removed and the clarity of the video frame can be improved.
在一些实施例中,在获取视频之后,为了便于后续处理,在S310之后,还可以确定手势在视频的各视频帧中的位置。具体地,可以将视频的各视频帧输入手势追踪模型,得到手势在各视频帧中的位置。示例性地,手势追踪模型可以是深度神经网络模型。在一个可选的实施例中,通过手势追踪模型确定手部的运动轨迹之后,可以对得到的手部的运动轨迹进行平滑处理。具体地,可以利用滤波技术对其进行平滑处理。In some embodiments, after acquiring the video, in order to facilitate subsequent processing, after S310, the position of the gesture in each video frame of the video may also be determined. Specifically, each video frame of the video can be input into the gesture tracking model to obtain the position of the gesture in each video frame. Illustratively, the gesture tracking model may be a deep neural network model. In an optional embodiment, after the motion trajectory of the hand is determined by the gesture tracking model, the obtained motion trajectory of the hand may be smoothed. Specifically, it can be smoothed using filtering technology.
S320,根据手势在视频的至少两帧视频帧中的位置,得到手势的移动速度和第一移动距离。S320: Obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video.
首先,对于手势的移动速度和第一移动距离的含义,具体说明如下。First, the meanings of the movement speed of the gesture and the first movement distance are specifically described as follows.
示例性地,手势的移动速度Vi可以表示为
Figure PCTCN2020141781-appb-000001
以及,为了便于对光标进行控制,第一移动距离ΔL i可以用X方向上的分量和Y方向上的分量进行表示,比如可以表示为(ΔXi,ΔYi)。需要说明的是,其还可以根据具体场景和实际情况采用其他形式进行表示,比如对于圆形屏幕,可以用极坐标形式进行表示,对此不作限定。
Exemplarily, the movement speed Vi of the gesture can be expressed as
Figure PCTCN2020141781-appb-000001
And, in order to facilitate the control of the cursor, the first moving distance ΔL i can be represented by a component in the X direction and a component in the Y direction, such as (ΔXi, ΔYi). It should be noted that it can also be represented in other forms according to specific scenarios and actual conditions, for example, for a circular screen, it can be represented in the form of polar coordinates, which is not limited.
在一些实施例中,手势的移动速度Vi可以为第一位置(Xi,Yi)与第二位置(Xj,Yj)之间的移动速度。相应地,第一移动距离可以表示手势在第一位置和第二位置之间的移动距离。In some embodiments, the movement speed Vi of the gesture may be the movement speed between the first position (Xi, Yi) and the second position (Xj, Yj). Accordingly, the first movement distance may represent the movement distance of the gesture between the first position and the second position.
示例性地,第一位置可以是手势在视频中某一视频帧中的位置,第二位置可以是手势在视频的另一视频帧中的位置。示例性地,若该视频包括N帧视频帧,则i和j可以是小于或等于N的任意正整数。Exemplarily, the first position may be the position of the gesture in a certain video frame of the video, and the second position may be the position of the gesture in another video frame of the video. Exemplarily, if the video includes N video frames, i and j may be any positive integers less than or equal to N.
在一个示例中,为了便于对光标进行精细化控制,第一位置和第二位置可以是手势在两个相邻视频帧中的位置。比如,若手势在第4帧视频帧的第一位置为(X4,Y4),手势在第5帧视频帧的第二位置为(X5,Y5)。In one example, in order to facilitate fine-grained control of the cursor, the first position and the second position may be the positions of the gesture in two adjacent video frames. For example, if the first position of the gesture in the fourth video frame is (X4, Y4), the second position of the gesture in the fifth video frame is (X5, Y5).
其次,在介绍完移动速度Vi、第一移动距离ΔL i的含义之后,本申请实施例的下述部分将对移动速度以及第一移动距离ΔL i的具体计算方式进行具体说明。 Next, after introducing the meanings of the moving speed Vi and the first moving distance ΔL i , the following parts of the embodiments of the present application will specifically describe the specific calculation methods of the moving speed and the first moving distance ΔL i .
对于第一移动距离ΔL i可以表示为(ΔXi,ΔYi),其中两个分量可以各自满足公式(1): For the first moving distance ΔL i can be expressed as (ΔXi, ΔYi), where the two components can each satisfy formula (1):
Figure PCTCN2020141781-appb-000002
Figure PCTCN2020141781-appb-000002
对于移动速度Vi,下面分为两种情况对其进行讨论:For the moving speed Vi, it is discussed in two cases as follows:
第一种情况:若第一位置和第二位置是手势在相邻两帧视频帧中的位置,则可以确定手势在第一位置的移动速度,并将该速度确定为手势在第一位置和第二位置之间的移动速度。此时,j=i+1。The first case: if the first position and the second position are the positions of the gesture in two adjacent video frames, the movement speed of the gesture at the first position can be determined, and the speed is determined as the position of the gesture at the first position and the second position. The speed of movement between the second positions. At this time, j=i+1.
示例性地,若第一位置为手势在第i帧视频帧中的位置,利用第i帧视频帧之前的至少一帧视频帧以及第i帧视频帧之后的至少一帧视频帧,确定手势在第i帧视频帧中的移动速度,并将该移动速度确定为该手势在第一位置和第二位置之间的移动速度。Exemplarily, if the first position is the position of the gesture in the ith video frame, use at least one video frame before the ith video frame and at least one video frame after the ith video frame to determine that the gesture is in the ith video frame. The moving speed in the ith video frame, and determining the moving speed as the moving speed of the gesture between the first position and the second position.
作一个具体示例,可以利用手势在第i-m帧视频帧中的位置(X i-m,Y i-m),以及手势在第i+m帧视频帧中的位置(X i+m,Y i+m),确定该手势在第i帧视频帧中的移动速度。其中,m可以为任意正整数,比如m可以等于1。需要说明的是,应保证i+m小于或等于视频的图像帧的总数,i-m应大于或等于1。 As a specific example, the position (X im , Y im ) of the gesture in the ith video frame and the position (X i+m , Y i+m ) of the gesture in the i+m th video frame can be used, Determines the movement speed of the gesture in the ith video frame. Among them, m can be any positive integer, for example, m can be equal to 1. It should be noted that i+m should be guaranteed to be less than or equal to the total number of image frames of the video, and im should be greater than or equal to 1.
具体地,移动速度Vi可以表示为
Figure PCTCN2020141781-appb-000003
其中两个分量可以各自表示为公式(2):
Specifically, the moving speed Vi can be expressed as
Figure PCTCN2020141781-appb-000003
The two components can each be expressed as Equation (2):
Figure PCTCN2020141781-appb-000004
Figure PCTCN2020141781-appb-000004
需要说明的是,为了提高计算移动速度的计算精度,可以用至少三张视频帧计算移动速度。比如,可以用手势在第i-1帧视频帧上的位置以及该手势在第i+1帧视频帧上的位置,计算一个速度值;再利用手势在第i-2帧视频帧上的位置以及该手势在第i+2帧视频帧上的位置,计算一个速度值,然后将两个速度值的平均值作为第i帧视频中的手势的移动速度。It should be noted that, in order to improve the calculation accuracy of calculating the moving speed, at least three video frames may be used to calculate the moving speed. For example, you can use the position of the gesture on the i-1th video frame and the position of the gesture on the i+1th video frame to calculate a speed value; then use the position of the gesture on the i-2th video frame and the position of the gesture on the i+2 th video frame, calculate a speed value, and then use the average of the two speed values as the movement speed of the gesture in the ith video frame.
(2)若第一位置和第二位置是手势在不相邻两帧视频帧中的位置,则可以根据手势在该不相邻两帧视频帧之间的所有视频帧中的位置,确定移动速度。(2) If the first position and the second position are the positions of the gesture in two non-adjacent video frames, the movement can be determined according to the position of the gesture in all video frames between the two non-adjacent video frames speed.
具体地,可以计算手势在该不相邻两帧视频帧之间的任意相邻两视频帧的移动速度,并计算得到的多个移动速度的平均值,将该多个速度的平均值作为手势在该不相邻两帧视频帧之间的移动速度。Specifically, the movement speed of the gesture in any two adjacent video frames between the two non-adjacent video frames can be calculated, and the average value of the obtained multiple moving speeds can be calculated, and the average value of the multiple speeds can be used as the gesture. The speed of movement between the two non-adjacent video frames.
示例性地,若第一位置为手势在第3视频帧中的位置,第二位置为手势在第5视频帧中的位置,则可以确定手势在第3视频帧和第4视频帧之间的移动速度V1,以及手势在第4视频帧和第5视频帧之间的移动速度V2,然后将V1和V2的平均值确定为手势在第3视频帧和第5视频帧之间的移动速度。需要说明的是,计算手势在任意相邻两视频帧的移动速度的具体实施方式可以参见上一实施例的相关说明,在此不再赘述。Exemplarily, if the first position is the position of the gesture in the third video frame, and the second position is the position of the gesture in the fifth video frame, it can be determined that the gesture is between the third video frame and the fourth video frame. The movement speed V1, and the movement speed V2 of the gesture between the 4th video frame and the 5th video frame, and then the average value of V1 and V2 is determined as the movement speed of the gesture between the 3rd video frame and the 5th video frame. It should be noted that, for the specific implementation manner of calculating the movement speed of the gesture in any two adjacent video frames, reference may be made to the relevant description of the previous embodiment, which will not be repeated here.
S330,根据移动速度Vi、手势对应的基准移动幅度Span0以及显示区域尺寸Res,确定手势与光标的移动距离比例rate。S330 , according to the movement speed Vi, the reference movement range Span0 corresponding to the gesture, and the size of the display area Res, determine the movement distance ratio rate of the gesture and the cursor.
首先,对于手势对应的基准移动幅度Span0,其是手势的移动幅度的一个基准值。示例性地,考虑到人体的手臂移动范围,手势基准移动幅度可以在0.4m至1.6m之间。First, for the reference movement range Span0 corresponding to the gesture, it is a reference value of the movement range of the gesture. Exemplarily, considering the arm movement range of the human body, the gesture reference movement range may be between 0.4m and 1.6m.
在一些实施例中,手势对应的基准移动幅度Span0与目标对象相关。对于同一组别的对象,其所有手势的基准移动幅度Span0相同。对于不同组别的对象,其同一手势的基准移动幅度不同。In some embodiments, the reference movement magnitude Span0 corresponding to the gesture is related to the target object. For objects in the same group, the reference movement range Span0 of all gestures is the same. For different groups of objects, the reference movement range of the same gesture is different.
在一个具体的实施例中,可以按照年龄段对对象进行分组,比如分为儿童和成年人。比如,儿童A和儿童B,其手势的基准幅度值均为0.4m。成年人C和成年人D,其手势的基准幅度值均为1.5m。在另一个具体地实施例中,可以按照体型对对象进行分组,比如分为高大用户和矮小用户。比如,高大用户E的手势1和矮小用户F的手势1,其基准移动幅度不同。高大用户E的手势的基准幅度值为1.6m,矮小用户F的手势的基准幅度值均为1.2m。In a specific embodiment, the objects may be grouped according to age groups, such as children and adults. For example, for Child A and Child B, the reference amplitude values of their gestures are both 0.4m. For adults C and D, the reference amplitude values of their gestures are both 1.5m. In another specific embodiment, the objects may be grouped according to body size, such as tall users and short users. For example, gesture 1 of tall user E and gesture 1 of short user F have different reference movement ranges. The reference amplitude value of the gesture of the tall user E is 1.6 m, and the reference amplitude value of the gesture of the short user F is both 1.2 m.
其次,对于手势与光标的移动距离比例rate,其受到移动速度Vi、手势对应的基准 移动幅度Span0等参数的影响。具体地,手势的移动速度Vi的值越大,比例rate的值越大。手势对应的基准移动幅度Span0越小,rate的值越大。Secondly, for the movement distance ratio rate of the gesture and the cursor, it is affected by parameters such as the movement speed Vi and the reference movement range Span0 corresponding to the gesture. Specifically, the larger the value of the movement speed Vi of the gesture, the larger the value of the ratio rate. The smaller the reference movement range Span0 corresponding to the gesture, the larger the value of rate.
在一些实施例中,考虑到合理性,本申请实施例为手势的移动速度Vi与移动距离比例rate的关系,设置了一定的边界条件。也就是说,在手势的移动速度Vi小于预设速度阈值Vu时,移动距离比例rate随着移动速度Vi的增大而增大。当手势的移动速度Vi大于或等于预设速度阈值Vu时,随着移动速度Vi的增大,移动距离比例rate保持不变。其中,预设速度阈值Vu可以根据具体场景和实际需求进行设置,比如可以是2-5米/秒之间的任意值,对此不作限定。In some embodiments, considering the rationality, the embodiments of the present application set certain boundary conditions for the relationship between the movement speed Vi of the gesture and the movement distance ratio rate. That is, when the movement speed Vi of the gesture is less than the preset speed threshold Vu, the movement distance ratio rate increases as the movement speed Vi increases. When the movement speed Vi of the gesture is greater than or equal to the preset speed threshold Vu, as the movement speed Vi increases, the movement distance ratio rate remains unchanged. The preset speed threshold Vu may be set according to specific scenarios and actual needs, for example, may be any value between 2-5 m/s, which is not limited.
S340,根据移动距离比例以及第一移动距离,确定光标的目标移动距离。S340: Determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance.
首先,对于光标的目标移动距离Δli,其为光标在显示区域内的移动距离。具体地,目标移动距离的具体内容可以参见第一移动距离的相关描述,在此不再赘述。First, for the target moving distance Δli of the cursor, it is the moving distance of the cursor in the display area. Specifically, for the specific content of the target moving distance, reference may be made to the relevant description of the first moving distance, which will not be repeated here.
在一些实施例中,光标的目标移动距离Δli可以表示为(Δxi,Δyi),可以满足公式(3):In some embodiments, the target moving distance Δli of the cursor can be expressed as (Δxi, Δyi), which can satisfy formula (3):
Figure PCTCN2020141781-appb-000005
Figure PCTCN2020141781-appb-000005
S350,控制光标在显示区域内,按照目标移动距离Δli进行移动。S350, control the cursor to move in the display area according to the target moving distance Δli.
也就是说,控制光标在显示区域内从上一时刻的位置,向X方向移动距离Δxi,向Y方向移动距离Δyi。That is, the control cursor moves from the position at the previous moment in the display area by a distance Δxi in the X direction and a distance Δyi in the Y direction.
本申请实施例的光标控制方法,可以根据手势的移动速度、手势的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,并根据移动距离比例以及第一移动距离,确定光标在显示区域内的目标移动距离。由于手势的移动速度、手势的基准移动幅度、第一移动距离等因素均能够影响光标移动距离,从而能够根据手势的移动速度、手势的基准移动幅度以及第一移动距离控制光标移动,提高对光标的控制准确度。In the cursor control method of the embodiment of the present application, the ratio of the movement distance between the gesture and the cursor can be determined according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and according to the ratio of the movement distance and the first movement distance, it can be determined that the cursor is displayed on the display. The distance the target moves within the area. Since the movement speed of the gesture, the reference movement range of the gesture, the first movement distance and other factors can affect the movement distance of the cursor, it is possible to control the movement of the cursor according to the movement speed of the gesture, the reference movement range of the gesture and the first movement distance, and improve the accuracy of the cursor movement. control accuracy.
在一些实施例中,在S330中,可以先根据移动速度Vi和基准移动幅度Span0,确定手势的第一移动幅度Span1。然后再根据屏幕尺寸Res与第一移动幅度Span1的比值确定移动距离比例rate。In some embodiments, in S330, the first movement range Span1 of the gesture may be determined according to the movement speed Vi and the reference movement range Span0. Then, the moving distance ratio rate is determined according to the ratio of the screen size Res to the first moving range Span1.
下面结合图4对上述根据第一移动幅度Span1确定移动距离比例rate的实施方式展开具体说明。The above-mentioned embodiment of determining the moving distance ratio rate according to the first moving range Span1 will be described in detail below with reference to FIG. 4 .
图4是本申请第一实施例提供的另一种光标控制方法的流程图。图4与图3的不同之处在于,图3中的步骤S330具体细化为图4中的步骤S331至S333。FIG. 4 is a flowchart of another cursor control method provided by the first embodiment of the present application. The difference between FIG. 4 and FIG. 3 is that step S330 in FIG. 3 is specifically refined into steps S331 to S333 in FIG. 4 .
S331,获取与移动速度Vi对应的第一系数α。S331: Obtain a first coefficient α corresponding to the moving speed Vi.
在一些实施例中,第一系数α与移动速度Vi负相关。也就是说,第一系数α随着移动速度Vi的增加而减小。In some embodiments, the first coefficient α is inversely related to the movement speed Vi. That is, the first coefficient α decreases as the moving speed Vi increases.
在另一些实施例中,考虑到控制合理性,为二者之间的关系设置了一定的边界。也就是说,在移动速度Vi小于预设速度阈值Vu的情况下,第一系数α与移动速度Vi负相关。在移动速度Vi大于或等于预设速度阈值Vu的情况下,第一系数α为固定值。 具体地,在移动速度Vi小于预设速度阈值Vu的情况下,第一系数α可以随着移动速度Vi的增大等比例减小,又或者可以按照余弦变化规律减小。下面将分为两个示例,对第一系数α与移动速度Vi的具体关系展开具体说明。In other embodiments, considering the rationality of control, a certain boundary is set for the relationship between the two. That is, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient α is negatively correlated with the moving speed Vi. When the moving speed Vi is greater than or equal to the preset speed threshold Vu, the first coefficient α is a fixed value. Specifically, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient α may decrease proportionally with the increase of the moving speed Vi, or may decrease according to the cosine variation law. The following will be divided into two examples, and the specific relationship between the first coefficient α and the moving speed Vi will be described in detail.
在一个示例中,在移动速度Vi小于预设速度阈值Vu的情况下,第一系数随着移动速度的增加而等比例减小。In one example, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient decreases proportionally as the moving speed increases.
示例地,第一系数α可以表示为公式(4):Illustratively, the first coefficient α can be expressed as formula (4):
Figure PCTCN2020141781-appb-000006
Figure PCTCN2020141781-appb-000006
其中,λ为比例系数,其取值范围可以在0至1之间,其具体取值可以根据具体场景和实际需求进行设置,对此不作限制,。Among them, λ is a proportional coefficient, and its value range can be between 0 and 1, and its specific value can be set according to specific scenarios and actual needs, which is not limited.
在另一个示例中,在移动速度Vi小于预设速度阈值Vu的情况下,第一系数随着移动速度的增加,按照余弦变化规律减小。In another example, when the moving speed Vi is less than the preset speed threshold Vu, the first coefficient decreases according to a cosine variation law as the moving speed increases.
示例地,第一系数α可以表示为公式(5):Illustratively, the first coefficient α can be expressed as formula (5):
Figure PCTCN2020141781-appb-000007
Figure PCTCN2020141781-appb-000007
在一个具体应用场景中,可以根据目标对象的移动习惯选择合适的第一系数α计算公式。比如,若目标对象移动速度较为平均,则选择公式(4)计算第一系数α。若目标对象的移动速度较为两级分化,即要不高速移动,要不低速移动,则选择公式(5)计算第一系数α。需要说明的是,当选用公式(5)时,由于第一系数呈余弦规律变化,当移动速度过快或者过慢时,第一系数的变化均较为平稳,提高了控制的稳定性。In a specific application scenario, an appropriate first coefficient α calculation formula can be selected according to the moving habit of the target object. For example, if the moving speed of the target object is relatively average, formula (4) is selected to calculate the first coefficient α. If the moving speed of the target object is relatively two-level, that is, whether it is moving at a high speed or moving at a low speed, formula (5) is selected to calculate the first coefficient α. It should be noted that when formula (5) is selected, since the first coefficient changes in a cosine law, when the moving speed is too fast or too slow, the change of the first coefficient is relatively stable, which improves the control stability.
示例性地,可以用目标用户的历史移动速度数据判断该用户的速度是否较为平均。比如,可以依据用户历史视频中,该用户曾经做过的其他手势的移动速度。又或者,可以依据同一视频的该手势在前面多帧视频中的移动速度判断该用户的速度是否平均。Exemplarily, the historical movement speed data of the target user can be used to determine whether the user's speed is relatively average. For example, the moving speed of other gestures that the user has performed in the user history video may be used. Alternatively, it can be determined whether the speed of the user is average according to the moving speed of the gesture in the same video in the previous multiple frames of video.
示例性地,可以计算历史移动速度数据的方差、均方差等参数,来判断用户的移动速度是否平均。比如,若方差大于预设方差阈值,则确定其速度两级分化,若小于预设方差阈值,则确定其速度较为平均。Exemplarily, parameters such as variance and mean square error of historical moving speed data may be calculated to determine whether the user's moving speed is average. For example, if the variance is greater than the preset variance threshold, it is determined that the speed is divided into two levels, and if it is less than the preset variance threshold, it is determined that the speed is relatively average.
S332,根据第一系数α和基准移动幅度Span0的乘积,确定手势的第一移动幅度Span1。S332: Determine the first movement range Span1 of the gesture according to the product of the first coefficient α and the reference movement range Span0.
示例性地,手势的第一移动幅度Span1可以表示为公式(6):Exemplarily, the first movement range Span1 of the gesture can be expressed as formula (6):
Span1=Span0*α      (6)Span1=Span0*α (6)
其中,第一系数α可以表示为上述公式(5)或上述公式(6),在此不再赘述。The first coefficient α may be expressed as the above formula (5) or the above formula (6), which will not be repeated here.
在一些实施例中,为了提高控制的合理性,基准移动幅度Span0是可以根据目标对象的体型确定的。此时,在S332之前,光标控制方法还可以包括确定基准移动幅度Span0的步骤A和步骤B。In some embodiments, in order to improve the rationality of the control, the reference movement range Span0 may be determined according to the body shape of the target object. At this time, before S332, the cursor control method may further include steps A and B of determining the reference movement amplitude Span0.
步骤A,获取目标对象的体型信息H1。其中,体型信息表示可以反映目标对象体型的信息,比如说,身高信息和/或宽度信息等。示例性地,体型信息H1可以是人的身高。Step A, acquiring the body shape information H1 of the target object. The body shape information represents information that can reflect the body shape of the target object, for example, height information and/or width information. Exemplarily, the body type information H1 may be the height of a person.
步骤B,确定与体型信息H1对应的基准移动幅度Span0。其中,体型信息H1和基 准移动幅度Span0之间的关系可以根据具体场景和实际需求设置,二者之间成正相关。比如,基准移动幅度Span0随着体型信息H1的增大而增大。又比如,体型信息H1落入某一取值范围时,将该取值范围对应的基准移动幅度Span0作为与体型信息H1对应的基准移动幅度Span0。Step B: Determine the reference movement width Span0 corresponding to the body shape information H1. Among them, the relationship between the body shape information H1 and the reference movement range Span0 can be set according to specific scenarios and actual needs, and there is a positive correlation between the two. For example, the reference movement width Span0 increases as the body type information H1 increases. For another example, when the body shape information H1 falls within a certain value range, the reference movement width Span0 corresponding to the value range is used as the reference movement width Span0 corresponding to the body shape information H1 .
在本实施例中,为不同高度的目标对象设置不同的基准移动幅度。儿童等身高矮或者身材纤细的对象的移动的一个较小距离,与成年男性等身高高或者体型宽的对象移动的一个较大距离,可以控制光标移动相同距离。在大范围移动光标时,身高矮或者身材纤细的用户无需多次执行同一手势。身高矮或者身材纤细的用户可以实现更小距离的光标移动,提高了对光标的精细控制。In this embodiment, different reference movement amplitudes are set for target objects with different heights. A small distance of movement of a short or slender object such as a child, and a larger distance of a tall or wide object such as an adult male, can control the cursor to move the same distance. Short or slender users don't need to perform the same gesture multiple times when moving the cursor in a wide range. Shorter or slender users can move the cursor at a smaller distance, improving fine-grained control of the cursor.
S333,根据显示区域尺寸res与第一移动幅度Span1的比值,确定移动距离比例rate。S333: Determine the moving distance ratio rate according to the ratio of the display area size res to the first moving range Span1.
示例性地,移动距离比例rate可以表示为公式(7):Exemplarily, the moving distance ratio rate can be expressed as formula (7):
rate=res/Span1         (7)rate=res/Span1 (7)
在一些实施例中,若仅通过手势在视频帧上的位置计算第一移动距离,并进而控制光标移动,则光标的目标移动距离与手势在两帧视频帧之间的移动距离相关。若视频帧采样间隔较大,比如采样间隔30帧/秒或者15帧/秒,或者,若手势移动速度较快,则会导致手势在相邻两视频帧之间的移动较大,相应地,光标在进行移动时,一次会进行一个大距离的移动。在视觉上,给用户的感觉是光标的移动不是连贯的,而是存在一定卡顿,影响视觉体验。In some embodiments, if the first movement distance is calculated only by the position of the gesture on the video frame, and then the cursor movement is controlled, the target movement distance of the cursor is related to the movement distance of the gesture between two video frames. If the sampling interval of the video frames is large, for example, the sampling interval is 30 frames/second or 15 frames/second, or if the gesture moves fast, it will cause the gesture to move more between two adjacent video frames. Correspondingly, As the cursor moves, it moves one large distance at a time. Visually, the user feels that the movement of the cursor is not coherent, but there is a certain delay, which affects the visual experience.
为了提高视觉体验,可以通过插值的方式,在视频帧之间还插入该手势的M个插值位置点。此时,通过该视频,可以一共获取该手势的N+M个位置。具体地,包括该手势在N帧视频帧中的位置,以及该手势在M个插值位置点的位置。其中,M可以为任意正整数,M的取值可以根据具体场景和实际需求设置,对此不作限定。In order to improve the visual experience, M interpolation position points of the gesture may be inserted between the video frames by means of interpolation. At this time, through the video, N+M positions of the gesture can be acquired in total. Specifically, it includes the position of the gesture in N video frames, and the position of the gesture in M interpolation position points. Wherein, M can be any positive integer, and the value of M can be set according to specific scenarios and actual requirements, which is not limited.
与原先的N个位置相比,N+M个位置彼此之间的距离减小,光标每次移动的目标移动距离也相应减小,从而提高了视觉体验,提高了光标控制精度。Compared with the original N positions, the distances between the N+M positions are reduced, and the target moving distance of each cursor movement is also reduced accordingly, thereby improving the visual experience and improving the cursor control accuracy.
在一个实施例中,可以预估手势在插值时刻对应的位置,从而在视频帧之间插入多个插值位置。比如,可以在相邻两视频帧之间等时间间隔Δt插入k个插值位置。具体地,若该任意两个相邻视频帧的采样时间分别是T和T+ΔT,若每间隔Δt插入一个插值位置点,则k个插值位置点对应的时刻t分别为T+Δt、T+2Δt、……、T+kΔt。其中,ΔT表示相邻两个视频帧之间的采样间隔,ΔT/Δt=k+1。也就是说,手势在该任意两个相邻视频帧的位置分别表示该手势在T时刻的位置、以及该手势在T+ΔT时刻的位置,相应地,k个插值位置点分别表示该手势在T+Δt时刻、T+2Δt时刻、……、T+kΔt时刻的位置。其中,k为任意正整数。示例性地,时间间隔Δt可以为1/50秒。In one embodiment, the position corresponding to the gesture at the interpolation moment may be estimated, so that multiple interpolation positions are inserted between video frames. For example, k interpolation positions may be inserted at equal time intervals Δt between two adjacent video frames. Specifically, if the sampling times of any two adjacent video frames are T and T+ΔT respectively, and if an interpolation position point is inserted every interval Δt, the time t corresponding to the k interpolation position points is T+Δt, T respectively +2Δt, ..., T+kΔt. Among them, ΔT represents the sampling interval between two adjacent video frames, ΔT/Δt=k+1. That is to say, the position of the gesture in any two adjacent video frames respectively represents the position of the gesture at time T and the position of the gesture at time T+ΔT, correspondingly, the k interpolation position points respectively represent the position of the gesture at time T+ΔT. The position at time T+Δt, time T+2Δt, ..., time T+kΔt. where k is any positive integer. Illustratively, the time interval Δt may be 1/50 second.
为了便于直观表示插值位置点,图5是本申请实施例提供的一种示例性的插值位置点的示意图。如图5所示,在第i帧视频帧和第i+1帧视频帧之间,可以插入有7个插值位置点。具体地,若手势在第i帧视频帧的位置为Ai,在第i+1帧视频帧的位置为Ai+1,则7个插值位置点可以分别表示为Bi1至Bi7。若Ai至Ai+1之间的曲线表示手 势在第i帧视频帧的采样时刻Ti至第i+1帧视频帧的采样时刻Ti+ΔT的运动轨迹,则其中第n个插值位置点为Ti+nΔt时刻的预估手势位置。其中,n为1至7之间的任意整数。In order to facilitate the intuitive representation of the interpolation position point, FIG. 5 is a schematic diagram of an exemplary interpolation position point provided by an embodiment of the present application. As shown in FIG. 5 , between the i-th video frame and the i+1-th video frame, 7 interpolation position points can be inserted. Specifically, if the position of the gesture in the i-th video frame is Ai, and the position in the i+1-th video frame is Ai+1, the seven interpolation position points can be represented as Bi1 to Bi7 respectively. If the curve between Ai and Ai+1 represents the motion trajectory of the gesture from the sampling time Ti of the i-th video frame to the sampling time Ti+ΔT of the i+1-th video frame, then the n-th interpolation position point is Ti The estimated gesture position at time +nΔt. where n is any integer between 1 and 7.
在一些实施例中,在插入插值位置点之后,可以将第一移动距离ΔL i划分为k+1个子距离,也就是说第一移动距离ΔL i包括k个手势移动子距离ΔL i1至ΔL i(k+1)。其中,每个手势移动子距离为手势在相邻两个时刻之间的移动距离。继续参见图5,若第一移动距离为Ai至Ai+1之间的距离,则第一移动距离可以细分为8个子距离,分别为Ai至Bi1之间的子距离、Bi1至Bi2之间的子距离、……、Bi7至Ai+1之间的子距离。 In some embodiments, after the interpolation position point is inserted, the first movement distance ΔL i may be divided into k+1 sub-distances, that is to say, the first movement distance ΔL i includes k gesture movement sub-distances ΔL i1 to ΔL i (k+1) . Wherein, each gesture movement sub-distance is the movement distance of the gesture between two adjacent moments. Continue to refer to FIG. 5 , if the first moving distance is the distance between Ai and Ai+1, then the first moving distance can be subdivided into 8 sub-distances, which are the sub-distances between Ai and Bi1 and between Bi1 and Bi2 The sub-distance of , ..., the sub-distance between Bi7 and Ai+1.
相应地,目标移动距离包括:与k+1个手势移动子距离分别一一对应的k+1个光标移动子距离。其中,任意一个光标移动子距离与其对应的手势移动子距离之间的比值等于移动距离比例rate。Correspondingly, the target movement distance includes: k+1 cursor movement sub-distances corresponding to the k+1 gesture movement sub-distances one-to-one respectively. The ratio between any cursor movement sub-distance and its corresponding gesture movement sub-distance is equal to the movement distance ratio rate.
具体地,下面结合图6对获取移动子距离的具体实施方式展开具体说明。图6是本申请第一实施例提供的又一种光标控制方法的流程示意图。图6与图3的不同之处在于,图3中的确定的手势移动距离的步骤S340具体细化为图6中的步骤S341至S343。Specifically, a specific implementation of acquiring the moving sub-distance is described in detail below with reference to FIG. 6 . FIG. 6 is a schematic flowchart of another cursor control method provided by the first embodiment of the present application. The difference between FIG. 6 and FIG. 3 is that the step S340 of determining the gesture movement distance in FIG. 3 is specifically refined into steps S341 to S343 in FIG. 6 .
S341,获取至少两帧视频帧各自的采集时刻。S341 , acquiring the respective acquisition moments of at least two video frames.
示例性地,以相邻两帧视频帧为例,第i帧视频帧的采集时刻为Ti,第i+1帧视频帧的采集时刻为Ti+ΔT。Exemplarily, taking two adjacent video frames as an example, the acquisition moment of the i-th video frame is Ti, and the acquisition moment of the i+1-th video frame is Ti+ΔT.
S342,在至少两帧视频帧各自的采集时刻之间,确定多个第一时刻。S342, between the respective acquisition moments of the at least two video frames, determine a plurality of first moments.
示例性地,若插入k个插值位置点,则其各自的第一时刻分别为T+Δt时刻、T+2Δt时刻、……、T+kΔt时刻。Exemplarily, if k interpolation position points are inserted, their respective first time points are respectively T+Δt time, T+2Δt time, ..., T+kΔt time.
S343,根据手势在视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离。S343 , according to the positions of the gesture in at least three video frames of the video, determine the gesture movement sub-distance between each two adjacent first moments, and obtain a plurality of gesture movement sub-distances.
其中,至少三帧视频帧包含S341中的至少两帧视频帧。The at least three video frames include at least two video frames in S341.
在一些实施例中,图7是本申请第一实施例提供的另一种光标控制方法的具体流程图。如图7所示,S343可以具体实现为S3431至S3433。In some embodiments, FIG. 7 is a specific flowchart of another cursor control method provided by the first embodiment of the present application. As shown in FIG. 7 , S343 may be specifically implemented as S3431 to S3433.
S3431,基于手势在至少两帧视频帧中的位置,计算手势的移动速度v。S3431: Calculate the movement speed v of the gesture based on the position of the gesture in at least two video frames.
其中,S3431中计算手势的移动速度的具体实施方式可参见本申请实施例的S320中计算移动速度的相关说明,在此不再赘述。示例性地,手势的移动速度可以表示为(v X,v Y)。 For the specific implementation manner of calculating the movement speed of the gesture in S3431, reference may be made to the relevant description of the calculation of the movement speed in S320 in the embodiment of the present application, and details are not repeated here. Exemplarily, the movement speed of the gesture can be represented as (v X , v Y ).
在一个实施例中,若在相邻两帧视频帧之间插入多个插值位置点,则可以将该相邻两帧视频帧中的前一视频帧的移动速度确定为S3431中计算得到的移动速度。In one embodiment, if multiple interpolation position points are inserted between two adjacent video frames, the movement speed of the previous video frame in the adjacent two video frames can be determined as the movement calculated in S3431 speed.
示例性地,若在第i帧视频帧和第i+1帧视频帧之间插入多个插值位置点,则可以根据手势在第i-1帧视频帧的位置和手势在第i+1帧视频帧的位置,计算手势在第i帧视频帧的移动速度。Exemplarily, if multiple interpolation position points are inserted between the i-th video frame and the i+1-th video frame, then according to the position of the gesture in the i-1-th video frame and the gesture in the i+1-th frame The position of the video frame, and the movement speed of the gesture in the ith video frame is calculated.
S3432,基于手势在至少三帧视频帧中的位置,计算手势的移动加速度a。S3432: Calculate the movement acceleration a of the gesture based on the position of the gesture in at least three video frames.
在一个实施例中,若在相邻两帧视频帧之间插入多个插值位置点,则可以根据该相邻视频帧以及该相邻视频帧之前的视频帧,计算手势的移动加速度a。其中,a可以表示为(ax,aY)。In one embodiment, if multiple interpolation position points are inserted between two adjacent video frames, the movement acceleration a of the gesture can be calculated according to the adjacent video frame and the video frame preceding the adjacent video frame. where a can be represented as (ax, aY).
示例性地,若在第i帧视频帧和第i+1帧视频帧之间插入多个插值位置点,则可以根据手势在第i-1帧视频帧的位置、手势在第i帧视频帧的位置和手势在第i+1帧视频帧的位置,计算手势在第i帧视频帧的移动加速度。Exemplarily, if multiple interpolation position points are inserted between the i-th video frame and the i+1-th video frame, then according to the position of the gesture in the i-1-th video frame, the gesture is in the i-th video frame. The position of the gesture and the position of the gesture in the i+1th video frame, calculate the movement acceleration of the gesture in the i-th video frame.
具体地,手势的移动加速度a的计算公式可以包括公式(8):Specifically, the calculation formula of the movement acceleration a of the gesture may include formula (8):
Figure PCTCN2020141781-appb-000008
Figure PCTCN2020141781-appb-000008
S3433,根据移动速度v、移动加速度a、以及手势在至少两帧视频帧的任一视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离。S3433, according to the movement speed v, the movement acceleration a, and the position of the gesture in any one of the at least two video frames, determine the gesture movement sub-distance between every two adjacent first moments, and obtain a plurality of gesture movements sub-distance.
继续以在第i帧视频帧和第i+1帧视频帧之间插入多个插值位置点为例,其中第p个插值位置点的位置(Xp,Yp)。Continue to take the example of inserting a plurality of interpolation position points between the i-th video frame and the i+1-th video frame, where the position of the p-th interpolation position point is (Xp, Yp).
具体地,第p个插值位置点的位置(Xp,Yp)的计算公式可以包括公式(9):Specifically, the calculation formula of the position (Xp, Yp) of the p-th interpolation position point may include formula (9):
Figure PCTCN2020141781-appb-000009
Figure PCTCN2020141781-appb-000009
其中,p可以是不大于k的任意正整数。where p can be any positive integer not greater than k.
然后,再将每相邻两个插值位置点的位置差作为一个移动子距离。Then, the position difference of every two adjacent interpolation position points is used as a moving sub-distance.
在实际的过程中,还存在至少如下两种情况:一、视频帧的一个或者部分时间帧丢失,比如在获取第i帧视频帧之后,间隔预设时间段Ta之后,未接收到到第i+1帧视频帧。其中,预设时间段Ta大于或等于采样间隔ΔT。二、在预设时间段Ta之后,接收到了视频帧,但无法在该视频帧中确定手部位置。In the actual process, there are at least the following two situations: 1. One or part of the time frame of the video frame is lost. For example, after the i-th video frame is acquired and after the preset time period Ta, the i-th video frame is not received. +1 video frame. Wherein, the preset time period Ta is greater than or equal to the sampling interval ΔT. 2. After the preset time period Ta, a video frame is received, but the hand position cannot be determined in the video frame.
申请人考虑到上述情况,还提供了一种能够在未接收到包含手势的视频帧的情况下进行光标控制的方案。In consideration of the above situation, the applicant also provides a solution capable of performing cursor control without receiving a video frame containing a gesture.
为了直观理解该方案,图8为本申请实施例提供的一种在未接收到包含手势的视频帧的情况下的光标控制方案的逻辑示意图。如图8所示,在接收到第i帧视频帧和第i+1帧视频帧之后,若第i+2帧视频帧丢失,则可以根据手势在之前视频帧之中的运动情况,来预估该手势在第i+2帧视频帧中的位置。In order to understand the solution intuitively, FIG. 8 is a schematic diagram of a cursor control solution provided by an embodiment of the present application in a case where a video frame containing a gesture is not received. As shown in Figure 8, after receiving the i-th video frame and the i+1-th video frame, if the i+2-th video frame is lost, it is possible to predict Estimate the position of the gesture in the i+2th video frame.
本申请实施例的下述部分将对在未接收到包含手势的视频帧的情况下进行光标控制的方案的具体实施方式展开具体说明。The following parts of the embodiments of the present application will specifically describe the specific implementation of the solution for cursor control in the case of not receiving a video frame including a gesture.
图9是本申请第一实施例提供的再一种光标控制方法的流程图。图9与图3的不同之处在于,步骤S320之前还包括步骤S360。FIG. 9 is a flowchart of still another cursor control method provided by the first embodiment of the present application. The difference between FIG. 9 and FIG. 3 is that step S360 is further included before step S320.
S360,在获取视频的多帧视频帧的过程中,若在预设时间段内未接收到包含手势的第一视频帧,基于手势在第二视频帧的位置,确定手势在第一视频帧中的位置。S360, in the process of acquiring the multi-frame video frames of the video, if the first video frame containing the gesture is not received within the preset time period, determine that the gesture is in the first video frame based on the position of the gesture in the second video frame s position.
其中,预设时间段为以接收到包含手势的第二视频帧为起点的预设时间段。The preset time period is a preset time period starting from receiving the second video frame including the gesture.
需要说明的是,如何估算手势在该第一视频帧中的位置的具体方式可以参见本申请上述实施例中结合S3431至S3433对如何得到多个手势移动子距离的相关描述。It should be noted that, for the specific manner of how to estimate the position of the gesture in the first video frame, reference may be made to the relevant description of how to obtain multiple gesture movement sub-distances in conjunction with S3431 to S3433 in the above embodiments of the present application.
需要说明的是,可以将第一视频帧看作是第k+2个插入位置点(第i+1帧视频视作第k+1个插入位置点)代入公式(9)来计算手势在第一视频帧中的位置。It should be noted that the first video frame can be regarded as the k+2 th insertion position point (the i+1 th video frame is regarded as the k+1 th insertion position point) and substituted into formula (9) to calculate the gesture at the th position within a video frame.
具体地,手势在第一视频帧中的位置(Xi+2,Yi+2)的计算公式可以包括公式 (10):Specifically, the calculation formula of the position (Xi+2, Yi+2) of the gesture in the first video frame may include formula (10):
Figure PCTCN2020141781-appb-000010
Figure PCTCN2020141781-appb-000010
基于相同的申请构思,本申请实施例除了提供了光标控制方法之外,还提供了与之对应的光标控制装置。Based on the same application concept, the embodiments of the present application not only provide a cursor control method, but also provide a cursor control device corresponding thereto.
下面结合附图,详细介绍根据本申请实施例光标控制装置。The cursor control apparatus according to the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
图10是本申请实施例提供的一种光标控制装置的结构示意图。如图10所示,光标控制装置1000包括第一获取模块1010、第一处理模块1020、第二处理模块1030、第三处理模块1040和光标控制模块1050。FIG. 10 is a schematic structural diagram of a cursor control apparatus provided by an embodiment of the present application. As shown in FIG. 10 , the cursor control apparatus 1000 includes a first acquisition module 1010 , a first processing module 1020 , a second processing module 1030 , a third processing module 1040 and a cursor control module 1050 .
第一获取模块1010,用于获取手势的视频和交互式终端的显示区域尺寸,手势是目标对象操控交互式终端的手势。The first acquiring module 1010 is configured to acquire the video of the gesture and the size of the display area of the interactive terminal, and the gesture is a gesture by which the target object manipulates the interactive terminal.
第一处理模块1020,用于根据手势在视频的至少两帧视频帧中的位置,得到手势的移动速度和第一移动距离。The first processing module 1020 is configured to obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video.
第二处理模块1030,用于根据移动速度、手势对应的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例。The second processing module 1030 is configured to determine the ratio of the movement distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area.
其中,基准移动幅度是手势的移动幅度的基准值。The reference movement range is a reference value of the movement range of the gesture.
第三处理模块1040,用于根据移动距离比例以及第一移动距离,确定光标的目标移动距离。The third processing module 1040 is configured to determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance.
光标控制模块1050,用于控制光标在所述显示区域内,按照目标移动距离进行移动。The cursor control module 1050 is configured to control the cursor to move in the display area according to the target moving distance.
本申请实施例的光标控制装置,可以根据手势的移动速度、手势的基准移动幅度以及显示区域尺寸,确定手势与光标的移动距离比例,并根据移动距离比例以及第一移动距离,确定光标在显示区域内的目标移动距离。由于手势的移动速度、手势的基准移动幅度、第一移动距离等因素均能够影响光标移动距离,从而能够根据手势的移动速度、手势的基准移动幅度以及第一移动距离控制光标移动,提高对光标的控制准确度。The cursor control device of the embodiment of the present application can determine the ratio of the movement distance between the gesture and the cursor according to the movement speed of the gesture, the reference movement range of the gesture, and the size of the display area, and determine whether the cursor is displayed on the display according to the ratio of the movement distance and the first movement distance. The distance the target moves within the area. Since the movement speed of the gesture, the reference movement range of the gesture, the first movement distance and other factors can affect the movement distance of the cursor, it is possible to control the movement of the cursor according to the movement speed of the gesture, the reference movement range of the gesture and the first movement distance, and improve the accuracy of the cursor movement. control accuracy.
在一些实施例中,第二处理模块730具体包括第一获取单元、第一处理单元和第二处理单元。In some embodiments, the second processing module 730 specifically includes a first obtaining unit, a first processing unit and a second processing unit.
第一获取单元,用于获取与移动速度对应的第一系数;a first obtaining unit for obtaining a first coefficient corresponding to the moving speed;
第一处理单元,用于根据第一系数和基准移动幅度的乘积,确定手势的第一移动幅度;a first processing unit, configured to determine the first movement range of the gesture according to the product of the first coefficient and the reference movement range;
第二处理单元,用于根据显示区域尺寸与第一移动幅度的比值,确定移动距离比例。The second processing unit is configured to determine the moving distance ratio according to the ratio of the size of the display area to the first moving amplitude.
在一些实施例中,在移动速度小于预设速度阈值的情况下,第一系数与移动速度负相关。In some embodiments, the first coefficient is negatively correlated with the movement speed when the movement speed is less than a preset speed threshold.
在移动速度大于或等于预设速度阈值的情况下,第一系数为固定值。When the moving speed is greater than or equal to the preset speed threshold, the first coefficient is a fixed value.
在一些实施例中,第一系数与移动速度负相关,包括:In some embodiments, the first coefficient is negatively related to movement speed, including:
第一系数随着移动速度的增加而等比例减小;The first coefficient decreases proportionally with the increase of the moving speed;
或者,第一系数随着移动速度的增加,按照余弦变化规律减小。Or, the first coefficient decreases according to the cosine variation law as the moving speed increases.
在一些实施例中,第一移动距离包括多个手势移动子距离,其中,每个手势移动子距离为手势在相邻两个时刻之间的移动距离。In some embodiments, the first movement distance includes a plurality of gesture movement sub-distances, wherein each gesture movement sub-distance is a movement distance of the gesture between two adjacent moments.
相应地,目标移动距离包括:与多个手势移动子距离分别一一对应的多个光标移动子距离。Correspondingly, the target movement distance includes: a plurality of cursor movement sub-distances corresponding to the plurality of gesture movement sub-distances one-to-one respectively.
在一些实施例中,第一处理模块720,具体包括:第二获取单元、第三处理单元和第四处理单元。In some embodiments, the first processing module 720 specifically includes: a second obtaining unit, a third processing unit and a fourth processing unit.
第二获取单元,用于获取至少两帧视频帧各自的采集时刻。The second acquiring unit is configured to acquire the respective acquisition moments of the at least two video frames.
第三处理单元,用于在至少两帧视频帧各自的采集时刻之间,确定多个第一时刻。The third processing unit is configured to determine a plurality of first moments between the respective acquisition moments of the at least two video frames.
第四处理单元,用于根据手势在视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离。The fourth processing unit is configured to determine the gesture movement sub-distance between every two adjacent first moments according to the position of the gesture in at least three video frames of the video, and obtain a plurality of gesture movement sub-distances.
其中,至少三帧视频帧包含至少两帧视频帧。Wherein, the at least three video frames include at least two video frames.
在一些实施例中,根据手势在至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离,具体包括:In some embodiments, a gesture movement sub-distance between every two adjacent first moments is determined according to the position of the gesture in at least three video frames, and a plurality of gesture movement sub-distances are obtained, which specifically includes:
基于手势在至少两帧视频帧中的位置,计算手势的移动速度;Calculate the movement speed of the gesture based on the position of the gesture in at least two video frames;
以及基于手势在至少三帧视频帧中的位置,计算手势的移动加速度;and calculating the movement acceleration of the gesture based on the position of the gesture in at least three video frames;
根据移动速度、移动加速度、以及手势在至少两帧视频帧的任一视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个手势移动子距离。According to the movement speed, the movement acceleration, and the position of the gesture in any one of the at least two video frames, the gesture movement sub-distance between every two adjacent first moments is determined to obtain a plurality of gesture movement sub-distances.
在一些实施例中,光标控制装置1000还包括第四处理模块。In some embodiments, the cursor control apparatus 1000 further includes a fourth processing module.
第四处理模块用于在获取视频的多帧视频帧的过程中,若在预设时间段内未接收到包含手势的第一视频帧,基于手势在第二视频帧的位置,确定手势在第一视频帧中的位置。The fourth processing module is used for, in the process of acquiring the multi-frame video frames of the video, if the first video frame containing the gesture is not received within the preset time period, based on the position of the gesture in the second video frame, determine that the gesture is in the first video frame. position within a video frame.
其中,预设时间段为以接收到包含手势的第二视频帧为起点的预设时间段。The preset time period is a preset time period starting from receiving the second video frame including the gesture.
在一些实施例中,基准移动幅度与目标对象相关,光标控制装置1000还包括第二获取模块和第五处理模块。In some embodiments, the reference movement magnitude is related to the target object, and the cursor control apparatus 1000 further includes a second acquiring module and a fifth processing module.
第二获取模块用于获取目标对象的体型信息。The second acquiring module is used for acquiring the body shape information of the target object.
第五处理模块用于确定与体型信息对应的基准移动幅度。The fifth processing module is used for determining the reference movement amplitude corresponding to the body shape information.
根据本申请实施例的光标控制装置的其他细节,与以上结合图1至图9所示实例描述的光标控制方法类似,并能达到其相应的技术效果,为简洁描述,在此不再赘述。Other details of the cursor control apparatus according to the embodiments of the present application are similar to the cursor control methods described above with reference to the examples shown in FIG. 1 to FIG. 9 , and can achieve its corresponding technical effects.
图11示出了本申请实施例提供的光标控制设备的硬件结构示意图。FIG. 11 shows a schematic diagram of a hardware structure of a cursor control device provided by an embodiment of the present application.
在光标控制设备可以包括处理器1101以及存储有计算机程序指令的存储器1102。The cursor control device may include a processor 1101 and a memory 1102 storing computer program instructions.
具体地,上述处理器1101可以包括中央处理器(CPU),或者特定集成电路(Application Specific Integrated Circuit,ASIC),或者可以被配置成实施本申请实施例的一个或多个集成电路。Specifically, the above-mentioned processor 1101 may include a central processing unit (CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
存储器1102可以包括用于数据或指令的大容量存储器。举例来说而非限制,存储器1102可包括硬盘驱动器(Hard Disk Drive,HDD)、软盘驱动器、闪存、光盘、磁光盘、磁带或通用串行总线(Universal Serial Bus,USB)驱动器或者两个或更多个以上这些的组合。在合适的情况下,存储器1102可包括可移除或不可移除(或固定)的介 质。在合适的情况下,存储器1102可在光标控制设备的内部或外部。在特定实施例中,存储器1102是非易失性固态存储器。 Memory 1102 may include mass storage for data or instructions. By way of example and not limitation, memory 1102 may include a Hard Disk Drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive or two or more A combination of more than one of the above. Memory 1102 may include removable or non-removable (or fixed) media, where appropriate. Where appropriate, memory 1102 may be internal or external to the cursor control device. In certain embodiments, memory 1102 is non-volatile solid state memory.
存储器可包括只读存储器(ROM),随机存取存储器(RAM),磁盘存储介质设备,光存储介质设备,闪存设备,电气、光学或其他物理/有形的存储器存储设备。因此,通常,存储器包括一个或多个编码有包括计算机可执行指令的软件的有形(非暂态)计算机可读存储介质(例如,存储器设备),并且当该软件被执行(例如,由一个或多个处理器)时,其可操作来执行参考根据本公开的一方面的方法所描述的操作。Memory may include read only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical/tangible memory storage devices. Thus, typically, a memory includes one or more tangible (non-transitory) computer-readable storage media (eg, memory devices) encoded with software including computer-executable instructions, and when the software is executed (eg, by a or multiple processors), it is operable to perform the operations described with reference to a method according to an aspect of the present disclosure.
处理器1101通过读取并执行存储器1102中存储的计算机程序指令,以实现上述实施例中的任意一种光标控制方法。The processor 1101 reads and executes the computer program instructions stored in the memory 1102 to implement any one of the cursor control methods in the foregoing embodiments.
在一个示例中,光标控制设备还可包括通信接口1103和总线1110。其中,如图11所示,处理器1101、存储器1102、通信接口1103通过总线1110连接并完成相互间的通信。In one example, the cursor control device may also include a communication interface 1103 and a bus 1110 . Among them, as shown in FIG. 11 , the processor 1101 , the memory 1102 , and the communication interface 1103 are connected through the bus 1110 and complete the mutual communication.
通信接口1103,主要用于实现本申请实施例中各模块、装置、单元和/或设备之间的通信。The communication interface 1103 is mainly used to implement communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
总线1110包括硬件、软件或两者,将在线数据流量计费设备的部件彼此耦接在一起。举例来说而非限制,总线可包括加速图形端口(AGP)或其他图形总线、增强工业标准架构(EISA)总线、前端总线(FSB)、超传输(HT)互连、工业标准架构(ISA)总线、无限带宽互连、低引脚数(LPC)总线、存储器总线、微信道架构(MCA)总线、外围组件互连(PCI)总线、PCI-Express(PCI-X)总线、串行高级技术附件(SATA)总线、视频电子标准协会局部(VLB)总线或其他合适的总线或者两个或更多个以上这些的组合。在合适的情况下,总线310可包括一个或多个总线。尽管本申请实施例描述和示出了特定的总线,但本申请考虑任何合适的总线或互连。The bus 1110 includes hardware, software, or both, coupling the components of the online data flow metering device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) Interconnect, Industry Standard Architecture (ISA) Bus, Infiniband Interconnect, Low Pin Count (LPC) Bus, Memory Bus, Microchannel Architecture (MCA) Bus, Peripheral Component Interconnect (PCI) Bus, PCI-Express (PCI-X) Bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus or other suitable bus or a combination of two or more of the above. Bus 310 may include one or more buses, where appropriate. Although embodiments of this application describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
该光标控制设备可以执行本申请实施例中的光标控制方法,从而实现结合图1至图10描述的光标控制方法和装置。The cursor control device may execute the cursor control method in the embodiments of the present application, thereby implementing the cursor control method and apparatus described in conjunction with FIG. 1 to FIG. 10 .
另外,结合上述实施例中的光标控制方法,本申请实施例可提供一种计算机存储介质来实现。该计算机存储介质上存储有计算机程序指令;该计算机程序指令被处理器执行时实现上述实施例中的任意一种光标控制方法。In addition, in combination with the cursor control method in the foregoing embodiment, the embodiment of the present application may provide a computer storage medium for implementation. Computer program instructions are stored on the computer storage medium; when the computer program instructions are executed by the processor, any one of the cursor control methods in the foregoing embodiments is implemented.
需要明确的是,本申请并不局限于上文所描述并在图中示出的特定配置和处理。为了简明起见,这里省略了对已知方法的详细描述。在上述实施例中,描述和示出了若干具体的步骤作为示例。但是,本申请的方法过程并不限于所描述和示出的具体步骤,本领域的技术人员可以在领会本申请的精神后,作出各种改变、修改和添加,或者改变步骤之间的顺序。To be clear, the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above-described embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the sequence of steps after comprehending the spirit of the present application.
以上所述的结构框图中所示的功能块可以实现为硬件、软件、固件或者它们的组合。当以硬件方式实现时,其可以例如是电子电路、专用集成电路(ASIC)、适当的固件、插件、功能卡等等。当以软件方式实现时,本申请的元素是被用于执行所需任务的程序或者代码段。程序或者代码段可以存储在机器可读介质中,或者通过载波中携带的数据信号在传输介质或者通信链路上传送。“机器可读介质”可以包括能够存储或传输信息的任何介质。机器可读介质的例子包括电子电路、半导体存储器设备、 ROM、闪存、可擦除ROM(EROM)、软盘、CD-ROM、光盘、硬盘、光纤介质、射频(RF)链路,等等。代码段可以经由诸如因特网、内联网等的计算机网络被下载。The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, elements of the present application are programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted over a transmission medium or communication link by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and the like. The code segments may be downloaded via a computer network such as the Internet, an intranet, or the like.
还需要说明的是,本申请中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本申请不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiment, or may be different from the order in the embodiment, or several steps may be performed simultaneously.
上面参考根据本公开的实施例的方法、装置、设备及和计算机程序产品的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus, devices, and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that execution of the instructions via the processor of the computer or other programmable data processing apparatus enables the Implementation of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. Such processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It will also be understood that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can also be implemented by special purpose hardware that performs the specified functions or actions, or that special purpose hardware and/or A combination of computer instructions is implemented.
以上所述,仅为本申请的具体实施方式,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。应理解,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。The above are only specific implementations of the present application. Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-described systems, modules and units may refer to the foregoing method embodiments. The corresponding process in , will not be repeated here. It should be understood that the protection scope of this application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should all cover within the scope of protection of this application.

Claims (12)

  1. 一种光标控制方法,包括:A cursor control method, comprising:
    获取手势的视频和交互式终端的显示区域尺寸,所述手势是目标对象操控所述交互式终端的手势;acquiring the video of the gesture and the size of the display area of the interactive terminal, the gesture being a gesture by the target object to manipulate the interactive terminal;
    根据所述手势在所述视频的至少两帧视频帧中的位置,得到所述手势的移动速度和第一移动距离;obtaining the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video;
    根据所述移动速度、所述手势对应的基准移动幅度以及所述显示区域尺寸,确定所述手势与所述光标的移动距离比例,其中,所述基准移动幅度是所述手势的移动幅度的基准值;The ratio of the movement distance between the gesture and the cursor is determined according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area, where the reference movement range is a reference for the movement range of the gesture value;
    根据所述移动距离比例以及所述第一移动距离,确定所述光标的目标移动距离;Determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance;
    控制所述光标在所述显示区域内,按照所述目标移动距离进行移动。The cursor is controlled to move in the display area according to the moving distance of the target.
  2. 根据权利要求1所述的方法,其中,所述根据所述移动速度、所述手势对应的基准移动幅度以及所述显示区域尺寸,确定所述手势与所述光标的移动距离比例,具体包括:The method according to claim 1, wherein the determining the ratio of the moving distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area, specifically includes:
    获取与所述移动速度对应的第一系数;obtaining a first coefficient corresponding to the moving speed;
    根据所述第一系数和所述基准移动幅度的乘积,确定所述手势的第一移动幅度;determining the first movement range of the gesture according to the product of the first coefficient and the reference movement range;
    根据所述显示区域尺寸与所述第一移动幅度的比值,确定所述移动距离比例。The moving distance ratio is determined according to the ratio of the size of the display area to the first moving amplitude.
  3. 根据权利要求2所述的方法,其中,The method of claim 2, wherein,
    在所述移动速度小于预设速度阈值的情况下,所述第一系数与所述移动速度负相关;When the moving speed is less than a preset speed threshold, the first coefficient is negatively correlated with the moving speed;
    在所述移动速度大于或等于所述预设速度阈值的情况下,所述第一系数为固定值。When the moving speed is greater than or equal to the preset speed threshold, the first coefficient is a fixed value.
  4. 根据权利要求3所述的方法,其中,The method of claim 3, wherein,
    所述第一系数与所述移动速度负相关,包括:The first coefficient is negatively related to the moving speed, including:
    所述第一系数随着所述移动速度的增加而等比例减小;the first coefficient decreases proportionally with the increase of the moving speed;
    或者,所述第一系数随着所述移动速度的增加,按照余弦变化规律减小。Alternatively, as the moving speed increases, the first coefficient decreases according to a cosine variation law.
  5. 根据权利要求1所述的方法,其中,The method of claim 1, wherein,
    所述第一移动距离包括多个手势移动子距离,其中,每个所述手势移动子距离为所述手势在相邻两个时刻之间的移动距离;The first movement distance includes a plurality of gesture movement sub-distances, wherein each gesture movement sub-distance is a movement distance of the gesture between two adjacent moments;
    相应地,所述目标移动距离包括:与多个所述手势移动子距离分别一一对应的多个光标移动子距离。Correspondingly, the target movement distance includes: a plurality of cursor movement sub-distances corresponding to the plurality of gesture movement sub-distances one-to-one respectively.
  6. 根据权利要求5所述的方法,其中,The method of claim 5, wherein,
    所述根据所述手势在所述视频的至少两帧视频帧中的位置,得到第一移动距离,具体包括:The obtaining the first moving distance according to the position of the gesture in at least two video frames of the video specifically includes:
    获取所述至少两帧视频帧各自的采集时刻;acquiring the respective acquisition moments of the at least two video frames;
    在所述至少两帧视频帧各自的采集时刻之间,确定多个第一时刻;between the respective acquisition moments of the at least two video frames, determining a plurality of first moments;
    根据所述手势在所述视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个所述手势移动子距离;According to the position of the gesture in at least three video frames of the video, determine the gesture movement sub-distance between every two adjacent first moments, and obtain a plurality of the gesture movement sub-distances;
    其中,所述至少三帧视频帧包含所述至少两帧视频帧。Wherein, the at least three video frames include the at least two video frames.
  7. 根据权利要求6所述的方法,其中,The method of claim 6, wherein,
    所述根据所述手势在所述视频的至少三帧视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个所述手势移动子距离,具体包括:According to the position of the gesture in at least three video frames of the video, determining the gesture movement sub-distance between every two adjacent first moments, and obtaining a plurality of the gesture movement sub-distances, specifically including:
    基于所述手势在至少两帧视频帧中的位置,计算所述手势的移动速度;calculating the movement speed of the gesture based on the position of the gesture in at least two video frames;
    以及基于所述手势在所述至少三帧视频帧中的位置,计算所述手势的移动加速度;and calculating the movement acceleration of the gesture based on the position of the gesture in the at least three video frames;
    根据所述移动速度、所述移动加速度、以及所述手势在所述至少两帧视频帧的任一视频帧中的位置,确定每相邻两个第一时刻之间的手势移动子距离,得到多个所述手势移动子距离。According to the movement speed, the movement acceleration, and the position of the gesture in any one of the at least two video frames, determine the gesture movement sub-distance between every two adjacent first moments, and obtain A plurality of the gestures move a sub-distance.
  8. 根据权利要求1所述的方法,其中,The method of claim 1, wherein,
    所述根据所述手势在所述视频的至少两帧视频帧中的位置,得到所述手势的移动速度和第一移动距离之前,所述方法还包括:Before obtaining the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video, the method further includes:
    在获取所述视频的多帧视频帧的过程中,若在预设时间段内未接收到包含所述手势的第一视频帧,基于所述手势在第二视频帧的位置,确定所述手势在所述第一视频帧中的位置;In the process of acquiring multiple video frames of the video, if the first video frame containing the gesture is not received within a preset time period, the gesture is determined based on the position of the gesture in the second video frame the position in the first video frame;
    其中,所述预设时间段为以接收到包含所述手势的第二视频帧为起点的预设时间段。The preset time period is a preset time period starting from receiving the second video frame including the gesture.
  9. 根据权利要求1所述的方法,其中,所述基准移动幅度与所述目标对象相关;The method of claim 1, wherein the reference movement magnitude is related to the target object;
    所述根据所述移动速度、所述手势对应的基准移动幅度以及所述显示区域尺寸,确定所述手势移动距离与光标移动距离的比例之前,所述方法还包括:Before determining the ratio of the gesture movement distance to the cursor movement distance according to the movement speed, the reference movement range corresponding to the gesture, and the size of the display area, the method further includes:
    获取所述目标对象的体型信息;obtain the body shape information of the target object;
    确定与所述体型信息对应的所述基准移动幅度。The reference movement range corresponding to the body size information is determined.
  10. 一种光标控制装置,所述装置包括:A cursor control device comprising:
    第一获取模块,用于获取手势的视频和交互式终端的显示区域尺寸,所述手势是目标对象操控所述交互式终端的手势;a first acquiring module, configured to acquire the video of the gesture and the size of the display area of the interactive terminal, and the gesture is a gesture by the target object to manipulate the interactive terminal;
    第一处理模块,用于根据所述手势在所述视频的至少两帧视频帧中的位置,得到所述手势的移动速度和第一移动距离;a first processing module, configured to obtain the movement speed and the first movement distance of the gesture according to the position of the gesture in at least two video frames of the video;
    第二处理模块,用于根据所述移动速度、所述手势对应的基准移动幅度以及所述显示区域尺寸,确定所述手势与所述光标的移动距离比例,其中,所述基准移动幅度是所述手势的移动幅度的基准值;The second processing module is configured to determine the ratio of the movement distance between the gesture and the cursor according to the movement speed, the reference movement range corresponding to the gesture and the size of the display area, wherein the reference movement range is the the reference value of the movement range of the gesture;
    第三处理模块,用于根据所述移动距离比例以及所述第一移动距离,确定所述光标的目标移动距离;a third processing module, configured to determine the target moving distance of the cursor according to the moving distance ratio and the first moving distance;
    光标控制模块,用于控制所述光标在所述显示区域内,按照所述目标移动距离进行移动。A cursor control module, configured to control the cursor to move in the display area according to the target moving distance.
  11. 一种光标控制设备,所述设备包括:处理器以及存储有计算机程序指令的存储器;A cursor control device comprising: a processor and a memory storing computer program instructions;
    所述处理器执行所述计算机程序指令时实现如权利要求1-9任意一项所述的光标控制方法。When the processor executes the computer program instructions, the cursor control method according to any one of claims 1-9 is implemented.
  12. 一种计算机存储介质,所述计算机存储介质上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现如权利要求1-9任意一项所述的光标控制方法。A computer storage medium, where computer program instructions are stored thereon, and when the computer program instructions are executed by a processor, the cursor control method according to any one of claims 1-9 is implemented.
PCT/CN2020/141781 2020-12-14 2020-12-30 Cursor control method and apparatus, device and medium WO2022126775A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011465353.0 2020-12-14
CN202011465353 2020-12-14

Publications (1)

Publication Number Publication Date
WO2022126775A1 true WO2022126775A1 (en) 2022-06-23

Family

ID=82059902

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/141781 WO2022126775A1 (en) 2020-12-14 2020-12-30 Cursor control method and apparatus, device and medium

Country Status (1)

Country Link
WO (1) WO2022126775A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799717A (en) * 2010-03-05 2010-08-11 天津大学 Man-machine interaction method based on hand action catch
CN103517111A (en) * 2012-06-29 2014-01-15 上海广电电子科技有限公司 Television remote control method based on touch remote control device and television system
US20140177909A1 (en) * 2012-12-24 2014-06-26 Industrial Technology Research Institute Three-dimensional interactive device and operation method thereof
CN104460951A (en) * 2013-09-12 2015-03-25 天津智树电子科技有限公司 Human-computer interaction method
CN106909871A (en) * 2015-12-22 2017-06-30 江苏达科智能科技有限公司 Gesture instruction recognition methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799717A (en) * 2010-03-05 2010-08-11 天津大学 Man-machine interaction method based on hand action catch
CN103517111A (en) * 2012-06-29 2014-01-15 上海广电电子科技有限公司 Television remote control method based on touch remote control device and television system
US20140177909A1 (en) * 2012-12-24 2014-06-26 Industrial Technology Research Institute Three-dimensional interactive device and operation method thereof
CN104460951A (en) * 2013-09-12 2015-03-25 天津智树电子科技有限公司 Human-computer interaction method
CN106909871A (en) * 2015-12-22 2017-06-30 江苏达科智能科技有限公司 Gesture instruction recognition methods

Similar Documents

Publication Publication Date Title
US10452188B2 (en) Predictive compensation for a latency of an input device
CN111553282B (en) Method and device for detecting a vehicle
US9285983B2 (en) Gesture recognition using neural networks
CN103970264B (en) Gesture recognition and control method and device
KR101608423B1 (en) Full 3d interaction on mobile devices
US20130229375A1 (en) Contact Grouping and Gesture Recognition for Surface Computing
US20150091832A1 (en) Information processing apparatus, information processing method, and program
CN111625157B (en) Fingertip key point detection method, device, equipment and readable storage medium
TW201543342A (en) Electronic apparatus and drawing method and computer products thereof
Ruan et al. Dynamic gesture recognition based on improved DTW algorithm
WO2022126775A1 (en) Cursor control method and apparatus, device and medium
JP6018474B2 (en) Program, information processing apparatus, information processing method, and information processing system
WO2020202352A1 (en) Pen condition detection circuit and pen condition detection method
CN110490165B (en) Dynamic gesture tracking method based on convolutional neural network
WO2017101340A1 (en) Method and device for adjusting video window by means of multi-point touch control
Ghodichor et al. Virtual mouse using hand gesture and color detection
Fujiwara et al. Interactions with a line-follower: An interactive tabletop system with a markerless gesture interface for robot control
Pradhan et al. Design of intangible interface for mouseless computer handling using hand gestures
KR101993257B1 (en) Apparatus of correcting touch input based on compensation hand vibration
CN107256089B (en) Gesture recognition method by natural image
CN110162251A (en) Image-scaling method and device, storage medium, electronic equipment
US20230060045A1 (en) Systems and methods for grid-aligned inking
CN103885597A (en) Space input recognition method and system
KR20170071167A (en) Presentation image controlling apparatus using sensor and presentation image controlling method using the same
CN103970327A (en) Touch trajectory tracking method and device based on curve fitting

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20965787

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20965787

Country of ref document: EP

Kind code of ref document: A1