The compression of electronic shelf label image data, decompression, processing method and system
Technical field
The invention belongs to image procossing transmission fields, relate generally to a kind of compression of electronic shelf label image data, solution
Pressure, processing method and system.
Background technology
In recent years, with the reduction of electronic curtain price, electronic shelf label ESL is for having replaced traditionally on paper label
Through becoming trend.Compared to traditional paper labels, merchandise news (quotient that electronic shelf label can be on fast remote update price card
The name of an article claims, price, bar code, Quick Response Code etc.), easy to use, setting is simple, and application is very extensive.Electronic shelf label picture number
The background image data that often there is a large amount of redundancy in, such as black and white background colour data or black and white red trichromatism
Background colour data.Existing electronic shelf label generally uses battery powered, and large batch of electronic bin mark is connected using gateway
Label form update network, and under the transmission technology of existing electronic shelf label data, large batch of electronic shelf label carries out
, directly will be original by updating network when update, unpressed electronic shelf label image data is simultaneously sent to each electronic bin
Label, big data quantity transmission, network momentary load is very big, and data packetloss rate is high, causes the update of part price card not in time, needs anti-
Multiple transmission data improves each newer power consumption, causes to bear to battery in turn.
Invention content
Present invention aims at the compressions in view of the drawbacks of the prior art, providing electronic shelf label image data, decompress,
Processing method and system can significantly reduce the electronic shelf label image data amount of pre-transmission by compressing, reduce big
The power consumption when electronic shelf label of batch is updated and the load caused by network.
The invention discloses a kind of compression method of electronic shelf label image data, step includes:
S11, the raw image data for obtaining electronic shelf label;
S12, the first image data progress Run- Length Coding in the raw image data is obtained into the second image data, institute
State the compressed data of the second image data and third image data composition electronic shelf label;Described first image data are to meet
The pixel data of preset condition;The third image data be the raw image data in addition to described first image data
Other image datas.
Further, the step S12 includes:
S121, it puts in order according to pixel data in the raw image data, is successively read the original image number
Pixel data in;
S122, when continuously reading the identical described first image data of N number of color, by N number of first picture number
According to being substituted for second image data;Wherein, second image data is indicated in the form of " label value+frequency ", institute
Color of the label value for identifying described first image data is stated, the frequency is N;N is integer, and N is greater than or equal to 2;
S123, after the electronic shelf label raw image data is all read and has been replaced, obtain the electronics
Shelf label compressed data.
Meanwhile the invention also discloses a kind of decompressing method of electronic shelf label image data, step includes:
S21, electronic shelf label compressed data is obtained;The electronic shelf label compressed data is to pass through above-mentioned compression side
The data that method compresses the raw image data of electronic shelf label;
S22, distance of swimming decoding is carried out to second image data in the electronic shelf label compressed data, obtains electricity
The raw image data of sub- shelf label.
Further, the step S22 includes:
S221, the electronic shelf label compressed data is sequentially read;
S222, when reading second image data, be substituted for continuous N third image data, described
Three image datas are the label value in second image data, and M is equal to the frequency in second image data;
S223, when all having read and having replaced the electronic shelf label compressed data, obtain electronic shelf label
Raw image data.
Meanwhile the invention also discloses a kind of processing method of electronic shelf label image data, step includes:
Server is handled the electronic shelf label raw image data of pre-transmission using above-mentioned compression method, is obtained
Electronic shelf label compressed data;
The electronic shelf label compressed data is transferred to electronic tag terminal by server;
Electronic tag terminal decompresses the electronic shelf label compressed data using above-mentioned decompressing method, obtains electricity
Sub- shelf label raw image data.
Corresponding, the invention also discloses a kind of compressibilities of electronic shelf label image data, including the first acquisition
Module, first processor:
First acquisition module, the raw image data for obtaining electronic shelf label;
The first processor, for by the first image data in the raw image data of the electronic shelf label into
Row Run- Length Coding obtains the second image data, the pressure of second image data and third image data composition electronic shelf label
Contracting data;Described first image data are to meet the pixel data of preset condition;The third image data is the original graph
As other image datas in data in addition to described first image data.
Further, the first processor includes the first read module, the first replacement module;
First read module is read successively for putting in order according to pixel data in the raw image data
Take the pixel data in the raw image data;
First replacement module continuously reads N number of color identical described for working as first read module
When one image data, N number of first image data is substituted for second image data;Wherein, second picture number
It is indicated according in the form of " label value+frequency ", the label value is used to identify the color of described first image data, the frequency
Secondary is N;N is integer, and N is greater than or equal to 2.
Corresponding, the invention also discloses a kind of decompression systems of electronic shelf label image data, including the second acquisition
Module, second processor;
Second acquisition module, for obtaining electronic shelf label compressed data;The electronic shelf label compresses number
According to the data to be compressed to the raw image data of the electronic shelf label by above-mentioned compression method;
The second processor, for being carried out to second image data in the electronic shelf label compressed data
The distance of swimming decodes, and obtains the raw image data of electronic shelf label.
Further, the second processor includes the second read module, the second replacement module;
Second read module, for sequentially reading the electronic shelf label compressed data;
Second replacement module, for when the second read module reads second image data, by it
It is substituted for continuous N third image data, the third image data is the label value in second image data, and M is equal to
The frequency in second image data.
Corresponding, the invention also discloses a kind of processing system of electronic shelf label image data, including server, electricity
Subtab terminal;
The server includes the compressibility and the first communication module of above-mentioned electronic shelf label image data;Described
One communication module, for transferring data to the electronic tag terminal;
The electronic tag terminal includes the decompression system and the second communication module of above-mentioned electronic shelf label image data;
Second communication module, for receiving the data sent from the server.
Compared with prior art, advantageous effects of the invention are as follows:
The present invention provides a kind of compression of electronic shelf label image data, decompression, processing method and system, Ke Yitong
It crosses Run- Length Coding algorithm to compress a large amount of black and white red trichromatism data of redundancy in electronic shelf label image data, significantly
Reduce the electronic shelf label image data amount of pre-transmission, then compressed data transmission to terminal is decompressed, reduces
Power consumption when large batch of electronic shelf label is updated and the load caused by network, also reduce losing in transmission process
Packet rate so that the update of electronic shelf label more precise and high efficiency.
Description of the drawings
The step of Fig. 1 is the compression method of a kind of electronic shelf label image data described in embodiment 1 in the present invention is shown
It is intended to;
The step of Fig. 2 is the decompressing method of a kind of electronic shelf label image data described in embodiment 2 in the present invention is shown
It is intended to;
The step of Fig. 3 is the processing method of a kind of electronic shelf label image data described in embodiment 3 in the present invention is shown
It is intended to;
Fig. 4 is that a kind of structure of the compressibility of electronic shelf label image data described in embodiment 4 in the present invention is shown
It is intended to;
Fig. 5 is that a kind of structure of the decompression system of electronic shelf label image data described in embodiment 5 in the present invention is shown
It is intended to;
Fig. 6 is that a kind of structure of the processing system of electronic shelf label image data described in embodiment 6 in the present invention is shown
It is intended to.
Specific implementation mode
In order to be fully understood from the purpose of the present invention, feature and effect, below with reference to attached drawing and specific implementation mode pair
The technique effect of design, specific steps and the generation of the present invention is described further.
Embodiment 1
As shown in Figure 1, the present embodiment 1 discloses a kind of compression method of electronic shelf label image data, step packet
It includes:
S11, the raw image data for obtaining electronic shelf label;
S12, the first image data progress Run- Length Coding in raw image data is obtained into the second image data, the second figure
As data and third image data form the compressed data of electronic shelf label;First image data is to meet the picture of preset condition
Prime number evidence;Third image data is other image datas in addition to the first image data in raw image data.
Specifically, step S12 includes:
S121, it puts in order according to pixel data in raw image data, the picture that is successively read in raw image data
Prime number evidence;
S122, when continuously reading identical first image data of N number of color, N number of first image data is substituted for
Second image data;Wherein, the second image data is indicated in the form of " label value+frequency ", and label value is for identifying first
The color of image data, frequency N;N is integer, and N is greater than or equal to 2;
S123, after electronic shelf label raw image data is all read and has been replaced, obtain electronic shelf label
Compressed data.
Specifically, in compression method described in the present embodiment, preset condition is when the color type of pixel data is black
When color, white, yellow or red.In practical application, since the background colour data in electronic shelf label image data can have
Other selections, such as select green or blue as background colour, preset condition also should be adjusted accordingly.
In practical applications, the raw image data of electronic shelf label usually contains a large amount of redundant data, seems to connect
Continuous white pixel is as background colour, and using electronic paper screen original image hexadecimal bin file as example, there are a line 16
The AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA AA (continuous red background color) of a byte, when making
It is exactly AA 10 after being compressed to it with the technical solution in step S121-S123, because indicating several with two bytes
Amount, so maximum continuous quantity just has 255.This means that maximum space of saving can reach 255:2, i.e. theoretical maximum compression ratio energy
Reach 127.
Embodiment 2
As shown in Fig. 2, the present embodiment 2 discloses a kind of decompressing method of electronic shelf label image data, step packet
It includes:
S21, electronic shelf label compressed data is obtained;Electronic shelf label compressed data is by being compressed in embodiment 1
The data that method compresses the raw image data of electronic shelf label;
S22, distance of swimming decoding is carried out to the second image data in electronic shelf label compressed data, obtains electronic bin mark
The raw image data of label.
Specifically, step S22 includes:
S221, sequence read electronic shelf label compressed data;
S222, when reading the second image data, be substituted for continuous N third image data, third picture number
According to for the label value in the second image data, M is equal to the frequency in the second image data;
S223, when all having read and having replaced electronic shelf label compressed data, it is original to obtain electronic shelf label
Image data.
Embodiment 3
As shown in figure 3, the present embodiment 3 discloses a kind of processing method of electronic shelf label image data, step packet
It includes:
Server using the compression method in embodiment 1 to the electronic shelf label raw image data of pre-transmission at
Reason, obtains electronic shelf label compressed data;
Electronic shelf label compressed data is transferred to electronic tag terminal by server;
Electronic tag terminal decompresses electronic shelf label compressed data using the decompressing method in embodiment 2, obtains
To electronic shelf label raw image data.
Embodiment 4
As shown in figure 4, the present embodiment 4 discloses a kind of compressibility of electronic shelf label image data, including first
Acquisition module 1, first processor 2:
First acquisition module 1, the raw image data for obtaining electronic shelf label;
First processor 2, for the first image data in the raw image data of electronic shelf label to be carried out the distance of swimming
Coding obtains the second image data, the compressed data of the second image data and third image data composition electronic shelf label;The
One image data is to meet the pixel data of preset condition;Third image data is that the first image data is removed in raw image data
Other image datas in addition.
Specifically, preset condition is the white when the color type of pixel data is black, yellow or it is red when.Actually answer
In, since the background colour data in electronic shelf label image data can have other selections, such as selection green or blue
As background colour, preset condition also should be adjusted accordingly.Specifically, first processor 2 includes the first read module 3, first
Replacement module 4;
First read module 3 is successively read original graph for putting in order according to pixel data in raw image data
As the pixel data in data;
First replacement module 4, for continuously reading identical first image data of N number of color when the first read module 3
When, N number of first image data is substituted for the second image data;Wherein, the second image data uses the shape of " label value+frequency "
Formula indicates that label value is used to identify the color of the first image data, frequency N;N is integer, and N is greater than or equal to 2.
Embodiment 5
As shown in figure 5, the present embodiment 5 discloses a kind of decompression system of electronic shelf label image data, including second
Acquisition module 5, second processor 6;
Second acquisition module 5, for obtaining electronic shelf label compressed data;Electronic shelf label compressed data is to pass through
The data that compression method in embodiment 1 compresses the raw image data of electronic shelf label;
Second processor 6 is obtained for carrying out distance of swimming decoding to the second image data in electronic shelf label compressed data
To the raw image data of electronic shelf label.
Further, second processor 6 includes the second read module 7, the second replacement module 8;
Second read module 7, for sequentially reading electronic shelf label compressed data;
Second replacement module 8, for when the second read module 7 reads the second image data, being substituted for continuous N
A third image data, third image data are the label value in the second image data, and M is equal to the frequency in the second image data
It is secondary.
Embodiment 6
As shown in fig. 6, the present embodiment 6 discloses a kind of processing system of electronic shelf label image data, including service
Device 9, electronic tag terminal 10;
Server 9 includes the compressibility and the first communication module 11 of the electronic shelf label image data in embodiment 4;
First communication module 11, for transferring data to electronic tag terminal 10;
Electronic tag terminal 10 includes decompression system and the second communication of the electronic shelf label image data in embodiment 5
Module 12;Second communication module 12, for receiving the data sent from server 9.
The compression of electronic shelf label image data disclosed in through the invention, decompression, processing method and system can be with
A large amount of background colour data of redundancy in electronic shelf label image data are compressed by Run- Length Coding algorithm, are significantly subtracted
The electronic shelf label image data amount of small pre-transmission, then compressed data transmission to terminal is decompressed, it reduces big
The power consumption when electronic shelf label of batch is updated and the load caused by network, also reduce the packet loss in transmission process
Rate so that the update of electronic shelf label more precise and high efficiency.
The preferred embodiment of the present invention has been described in detail above, it should be understood that those skilled in the art without
It needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the art
Personnel according to present inventive concept in prior art basis by logic analysis, reasoning or according to it is limited experiment it is available
Technical solution, should be among the protection domain determined by the claims.