A method and system for controlling the playback of image sequence frames via gestures
By controlling the playback of image sequence frames through gestures, and using the direction and speed of gesture movement for precise control, the problem of insufficient scene detail display in video players during jump operations is solved, and more efficient display of image details is achieved.
Patent Information
- Application Number
- CN202211294948.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-10-21
AI Technical Summary
When playing a sequence of image frames, existing video players require jumping between multiple images, resulting in insufficient display of scene details and making it difficult to meet the refined requirements of scene display such as 360-degree bird's-eye view or one-shot scene.
This method controls the playback of image sequence frames using gestures. It utilizes the direction and speed of gesture movement to control the playback of image sequence frames. The image frames are stored in an array and finely controlled by the finger movement speed vector to achieve normal and reverse playback.
It enables fine-grained control over the playback of image sequence frames, allowing for better display of image details. It is suitable for scenarios that require detailed display, such as exhibition halls and real estate developments.
Smart Images

Figure CN115617250B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information processing technology, specifically relating to a method and system for controlling the playback of image sequence frames through gestures. Background Technology
[0002] Animation is created by breaking down a character's facial expressions and movements into many snapshots, then capturing these snapshots with a camera to form a series of images. This creates a visually continuous sequence of images, resulting in animation. The basic principle of animation is the same as that of film and television: the persistence of vision.
[0003] Currently, video players play image sequences in units of frame rate. For example, if the frame rate is 30 frames per second, and it is necessary to control the jump to the target image during video playback, the jump is in units of seconds. For example, for a video player with a frame rate of 30, the minimum jump time is 1 second. Therefore, a minimum of 30 images need to be jumped to.
[0004] This method has the following problems: during the adjustment of the screen, due to the large number of jump image frames, the details of the scene will be lost, making it unsuitable for 360-degree bird's-eye view of scenes such as rooms, buildings, and cities, or one-shot display of scenes. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for controlling the playback of image sequence frames via gestures, which can effectively solve the aforementioned problems.
[0006] The technical solution adopted in this invention is as follows:
[0007] This invention provides a method for controlling the playback of a sequence of image frames via gestures, comprising the following steps:
[0008] Step 1: Store the image sequence frames in memory as an array; each image frame has a position number in the array; assume that the image sequence frames include n images, and their position numbers are 1, 2, ..., n, that is: the first image is located at the first position in the array, the second image is located at the second position in the array, ..., the nth image is located at the nth position in the array;
[0009] Step 2: Pre-set playback control parameters, including: current position number num, position number difference step, and whether loop playback is allowed;
[0010] Step 3: The display control listens for touch events indicating finger movement. When a touch event indicating finger movement is detected, the display control obtains the finger movement velocity vector V in the display control's coordinate system xy and sends the finger movement velocity vector V to the image control.
[0011] Step 4: The image control controls the display of the image sequence frames based on the finger movement speed vector V. The specific method is as follows:
[0012] Step 4.1: The image control decomposes the finger movement velocity vector V into the finger movement velocity vector V in the x-direction. x and the velocity vector V of the finger moving in the y direction y ;
[0013] Step 4.2, the image control moves according to the finger's x-direction velocity vector V. x velocity direction_V x and velocity value abs_V x Control playback by switching between frames in the image sequence:
[0014] Step 4.2.1: Pre-set the relationship between the velocity values and position sequence difference (step) for different intervals, based on the velocity value abs_V. x , obtain the value of the position index difference step;
[0015] If the velocity direction is direction_V x If the x-axis is positive, then proceed to step 4.2.2; if the velocity direction is direction_V x If the x-axis is in the negative direction, then proceed to step 4.2.3;
[0016] Step 4.2.2, velocity direction_V x When the x-axis is positive, follow these steps to control the sequential playback switching:
[0017] Step A1: Calculate the next position number num_next using the following formula:
[0018] num_next = num + step;
[0019] Step A2: Determine if the position number num_next is greater than n. If not, assign the position number num_next to the current position number num and switch to displaying the image with the position number num_next in the array. When the set display time interval is reached, return to step A1. If it is greater than n, proceed to step A3.
[0020] Step A3: Determine if loop playback is supported. If not, assign the value of n to the current position index num, switch to displaying the image with position index n in the array, and then return to step 3. If supported, set num_next = num_next - n; return to step A2.
[0021] Step 4.3, velocity direction_V x When the x-axis is in the negative direction, follow these steps to control the reverse playback switching:
[0022] Step B1, use the following formula to calculate the next position number num_next:
[0023] num_next = num - step;
[0024] Step B2: Determine if the position number num_next is less than 1. If it is not less than 1, directly assign the position number num_next to the current position number num, and switch to displaying the image with the position number num_next in the array. When the set display time interval is reached, return to step B1; if it is less than 1, execute step B3.
[0025] Step B3: Determine if loop playback is supported. If not, assign the value of n to the current position number num, switch to displaying the image with position number n in the array, and then return to step 3. If supported, set num_next = num_next - n; then return to step B2.
[0026] Preferably, the relationship between the velocity value and the position number difference step in different intervals is as follows: as the velocity value increases, the value of the position number difference step increases.
[0027] The present invention also provides a system for controlling the playback of image sequence frames via gestures, comprising:
[0028] The image sequence frame storage module is used to store image sequence frames in memory in the form of an array; each image frame has a position number in the array; assuming that the image sequence frame includes n images, their position numbers are 1, 2, ..., n, that is: the first image is located at the first position in the array, the second image is located at the second position in the array, ..., the nth image is located at the nth position in the array;
[0029] The playback control parameter setting unit is used to preset playback control parameters, including: current position number num, position number difference step, and whether loop playback is allowed;
[0030] The display control is used to listen for touch events that indicate finger movement. When a touch event indicating finger movement is detected, the display control obtains the finger movement velocity vector V in the display control's coordinate system xy and sends the finger movement velocity vector V to the image control.
[0031] The image control is used to control the display of image sequence frames based on the finger movement speed vector V.
[0032] The method and system for controlling the playback of image sequence frames via gestures provided by this invention have the following advantages:
[0033] This invention provides a method for controlling the playback of image sequence frames through gestures. The playback of image sequence frames is controlled by the direction and speed of gesture movement. The playback speed can be precisely controlled, and normal playback and rewind playback can also be controlled, making it easier to view the details of changes in the image and providing strong controllability. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating the method for controlling the playback of image sequence frames via gestures provided by the present invention. Detailed Implementation
[0035] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the invention.
[0036] This invention provides a method for controlling the playback of image sequence frames through gestures. The playback of image sequence frames is controlled by the direction and speed of gesture movement. The playback speed can be precisely controlled, and normal playback and rewind playback can also be controlled, making it easier to view the details of changes in the image and providing strong controllability.
[0037] The method of this invention can be used for image controls on iOS or Android systems, but it is not applicable to controlling a media player.
[0038] refer to Figure 1 The method for controlling the playback of image sequence frames via gestures provided by the present invention includes the following steps:
[0039] Step 1: Store the image sequence frames in memory as an array; each image frame has a position number in the array; assume that the image sequence frames include n images, and their position numbers are 1, 2, ..., n, that is: the first image is located at the first position in the array, the second image is located at the second position in the array, ..., the nth image is located at the nth position in the array;
[0040] The image sequence frames are stored in an array, which makes it easy to quickly locate the image frame at the required position in subsequent steps, resulting in high efficiency in image frame lookup and location.
[0041] Step 2: Pre-set playback control parameters, including: current position number num, position number difference step, and whether loop playback is allowed;
[0042] Step 3: The display control listens for touch events indicating finger movement. When a touch event indicating finger movement is detected, the display control obtains the finger movement velocity vector V in the display control's coordinate system xy and sends the finger movement velocity vector V to the image control.
[0043] In terms of specific implementation, a single-finger UIPanGestureRecognizer gesture, i.e. a single-finger drag (move) gesture, is added to the display control to realize the function of listening to touch events of finger movement.
[0044] In practical applications, the finger movement speed vector V can be expressed in pixels per second.
[0045] Step 4: The image control controls the display of the image sequence frames based on the finger movement speed vector V. The specific method is as follows:
[0046] Step 4.1: The image control decomposes the finger movement velocity vector V into the finger movement velocity vector V in the x-direction. x and the velocity vector V of the finger moving in the y direction y ;
[0047] For example, in the xy coordinate system of the display control, the x-direction is defined as the horizontal movement direction, and the y-direction as the vertical movement direction. Of course, depending on the actual needs, the x-direction can also be defined as the vertical movement direction, and the y-direction as the horizontal movement direction; this application does not limit this. As a specific embodiment, based on daily operating habits, it is generally common practice to define the x-direction as the horizontal movement direction and the y-direction as the vertical movement direction.
[0048] In addition, in practical applications, it is possible to use only the velocity vector V of the finger moving in the x-direction. x To achieve playback control of image sequence frames, it is also possible to control playback based solely on the finger's movement velocity vector V in the y-direction. y To achieve playback control of image sequence frames, the velocity vector V of finger movement in the x-direction can also be used. x and the velocity vector V of the finger moving in the y direction y By combining these methods, playback control of image sequence frames can be achieved. For example, for a finger movement velocity vector V, if it is closer to the x-direction, then the finger's x-direction movement velocity vector V is used. x This enables playback control by switching image frames horizontally; if the frame is closer to the y-axis, the finger's y-axis movement velocity vector V is used. y This enables playback control by switching between frames in a vertical direction within an image sequence. This application does not limit this functionality.
[0049] Since the underlying principles are basically the same, for ease of description, the following will only use the velocity vector V of the finger moving in the x-direction. xThis section will use the example of controlling the playback of a sequence of image frames to illustrate the process:
[0050] Step 4.2, the image control moves according to the finger's x-direction velocity vector V. x velocity direction_V x and velocity value abs_V x Control playback by switching between frames in the image sequence:
[0051] Step 4.2.1: Pre-set the relationship between the velocity values and position sequence difference (step) for different intervals, based on the velocity value abs_V. x , obtain the value of the position index difference step;
[0052] Specifically, based on the principle of visual persistence, when displaying animation effects of the same sequence of frames, the more frames in the sequence, the smoother the animation effect. The relationship between the speed value and the position number difference (step) can be flexibly adjusted according to the total number of frames in the sequence. The relationship between the speed value and the position number difference (step) in different intervals can be as follows: as the speed value increases, the value of the position number difference (step) increases.
[0053] For example, the speed value is measured in pixels per second. Typically, finger movement speed is between 0 and 5000 pixels per second. Therefore, the following settings can be used:
[0054] When the speed value is ≤200, step = 1;
[0055] When the velocity value ∈ (200, 500], step = 2;
[0056] When the velocity value ∈ (500, 1000], step = 4;
[0057] When the velocity value ∈ (1000, 2000], step = 7;
[0058] When the velocity value ∈ (2000, 3000], step = 13;
[0059] When the speed value is greater than 3000, step = 21.
[0060] If the velocity direction is direction_V x If the x-axis is positive, then proceed to step 4.2.2; if the velocity direction is direction_V x If the x-axis is in the negative direction, then proceed to step 4.2.3;
[0061] Step 4.2.2, velocity direction_V x When the x-axis is positive, follow these steps to control the sequential playback switching:
[0062] Step A1: Calculate the next position number num_next using the following formula:
[0063] num_next = num + step;
[0064] Step A2: Determine if the position number num_next is greater than n. If not, assign the position number num_next to the current position number num and switch to displaying the image with the position number num_next in the array. When the set display time interval is reached, return to step A1. If it is greater than n, proceed to step A3.
[0065] Step A3: Determine if loop playback is supported. If not, assign the value of n to the current position index num, switch to displaying the image with position index n in the array, and then return to step 3. If supported, set num_next = num_next - n; return to step A2.
[0066] Step 4.3, velocity direction_V x When the x-axis is in the negative direction, follow these steps to control the reverse playback switching:
[0067] Step B1, use the following formula to calculate the next position number num_next:
[0068] num_next = num - step;
[0069] Step B2: Determine if the position number num_next is less than 1. If it is not less than 1, directly assign the position number num_next to the current position number num, and switch to displaying the image with the position number num_next in the array. When the set display time interval is reached, return to step B1; if it is less than 1, execute step B3.
[0070] Step B3: Determine if loop playback is supported. If not, assign the value of n to the current position number num, switch to displaying the image with position number n in the array, and then return to step 3. If supported, set num_next = num_next - n; then return to step B2.
[0071] The present invention also provides a system for controlling the playback of image sequence frames via gestures, comprising:
[0072] The image sequence frame storage module is used to store image sequence frames in memory in the form of an array; each image frame has a position number in the array; assuming that the image sequence frame includes n images, their position numbers are 1, 2, ..., n, that is: the first image is located at the first position in the array, the second image is located at the second position in the array, ..., the nth image is located at the nth position in the array;
[0073] The playback control parameter setting unit is used to preset playback control parameters, including: current position number num, position number difference step, and whether loop playback is allowed;
[0074] The display control is used to listen for touch events that indicate finger movement. When a touch event indicating finger movement is detected, the display control obtains the finger movement velocity vector V in the display control's coordinate system xy and sends the finger movement velocity vector V to the image control.
[0075] The image control is used to control the display of image sequence frames based on the finger movement speed vector V.
[0076] The so-called "frame rate" refers to the number of frames played per unit of time. In reality, all the video frames we see are not continuous; they are composed of multiple frames. However, due to this phenomenon of human vision, the images remain in the human eye for a very short time (approximately 0.1 to 0.4 seconds) during playback. As the playback speed increases, reaching a critical point, the human eye no longer sees single frames but a continuous video. Video players usually calculate the unit of time in "seconds (s)," such as 24 frames / s, 30 frames / s, 60 frames / s, etc. Regarding the appropriate video frame rate, based on the "persistence of vision" phenomenon, most videos have a minimum frame rate of 24, and currently, online videos generally have a frame rate of 30 frames / second. Above 30 frames / second, the video format will be too large. Below 24 frames / second, the video will experience stuttering.
[0077] The method and system for controlling the playback of image sequence frames via gestures provided in this application have the following characteristics compared to a video player:
[0078] Video players typically use progress bars to jump between frames in seconds. Taking a common video playback frame rate of 30 frames per second (30 images per second) as an example, to display the same scene and control the jump to the target image, a 30fps video player requires a minimum jump time of 1 second, which means jumping between 30 images. However, the method provided in this invention, which controls the playback of image sequences via gestures, can control the jump to a minimum of one image at a time, a difference of 30 times. During image adjustment, this invention can display much finer scene details.
[0079] As described above, this invention offers more precise and convenient adjustment of the viewing progress compared to a video player, allowing for easy rewinding to view details. It is suitable for various scenarios requiring explanation or demonstration of visual details, such as exhibition halls or real estate developments. Practical applications include: scenes requiring long takes, such as multi-angle long shots of objects (antiques, ornaments, handicrafts, jade, calligraphy, paintings, etc.), 360-degree bird's-eye views of scenes (rooms, real estate developments, cities), and single-shot scenes (e.g., showing a complete tour route of the Forbidden City from entrance to exit).
[0080] This invention provides a method for controlling the playback of image sequence frames through gestures. The playback of image sequence frames is controlled by the direction and speed of gesture movement. The playback speed can be precisely controlled, and normal playback and rewind playback can also be controlled, making it easier to view the details of changes in the image and providing strong controllability.
[0081] In the description of this application, it should be understood that the terms "positive x-axis direction", "negative x-axis direction", "sequential playback", etc. are only for the convenience of describing this application and simplifying the description, and are not intended to indicate or imply that the referred to must have a specific orientation, and therefore should not be construed as a limitation of this application.
[0082] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for controlling the playing of frames of a picture sequence by gestures, characterized in that, The method comprises the following steps: Step 1, storing picture sequence frames in an array in the memory; Each picture has a position sequence number in the array; assuming that the picture sequence frames comprise n pictures, the position sequence numbers of which are 1, 2, …, n in sequence, namely, the first picture is located at the first position in the array, the second picture is located at the second position in the array, …, and the nth picture is located at the nth position in the array; Step 2, setting a play control parameter in advance, comprising a current position sequence number num, a position sequence number difference step, and whether the play is loopable; Step 3, the display control listens to whether a touch event of finger movement occurs, when detecting that the touch event of finger movement occurs, the display control acquires a finger movement speed vector V in the coordinate system xy of the display control and sends the finger movement speed vector V to the picture control; Step 4, the picture control controls the display of the picture sequence frames according to the finger movement speed vector V, and the specific method is as follows: Step 4.1, the picture control decomposes the finger movement velocity vector V into a finger x direction movement velocity vector V x and a finger y direction movement velocity vector V y ; Step 4.2, the picture control switches the frame of the picture sequence according to the speed vector V of the finger x direction movement x , the speed direction direction_V x , and the speed value abs_V x , to control the play Step 4.2.1, preset the relationship between the speed value of different intervals and the position serial number difference step, according to the speed value abs_V x , get the value of the position serial number difference step; If the velocity direction direction_V x is the positive x-axis direction, then step 4.2.2 is executed; if the velocity direction direction_V x is the negative x-axis direction, then step 4.3 is executed. Step 4.2.2, velocity direction direction_V x When the x-axis positive direction is the direction of the arrow, the sequential play switching control is performed in the following steps: Step A1, the next position sequence number num_next is calculated by using the following formula: num_next=num+step; Step A2, judging whether the position sequence number num_next is greater than n, if not, directly assigning the position sequence number num_next to the current position sequence number num and switching the display of the picture with the position sequence number num_next in the array, and returning to step A1 after a set display time interval is reached; if yes, step A3 is executed; Step A3, judging whether the loop play is supported at present, if not, assigning the value of n to the current position sequence number num and switching the display of the picture with the position sequence number n in the array, and then returning to step 3; if yes, num_next=num_next-n; returning to step A2; Step 4.3, velocity direction direction_V x When the x-axis negative direction is set, the reverse play switching control is performed according to the following steps: Step B1, the next position sequence number num_next is calculated by using the following formula: num_next=num-step; Step B2, judging whether the position sequence number num_next is less than 1, if not, directly assigning the position sequence number num_next to the current position sequence number num and switching the display of the picture with the position sequence number num_next in the array, and returning to step B1 after a set display time interval is reached; if yes, step B3 is executed; Step B3, judging whether the loop play is supported at present, if not, assigning the value of n to the current position sequence number num and switching the display of the picture with the position sequence number n in the array, and then returning to step 3; if yes, num_next=num_next-n; returning to step B2.
2. The method of claim 1, wherein, The relationship between the different interval speed values and the position sequence number difference step is that the value of the position sequence number difference step increases with the increase of the speed value.
3. A system for performing the method of controlling the play of frames of a sequence of pictures by gestures according to any one of claims 1-2, characterized in that, The method comprises the following steps: A picture sequence frame storage module is arranged for storing picture sequence frames in an array in the memory; Each picture has a position sequence number in the array; assuming that the picture sequence frame includes n pictures, the position sequence numbers thereof are 1, 2, …, n in turn, that is, the first picture is located at the first position in the array, the second picture is located at the second position in the array, …, and the nth picture is located at the nth position in the array; The play control parameter setting unit is used for pre-setting play control parameters, including a current position sequence number num, a position sequence number difference step and whether the play is loopable or not; The display control is used for listening to whether a touch event of finger movement occurs or not; when detecting that the touch event of finger movement occurs, the display control acquires a finger movement speed vector V in a display control coordinate system xy and sends the finger movement speed vector V to the picture control; The picture control is used for performing display control on the picture sequence frame according to the finger movement speed vector V.
Citation Information
Patent Citations
Video guidance method for mobile terminal
CN104735544A
Video play control method and device
CN106803856A