CN112419139A - UI display effect processing method and storage medium - Google Patents
UI display effect processing method and storage medium Download PDFInfo
- Publication number
- CN112419139A CN112419139A CN202011310431.XA CN202011310431A CN112419139A CN 112419139 A CN112419139 A CN 112419139A CN 202011310431 A CN202011310431 A CN 202011310431A CN 112419139 A CN112419139 A CN 112419139A
- Authority
- CN
- China
- Prior art keywords
- pixel points
- same pixel
- data
- image
- index file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000000694 effects Effects 0.000 title claims abstract description 18
- 238000003672 processing method Methods 0.000 title claims abstract description 12
- 238000011835 investigation Methods 0.000 claims abstract description 12
- 238000007906 compression Methods 0.000 claims description 8
- 230000006835 compression Effects 0.000 claims description 7
- 238000012545 processing Methods 0.000 abstract description 5
- 238000000034 method Methods 0.000 abstract description 4
- 230000006837 decompression Effects 0.000 abstract 1
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
Abstract
The invention discloses a UI display effect processing method and a storage medium. The method comprises the following steps: converting the picture into RGB data and storing the RGB data in a memory; the same pixel point investigation is carried out on each line of the RGB data; compressing the same pixel points into one pixel point, and marking the number of the same pixel points; establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points; and the UI image display device decompresses the graphic data into an image according to the index file and displays the image. The RGB data are transmitted to the memory and further compressed, and the index file is established, so that the rapid decompression and local reading can be realized, the graphic processing speed is effectively accelerated, the graphic processing difficulty of the MCU is effectively reduced, and the purpose of saving power consumption is achieved; and the storage space of the external picture is saved, and the cost is saved.
Description
Technical Field
The invention relates to the field of smart watches, in particular to a UI display effect processing method and a storage medium.
Background
Along with developments such as intelligence wearing, thing networking, people also more and more highly require to human-computer interaction (UI) in the embedded system, and the key that promotes the effect of UI is the whole speed of refreshing that promotes the screen figure, but at present main SOC in the market all exists: the method has the advantages of low memory resource, small storage space, insufficient CPU speed and insufficient peripheral speed, so that the UI display effect is poor, the storage and memory consumption resources are large, and the use is greatly limited.
Disclosure of Invention
In order to solve the above problems, the present invention provides a UI display effect processing method and a storage medium, which solve the problems of large picture storage consumption, large data reading memory consumption resources, and poor UI display effect.
In order to achieve the above object, the first object of the present invention adopts the following technical solutions: the UI display effect processing method comprises the following steps:
A. converting the picture into RGB data and storing the RGB data in a memory;
B. the same pixel point investigation is carried out on each line of the RGB data;
C. compressing the same pixel points into one pixel point, and marking the number of the same pixel points;
D. establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;
E. and the UI image display device decompresses the graphic data into an image according to the index file and displays the image.
Specifically, in the step B, the examination of the RGB data includes the following steps:
b1, checking pixel points of the RGB data from left to right;
b2, checking the pixel points of the RGB data from top to bottom;
b3, determining whether each checked pixel point is the same.
Specifically, in the step C, compressing the same pixel point includes the following steps:
c1, compressing the same pixel points in each row after investigation, and reserving one same pixel point;
c2, recording the repeated compression times in a byte behind the same pixel point;
c3, marking the number of the same pixel points.
Specifically, in the step D, the creating of the index file includes the following steps:
d1, after the step c3, recording the offset of each line of data according to the graphic data;
d2, establishing the index file according to the offset.
Specifically, in step E, decompressing the graphics data includes the steps of:
e1, the offset of the UI image display device positioning to each line according to the index file;
e2, according to the offset and the graphic data, decompressing into image and displaying.
The second purpose of the invention adopts the technical scheme that: a storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform in particular:
converting the picture into RGB data and storing the RGB data in a memory;
the same pixel point investigation is carried out on each line of the RGB data;
compressing the same pixel points into one pixel point, and marking the number of the same pixel points;
establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;
and the UI image display device decompresses the graphic data into an image according to the index file and displays the image.
In particular, a plurality of instructions are stored, said instructions being adapted to be loaded by a processor and to perform in particular:
checking pixel points of the RGB data from left to right;
checking the pixel points of the RGB data from top to bottom;
and determining whether each checked pixel point is the same.
In particular, a plurality of instructions are stored, said instructions being adapted to be loaded by a processor and to perform in particular:
compressing the same pixel points in each row after the investigation, and reserving one same pixel point;
the repeated compression times are recorded in a byte behind the same pixel point;
and marking the number of the same pixel points.
In particular, a plurality of instructions are stored, said instructions being adapted to be loaded by a processor and to perform in particular:
recording the offset of each line of data according to the graphic data;
and establishing the index file according to the offset.
In particular, a plurality of instructions are stored, said instructions being adapted to be loaded by a processor and to perform in particular:
the UI image display device positions the offset to each line according to the index file;
and decompressing into an image according to the offset and the graphic data, and displaying the image.
The invention has the beneficial effects that: the invention transmits the RGB data to the memory, further compresses the RGB data and establishes the index file, can quickly decompress and locally read, effectively accelerates the graphic processing speed and effectively reduces the graphic processing difficulty of the MCU, thereby achieving the purpose of saving power consumption; and the storage space of the external picture is saved, and the cost is saved.
Drawings
Fig. 1 is a flowchart of a UI display effect processing method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, a method for processing UI display effect and a storage medium according to the present invention are provided.
The invention is further illustrated by the following specific examples; the method comprises the following steps:
s100, converting the picture into RGB data and storing the RGB data in a memory;
s200, performing same pixel point investigation on each line of the RGB data;
s300, compressing the same pixel points into one pixel point, and marking the number of the same pixel points;
s400, establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;
and S500, the UI image display device decompresses the graphic data into an image according to the index file and displays the image.
The invention is further illustrated by the following specific examples.
The invention firstly carries out preprocessing on the picture, carries out analysis and format conversion on the picture, directly analyzes the pictures such as jpg/png/bmp and the like into RGB original data, preferably converts the RGB original data into RGB565 format, stores the converted RGB data into a memory of the intelligent watch,
for example, a 40 x 4 picture, represented in RGB565 format,
{0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,
0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0xF8,0x00,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,
0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x70,0xE0,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,
0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x00,0x1F,0x F,0x 1F,0x F,0x 1F,0x F,0x 1F,0x F,0x 1F,0x F,0x 360 x F, 360 x F, 360 x F, 360 x F, 360 x F, 360 x F, F x 360 x F, 360 x F, 360 x F, 360 x F x 360 x F, 360 x F x 360 x F, 360 x, the demand on memory resources of the memory is high;
furthermore, each pixel point of the RGB data is checked, and scanning is performed sequentially from left to right and from top to bottom to determine the color represented by each pixel point.
In a near step, if the colors of the pixel points are the same, compressing the same pixel points in each row after the elimination, keeping one same pixel point, storing the repeated times in a byte behind the color expression expressed by the RGB of the pixel points, and marking the number of the same pixel points;
therefore, the data after the compression process is:
{0xF8,0x00,0x28,
0xF8,0x00,0x14,0x70,0xE0,0x14,
0x70,0xE0,0x14,0x00,0x1F,0x14
0x00,0x1F,0x28};
the graphics data are obtained after compression, so that the consumption of memory resources is reduced, and the effect of more pictures in the same storage space is increased.
Further, the same pixel point is performed on each line of the picture to remove the compressed graphic data, the offset of each line of data is recorded at the start position, and an index file is established, so that the data processed by the 40 × 4 picture is:
{0x0B,0x00,0x0E,0x00,0x15,0x00,0x1B,0x00,
0xF8,0x00,0x28,
0xF8,0x00,0x14,0x07,0xE0,0x14,
0x07,0xE0,0x14,0x00,0x1F,0x14,
0x00,0x1F,0x28};
and the graphic data is obtained after compression, so that the graphic data is quickly positioned, and the reading of the graphic data is facilitated.
Furthermore, the UI image display device is positioned according to the index file, so that when the picture is read, the graphic data is quickly positioned, the graphic data of the same pixel points are gradually decompressed and restored by analyzing the offset, the decompressed graphic data is displayed on the UI image display device, meanwhile, the local content of the picture can be quickly extracted by establishing the index file of each line, the existing problem that the local content of the picture can be extracted only by fully decompressing the picture when the picture is read is solved, the purposes of reducing the read data and the operation and saving the consumption of an internal memory (RAM) are achieved.
The present invention also provides a storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform in particular:
converting the picture into RGB data and storing the RGB data in a memory;
the same pixel point investigation is carried out on each line of the RGB data;
compressing the same pixel points into one pixel point, and marking the number of the same pixel points;
establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;
the UI image display device decompresses the graphic data into an image according to the index file and displays the image;
further, a plurality of instructions are stored, the instructions being adapted to be loaded by the processor and to perform in particular:
checking pixel points of the RGB data from left to right;
checking the pixel points of the RGB data from top to bottom;
determining whether each checked pixel point is the same;
further, a plurality of instructions are stored, the instructions being adapted to be loaded by the processor and to perform in particular:
compressing the same pixel points in each row after the investigation, and reserving one same pixel point;
the repeated compression times are recorded in a byte behind the same pixel point;
marking the number of the same pixel points;
further, a plurality of instructions are stored, the instructions being adapted to be loaded by the processor and to perform in particular:
recording the offset of each line of data according to the graphic data;
establishing the index file according to the offset;
further, a plurality of instructions are stored, the instructions being adapted to be loaded by the processor and to perform in particular:
the UI image display device positions the offset to each line according to the index file;
and decompressing into an image according to the offset and the graphic data, and displaying the image.
In view of the above, it is desirable to provide,
it is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.
Claims (10)
- A UI display effect processing method, characterized by comprising the steps of:A. converting the picture into RGB data and storing the RGB data in a memory;B. the same pixel point investigation is carried out on each line of the RGB data;C. compressing the same pixel points into one pixel point, and marking the number of the same pixel points;D. establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;E. and the UI image display device decompresses the graphic data into an image according to the index file and displays the image.
- 2. The UI display effect processing method according to claim 1, wherein the examination of the RGB data in the B step comprises the steps of:b1, checking pixel points of the RGB data from left to right;b2, checking the pixel points of the RGB data from top to bottom;b3, determining whether each checked pixel point is the same.
- 3. The UI display effect processing method according to claim 1, wherein in the step C, compressing the same pixel point comprises the following steps:c1, compressing the same pixel points in each row after investigation, and reserving one same pixel point;c2, recording the repeated compression times in a byte behind the same pixel point;c3, marking the number of the same pixel points.
- 4. The UI display effect processing method according to claim 3, wherein the creating of the index file in the step D comprises the following steps:d1, after the step c3, recording the offset of each line of data according to the graphic data;d2, establishing the index file according to the offset.
- 5. The UI display effect processing method according to claim 5, wherein the decompressing the graphic data in the step E comprises the steps of:e1, the offset of the UI image display device positioning to each line according to the index file;e2, according to the offset and the graphic data, decompressing into image and displaying.
- 6. A storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform in particular:converting the picture into RGB data and storing the RGB data in a memory;the same pixel point investigation is carried out on each line of the RGB data;compressing the same pixel points into one pixel point, and marking the number of the same pixel points;establishing an index file according to the compressed same pixel points and the image data with the same number of the pixel points;and the UI image display device decompresses the graphic data into an image according to the index file and displays the image.
- 7. The storage medium of claim 6, having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform in particular:checking pixel points of the RGB data from left to right;checking the pixel points of the RGB data from top to bottom;and determining whether each checked pixel point is the same.
- 8. The storage medium of claim 6, having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform in particular:compressing the same pixel points in each row after the investigation, and reserving one same pixel point;the repeated compression times are recorded in a byte behind the same pixel point;and marking the number of the same pixel points.
- 9. The storage medium of claim 8, having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform in particular:recording the offset of each line of data according to the graphic data;and establishing the index file according to the offset.
- 10. The storage medium of claim 9, having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform in particular:the UI image display device positions the offset to each line according to the index file;and decompressing into an image according to the offset and the graphic data, and displaying the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011310431.XA CN112419139A (en) | 2020-11-20 | 2020-11-20 | UI display effect processing method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011310431.XA CN112419139A (en) | 2020-11-20 | 2020-11-20 | UI display effect processing method and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112419139A true CN112419139A (en) | 2021-02-26 |
Family
ID=74776969
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011310431.XA Pending CN112419139A (en) | 2020-11-20 | 2020-11-20 | UI display effect processing method and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112419139A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052772A1 (en) * | 2005-02-28 | 2009-02-26 | Nxp B.V. | Compression format and apparatus using the new compression format for temporarily storing image data in a frame memory |
CN104575427A (en) * | 2015-01-23 | 2015-04-29 | 浙江工业大学 | High-compression-ratio lossless image compression method suitable for embedded system decoding |
CN107357545A (en) * | 2017-07-18 | 2017-11-17 | 惠州Tcl移动通信有限公司 | A kind of method, storage medium and the intelligent watch of enhancing UI display effects |
CN108694733A (en) * | 2018-03-30 | 2018-10-23 | 温州长江汽车电子有限公司 | Superposition Dynamic Graph display system and its display methods on a kind of Background based on MCU |
CN111061896A (en) * | 2019-10-21 | 2020-04-24 | 武汉神库小匠科技有限公司 | Loading method, device, equipment and medium for 3D (three-dimensional) graph based on glTF (generalized likelihood TF) |
-
2020
- 2020-11-20 CN CN202011310431.XA patent/CN112419139A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052772A1 (en) * | 2005-02-28 | 2009-02-26 | Nxp B.V. | Compression format and apparatus using the new compression format for temporarily storing image data in a frame memory |
CN104575427A (en) * | 2015-01-23 | 2015-04-29 | 浙江工业大学 | High-compression-ratio lossless image compression method suitable for embedded system decoding |
CN107357545A (en) * | 2017-07-18 | 2017-11-17 | 惠州Tcl移动通信有限公司 | A kind of method, storage medium and the intelligent watch of enhancing UI display effects |
CN108694733A (en) * | 2018-03-30 | 2018-10-23 | 温州长江汽车电子有限公司 | Superposition Dynamic Graph display system and its display methods on a kind of Background based on MCU |
CN111061896A (en) * | 2019-10-21 | 2020-04-24 | 武汉神库小匠科技有限公司 | Loading method, device, equipment and medium for 3D (three-dimensional) graph based on glTF (generalized likelihood TF) |
Non-Patent Citations (1)
Title |
---|
刘韬 等: "《机器视觉及其应用技术》", 机械工业出版社, pages: 41 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7595808B2 (en) | Method and apparatus for updating a color look-up table | |
CN104272740A (en) | Color buffer and depth buffer compression | |
US20050024380A1 (en) | Method for reducing random access memory of IC in display devices | |
CN108694733B (en) | MCU-based display system and display method for overlaying dynamic images on background image | |
US7580041B1 (en) | Direct storage of compressed scan converted data | |
CN114972001A (en) | Image sequence rendering method and device, computer readable medium and electronic equipment | |
CN109801352B (en) | Meteorological lattice data animation display method | |
CN112419139A (en) | UI display effect processing method and storage medium | |
CN108877030A (en) | Image processing method, device, terminal and computer readable storage medium | |
US20050128217A1 (en) | Device, system and method for video signal modification | |
CN116405685A (en) | Image data compression method applied to test process record | |
CN112653905A (en) | Image processing method, device, equipment and storage medium | |
JP2014102596A (en) | Image processor | |
CN115760539A (en) | Image processing method and device and network equipment | |
CN112991412B (en) | Liquid crystal instrument sequence frame animation performance optimization method and liquid crystal instrument | |
WO2022022086A1 (en) | Image processing method, image processing apparatus, electronic device, and image display system | |
CN110930480A (en) | Direct rendering method for starting animation video of liquid crystal instrument | |
US20080055319A1 (en) | Apparatus and Method of Conversing Data | |
JPH07182512A (en) | Graphics display processor | |
CN117524154A (en) | Outdoor liquid crystal display control method and device and electronic equipment | |
CN116453131B (en) | Document image correction method, electronic device and storage medium | |
CN115965616B (en) | Iris image processing method and device and electronic equipment | |
CN114445925B (en) | Facial recognition intelligent attendance system capable of being automatically loaded and deleted | |
CN100573656C (en) | The drafting system of Real Time Compression and decompression | |
US20230154063A1 (en) | Non-linear filtering for color space conversions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220627 Address after: 518000 floor 2, building 14a, winter solstice, Taihua Wutong Industrial Park, Sanwei community, Hangcheng street, Bao'an District, Shenzhen, Guangdong Province Applicant after: Shenzhen magic Sample Software Co.,Ltd. Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.) Applicant before: SHENZHEN KUNPENG DIGITAL TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right |