CN110009564B - Picture processing method, system, terminal equipment and storage medium - Google Patents

Picture processing method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN110009564B
CN110009564B CN201910271982.0A CN201910271982A CN110009564B CN 110009564 B CN110009564 B CN 110009564B CN 201910271982 A CN201910271982 A CN 201910271982A CN 110009564 B CN110009564 B CN 110009564B
Authority
CN
China
Prior art keywords
picture
units
color
unit
addressing
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.)
Active
Application number
CN201910271982.0A
Other languages
Chinese (zh)
Other versions
CN110009564A (en
Inventor
王智勇
胡分初
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHONGQING HUIKE JINYANG SCIENCE & TECHNOLOGY CO LTD
Original Assignee
CHONGQING HUIKE JINYANG SCIENCE & TECHNOLOGY CO LTD
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CHONGQING HUIKE JINYANG SCIENCE & TECHNOLOGY CO LTD filed Critical CHONGQING HUIKE JINYANG SCIENCE & TECHNOLOGY CO LTD
Priority to CN201910271982.0A priority Critical patent/CN110009564B/en
Publication of CN110009564A publication Critical patent/CN110009564A/en
Application granted granted Critical
Publication of CN110009564B publication Critical patent/CN110009564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application is applicable to the technical field of picture processing, and provides a picture processing method, a system, a terminal device and a storage medium.

Description

Picture processing method, system, terminal equipment and storage medium
Technical Field
The present application belongs to the field of image processing technologies, and in particular, to an image processing method, an image processing system, a terminal device, and a storage medium.
Background
In the daily life of people, various display products can be seen everywhere, and rich visual enjoyment is brought to people. Manufacturers or distributors often have their own brand icons, and store the brand icons in a display chip that displays the product to display a power-on icon when the product is powered on or a power-off icon when the product is powered off.
However, the storage resources of the display chip of the display product are very limited, the storage capacity of an OSD (on screen display) RAM (Random Access Memory) of the display chip is very small, a large power-on/power-off icon cannot be stored, the icon can only be reduced for storage, and the icon is enlarged during display, which causes the loss of details of the icon, and the display effect is not ideal.
Disclosure of Invention
In view of this, embodiments of the present application provide a picture processing method, a system, a terminal device, and a storage medium, so as to solve the problems in the prior art that a display chip of a display product has very limited storage resources, the storage capacity of the display chip is very small, a large power-on/power-off icon cannot be stored, only the icon is reduced for storage, and the icon is enlarged during display, so that details of the icon are lost, and the display effect is not ideal.
A first aspect of an embodiment of the present application provides an image processing method, including:
processing a picture into at least two picture units with a preset pixel size;
acquiring display parameters of each picture unit;
when the number of the picture units with the same display parameters is larger than 1, reserving one of the picture units with the same display parameters to generate a simplified picture;
storing the simplified picture; and each line of picture units in the picture corresponds to one addressing address in the simplified picture.
A second aspect of an embodiment of the present application provides an image processing system, including:
the processing module is used for processing the picture into at least two picture units with preset pixel sizes;
the acquisition module is used for acquiring the display parameters of each picture unit;
the generating module is used for reserving one of the picture units with the same display parameters to generate a simplified picture when the number of the picture units with the same display parameters is greater than 1;
the storage module is used for storing the simplified picture; and each line of picture units in the picture corresponds to one addressing address in the simplified picture.
A third aspect of the embodiments of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described method.
According to the method and the device for reducing the size of the simplified picture, the picture is processed into at least two picture single sheets with the preset pixel size, the display parameter of each picture unit is obtained, only one of the picture units with the same display parameter is reserved, the simplified picture is generated and then stored, the size of the picture can be effectively reduced, each line of picture units in the picture corresponds to one addressing address in the simplified picture, and the picture can be conveniently restored according to the addressing addresses and the simplified picture when the picture needs to be displayed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a picture processing method according to an embodiment of the present application;
FIG. 2 is a schematic view of a photograph provided by one embodiment of the present application;
FIG. 3 is a schematic diagram of a display unit provided by one embodiment of the present application;
FIG. 4 is a schematic diagram of a condensed picture provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of addressing addresses of pictures provided by an embodiment of the present application;
fig. 6 is a flowchart illustrating a picture processing method according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a picture processing system according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
The terms "comprises" and "comprising," and any variations thereof, in the description and claims of this application and the drawings described above, are intended to cover non-exclusive inclusions. For example, a process, method, or system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Further, the terms "first" and "second" are used to distinguish different objects, and are not used to describe a particular order.
An optional embodiment of the present application provides a picture processing method, which may be applied to various display devices with display functions, such as a television, a mobile phone, a tablet computer, a notebook computer, a palm computer, a personal digital assistant, a display, a self-service terminal, and an electronic billboard, and may also be applied to a computing device, such as a desktop computer and a cloud server, where the picture processing method is executed by a processor in the display device or the computing device.
As shown in fig. 1, an image processing method provided in an embodiment of the present application includes:
step S101, processing the picture into at least two picture units of a preset pixel size.
In application, the picture may be a power-on icon or a power-off icon of the display device, or may be a common icon or picture stored in the display device or the computing device.
In application, the preset pixel size may be set according to actual needs, for example, the size may be set as the size of the maximum pixel capacity supported by one storage unit in the RAM of the display chip, or the size of the picture may be an integral multiple of the preset pixel size. When the size of the preset pixel is fixed, if the size of the picture is not integral multiple of the size of the preset pixel, the pixel is added at the frame position of the picture, so that the size of the picture is integral multiple of the preset pixel. The principle followed by adding pixels at the frame position of the picture is to add the least number of pixels under the condition of ensuring that the size of the picture after the pixels are added is integral multiple of the preset pixels.
In application, assuming that the size of one picture is (41 × 12) × (13 × 18) pixels, and the maximum pixel capacity supported by the storage unit is 12 × 18 pixels, the picture can be divided into 41 × 13 picture units with the size of 12 × 18 pixels. If the picture is not processed, storing the picture will occupy the storage space of (41 × 12) × (13 × 18)/(12 × 18) =533 storage units. Assuming that the size of the memory space of the RAM is only 2 PAGEs (PAGEs), and one PAGE has 256 memory units, the size of the picture exceeds the memory space of the RAM, and therefore, the picture needs to be compressed to reduce the size of the picture.
Fig. 2 exemplarily shows a picture with a size of (41 × 12) × (13 × 18) pixels, and the picture in fig. 2 has been divided into 41 × 13 picture units with a size of 12 × 18 pixels; for ease of illustration, each pixel in the picture is not further shown in fig. 2.
In an alternative embodiment, step S101 is preceded by:
setting a display unit with a preset pixel size;
step S101 includes:
and processing the picture into at least two picture units with preset pixel size by taking the display unit as a reference template.
In application, a display unit with a preset pixel size can be preset, the size of each pixel in the display unit is the same as that of each pixel in a picture, then the picture is processed into at least two picture units by taking the display unit as a reference template, and the size of the display unit is the same as that of the picture units and can be adjusted in a self-defining mode according to actual needs.
It should be understood that, when the size of the picture is smaller than the size of two picture units, it indicates that the size of the picture itself is smaller, and the occupied storage space is small, and the picture does not need to be processed by using the picture processing method provided in this embodiment.
In an alternative embodiment, before step S101, the method includes:
detecting the size of the picture;
and when the size of the picture is smaller than twice the preset pixel size, storing the picture.
Fig. 3 exemplarily shows a black display unit after binarization processing of 12 × 18 pixels in size. The functions of the elements shown in fig. 3 are as follows:
0 in the black frame on the left of the display unit represents a black pixel, the gray value of 0,1 represents a white pixel, and the gray value is 1;
the toolbar on the right side of the display unit is used for setting parameters of the display unit;
the frame corresponding to the Name is used for setting the Name of the display unit in a user-defined mode;
the frame corresponding to the X is used for self-defining the number of the row pixels of the display unit;
the frame corresponding to the Y is used for setting the number of the row pixels of the display unit in a user-defined mode;
the frame corresponding to the TEXT is used for automatically generating the pixel size of the display unit;
the Font button is used for self-defining and setting the color of each pixel in the display unit;
a Draw button for confirming that the display unit is generated according to the settings of X and Y and displayed in the middle window;
the frame corresponding to the Grid With is used for setting the size of the frame of each pixel in the display unit in a user-defined mode;
the functions of the buttons in the continuous toolbar are as follows:
UP, right, left and Down orientation buttons for moving the pixels in the display unit UP, down, left and Right to adjust the orientation of the pixels in the display unit;
u (UP, up)/D (Down) and L (Left )/R (Right) are used for moving the display unit UP, down, left and Right, and the orientation of the display unit is adjusted;
clear means clearance;
inv denotes negation;
paste means Paste;
update represents Update;
close indicates closing the current display interface.
And step S102, acquiring display parameters of each picture unit.
In an application, the display parameters include color data, i.e. RGB values, of each pixel in a picture unit, and if the picture is a grayscale map, the color data is a grayscale value of each pixel.
And S103, when the number of the picture units with the same display parameters is larger than 1, reserving one of the picture units with the same display parameters to generate the simplified picture.
In application, the display parameters of two or more picture units are the same, which means that the color data of all the pixel points at the same position in the picture units with the same display parameters are the same. The pixel points at the same position refer to pixel points at the same position in two or more picture units, for example, if the display parameters of the picture unit a and the picture unit B are the same, the color data of the pixel points in the first row and the first column in the picture unit a and the color data of the pixel points in the first row and the second column in the picture unit a are the same as the color data of the pixel points in the first row and the second column in the picture unit B, … …, the pixel points in the mth row and the nth column in the picture unit a and the pixel points in the mth row and the nth column in the picture unit B are the same, and so on; wherein M is not less than 1,N is not less than 1, M is an integer, and N is an integer.
The display parameters of picture elements located at positions 0 (row position) 1 (column position) to 08, 0F to 014, and 01B to 01F in fig. 2 are the same.
In an application, a reduced picture is a picture after redundant same picture units are removed.
Fig. 4 exemplarily shows a reduced picture processed by the picture shown in fig. 2, wherein the reduced picture has a size equal to the size of 172 picture units or 172 storage units, and is reduced by (533-172)/533 =67.73% compared to the size of 533 picture units or 533 storage units of the original picture.
Step S104, storing the simplified picture; and each line of picture units in the picture corresponds to one addressing address in the simplified picture.
In the application, the generated and stored detailed attribute information of the simplified picture records addressing addresses corresponding to each row of picture units in the original picture, and each addressing address comprises a sub-addressing address corresponding to each picture unit in each row of picture units, so that the picture can be restored according to the sub-addressing address corresponding to each picture unit when the simplified picture needs to be restored into the picture.
FIG. 5 schematically shows 13 addressing addresses corresponding to 13 picture elements in the picture shown in FIG. 2; the NEXT or END is taken as a boundary, two rows before each NEXT or END are taken as an addressing address, each addressing address comprises 41 sub-addresses, and the addressing addresses correspond to 41 picture units in each row of picture units.
In an alternative embodiment, before step S104, the method includes:
and establishing an association relation between each row of picture units in the picture and one addressing address in the simplified picture.
In application, the association relationship may be a correspondence relationship or a mapping relationship, a correspondence relationship table or a mapping relationship table may be established to represent the association relationship, the correspondence relationship table or the mapping relationship table may be implemented by a look-up table (LUT), or may be implemented by other data tables or Random Access Memory (RAM) type storage media having the same input data function, that is, a function of looking up corresponding output data according to input data.
As shown in fig. 6, in another embodiment of the present application, after step S104, the method further includes:
step S105, addressing the simplified picture according to the addressing address corresponding to each row of picture units in the picture;
and S106, sequencing the pixels in a row of picture units corresponding to each addressing address according to the addressing result so as to restore the picture.
In application, after the image is compressed and stored, if the image is to be restored and restored for display, the image can be restored by addressing according to the addressing address carried by the simplified image and sequencing the addressing result according to the addressing sequence.
As shown in fig. 6, in another embodiment of the present application, step S101 includes:
step S1011, processing the picture into at least two black-and-white picture units with preset pixel size;
the picture processing method further comprises the following steps:
step S107, generating a color palette with preset color digits according to the colors of the pictures;
after step S106, the method includes:
step S108, calling a coloring function, importing the data of the palette, and restoring the color of each picture unit in the picture.
In application, a binarization process may be performed on a picture, and a gray value of each pixel in the picture is processed to be 0 or1, so as to process the picture into a black-and-white picture, for example, the picture is processed by using the display unit shown in fig. 3, so as to obtain a black-and-white picture including at least two picture units.
In application, after a picture is processed into a black-and-white picture, the finally stored simplified picture is also black-and-white, and in order to restore the color of the picture when the picture is restored, a color palette with preset color digits is required to be generated in advance according to the color of the picture. The value range of the preset color digit is determined by the color digit supported by the display device or the computing device. For example, if the display device or the computing device supports a maximum 16-bit color bit number, the value range of the preset color bit number is 0 to 16 bits.
In application, the display device or the computing device runs the palette generation software, and the implementation code for generating a 16-bit palette according to the colors of the picture is as follows:
BYTE code tPALETTE_0[]=
{
0x00,0x00,0x00,//black
0xff,0xff,0xff,//white
0xff,0xff,0x00,
0x00,0x00,0x80,
0xff,0x00,0xff,
0x00,0x80,0x00,
0xff,0x00,0x00,
0x00,0x80,0x80,
0x00,0xff,0xff,
0x80,0x00,0x00,
0x00,0xff,0x00,
0x80,0x00,0x80,
0x00,0x00,0xff,
0x80,0x80,0x00,
0x80,0x80,0x80,
0xc0,0xc0,0xc0,
}
in application, step S107 may be performed at any time prior to step S108.
In an alternative embodiment, step S108 includes:
calling RTDOsdFuncChangcolor 1Bit (ROW (X), COL (Y), WIDTH (W), HEIGHT (H), COLOR (FG, BG), _ FONTFROM _0 _255) and importing the data of the palette to restore the COLOR of the picture element;
wherein, X is the number of rows, Y is the number of columns, W is the width, H is the height, FG is the foreground color, BG is the background color, FG and BG are the data of the palette which is directly imported.
In an alternative embodiment, the shading functions include a first shading function and a second shading function;
step S108 includes:
detecting the number of colors of each picture unit in the picture;
when the color of the picture unit is non-monochrome, calling the first coloring function and importing the data of the color palette to restore the color of the picture unit;
and when the color of the picture unit is a single color, calling the first coloring function or the second coloring function and importing the data of the color palette to restore the color of the picture unit.
In an alternative embodiment, the second shading function is: RTDOsdFuncChangcolor 1Bit ()
In application, the first coloring function is the function rtdosdfinchangecolor 1Bit (ROW (X), COL (Y), WIDTH (W), HEIGHT (H), COLOR (FG, BG), _ FONTFROM _0 \, 255), and when the picture element is any COLOR, the function can be used to COLOR; when the picture unit is monochrome, a second coloring function can be adopted for coloring so as to simplify a coloring program, reduce the data operation amount and improve the coloring speed.
In an alternative embodiment, step S101 is preceded by:
identifying background pixels in the picture;
filtering the background pixels and reserving foreground pixels in the picture;
or, identifying foreground pixels in the picture;
the foreground pixels are retained.
In application, background pixels (for example, black background pixels in fig. 2) in a picture can be filtered out through pixel identification and filtering software, only foreground pixels are reserved, and the colors of the background pixels are the same, so that only the colors of the background pixels and the size of the picture need to be recorded, and when the picture is restored, parts except the foreground pixels are filled as the background pixels according to the colors of the background pixels and the size of the picture. The background pixels may be directly identified and filtered, or only the foreground pixels in the picture may be identified and only the foreground pixels may be retained.
According to the method and the device for reducing the size of the simplified picture, the picture is processed into at least two picture single sheets with the preset pixel size, the display parameter of each picture unit is obtained, only one of the picture units with the same display parameter is reserved, the simplified picture is generated and then stored, the size of the picture can be effectively reduced, each line of picture units in the picture corresponds to one addressing address in the simplified picture, and the picture can be conveniently restored according to the addressing addresses and the simplified picture when the picture needs to be displayed.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
As shown in fig. 7, an embodiment of the present application provides a picture processing system 100 for performing the method steps in the foregoing embodiments, where the picture processing system 100 includes:
a processing module 101, configured to process a picture into at least two picture units with a preset pixel size;
an obtaining module 102, configured to obtain a display parameter of each picture unit;
the generating module 103 is configured to, when the number of the picture units with the same display parameters is greater than 1, reserve one of the picture units with the same display parameters to generate a simplified picture;
a storage module 104, configured to store the compact picture; and each line of picture units in the picture corresponds to one addressing address in the simplified picture.
In an optional embodiment, the picture processing system further includes:
the setting module is used for setting a display unit with a preset pixel size;
the processing module is further configured to process the picture into at least two picture units of a preset pixel size with the display unit as a reference template.
In an optional embodiment, the picture processing system further includes:
the detection module is used for detecting the size of the picture;
and the storage module is also used for directly storing the picture and finishing when the size of the picture is smaller than twice of the preset pixel size.
In an optional embodiment, the picture processing system further comprises:
and the establishing module is used for establishing the association relationship between each row of picture units in the picture and one addressing address in the simplified picture.
In an optional embodiment, the picture processing system further includes:
the addressing module is used for addressing the simplified picture according to the addressing address corresponding to each line of picture units in the picture;
and the restoring module is used for sequencing the pixels in a row of picture units corresponding to each addressing address according to the addressing result so as to restore the picture.
In an optional embodiment, the processing module is further configured to process the picture into at least two black and white picture units of a preset pixel size;
the picture processing system further includes:
the palette module is used for generating a palette with preset color digits according to the colors of the pictures;
and the calling module is used for calling a coloring function, importing the data of the color palette and restoring the color of each picture unit in the picture.
In an alternative embodiment, the shading functions include a first shading function and a second shading function;
the calling module is used for:
detecting the number of colors of each picture unit in the picture;
when the color of the picture unit is a non-monochromatic color, calling the first coloring function and importing the data of the color palette to restore the color of the picture unit;
and when the color of the picture unit is a single color, calling the first coloring function or the second coloring function and importing the data of the color palette to restore the color of the picture unit.
In an optional embodiment, the picture processing system further includes:
the first identification module is used for identifying background pixels in the picture;
the first filtering module is used for filtering the background pixels and reserving foreground pixels in the picture;
the second identification module is used for identifying foreground pixels in the picture;
a second filtering module to retain the foreground pixels.
In an application, the picture processing system may be a software program system in a processor of a display device or a computing device, and the modules in the picture processing system are software program modules. The Processor may be a display chip, a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In application, the storage module may be a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the display device or the computing device. The memory module may also be an internal memory unit of the display device or the computing device and also include an external memory device.
According to the method and the device, the picture is processed into at least two picture single sheets with the preset pixel size, the display parameter of each picture unit is obtained, only one of the picture units with the same display parameter is reserved, the simplified picture is generated and then stored, the size of the picture can be effectively reduced, each line of picture units in the picture corresponds to one addressing address in the simplified picture, and the picture can be conveniently restored according to the addressing addresses and the simplified picture when the picture needs to be displayed.
As shown in fig. 8, an embodiment of the present application provides a terminal device 8 including: a processor 80, a memory 81 and a computer program 82, such as a picture processing program, stored in said memory 81 and operable on said processor 80. The processor 80 implements the steps in the above-described embodiments of the picture processing method, such as steps S101 to S104 shown in fig. 1, when executing the computer program 82. Alternatively, the processor 80, when executing the computer program 82, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the modules 101 to 104 shown in fig. 7.
Illustratively, the computer program 82 may be partitioned into one or more modules that are stored in the memory 81 and executed by the processor 80 to accomplish the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the terminal device 8. For example, the computer program 82 may be divided into a processing module, an obtaining module, a generating module, and a storing module, and the specific functions of the modules are as follows:
the processing module is used for processing the picture into at least two picture units with preset pixel sizes;
the acquisition module is used for acquiring the display parameters of each picture unit;
the generating module is used for reserving one of the picture units with the same display parameters to generate the simplified picture when the number of the picture units with the same display parameters is larger than 1;
the storage module is used for storing the simplified picture; and each line of picture units in the picture corresponds to one addressing address in the simplified picture.
The terminal device 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing device. The terminal device may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device 8 and does not constitute a limitation of terminal device 8 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The processor 80 may be a central processing unit, but may also be other general purpose processors, digital signal processors, application specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. provided on the terminal device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the terminal device 8. The memory 81 is used for storing the computer programs and other programs and data required by the terminal device. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (8)

1. An image processing method, comprising:
processing a picture into at least two picture units with a preset pixel size;
acquiring display parameters of each picture unit;
when the number of the picture units with the same display parameters is larger than 1, reserving one of the picture units with the same display parameters to generate a simplified picture;
storing the simplified picture; each line of picture units in the picture corresponds to one addressing address in the simplified picture;
addressing according to the addressing address corresponding to each row of picture units in the picture;
sequencing pixels in a row of picture units corresponding to each addressing address according to an addressing result to restore the picture;
processing a picture into at least two picture units of a preset pixel size, including:
processing the picture into at least two black and white picture units with preset pixel size;
the picture processing method further comprises the following steps:
generating a color palette with preset color digits according to the colors of the pictures;
sorting the pixels in a row of picture units corresponding to each addressing address according to the addressing result so as to restore the picture, and the method comprises the following steps:
and calling a coloring function and importing the data of the color palette to restore the color of each picture unit in the picture.
2. The picture processing method according to claim 1, wherein the coloring function includes a first coloring function and a second coloring function;
calling a coloring function and importing the data of the color palette to restore the color of each picture unit in the picture, wherein the method comprises the following steps:
detecting the number of colors of each picture unit in the picture;
when the color of the picture unit is a non-monochromatic color, calling the first coloring function and importing the data of the color palette to restore the color of the picture unit;
and when the color of the picture unit is a single color, calling the first coloring function or the second coloring function and importing the data of the color palette to restore the color of the picture unit.
3. The picture processing method according to claim 1 or 2, wherein before dividing the picture into at least two picture units, comprising:
identifying background pixels in the picture;
filtering the background pixels and reserving foreground pixels in the picture;
or, identifying foreground pixels in the picture;
the foreground pixels are retained.
4. The method of claim 1 or 2, wherein prior to storing the decimated picture, comprising:
and establishing an association relation between each row of picture units in the picture and one addressing address in the simplified picture.
5. The picture processing method according to claim 1 or 2, wherein the picture is a power-on icon or a power-off icon.
6. A picture processing system, comprising:
the processing module is used for processing the picture into at least two picture units with preset pixel sizes;
the acquisition module is used for acquiring the display parameters of each picture unit;
the generating module is used for reserving one of the picture units with the same display parameters to generate the simplified picture when the number of the picture units with the same display parameters is larger than 1;
the storage module is used for storing the simplified picture; each line of picture units in the picture corresponds to one addressing address in the simplified picture;
the addressing module is used for addressing the simplified picture according to the addressing address corresponding to each row of picture units in the picture;
the restoration module is used for sequencing the pixels in a row of picture units corresponding to each addressing address according to the addressing result so as to restore the picture;
the processing module is also used for processing the picture into at least two black-and-white picture units with preset pixel sizes;
the palette module is used for generating a palette with preset color digits according to the colors of the pictures;
and the calling module is used for calling a coloring function, importing the data of the palette and restoring the color of each picture unit in the picture.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201910271982.0A 2019-04-04 2019-04-04 Picture processing method, system, terminal equipment and storage medium Active CN110009564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910271982.0A CN110009564B (en) 2019-04-04 2019-04-04 Picture processing method, system, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910271982.0A CN110009564B (en) 2019-04-04 2019-04-04 Picture processing method, system, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110009564A CN110009564A (en) 2019-07-12
CN110009564B true CN110009564B (en) 2023-04-07

Family

ID=67169999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910271982.0A Active CN110009564B (en) 2019-04-04 2019-04-04 Picture processing method, system, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110009564B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113035151A (en) * 2019-12-25 2021-06-25 施耐德电气工业公司 Method, electronic device, and computer-readable medium for displaying image

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351454A (en) * 2001-05-23 2002-12-06 Nec Microsystems Ltd Device and method for image processing
CN107967341A (en) * 2017-12-08 2018-04-27 广东欧珀移动通信有限公司 A kind of image display method, terminal device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351454A (en) * 2001-05-23 2002-12-06 Nec Microsystems Ltd Device and method for image processing
CN107967341A (en) * 2017-12-08 2018-04-27 广东欧珀移动通信有限公司 A kind of image display method, terminal device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于FPGA的VGA多幅图片动态显示系统;申中杰等;《单片机与嵌入式系统应用》;20180101(第01期);全文 *

Also Published As

Publication number Publication date
CN110009564A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN106056530B (en) Method and device for displaying picture content in application
CN109472839B (en) Image generation method and device, computer equipment and computer storage medium
US10834424B2 (en) Method and device for compressing image, and electronic device
AU2014402162B2 (en) Method and apparatus for setting background of UI control, and terminal
CN107799093A (en) Adjust method, terminal and the computer-readable recording medium of screen luminance of terminal
CN101299804A (en) Character overlapping method and device
CN112929672B (en) Video compression method, device, equipment and computer readable storage medium
CN112287257A (en) Page display method and device, electronic equipment and storage medium
CN110009564B (en) Picture processing method, system, terminal equipment and storage medium
CN110838154A (en) Picture processing method and device
CN115831061A (en) Ink screen display method and device, terminal equipment and storage medium
CN111562869B (en) Screenshot method and device, storage medium and electronic device
JPH10187138A (en) Method for efficiently constructing display image and display processor system
CN112435634A (en) Image display method, image display apparatus, and readable storage medium
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
CN113391779B (en) Parameter adjusting method, device and equipment for paper-like screen
CN109614064A (en) A kind of image display method, image display apparatus and terminal device
CN110996026B (en) OSD display method, device, equipment and storage medium
CN111127310B (en) Image processing method and device, electronic equipment and storage medium
CN114697555A (en) Image processing method, device, equipment and storage medium
CN104021579A (en) Method and device for changing colors of image
CN111930461A (en) Android-based mobile terminal APP full page graying method and device
JPH07118002B2 (en) Image processing device
CN111722823A (en) Method and device for self-adapting screen resolution, storage medium and electronic equipment
CN112598694B (en) Video image processing method, electronic device and storage medium

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: 20191220

Address after: No. 2388, Dongcheng Avenue, Jieshi Town, Banan District, Chongqing

Applicant after: CHONGQING HUIKE JINYANG SCIENCE & TECHNOLOGY Co.,Ltd.

Address before: The New District of Hefei City, Anhui province 230012 nine Top Road and intersection of the northeast corner of Kui he Lu

Applicant before: HEFEI HUIKE JINYANG TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant