Gesture control method and system for window size of all-in-one educational computer, and terminal and medium
The infrared touch box obtains two-finger gesture data, analyzes the position and trajectory, calculates the relative value of the scaling, locates and adjusts the window size of the all-in-one machine, which solves the problem of inconvenient window adjustment in the existing technology and improves the user experience.
Patent Information
- Application Number
- PCT/CN2024/102128
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-28
- Filing Date
- 2024-06-27
- Publication Date
- 2025-09-04
AI Technical Summary
The window size adjustment of the existing education all-in-one machine is inconvenient and has poor user experience.
The infrared touch box obtains the two-finger gesture touch data, analyzes the position coordinates and movement trajectory, calculates the scaling relative value, locates the target window and controls the window size according to the center point position.
It realizes more convenient control of the window size of the education all-in-one machine and improves the user experience.
Smart Images

Figure CN2024102128_04092025_PF_FP_ABST
Abstract
Description
Educational all-in-one machine window size gesture control method, system, terminal and medium Technical Field
[0001] The present invention relates to the field of window size control of an all-in-one educational machine, and in particular to a method, system, terminal and medium for gesture control of window size of an all-in-one educational machine. Background Art
[0002] The educational all-in-one machine requires an external open pluggable specification (OPS) device, which usually uses the Windows system.
[0003] In the existing technology, it is very difficult for users to resize windows in an all-in-one educational machine. They can only carefully find the lower left or right corner of the window and drag it. This operation experience is not user-friendly for large screens. Therefore, a more convenient method for controlling the window size of an all-in-one educational machine is needed.
[0004] Summary of the Invention
[0005] The present invention provides a method, system, terminal and medium for controlling the window size of an all-in-one educational machine through gestures, thereby enabling the window size of the all-in-one educational machine to be controlled more conveniently through gestures.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a method for controlling the window size of an educational all-in-one machine with gestures, comprising:
[0007] Acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain first position coordinates and movement trajectories corresponding to the two fingers;
[0008] Calculating a relative zoom value between the two fingers according to the first position coordinates and movement trajectories corresponding to the two fingers;
[0009] Locating a target window according to the first position coordinates corresponding to the two fingers, obtaining window information of the target window, and obtaining a center point position of the target window according to the window position, window width, and window height in the window information;
[0010] The size of the target window is controlled according to the position of the center point and in combination with the relative zoom value.
[0011] It can be understood that, compared with the prior art, the method provided by the present invention transmits the original two-finger gesture touch data from the infrared touch frame to the OPS device through the USB interface, parses the gesture touch data, and if the gesture touch data is a two-finger zoom gesture, the first position coordinates and movement trajectory corresponding to the two fingers are recorded, and the relative zoom value between the two fingers is calculated, so as to determine the specific intention of the current gesture. The target window is positioned according to the first position coordinates corresponding to the two fingers, and the center point position of the window is calculated according to the window position and window width and height of the target window, so that the size and position of the window can be controlled more accurately. The operator can intuitively determine the target window through the two-finger zoom gesture, and more conveniently control the window size in combination with the relative zoom value, thereby improving the user experience of the educational all-in-one machine.
[0012] Furthermore, the calculating the relative zoom value between the two fingers according to the first position coordinates and movement trajectories corresponding to the two fingers specifically includes:
[0013] Calculating a two-finger reference distance using a Euclidean distance formula based on the first position coordinates corresponding to the two fingers;
[0014] Moving the first position coordinates corresponding to the two fingers according to the movement trajectory to obtain the second position coordinates corresponding to the two fingers;
[0015] Calculating the moving distance of the two fingers using the Euclidean distance formula according to the second position coordinates corresponding to the two fingers;
[0016] The difference between the two-finger reference distance and the two-finger movement distance is calculated, and the difference is used as the relative scaling value between the two fingers.
[0017] It can be understood that the method provided by the present invention calculates the relative zoom value between the two fingers based on the first position coordinates and the second position coordinates corresponding to the two-finger gesture through the Euclidean distance formula, so that the gesture intention can be quickly identified and the target window size can be adjusted accordingly.
[0018] Furthermore, positioning the target window according to the first position coordinates corresponding to the two fingers specifically includes:
[0019] Traverse all windows of the current interface, and for each window, determine whether the first position coordinates corresponding to the two fingers are within the range of the current window. If the first position coordinates corresponding to the two fingers are within the range of the current window, then set the current window as the target window;
[0020] According to the handle of the target window, the state of the target window is converted into an activated state, so that the target window responds to the size control event.
[0021] It can be understood that the method provided by the present invention locates the target window by the landing point of the two-finger touch position, and converts the state of the target window to the activated state, so that the entity class of the target window can be obtained more efficiently, and the size of the target window can be adjusted through a series of operations of this entity class.
[0022] Furthermore, obtaining the center point position of the target window according to the window position, window width, and window height in the window information specifically includes:
[0023] Add half the window width to the horizontal coordinate of the window position to obtain the horizontal coordinate of the center point of the target window;
[0024] Add half the window height to the vertical coordinate of the window position to obtain the vertical coordinate of the target window center point;
[0025] The position of the center point of the target window is obtained by combining the horizontal coordinate and the vertical coordinate of the center point of the target window.
[0026] It is understandable that the method provided by the present invention calculates the horizontal and vertical coordinates of the target window center point by combining the horizontal and vertical coordinates of the window position with the window width and window height, providing a working basis for subsequent window size adjustment.
[0027] Furthermore, controlling the size of the target window according to the center point position and the relative zoom value specifically includes:
[0028] When the relative zoom value is greater than zero, the window width and window height of the target window are enlarged according to a preset enlargement ratio based on the center point position;
[0029] When the relative zoom value is less than zero, the window width and window height of the target window are reduced according to a preset reduction ratio based on the center point position.
[0030] It is understandable that the method provided by the present invention uses the center point position as a reference and controls and adjusts the width and height of the target window according to a preset magnification or reduction ratio. The operator can adjust the size of the target window more intuitively, thereby improving the user experience.
[0031] Accordingly, an embodiment of the present invention further provides a window size gesture control system for an educational all-in-one machine, comprising:
[0032] A position acquisition module is used to acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain the first position coordinates and movement trajectory corresponding to each of the two fingers;
[0033] a zoom relative value calculation module, configured to calculate a zoom relative value between the two fingers based on the first position coordinates and movement trajectories corresponding to the two fingers;
[0034] a target window determination module, configured to locate the target window according to the first position coordinates corresponding to the two fingers, obtain window information of the target window, and obtain the center point position of the target window according to the window position, window width, and window height in the window information;
[0035] A control module is used to control the size of the target window according to the position of the center point in combination with the relative zoom value.
[0036] It can be understood that, compared with the prior art, the system provided by the present invention transmits the original two-finger gesture touch data from the infrared touch frame to the OPS device through the USB interface, parses the gesture touch data, and if the gesture touch data is a two-finger zoom gesture, the first position coordinates and movement trajectory corresponding to the two fingers are recorded, and the relative zoom value between the two fingers is calculated, so as to determine the specific intention of the current gesture. The target window is positioned according to the first position coordinates corresponding to the two fingers, and the center point position of the window is calculated according to the window position and window width and height of the target window, so that the size and position of the window can be controlled more accurately. The operator can intuitively determine the target window through the two-finger zoom gesture, and more conveniently control the window size in combination with the relative zoom value, thereby improving the user experience of the educational all-in-one machine.
[0037] Furthermore, the scaling relative value calculation module specifically includes:
[0038] A reference distance calculation submodule, configured to calculate a reference distance between the two fingers using a Euclidean distance formula based on the first position coordinates corresponding to the two fingers;
[0039] a position updating submodule, configured to move the first position coordinates corresponding to the two fingers according to the movement trajectory to obtain second position coordinates corresponding to the two fingers;
[0040] A moving distance calculation submodule, configured to calculate the moving distance of the two fingers using a Euclidean distance formula based on the second position coordinates corresponding to the two fingers;
[0041] The difference calculation submodule is used to calculate the difference between the two-finger reference distance and the two-finger movement distance, and use the difference as the relative scaling value between the two fingers.
[0042] It can be understood that the system provided by the present invention calculates the relative zoom value between the two fingers based on the first position coordinates and the second position coordinates corresponding to the two-finger gesture through the Euclidean distance formula, so that the gesture intention can be quickly identified and the target window size can be adjusted accordingly.
[0043] Furthermore, the target window determination module specifically includes:
[0044] a judgment submodule, configured to traverse all windows of the current interface and, for each window, determine whether the first position coordinates corresponding to the two fingers are within the range of the current window; if the first position coordinates corresponding to the two fingers are within the range of the current window, then set the current window as the target window;
[0045] The state conversion submodule is used to convert the state of the target window into an active state according to the handle of the target window, so that the target window responds to the size control event.
[0046] It can be understood that the system provided by the present invention locates the target window by the landing point of the two-finger touch position, and converts the state of the target window to the activated state, so that the entity class of the target window can be obtained more efficiently, and the size of the target window can be adjusted through a series of operations of this entity class.
[0047] Furthermore, the target window determination module also includes: a center point position determination submodule, which is used to add half of the window width to the horizontal coordinate of the window position to obtain the horizontal coordinate of the center point of the target window; add half of the window height to the vertical coordinate of the window position to obtain the vertical coordinate of the center point of the target window; and combine the horizontal coordinate and vertical coordinate of the center point of the target window to obtain the center point position of the target window.
[0048] It is understandable that the system provided by the present invention calculates the horizontal and vertical coordinates of the target window center point by combining the horizontal and vertical coordinates of the window position with the window width and window height, providing a working basis for subsequent window size adjustment.
[0049] Furthermore, the control module specifically includes:
[0050] A first control submodule is configured to, when the relative zoom value is greater than zero, enlarge the window width and window height of the target window according to a preset zoom ratio based on the center point position;
[0051] The second control submodule is configured to reduce the window width and window height of the target window according to a preset reduction ratio based on the center point position when the relative zoom value is less than zero.
[0052] It is understandable that the system provided by the present invention uses the center point position as a reference and controls and adjusts the width and height of the target window according to a preset magnification or reduction ratio. The operator can adjust the size of the target window more intuitively, thereby improving the user experience.
[0053] Correspondingly, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the window size gesture control method of the educational all-in-one machine as described in any of the above items.
[0054] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the educational all-in-one machine window size gesture control method as described in any of the above items. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] FIG1 is a flowchart of a method for controlling window size of an all-in-one educational device using gestures according to an embodiment of the present invention;
[0056] FIG2 is a schematic diagram showing the interaction process between the all-in-one education machine and the OPS according to an embodiment of the present invention;
[0057] FIG3 is a schematic diagram showing the structure of a window size gesture control system for an all-in-one educational machine provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.
[0060] In the description of this specification, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include at least one of such features. In the description of this application, "plurality" means two or more, unless otherwise specifically defined.
[0061] For large screens such as educational all-in-one computers, the window size can currently only be adjusted by dragging the lower left or right corner of the window, which provides a poor user experience. Therefore, a more convenient gesture control method for the window size of educational all-in-one computers is needed.
[0062] Example 1
[0063] Please refer to FIG. 1 , which is a flowchart of a method for controlling window size of an all-in-one educational device through gestures according to an embodiment of the present invention, including steps S101 to S104 . Specific details of each step are as follows.
[0064] S101: Acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain first position coordinates and movement trajectories corresponding to the two fingers.
[0065] Please refer to Figure 2 for a schematic diagram of the interaction between the all-in-one educational machine and the OPS, as provided in an embodiment of the present invention. The OPS is a common accessory for all-in-one educational machines, powered by Windows, and connected to the machine via the Intel OPS standard interface. The machine's infrared touchscreen connects to the OPS via USB, and the OPS projects image signals onto the machine via an HDMI cable. The machine can then control the OPS through touch gestures to facilitate instruction.
[0066] S102: Calculating a relative zoom value between the two fingers according to the first position coordinates and movement trajectories corresponding to the two fingers.
[0067] In this embodiment, the base distance between the two fingers is calculated based on the first position coordinates corresponding to each of the two fingers using the Euclidean distance formula; the first position coordinates corresponding to each of the two fingers are moved according to the movement trajectory to obtain the second position coordinates corresponding to each of the two fingers; the moving distance between the two fingers is calculated based on the second position coordinates corresponding to each of the two fingers using the Euclidean distance formula; the difference between the base distance between the two fingers and the moving distance between the two fingers is calculated, and the difference is used as the relative scaling value between the two fingers.
[0068] As a preferred solution, if the first position coordinates corresponding to finger A are (x1, y1) and the first position coordinates corresponding to finger B are (x2, y2), the two-finger reference distance d1 can be calculated as √[(x1-x2)²+(y1-y2)²]. The first position coordinates are moved according to the movement trajectory to obtain the second position coordinates (x3, y3) corresponding to finger A and the second position coordinates (x4, y4) corresponding to finger B. The two-finger movement distance d2 can be calculated as √[(x3-x4)²+(y3-y4)²]. The difference between the two-finger reference distance and the two-finger movement distance is calculated. When d2-d1>0, it is a zoom gesture, and when d2-d1<0, it is a zoom gesture.
[0069] S103: Locate the target window according to the first position coordinates corresponding to the two fingers, obtain window information of the target window, and obtain the center point position of the target window according to the window position, window width and window height in the window information.
[0070] In this embodiment, all windows of the current interface are traversed, and for each window, it is determined whether the first position coordinates corresponding to the two fingers are within the range of the current window. If the first position coordinates corresponding to the two fingers are within the range of the current window, the current window is used as the target window; according to the handle of the target window, the state of the target window is converted to an activated state so that the target window responds to the size control event.
[0071] It should be noted that obtaining the handle of the target window is equivalent to obtaining the entity class of the target window, and the position and size of the target window can be adjusted through this entity class.
[0072] In this embodiment, the horizontal coordinate of the window position is added to half the window width to obtain the horizontal coordinate of the center point of the target window; the vertical coordinate of the window position is added to half the window height to obtain the vertical coordinate of the center point of the target window; and the horizontal coordinate and vertical coordinate of the center point of the target window are combined to obtain the center point position of the target window.
[0073] As a preferred solution, obtain the coordinates (x, y) of the upper left corner of the target window in the current interface, the window width of the target window is w, the window height of the target window is h, and the center point position of the target window can be calculated as (cx, cy) = (x+w / 2, y+h / 2).
[0074] S104: Control the size of the target window according to the center point position and the relative zoom value.
[0075] In this embodiment, when the relative zoom value is greater than zero, the window width and window height of the target window are enlarged according to a preset magnification ratio based on the center point position; when the relative zoom value is less than zero, the window width and window height of the target window are reduced according to a preset reduction ratio based on the center point position.
[0076] It should be noted that the preset zoom-in ratio and the preset zoom-out ratio are determined according to the relative magnitude of the zooming value.
[0077] The method provided by the present invention transmits the original two-finger gesture touch data from the infrared touch frame to the OPS device through the USB interface, parses the gesture touch data, and if the gesture touch data is a two-finger zoom gesture, records the first position coordinates and movement trajectory corresponding to the two fingers, calculates the relative zoom value between the two fingers, and can determine the specific intention of the current gesture. The target window is positioned according to the first position coordinates corresponding to the two fingers, and the center point position of the window is calculated according to the window position and window width and height of the target window, so that the size and position of the window can be more accurately controlled. The operator can intuitively determine the target window through the two-finger zoom gesture, and more conveniently control the window size in combination with the relative zoom value, thereby improving the user experience of the educational all-in-one machine.
[0078] Example 2
[0079] Please refer to Figure 3, which is a structural diagram of the window size gesture control system of the educational all-in-one machine provided by an embodiment of the present invention. The system includes: a position acquisition module 201, a zoom relative value calculation module 202, a target window determination module 203 and a control module 204.
[0080] The position acquisition module 201 is used to acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain the first position coordinates and movement tracks corresponding to the two fingers.
[0081] The zoom relative value calculation module 202 is configured to calculate the zoom relative value between the two fingers based on the first position coordinates and movement trajectories corresponding to the two fingers.
[0082] The target window determination module 203 is used to locate the target window according to the first position coordinates corresponding to the two fingers, obtain the window information of the target window, and obtain the center point position of the target window according to the window position, window width and window height in the window information.
[0083] The control module 204 is configured to control the size of the target window according to the center point position and the relative zoom value.
[0084] In this embodiment, the zoom relative value calculation module 202 specifically includes: a reference distance calculation submodule, a position update submodule, a movement distance calculation submodule, and a difference calculation submodule. The reference distance calculation submodule is used to calculate the two-finger reference distance based on the first position coordinates corresponding to each of the two fingers using the Euclidean distance formula; the position update submodule is used to move the first position coordinates corresponding to each of the two fingers according to the movement trajectory to obtain the second position coordinates corresponding to each of the two fingers; the movement distance calculation submodule is used to calculate the two-finger movement distance based on the second position coordinates corresponding to each of the two fingers using the Euclidean distance formula; the difference calculation submodule is used to calculate the difference between the two-finger reference distance and the two-finger movement distance, and use the difference as the zoom relative value between the two fingers.
[0085] In this embodiment, the target window determination module 203 specifically includes: a judgment submodule and a state conversion submodule. The judgment submodule is used to traverse all windows in the current interface and, for each window, determine whether the first position coordinates corresponding to the two fingers are within the range of the current window. If the first position coordinates corresponding to the two fingers are within the range of the current window, the current window is used as the target window. The state conversion submodule is used to convert the state of the target window to the active state based on the handle of the target window, so that the target window responds to the size control event.
[0086] In this embodiment, the target window determination module 203 also includes: a center point position determination submodule, which is used to add half of the window width to the horizontal coordinate of the window position to obtain the horizontal coordinate of the center point of the target window; add half of the window height to the vertical coordinate of the window position to obtain the vertical coordinate of the center point of the target window; and combine the horizontal coordinate and vertical coordinate of the center point of the target window to obtain the center point position of the target window.
[0087] In this embodiment, the control module 204 specifically includes: a first control submodule and a second control submodule. The first control submodule is configured to, when the relative zoom value is greater than zero, enlarge the window width and window height of the target window according to a preset enlargement ratio based on the center point position; and the second control submodule is configured to, when the relative zoom value is less than zero, reduce the window width and window height of the target window according to a preset reduction ratio based on the center point position.
[0088] The more detailed working principle and process flow of this system can be found in, but not limited to, Example 1.
[0089] The system provided by the present invention transmits the original two-finger gesture touch data from the infrared touch frame to the OPS device through the USB interface, parses the gesture touch data, and if the gesture touch data is a two-finger zoom gesture, records the first position coordinates and movement trajectory corresponding to the two fingers, calculates the relative zoom value between the two fingers, and can determine the specific intention of the current gesture. The target window is positioned according to the first position coordinates corresponding to the two fingers, and the center point position of the window is calculated according to the window position and window width and height of the target window, so that the size and position of the window can be more accurately controlled. The operator can intuitively determine the target window through the two-finger zoom gesture, and more conveniently control the window size in combination with the relative zoom value, thereby improving the user experience of the educational all-in-one machine.
[0090] Example 3
[0091] Correspondingly, the present invention also provides a terminal device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for controlling the window size of an educational all-in-one machine by gesture is implemented as described in any one of the above embodiments.
[0092] The terminal device of this embodiment includes: a processor, a memory, and a computer program or computer instructions stored in the memory and executable on the processor. When the processor executes the computer program, each step of the first embodiment described above is implemented, such as S101 to S104 shown in FIG1 . Alternatively, when the processor executes the computer program, the functions of each module / unit in the system embodiment described above are implemented.
[0093] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the terminal device. For example, the control module 204 is used to control the size of the target window based on the center point position and the relative zoom value.
[0094] The terminal device may be a computing device such as a desktop computer, laptop, PDA, or cloud server. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of a terminal device and does not limit the terminal device. The terminal device may include more or fewer components than shown, or a combination of certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, and the like.
[0095] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.
[0096] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the mobile terminal, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0097] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0098] Example 4
[0099] Accordingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the educational all-in-one machine window size gesture control method as described in any of the above embodiments.
[0100] The specific embodiments described above further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A gesture control method for window size of an educational all-in-one machine, characterized in that: include: Acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain first position coordinates and movement trajectories corresponding to the two fingers; Calculating a relative zoom value between the two fingers according to the first position coordinates and movement trajectories corresponding to the two fingers; Locating a target window according to the first position coordinates corresponding to the two fingers, obtaining window information of the target window, and obtaining a center point position of the target window according to the window position, window width, and window height in the window information; The size of the target window is controlled according to the position of the center point and in combination with the relative zoom value.
2. The method for controlling window size of an educational all-in-one machine by gestures according to claim 1, wherein: The calculating the relative zoom value between the two fingers according to the first position coordinates and movement trajectories corresponding to the two fingers specifically includes: Calculating a two-finger reference distance using a Euclidean distance formula based on the first position coordinates corresponding to the two fingers; Moving the first position coordinates corresponding to the two fingers according to the movement trajectory to obtain the second position coordinates corresponding to the two fingers; Calculating the moving distance of the two fingers using the Euclidean distance formula according to the second position coordinates corresponding to the two fingers; The difference between the two-finger reference distance and the two-finger movement distance is calculated, and the difference is used as the relative scaling value between the two fingers.
3. The method for controlling window size of an all-in-one educational device by gestures according to claim 1, wherein: Positioning the target window according to the first position coordinates corresponding to the two fingers specifically includes: Traverse all windows of the current interface, and for each window, determine the first position corresponding to the two fingers whether the coordinates are within the range of the current window; if the first position coordinates corresponding to the two fingers are within the range of the current window, the current window is used as the target window; According to the handle of the target window, the state of the target window is converted into an activated state, so that the target window responds to the size control event.
4. The method for controlling window size of an all-in-one educational device by gestures according to claim 1, wherein: The step of obtaining the center point of the target window according to the window position, window width, and window height in the window information specifically includes: Add half the window width to the horizontal coordinate of the window position to obtain the horizontal coordinate of the center point of the target window; Add half the window height to the vertical coordinate of the window position to obtain the vertical coordinate of the target window center point; The position of the center point of the target window is obtained by combining the horizontal coordinate and the vertical coordinate of the center point of the target window.
5. The method for controlling window size of an all-in-one educational device by gestures according to claim 1, wherein: The controlling the size of the target window according to the center point position and the relative zoom value specifically includes: When the relative zoom value is greater than zero, the window width and window height of the target window are enlarged according to a preset enlargement ratio based on the center point position; When the relative zoom value is less than zero, the window width and window height of the target window are reduced according to a preset reduction ratio based on the center point position.
6. A window size gesture control system for an educational all-in-one machine, characterized in that: include: A position acquisition module is used to acquire two-finger gesture touch data of the educational all-in-one machine from the infrared touch frame, analyze the two-finger gesture touch data, and obtain the first position coordinates and movement trajectory corresponding to each of the two fingers; a zoom relative value calculation module, configured to calculate a zoom relative value between the two fingers based on the first position coordinates and movement trajectories corresponding to the two fingers; a target window determination module, configured to locate the target window according to the first position coordinates corresponding to the two fingers, obtain window information of the target window, and obtain the center point position of the target window according to the window position, window width, and window height in the window information; A control module is used to control the size of the target window according to the position of the center point in combination with the relative zoom value.
7. The window size gesture control system for an all-in-one educational machine according to claim 6, characterized in that: The scaling relative value calculation module specifically includes: A reference distance calculation submodule, configured to calculate a reference distance between the two fingers using a Euclidean distance formula based on the first position coordinates corresponding to the two fingers; a position updating submodule, configured to move the first position coordinates corresponding to the two fingers according to the movement trajectory to obtain second position coordinates corresponding to the two fingers; A moving distance calculation submodule, configured to calculate the moving distance of the two fingers using a Euclidean distance formula based on the second position coordinates corresponding to the two fingers; The difference calculation submodule is used to calculate the difference between the two-finger reference distance and the two-finger movement distance, and use the difference as the relative scaling value between the two fingers.
8. The window size gesture control system for an all-in-one educational machine according to claim 6, wherein: The target window determination module specifically includes: a judgment submodule, configured to traverse all windows of the current interface and, for each window, determine whether the first position coordinates corresponding to the two fingers are within the range of the current window; if the first position coordinates corresponding to the two fingers are within the range of the current window, then set the current window as the target window; The state conversion submodule is used to convert the state of the target window into an active state according to the handle of the target window, so that the target window responds to the size control event.
9. The window size gesture control system for an all-in-one educational machine according to claim 6, wherein: The target window determination module also includes: a center point position determination submodule, which is used to add half of the window width to the horizontal coordinate of the window position to obtain the horizontal coordinate of the center point of the target window; add half of the window height to the vertical coordinate of the window position to obtain the vertical coordinate of the center point of the target window; and combine the horizontal coordinate and vertical coordinate of the center point of the target window to obtain the center point position of the target window.
10. The window size gesture control system for an all-in-one educational machine according to claim 6, wherein: The control module specifically includes: A first control submodule is configured to, when the relative zoom value is greater than zero, enlarge the window width and window height of the target window according to a preset zoom ratio based on the center point position; The second control submodule is configured to reduce the window width and window height of the target window according to a preset reduction ratio based on the center point position when the relative zoom value is less than zero.
11. A terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the window size gesture control method of the educational all-in-one machine as described in any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the window size gesture control method of the educational all-in-one machine according to any one of claims 1 to 5.
Citation Information
Patent Citations
Management method of intelligent device for having control over a plurality of windows simultaneously
CN103412713A
Graph adjusting method and system of instrument graphics window interface
CN105389115A
Multi-window editing method, system and mobile terminal
CN105892823A
Window processing method and device
CN108776572A
Window adjustment method, mobile terminal and computer readable storage medium
CN109254707A