Mouse control method and device, equipment and medium
By acquiring and analyzing the user's eye movement data, the function of controlling the mouse cursor for people with physical disabilities through eye movements is realized, which solves the difficulty of mouse operation for people with physical disabilities when operating electronic devices, and provides a new and applicable mouse operation. Way.
Patent Information
- Application Number
- CN202410780739.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-17
AI Technical Summary
Users with physical disabilities face difficulty in operating the mouse when operating electronic devices, and existing technology cannot effectively solve this problem.
By obtaining the user's current eye image, determining the eye movement vector, and moving the mouse cursor on the display screen based on the vector, a new mouse operation method is provided, allowing the user to control the mouse through eye movements.
It realizes the function of users with physical disabilities to control the mouse cursor through eye movements, conveniently operates electronic devices, and provides a new mouse operation method suitable for people with physical disabilities.
Smart Images

Figure CN118655981A
Abstract
Description
Technical Field
[0001] The present application relates to the field of human-computer interaction technology, and more specifically, to a mouse control method, a mouse control device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of science and technology, electronic devices play an increasingly important role in people's daily lives and are used more and more widely.
[0003] However, existing electronic devices are usually designed for users with healthy limbs, which results in users with physical disabilities having difficulty in using the electronic devices. For example, users with physical disabilities in their hands cannot conveniently operate a mouse.
[0004] Therefore, how to provide a mouse control method for users with physical disabilities to conveniently operate electronic devices has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] An object of the present application is to provide a new technical solution for mouse control.
[0006] According to a first aspect of the present application, a mouse control method is provided, the method comprising:
[0007] Obtain the user's current eye image;
[0008] Determining a current eye movement vector according to the current eye image and an initial eye image, wherein the initial eye image is an eye image when the user is looking directly at a reference point of a display screen;
[0009] Determining a display position of a mouse cursor on the display screen according to the current eye movement vector;
[0010] The mouse cursor is displayed at the display position.
[0011] Optionally, determining a display position of a mouse cursor on the display screen according to the current eye movement vector includes:
[0012] Acquire a movement proportional coefficient of the eyeball in different directions, where the movement proportional coefficient is used to reflect a change in the distance between the eyeball and the reference point when the eyeball moves a unit distance in a corresponding direction;
[0013] Determine the distance vector between the current eyeball and the reference point according to the current eyeball movement vector and the movement proportional coefficients in different directions;
[0014] Determine the movement vector of the mouse cursor according to the distance vector;
[0015] The display position of the mouse cursor on the display screen is determined according to the movement vector of the mouse cursor.
[0016] Optionally, obtaining the movement proportional coefficient of the eyeball in different directions includes:
[0017] For any direction, indicating that the user is located at a first physical distance directly in front of the reference point;
[0018] Acquire an eye image at the first physical distance to obtain a first test eye image;
[0019] instructing the user to move a second physical distance in a corresponding direction;
[0020] Collecting an eye image of the user after the user moves a second physical distance along a corresponding direction to obtain a second test eye image;
[0021] A movement proportional coefficient in a corresponding direction is obtained according to the first test eye image and the second test eye image.
[0022] Optionally, before determining the current eye movement vector according to the current eye image and the initial eye image, the method further includes:
[0023] Displaying the reference point on the display screen;
[0024] Acquire a reference eye image when the user is looking directly at the reference point;
[0025] Determining the user's gaze point on the display screen according to the reference eye image;
[0026] When the distance deviation between the gaze point and the reference point is within a preset deviation range, determining that the user is looking directly at the reference point;
[0027] The eye image of the user when looking directly at the reference point is recorded as the initial eye image.
[0028] Optionally, the method further comprises:
[0029] When the distance deviation between the gaze point and the reference point is outside the preset deviation range, instructing the user to move his eyes according to the deviation between the gaze point and the reference point;
[0030] The step of obtaining a reference eye image of the user looking directly at the reference point is repeated until a distance deviation between the gaze point and the reference point is within a preset deviation range.
[0031] Optionally, determining a current eye movement vector according to the current eye image and the initial eye image at least includes:
[0032] Determining a moving direction corresponding to the current eye movement vector according to the current eye image and the positioning eye image;
[0033] The positioning eye image is an eye image when the user is at a position corresponding to the initial eye image and looking at a positioning point.
[0034] Optionally, the method further comprises:
[0035] Acquire historical eye images, where the historical eye images are eye images within a first preset time period before the current moment;
[0036] Determining a current blinking state of the user according to the current eye image and the historical eye images;
[0037] According to the blinking state, respond to a mouse click operation matching the blinking state, wherein the mouse click operation includes at least one of a single click and a double click.
[0038] According to a second aspect of the present application, a mouse control device is provided, comprising:
[0039] An acquisition module, used to acquire the current eye image of the user;
[0040] A first determination module, configured to determine a current eye movement vector according to the current eye image and an initial eye image, wherein the initial eye image is an eye image when the user is looking directly at a reference point of a display screen;
[0041] A second determination module is used to determine a display position of a mouse cursor on the display screen according to the current eye movement vector;
[0042] The display module is used to display the mouse cursor at the display position.
[0043] According to a third aspect of the present application, an electronic device is provided, the electronic device comprising the apparatus according to the second aspect; or,
[0044] The electronic device comprises a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the method as described in any one of the first aspects.
[0045] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the first aspects is implemented.
[0046] The present application adopts a mouse control method, including: obtaining the current eye image of the user; determining the current eye movement vector according to the current eye image and the initial eye image, wherein the initial eye image is the eye image when the user is looking directly at the reference point of the display screen; determining the display position of the mouse cursor on the display screen according to the current eye movement vector; and displaying the mouse cursor at the display position. Through this method, the user can control the movement of the mouse cursor through the eyeball. That is, the present application provides a new mouse operation method, which can be used by users with physical disabilities to conveniently operate electronic devices.
[0047] Other features and advantages of the present application will become apparent from the following detailed description of exemplary embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with the description, serve to explain the principles of the application.
[0049] Figure 1 A frame of a hardware configuration of an electronic device according to a mouse control method provided in an embodiment of the present application Figure 1 ;
[0050] Figure 2 is a flowchart of a mouse control method provided according to an embodiment of the present application;
[0051] Figure 3 is a schematic diagram of a three-dimensional coordinate system established for a display screen according to an embodiment of the present application;
[0052] Figure 4 It is a schematic diagram of a process for obtaining Kh provided according to an embodiment of the present application;
[0053] Figure 5 is a schematic diagram of a display screen provided according to an embodiment of the present application;
[0054] Figure 6 is a structural schematic diagram of a mouse control device provided according to an embodiment of the present application;
[0055] Figure 7 A frame of a hardware configuration of an electronic device according to a mouse control method provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0056] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application.
[0057] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0058] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0059] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0060] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0061] Figure 1 It is a block diagram of the hardware configuration of an electronic device according to a mouse control method provided in an embodiment of the present application.
[0062] The electronic device 1000 may be a terminal. Further, the terminal may be a portable computer, a tablet computer, a palmtop computer, etc.
[0063] The electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, an image acquisition device 1900, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, and the like. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 may include, for example, a USB interface, an earphone interface, and the like. The communication device 1400 may, for example, be capable of wired or wireless communication. The display device 1500 may be, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may include, for example, a touch screen, a keyboard, and the like. The user may input / output voice information through the speaker 1700 and the microphone 1800. The image acquisition device 1900 is used to acquire eye images of the user of the electronic device.
[0064] Despite Figure 1Multiple devices are shown for the electronic device 1000, but the present application may only involve some of the devices, for example, the electronic device 1000 only involves the memory 1200 and the processor 1100.
[0065] In the embodiment of the present application, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to execute the mouse control method provided in the embodiment of the present application.
[0066] In the above description, the technician can design instructions according to the scheme disclosed in this application. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0067] The present application provides a mouse control method to enable a user to control a mouse by eye movement. Figure 2 As shown, the method includes the following steps S210 to S240.
[0068] Step S210, obtaining the current eye image of the user.
[0069] In this embodiment, an image acquisition device is provided on the electronic device, and the image acquisition device acquires an image of the user's eyes. Based on this, an eye image of the user is obtained. The eye image acquired at the current moment is recorded as the current eye image.
[0070] Step S220, determining a current eye movement vector according to the current eye image and the initial eye image.
[0071] The initial eye image is the eye image when the user looks directly at the reference point of the display screen.
[0072] In this embodiment, the reference point of the display screen is a reference point. In one example, the reference point is the center position of the display screen.
[0073] At the initial moment of powering on the electronic device, the user looks directly at the reference point, and captures an image of the user's eyes to obtain an initial eye image. It is understandable that at a moment after the initial moment, that is, after the user looks directly at the reference point, if the user's body moves (driving the eyeball to move), or the eyeball moves, the user's eye image changes accordingly. Therefore, in one embodiment of the present application, the movement vector of the eyeball at the current moment compared to the starting moment can be determined based on the initial eye image and the current eye image. And, the movement vector of the eyeball at the current moment compared to the starting moment is recorded as the current eyeball movement vector. It is understandable that the current eyeball movement vector can be expressed by the movement amount and the corresponding movement direction along the two vertical edges of the display screen, and the movement amount and the corresponding movement direction along the vertical direction of the display screen.
[0074] In this embodiment, if Figure 3 As shown, a three-dimensional coordinate system is established for the display screen. Specifically, the directions of the two sides of the display screen are recorded as the direction along the X-axis and the Y-axis of the coordinate system, and the direction perpendicular to the display screen is recorded as the Z-axis direction. The user's eye movement can be described as the movement of the eye along the X-axis, Y-axis and Z-axis directions respectively. On this basis, the current eye movement vector is specifically described by the movement amount of the current eye along the X-axis, Y-axis and Z-axis directions respectively, that is, a vector with a movement direction.
[0075] It is understandable that, in one embodiment of the present application, the mouse control method provided in the embodiment of the present application further includes a step of acquiring an initial eye image before the above step S220. This step includes the following steps S221 to S225.
[0076] Step S221, displaying the reference point on the display screen.
[0077] In this embodiment, the reference point is first displayed on the display screen so that the user can see the reference point.
[0078] Step S222, obtaining a reference eye image when the user is looking straight at the reference point.
[0079] In one embodiment of the present application, the specific implementation of the above step S222 may be: after a second preset time period after the reference point is displayed, an eye image of the user looking directly at the reference point is obtained and recorded as a reference eye image. The second preset time period is for the user to adjust his position to look directly at the reference point.
[0080] Step S223, determining the gaze point of the user on the display screen according to the reference eye image.
[0081] In one embodiment of the present application, image analysis may be performed on the reference eye image according to an eye movement algorithm to obtain the user's gaze point on the display screen.
[0082] Step S224, when the distance deviation between the gaze point and the reference point is within a preset deviation range, it is determined that the user is located directly in front of the reference point.
[0083] In this embodiment, when the distance deviation between the gaze point and the reference point is within the preset deviation range, it is determined that the user is looking directly at the reference point, wherein the preset deviation refers to the allowable deviation range between the user's gaze point and the reference point when the user is looking directly at the reference point.
[0084] Step S225 , recording the eye image of the user when looking straight at the reference point as the initial eye image.
[0085] Corresponding to the above step S225, the mouse control method provided in the present application also includes the following steps S226 and S227.
[0086] Step S226, when the distance deviation between the gaze point and the reference point is outside the preset deviation range, instruct the user to keep the eyeball moving according to the deviation between the gaze point and the reference point.
[0087] In this embodiment, when the distance deviation between the gaze point and the reference point is outside the preset deviation range, it means that the user is not looking directly at the reference point. At this time, according to the distance deviation between the gaze point and the reference point, the user is instructed to move his eyes so that the gaze point is close to the reference point. The user controls the eye movement according to the above instructions.
[0088] Step S227, repeatedly obtaining a reference eye image when the user is looking directly at the reference point, until the distance deviation between the gaze point and the reference point is within a preset deviation range.
[0089] In this embodiment, when the user's eyeball moves, the above step S222 is re-executed until the distance deviation between the gaze point and the reference point is within a preset deviation range.
[0090] Based on the above steps S221 to S227, it is possible to obtain initial eye images of users with different eye features.
[0091] Step S230: determining the display position of the mouse cursor on the display screen according to the current eye movement vector.
[0092] In one embodiment of the present application, the above step S230 can be specifically implemented through the following steps S231 to S234.
[0093] Step S231, obtaining the movement ratio coefficients of the eyeball in different directions.
[0094] The moving proportional coefficient is used to reflect the change in the distance between the eyeball and the reference point when the eyeball moves a unit distance in the corresponding direction.
[0095] In this embodiment, the movement proportional coefficients in different directions are specifically movement proportional coefficients corresponding to the X-axis, Y-axis and Z-axis directions. Specifically, the movement proportional coefficient of the eyeball along the X-axis direction is recorded as Kh, the movement proportional coefficient of the eyeball along the Y-axis direction is recorded as Kw, and the movement proportional coefficient of the eyeball along the Z-axis direction is recorded as Kv.
[0096] In one embodiment of the present application, the movement proportional coefficients in different directions in the above-mentioned step S231 can be set based on experience.
[0097] In one embodiment of the present application, the moving proportional coefficients in different directions in the above step S231 can be obtained according to a test. In this regard, the above step S231 can be specifically implemented through the following steps S2311 to S2315.
[0098] Step S2311, for any direction, indicates that the user is located at a first physical distance directly in front of the reference point.
[0099] In this embodiment, a voice indicating that the user is located at a first physical distance directly in front of the reference point may be output, and the user stands at the first physical distance directly in front of the reference point according to the voice.
[0100] Step S2312, collecting an eye image at a first physical distance to obtain a first test eye image.
[0101] When the user stands at a first physical distance directly in front of the reference point, an eye image of the user is captured to obtain a first test eye image.
[0102] Step S2313, instructing the user to move a second physical distance along the corresponding direction.
[0103] As Figure 4 Taking the direction of the X-axis in the figure as an example, a voice is output to instruct the user to move the second physical distance along the X-axis. According to the voice, the user moves the second physical distance along the X-axis based on the first physical distance directly in front of the reference point.
[0104] Step S2314, collecting an eye image of the user after the user moves a second physical distance along the corresponding direction to obtain a second test eye image.
[0105] After the user moves a second physical distance in the corresponding direction, an eye image of the user is collected to obtain a second test eye image.
[0106] It should be noted that in the above steps S2311 and S2313, the user needs to move in a manner that keeps the eyes still while the body moves, so that the effect of replacing the eye movement with the body movement is achieved.
[0107] Step S2315, obtaining a movement proportional coefficient in a corresponding direction according to the first test eye image and the second test eye image.
[0108] The actual distance between the user's eyeball and the reference point is determined according to the first test eye image, which is recorded as the first actual distance. It is understandable that due to differences in physical characteristics such as height and pupils of users, the first actual distances corresponding to different users are not exactly the same.
[0109] Further, the actual distance between the user's eyeball and the reference point is determined based on the second test eye image, which is recorded as the second actual distance. It is understandable that due to differences in physical characteristics such as height and pupils of users, the second actual distances corresponding to different users are not the same.
[0110] like Figure 4 As shown, taking Kh as an example, assuming that the coordinates of the reference point are (x0, y0, z0), the first actual distance D0 is specifically expressed by the following formula 1:
[0111]
[0112] The second actual distance D1 is specifically expressed by the following formula 1:
[0113]
[0114] Combining the above formulas 1 and 2, Kh is expressed by the following formula 3:
[0115]
[0116] Similarly, Kw and Kv can also be obtained by the same principle.
[0117] Based on the above steps S2311 to S2315, a method for determining a movement proportional coefficient that meets the physical characteristics of different users is provided.
[0118] Step S232, determining the distance vector between the current eyeball and the reference point according to the current eyeball movement vector and the movement proportional coefficients in different directions.
[0119] In this embodiment, the distance vector between the current eyeball and the reference point includes sub-distance vectors on the X-axis, Y-axis and Z-axis respectively. The sub-distance vector on the X-axis included in the distance vector between the current eyeball and the reference point is specifically the product of the moving direction of the current eyeball movement vector along the X-axis (the positive direction or negative direction of the X-axis), the amount of movement along the X-axis in the current eyeball movement vector, and the movement proportional coefficient Kh in the X-axis direction. The sub-distance vector on the Y-axis included in the distance vector between the current eyeball and the reference point is specifically the product of the moving direction of the current eyeball movement vector along the Y-axis, the amount of movement along the Y-axis in the current eyeball movement vector, and the movement proportional coefficient Kw in the Y-axis direction. The sub-distance vector on the Z-axis included in the distance vector between the current eyeball and the reference point is specifically the product of the moving direction of the current eyeball movement vector along the Z-axis, the amount of movement along the Z-axis in the current eyeball movement vector, and the movement proportional coefficient Kv in the Z-axis direction.
[0120] Based on the above step S232, the change in the distance between the eyeball and the reference point caused by the movement of the user's eyeball can be determined.
[0121] Step S233, determining the movement vector of the mouse cursor according to the distance vector.
[0122] In this embodiment, the direction corresponding to the distance vector is used as the direction of the movement vector of the mouse cursor. And, according to the preset coefficient, the movement value in the mouse movement vector corresponding to the distance value in the distance vector (the product of the movement amount of the current eye movement vector along the X axis and the movement proportional coefficient Kh in the X axis direction, the product of the movement amount of the current eye movement vector along the Y axis and the movement proportional coefficient Kw in the Y axis direction, the product of the movement amount of the current eye movement vector along the Z axis and the movement proportional coefficient Kv in the Z axis direction) is determined. Based on this, the movement vector is obtained. Among them, the preset coefficient includes a sub-preset coefficient corresponding to the X axis, a sub-preset coefficient corresponding to the Y axis, and a sub-preset coefficient corresponding to the Z axis. The sub-preset coefficient corresponding to the X axis is used to reflect the proportional relationship between the unit distance of the eye movement and the movement value of the mouse cursor in different directions, which can be set according to experience.
[0123] Step S234, determining the display position of the mouse cursor on the display screen according to the movement vector of the mouse cursor.
[0124] In this embodiment, the position of the mouse cursor at the previous moment is superimposed with the movement vector determined based on the above step S233, so that the display position of the mouse cursor on the display screen can be obtained.
[0125] Step S240, displaying the mouse cursor at the display position.
[0126] In this embodiment, when the display position of the mouse cursor on the display screen is obtained, the mouse cursor is displayed at the display position, so that the user can control the movement of the mouse cursor through the eyeball.
[0127] The present application adopts a mouse control method, including: obtaining the current eye image of the user; determining the current eye movement vector according to the current eye image and the initial eye image, wherein the initial eye image is the eye image when the user is looking directly at the reference point of the display screen; determining the display position of the mouse cursor on the display screen according to the current eye movement vector; and displaying the mouse cursor at the display position. Through this method, the user can control the movement of the mouse cursor through the eyeball. That is, the present application provides a new mouse operation method, which can be used by users with physical disabilities to conveniently operate electronic devices.
[0128] Based on the above embodiment, the mouse control method provided in the present application also includes the following steps S250 to S270.
[0129] Step S250, obtaining historical eye images.
[0130] The historical eye images are eye images within a first preset time period before the current moment.
[0131] In one embodiment, since the mouse operation mode includes double-clicking the mouse and single-clicking the mouse, the preset duration can be set to the duration of two consecutive blinks in combination with ergonomics. On this basis, two consecutive blinks can be determined as controlling the mouse double-click, and only one blink can be determined as a mouse single-click.
[0132] Step S260, determining the current blinking state of the user according to the current eye image and the historical eye images.
[0133] In this embodiment, the current blinking state may include whether blinking is currently occurring and the number of blinks occurring during the current blinking state.
[0134] In one embodiment, historical eye images and current eye images may be input into a visual contour algorithm to obtain the eye contour of the user within the time range covered by the current eye image and the historical eye images; determine the eye contour change trend of the user based on the eye contour obtained above; determine whether the user blinks based on the eye contour change trend of the user; and in the case of blinking, determine the number of blinks.
[0135] Step S270: responding to a mouse click operation that matches the blinking state according to the blinking state, wherein the mouse click operation includes: one of a single click and a double click.
[0136] In this embodiment, different blinking states correspond to different mouse click operations. In one embodiment, when the number of blinks is 1, the mouse click operation is determined to be a single click, and when the number of blinks is twice, the mouse click operation is determined to be a double click.
[0137] In this embodiment, through the above steps S250 to S270, it is also possible to control the single click and double click of the mouse through the eyeball.
[0138] In one embodiment of the present application, the above step S220 further includes at least the above step S228.
[0139] Step S228, determining the movement direction corresponding to the current eye movement vector according to the current eye image and the positioning eye image.
[0140] The positioning eye image is an eye image when the user is at a position corresponding to the initial eye image and looking at the positioning point.
[0141] In this embodiment, if Figure 5 As shown, the positioning points can be exemplarily points at the four corners of the display screen, that is, Figure 5The user looks at the reference point, and after the electronic device collects the initial eye image, the user looks at the four positioning points in sequence according to a preset order. At this time, the electronic device collects the eye image at the positioning point where the user is looking, and obtains the positioning eye image. On this basis, the current eye image is matched with the positioning eye image to determine the positional relationship between the corresponding gaze point of the current eye image and the corresponding positioning point of the positioning eye image. Based on this positional relationship, the movement direction corresponding to the current eye movement vector can be determined.
[0142] Based on the above step S228, a specific implementation method for determining the movement direction corresponding to the current eye movement vector is provided. This method is simple and easy to implement.
[0143] The present application also provides a mouse control device 600, such as Figure 6 As shown, including:
[0144] An acquisition module 610 is used to acquire a current eye image of a user;
[0145] A first determination module 620, configured to determine a current eye movement vector according to the current eye image and an initial eye image, wherein the initial eye image is an eye image when the user is looking directly at a reference point of a display screen;
[0146] A second determination module 630 is used to determine a display position of a mouse cursor on the display screen according to the current eye movement vector;
[0147] The display module 640 is configured to display the mouse cursor at the display position.
[0148] In one embodiment of the present application, the second determination module 630 is specifically used to obtain the movement proportional coefficient of the eyeball in different directions, and the movement proportional coefficient is used to reflect the change in the distance between the eyeball and the reference point when the eyeball moves a unit distance in the corresponding direction;
[0149] Determine the distance vector between the current eyeball and the reference point according to the current eyeball movement vector and the movement proportional coefficients in different directions;
[0150] Determine the movement vector of the mouse cursor according to the distance vector;
[0151] The display position of the mouse cursor on the display screen is determined according to the movement vector of the mouse cursor.
[0152] In one embodiment of the present application, the second determination module 630 is specifically configured to indicate, for any direction, that the user is located at a first physical distance directly in front of the reference point;
[0153] Acquire an eye image at the first physical distance to obtain a first test eye image;
[0154] instructing the user to move a second physical distance in a corresponding direction;
[0155] Collecting an eye image of the user after the user moves a second physical distance along a corresponding direction to obtain a second test eye image;
[0156] A movement proportional coefficient in a corresponding direction is obtained according to the first test eye image and the second test eye image.
[0157] In one embodiment of the present application, the acquisition module 610 is further configured to display the reference point on the display screen;
[0158] Acquire a reference eye image when the user is looking directly at the reference point;
[0159] Determining the user's gaze point on the display screen according to the reference eye image;
[0160] When the distance deviation between the gaze point and the reference point is within a preset deviation range, determining that the user is looking directly at the reference point;
[0161] The eye image of the user when looking directly at the reference point is recorded as the initial eye image.
[0162] In one embodiment of the present application, the acquisition module 610 is specifically configured to instruct the user to move his eyeball according to the deviation between the gaze point and the reference point when the distance deviation between the gaze point and the reference point is outside the preset deviation range;
[0163] The step of obtaining a reference eye image of the user looking directly at the reference point is repeated until a distance deviation between the gaze point and the reference point is within a preset deviation range.
[0164] In one embodiment of the present application, the first determination module 620 is specifically configured to determine the movement direction corresponding to the current eye movement vector according to the current eye image and the positioning eye image;
[0165] The positioning eye image is an eye image when the user is at a position corresponding to the initial eye image and looking at a positioning point.
[0166] In one embodiment of the present application, the acquisition module 610 is further used to acquire a historical eye image, where the historical eye image is an eye image within a first preset time period before the current moment;
[0167] In this embodiment, the mouse control device 600 provided by the present application further includes:
[0168] a third determination module, configured to determine a current blinking state of the user according to the current eye image and the historical eye image;
[0169] A response module is used to respond to a mouse click operation matching the blink state according to the blink state, wherein the mouse click operation includes at least one of a single click and a double click.
[0170] The present application also provides an electronic device, the electronic device comprising any one of the mouse control devices provided in the above device embodiments; or,
[0171] like Figure 7 As shown, the electronic device 700 includes a memory 710 and a processor 720, the memory 710 is used to store computer instructions, and the processor 720 is used to call the computer instructions from the memory 710 to execute the mouse control method as described in any one of the above mouse control method embodiments.
[0172] The present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method according to any one of the above-mentioned mouse control methods.
[0173] The present application may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.
[0174] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0175] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0176] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of computer-readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer-readable program instructions, thereby realizing various aspects of the present application.
[0177] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0178] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0179] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0180] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0181] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present application is defined by the appended claims.
Claims
1. A mouse control method, characterized in that: The method comprises: Obtain the user's current eye image; Determining a current eye movement vector according to the current eye image and an initial eye image, wherein the initial eye image is an eye image when the user is looking directly at a reference point of a display screen; Determining a display position of a mouse cursor on the display screen according to the current eye movement vector; The mouse cursor is displayed at the display position.
2. The method according to claim 1, characterized in that The step of determining a display position of a mouse cursor on the display screen according to the current eye movement vector includes: Acquire a movement proportional coefficient of the eyeball in different directions, where the movement proportional coefficient is used to reflect a change in the distance between the eyeball and the reference point when the eyeball moves a unit distance in a corresponding direction; Determine the distance vector between the current eyeball and the reference point according to the current eyeball movement vector and the movement proportional coefficients in different directions; Determine the movement vector of the mouse cursor according to the distance vector; The display position of the mouse cursor on the display screen is determined according to the movement vector of the mouse cursor.
3. The method according to claim 2, characterized in that The obtaining of the movement ratio coefficient of the eyeball in different directions includes: For any direction, indicating that the user is located at a first physical distance directly in front of the reference point; Acquire an eye image at the first physical distance to obtain a first test eye image; instructing the user to move a second physical distance in a corresponding direction; Collecting an eye image of the user after the user moves a second physical distance along a corresponding direction to obtain a second test eye image; A movement proportional coefficient in a corresponding direction is obtained according to the first test eye image and the second test eye image.
4. The method according to claim 1, characterized in that: Before determining the current eye movement vector according to the current eye image and the initial eye image, the method further includes: Displaying the reference point on the display screen; Acquire a reference eye image when the user is looking directly at the reference point; Determining the user's gaze point on the display screen according to the reference eye image; When the distance deviation between the gaze point and the reference point is within a preset deviation range, determining that the user is looking directly at the reference point; The eye image of the user when looking directly at the reference point is recorded as the initial eye image.
5. The method according to claim 4, characterized in that The method further comprises: When the distance deviation between the gaze point and the reference point is outside the preset deviation range, instructing the user to move his eyes according to the deviation between the gaze point and the reference point; The step of obtaining a reference eye image of the user looking directly at the reference point is repeated until a distance deviation between the gaze point and the reference point is within a preset deviation range.
6. The method according to claim 1, characterized in that The step of determining the current eye movement vector according to the current eye image and the initial eye image at least comprises: Determining a moving direction corresponding to the current eye movement vector according to the current eye image and the positioning eye image; The positioning eye image is an eye image when the user is at a position corresponding to the initial eye image and looking at a positioning point.
7. The method according to claim 1, characterized in that The method further comprises: Acquire historical eye images, where the historical eye images are eye images within a first preset time period before the current moment; Determining a current blinking state of the user according to the current eye image and the historical eye images; According to the blinking state, respond to a mouse click operation matching the blinking state, wherein the mouse click operation includes at least one of a single click and a double click.
8. A mouse control device, characterized in that: include: An acquisition module, used to acquire the current eye image of the user; A first determination module, configured to determine a current eye movement vector according to the current eye image and an initial eye image, wherein the initial eye image is an eye image when the user is looking directly at a reference point of a display screen; A second determination module is used to determine a display position of a mouse cursor on the display screen according to the current eye movement vector; The display module is used to display the mouse cursor at the display position.
9. An electronic device, characterized in that: The electronic device comprises the apparatus as claimed in claim 8; or, The electronic device comprises a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call the computer instructions from the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which implements the method according to any one of claims 1 to 7 when executed by a processor.
