Image processing method based on differential sequence frame
Through the image processing method based on differential sequence frames, the difference value part in the animation effect is extracted and stored, and the problem of excessive memory occupancy of sequence frame images in the prior art is solved, and the effect of playing more animation effects on a small memory instrument is achieved.
Patent Information
- Application Number
- CN202411703985.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
When playing animation effects in existing car instruments, due to the excessive memory occupancy of sequence frame images, it cannot be fully stored when the number of pictures is too large, and the complete animation effect cannot be achieved.
An image processing method based on differential sequence frames is adopted. By obtaining N pictures to be realized from the server, identifying keyframes, comparing the sequence frames after the keyframe with the previous frame, obtaining a set of different regions, and cropping and storing them.
By processing the sequence frame pictures in advance, extracting the difference value part and storing it, the stored image size is reduced, the memory pressure of the instrument is reduced, and the instrument with small memory can produce more animation effects.
Smart Images

Figure CN119648868A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image processing method based on differential sequence frames. Background Art
[0002] With the development of technology, vehicles are becoming more and more intelligent, and instrument systems are becoming more and more important. When existing automobile instruments display animation effects, all sequence frame images are stored in the memory, and the animation effect is achieved by reading a new image each time for playback.
[0003] However, the memory of a car instrument is generally not very large. When the number of sequence frame images is too large, the images cannot be completely stored and the complete animation effect cannot be achieved. Summary of the invention
[0004] In view of the problem in the prior art that sequence frame images occupy too much memory, the present invention proposes an image processing method based on differential sequence frames.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] An image processing method based on differential sequence frames specifically comprises the following steps:
[0007] S1: Obtain N pictures of the animation effect to be realized from the server;
[0008] S2: Identify the key frames of N pictures, where the key frame is the picture with the largest change;
[0009] S3: Compare the sequence frames after the key frame with the previous frame to obtain a set of difference regions;
[0010] S4: Crop the difference region set, form a record file and save it.
[0011] Preferably, in S1, the sequence of the N pictures is pre-arranged according to the animation effect.
[0012] Preferably, in S2, when the i-1th picture is a logo and the i-th picture is a meter, the i-th picture is a key frame.
[0013] Preferably, in S3, the method for obtaining the difference region set is:
[0014] If the i-th picture is a key frame, then compare the i-th picture with the i+1-th picture to get the i-th difference area β between the two. i ; Then compare the i+1th picture with the i+2th picture to get the i+1th difference area β between the two i+1; By analogy, we can get the difference region set {β i ,β i+1 ,...,β N-1}, β i Represents the i-th difference region between the i-th picture and the i+1-th picture, where i=1, 2, ..., N-1.
[0015] Preferably, the pictures are compared by using BeyondCompare to obtain the difference areas.
[0016] Preferably, the difference regions are identified with boxes using GIMP software, thereby reading the corresponding coordinates.
[0017] Preferably, in S4, the set of different regions is cropped using picture editing software GIMP.
[0018] Preferably, the method further comprises S5: when playing the picture animation, firstly filling the key frames in sequence with the record file to obtain a complete picture, thereby realizing the animation playing of the sequence frame pictures.
[0019] Preferably, the method for filling the key frame is weighted averaging, and the ratio is 1:0, that is, the picture after the key frame is filled is new*1+old*0, new represents the picture with the difference area; old represents the picture of the previous frame.
[0020] In summary, due to the adoption of the above technical solution, compared with the prior art, the present invention has at least the following beneficial effects:
[0021] This technology extracts and stores the difference parts of different sequence frame pictures (the different parts of two frames) through advance processing of sequence frame pictures. That is, after the current frame picture is played, there is no need to read the entire picture of the next frame. It is only necessary to superimpose the difference part between the previous frame picture and the next frame picture on the previous frame picture to complete the playback, and the animation effect can also be achieved; at the same time, the size of the stored pictures is reduced, which reduces the memory pressure of the instrument, allowing the instrument with small memory to produce more animation effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The figure is a schematic diagram of an image processing method based on differential sequence frames according to an exemplary embodiment of the present invention.
[0023] Figure 2 Schematic diagram of the changed regions according to an exemplary embodiment of the present invention.
[0024] Figure 3 A schematic diagram is provided for determining a key frame according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described in detail below in conjunction with the examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0026] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0027] like Figure 1 As shown, the present invention provides an image processing method based on differential sequence frames, which specifically includes the following steps:
[0028] S1: Obtain N pictures for the animation effect to be realized from the server.
[0029] In this embodiment, the order of the N pictures obtained is pre-arranged according to the animation effect.
[0030] S2: Identify the key frame of N pictures, that is, the picture with the largest change, and process the subsequent frames with smaller changes.
[0031] For example, a sequence frame animation generally has a continuous change, such as the i-1th picture is the logo, the i-th picture is the instrument, and the i-th picture is the key frame.
[0032] In this embodiment, the differences between the two pictures can be automatically identified by BeyondCompare. Figure 3 As shown, there are two consecutive sequence frame pictures, but the difference between the previous one and the next one can be identified as the whole picture, so the next one can be confirmed as a key frame.
[0033] S3: Use BeyondCompare to compare the sequence frames after the key frame with the previous frame, obtain a set of difference areas, and mark the size coordinates of the changed areas.
[0034] like Figure 2 As shown, for example, the changed area is identified by a box using GIMP software, thereby reading the coordinates of the change point.
[0035] For example, if the i-th picture is a key frame, then compare the i-th picture with the i+1-th picture and calculate the i-th difference area β between the two. i; Then compare the i+1th image with the i+2th image and calculate the i+1th difference area β between the two i+1 ; By analogy, we can get the difference region set {β i ,β i+1 ,...,β N-1}, β i Represents the ith difference region between the ith image and the i+1th image, i=1,2,...,N-1
[0036] S4: crop the difference region set through image editing software (GIMP), record the coordinates and the size and number of sheets, form a record file and save it.
[0037] S5: When playing the picture animation, you only need to fill the key frames of the record file in sequence to get a complete picture, so as to realize the animation playback of the sequence frame pictures.
[0038] In this embodiment, the method of filling the key frame with the difference area in the record file is weighted averaging, that is, weighted addition is performed on the difference area (after addition, it is superimposed with the key frame), and the ratio is 1:0 (the difference area needs to be completely replaced, so the original color value needs to be cleared and the new value is added, so the ratio is 1:0), that is, the picture after the key frame is filled is new*1+old*0, new represents the picture with the difference area; old represents the picture of the previous frame
[0039] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. An image processing method based on differential sequence frames, characterized in that: The specific steps include: S1: Obtain N pictures of the animation effect to be realized from the server; S2: Identify the key frames of N pictures, where the key frame is the picture with the largest change; S3: Compare the sequence frames after the key frame with the previous frame to obtain a set of difference regions; S4: Crop the difference region set, form a record file and save it.
2. The image processing method based on differential sequence frames according to claim 1, characterized in that: In S1, the sequence of the N pictures is pre-arranged according to the animation effect.
3. The image processing method based on differential sequence frames according to claim 1, characterized in that: In S2, when the i-1th picture is a logo and the i-th picture is a meter, the i-th picture is a key frame.
4. The image processing method based on differential sequence frames according to claim 1, characterized in that: In S3, the method for obtaining the difference region set is: If the i-th picture is a key frame, then compare the i-th picture with the i+1-th picture to get the i-th difference area β between the two. i ; Then compare the i+1th picture with the i+2th picture to get the i+1th difference area β between the two i+1 ; By analogy, we can get the difference region set {β i ,β i+1 ,...,β N-1 }, β i Represents the i-th difference region between the i-th picture and the i+1-th picture, where i=1, 2, ..., N-1.
5. The image processing method based on differential sequence frames as claimed in claim 4, characterized in that: Use BeyondCompare to compare pictures and get the difference areas.
6. The image processing method based on differential sequence frames according to claim 4, characterized in that: The difference area was identified with a box using GIMP software, and the corresponding coordinates were read.
7. The image processing method based on differential sequence frames according to claim 1, characterized in that: In S4, the set of different regions is cropped using the image editing software GIMP.
8. The image processing method based on differential sequence frames according to claim 1, characterized in that: The method further comprises S5: when playing the picture animation, firstly filling the key frames with the record file in sequence, so as to obtain a complete picture and realize the animation playing of the sequence frame pictures.
9. The image processing method based on differential sequence frames as claimed in claim 8, characterized in that: The method for filling the key frame is weighted averaging, and the ratio is 1:0, that is, the picture after the key frame is filled is new*1+old*0, new represents the picture with different areas; old represents the picture of the previous frame.
Citation Information
Patent Citations
Improved method for generating animation file by using picture sequence
CN101656877A
Video key frame extraction algorithm
CN107832694A
Combination instrument animation display method and combination instrument animation data processing method
CN108022280A
Method and system for extracting key frame from motion capture data and reconstructing motion
CN111681303A
Video-based exercise evaluation method and apparatus, and computer device and storage medium
WO2021217927A1