[go: up one dir, main page]

CN107040791B - Adaptive binary image compression method suitable for electronic display labels - Google Patents

Adaptive binary image compression method suitable for electronic display labels Download PDF

Info

Publication number
CN107040791B
CN107040791B CN201710222362.9A CN201710222362A CN107040791B CN 107040791 B CN107040791 B CN 107040791B CN 201710222362 A CN201710222362 A CN 201710222362A CN 107040791 B CN107040791 B CN 107040791B
Authority
CN
China
Prior art keywords
character
image
compression
compression method
electronic display
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
CN201710222362.9A
Other languages
Chinese (zh)
Other versions
CN107040791A (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.)
Suzhou Etag Technology Corp
Original Assignee
Suzhou Vocational Institute of Industrial Technology
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 Suzhou Vocational Institute of Industrial Technology filed Critical Suzhou Vocational Institute of Industrial Technology
Priority to CN201710222362.9A priority Critical patent/CN107040791B/en
Publication of CN107040791A publication Critical patent/CN107040791A/en
Application granted granted Critical
Publication of CN107040791B publication Critical patent/CN107040791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明提供了一种适用于电子显示标签的自适应二值图像压缩方法,包括:步骤1,将待显示图像与当前显示图像进行对比获取有效刷新区域的点阵坐标和对应的更新信息,步骤2,以两种不同的压缩方式分别对所述更新信息中的图案部分和字符部分进行压缩处理。本发明能够在不增加电子显示标签处理器资源的情况下,提供一种压缩效率高,消耗资源少的图像压缩改进方法。使用本发明的图像压缩改进方法可以有效的提高电子货架标签的图像传输响应速度,提高电子货架标签的整体工作效率,不但减少了图像刷新传输的时间,并且能够有效的节省能耗,延长电子货架标签的工作寿命。

The present invention provides an adaptive binary image compression method suitable for electronic display labels, including: step 1, comparing the image to be displayed with the current display image to obtain the dot matrix coordinates of the effective refresh area and corresponding update information, the step 2. Perform compression processing on the pattern part and the character part in the update information in two different compression methods. The invention can provide an improved image compression method with high compression efficiency and less resource consumption without increasing the processor resources of the electronic display label. Using the image compression improvement method of the present invention can effectively improve the image transmission response speed of the electronic shelf label, improve the overall work efficiency of the electronic shelf label, not only reduce the time for image refresh transmission, but also effectively save energy consumption and prolong the electronic shelf life. The working life of the label.

Description

适用于电子显示标签的自适应二值图像压缩方法Adaptive binary image compression method suitable for electronic display labels

技术领域technical field

本发明涉及电子显示领域,具体地,涉及一种适用于电子显示标签的自适应二值图像压缩方法。The invention relates to the field of electronic display, in particular to an adaptive binary image compression method suitable for electronic display labels.

背景技术Background technique

目前,已经有很多关于无损压缩的方法,最常见的算法二值图像无损压缩算法有游长编码、Huffman编码、LZ77等。基于这些算法,也有很多人提出了一些优化算法,并通过硬件进行实现。At present, there are already many lossless compression methods. The most common algorithms for lossless compression of binary images include swim-length coding, Huffman coding, and LZ77. Based on these algorithms, many people have proposed some optimization algorithms and implemented them through hardware.

但对于新型领域的电子货架标签的二值图像显示而言,由于其图像内容具备特定特征,电子货架标签的图像内容在实际应用中基本固定于特定格式的模板,改变通常在特定区域局部刷新即可,全屏内容整屏刷新的时候并不多,但反而对传输响应的速度要求较高,因此,在这种应用领域,常用的图像压缩方法针对整屏图像采用一个统一的算法进行均匀无差别压缩的方式,实际上并不适合,效率也不高。Robin Kuivinen曾经比较了7种图像压缩算法在电子货架标签中的压缩效果。较好的情况也仅20%左右。However, for the binary image display of electronic shelf labels in the new field, due to the specific characteristics of the image content, the image content of the electronic shelf label is basically fixed in the template of a specific format in practical applications, and the change is usually refreshed locally in a specific area. However, there are not many times when the full screen content is refreshed on the whole screen, but on the contrary, the speed of the transmission response is high. Therefore, in this application field, the commonly used image compression method uses a unified algorithm for the entire screen image to perform uniform and indiscriminate The compression method is actually not suitable and the efficiency is not high. Robin Kuivinen once compared the compression effects of 7 image compression algorithms in electronic shelf labels. The better situation is only about 20%.

而针对字符编码的压缩也是一种常见的图像内容压缩方法,该方法虽然可以显著提高通讯速度,解压缩时间也很短,但是该方法局限于字符内容,对于有图像的内容,该方法并不适用。并且对于大部分应用来说,字符编码的压缩率要求极低(全屏字符甚至达到2%左右)。The compression for character encoding is also a common image content compression method. Although this method can significantly improve the communication speed and the decompression time is also very short, this method is limited to character content, and it is not suitable for image content. Be applicable. And for most applications, the compression ratio of character encoding is extremely low (full-screen characters even reach about 2%).

图像压缩后,压缩率越小,传输越快;同时,考虑到电子显示标签的运算处理能力,复杂压缩算法对应的解码方法复杂,对进行解码处理的标签处理器资源要求高,但是,处理器资源越高需要消耗更多资源成本,无法满足高传输速度和低耗能并存的需求。After image compression, the smaller the compression rate, the faster the transmission; at the same time, considering the computing and processing capabilities of the electronic display label, the decoding method corresponding to the complex compression algorithm is complicated, and the resource requirements of the label processor for decoding processing are high. However, the processor The higher the resources, the more resource costs will be consumed, which cannot meet the coexistence of high transmission speed and low energy consumption.

因此目前存在的问题包括:Therefore, the current problems include:

1.常见的压缩算法,压缩率不高,也不适应于电子显示标签的图像内容。复杂压缩算法会导致解码方法复杂,对标签处理器要求很高。1. The common compression algorithm has a low compression rate and is not suitable for the image content of the electronic display label. Complex compression algorithms result in complex decoding methods that place high demands on the label processor.

2.通用的字符编码,压缩率虽然非常高,解压缩时间快,但是无法对图像进行压缩,同样不能适用于图文并茂的电子显示标签内容的处理。2. Universal character encoding, although the compression rate is very high and the decompression time is fast, it cannot compress the image, and it is also not suitable for the processing of the content of the electronic display label with both pictures and text.

所以,如何寻找到一种能够自适应电子货架标签特定显示内容的,又同时兼备较高压缩率的解决方案,是目前急需解决的问题。Therefore, how to find a solution that can adapt to the specific display content of the electronic shelf label and at the same time have a high compression rate is an urgent problem to be solved at present.

发明内容Contents of the invention

针对现有技术中的缺陷,本发明的目的是提供一种适用于电子显示标签的自适应二值图像压缩方法。Aiming at the defects in the prior art, the object of the present invention is to provide an adaptive binary image compression method suitable for electronic display labels.

根据本发明提供的一种适用于电子显示标签的自适应二值图像压缩方法,包括:According to a kind of self-adaptive binary image compression method that is suitable for the electronic display label provided by the present invention, comprises:

步骤1,将待显示图像与当前显示图像进行对比获取有效刷新区域的点阵坐标和对应的更新信息,Step 1, compare the image to be displayed with the currently displayed image to obtain the lattice coordinates of the effective refresh area and the corresponding update information,

步骤2,以两种不同的压缩方式分别对所述更新信息中的图案部分和字符部分进行压缩处理。Step 2: Perform compression processing on the pattern part and the character part in the update information by two different compression methods.

优选地,所述步骤2对所述更新信息中的图案部分的压缩方式包括:Preferably, the method of compressing the pattern part in the update information in the step 2 includes:

预设一最小游程范围和一个或连续两个以上的分段游程范围;Preset a minimum run range and one or more than two consecutive segmented run ranges;

对所述图案部分进行游程长度检测;performing run length detection on the pattern portion;

当检测到当前数据的游程长度小于或等于所述最小游程范围时,图案类传输数据包括操作标志位和数据内容段,将操作标志位设置为不压缩;When detecting that the run length of the current data is less than or equal to the minimum run length range, the pattern class transmission data includes an operation flag bit and a data content segment, and the operation flag bit is set to be uncompressed;

当检测到当前数据的游程长度属于所述分段游程范围时,图案类传输数据包括操作标志位、类别标志位、数据长度位,将操作标志位设置为压缩,根据所述当前数据的二值属性确定所述类别标志位,根据所述当前数据的游程长度确定所述数据长度位。When it is detected that the run length of the current data belongs to the segmented run range, the pattern transmission data includes an operation flag bit, a category flag bit, and a data length bit, and the operation flag bit is set to compression, according to the binary value of the current data The attribute determines the category flag bit, and determines the data length bit according to the run length of the current data.

优选地,当检测到当前数据的游程长度属于所述分段游程范围时,根据当前数据所属的分段游程范围的最大长度确定预留的所述数据长度位的长度。Preferably, when it is detected that the run length of the current data belongs to the segment run range, the length of the reserved data length bit is determined according to the maximum length of the segment run range to which the current data belongs.

优选地,所述步骤1和步骤2之间还包括:Preferably, between said step 1 and step 2, it also includes:

将所述更新信息与预设的字符库内的字符特征一一比对,匹配则识别为所述字符部分,不匹配则识别为所述图案部分。The update information is compared with the character features in the preset character library one by one, and if they match, they will be recognized as the character part, and if they don't match, they will be recognized as the pattern part.

优选地,所述步骤2对所述更新信息中的字符部分的压缩方式包括:Preferably, the method of compressing the character part in the update information in step 2 includes:

提取所述字符部分在所述字符库中匹配的字符特征所对应的编号,字符类传输数据包括所述编号和对应顺序的点阵坐标。The number corresponding to the character feature matched by the character part in the character library is extracted, and the character class transmission data includes the number and the dot matrix coordinates of the corresponding sequence.

优选地,在步骤1之前还包括预设字符库的步骤:根据对字符的特征分析确定每个字符的所述字符特征,将字符和与该字符对应的字符特征一一对应存入所述字符库内并依次设置编号。Preferably, the step of presetting the character library is also included before step 1: determining the character feature of each character according to the feature analysis of the character, and storing the character and the character feature corresponding to the character into the character in one-to-one correspondence library and set the numbers sequentially.

优选地,所述字符包括中文、英文、数字、特殊字符。Preferably, the characters include Chinese, English, numbers and special characters.

与现有技术相比,本发明具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:

本发明能够在不增加电子显示标签处理器资源的情况下,提供一种压缩效率高,消耗资源少的图像压缩改进方法。使用本发明的图像压缩改进方法可以有效的提高电子货架标签的图像传输响应速度,提高电子货架标签的整体工作效率,不但减少了图像刷新传输的时间,并且能够有效的节省能耗,延长电子货架标签的工作寿命。The invention can provide an improved image compression method with high compression efficiency and less resource consumption without increasing the processor resources of the electronic display label. Using the image compression improvement method of the present invention can effectively improve the image transmission response speed of the electronic shelf label, improve the overall work efficiency of the electronic shelf label, not only reduce the time for image refresh transmission, but also effectively save energy consumption and prolong the electronic shelf life. The working life of the label.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单的介绍,显而易见,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图中:In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without any creative work. In the attached picture:

图1是一种适用于电子显示标签的自适应二值图像压缩方法流程步骤;Fig. 1 is a kind of process steps of adaptive binary image compression method suitable for electronic display labels;

图2是待显示图像举例;Figure 2 is an example of an image to be displayed;

图3是当前显示图像举例;Figure 3 is an example of the currently displayed image;

图4是不压缩操作的数据示意图;Fig. 4 is a data schematic diagram of an uncompressed operation;

图5是短压缩操作的数据示意图;Figure 5 is a data schematic diagram of a short compression operation;

图6是中压缩操作的数据示意图;Fig. 6 is a data schematic diagram of the compression operation;

图7是长压缩操作的数据示意图;Fig. 7 is a data schematic diagram of a long compression operation;

图8是可选的一种方法流程示意图。Fig. 8 is a schematic flowchart of an optional method.

具体实施方式Detailed ways

下文结合附图以具体实施例的方式对本发明进行详细说明。以下实施例将有助于本领域的技术人员进一步理解本发明,但不以任何形式限制本发明。应当指出的是,还可以使用其他的实施例,或者对本文列举的实施例进行结构和功能上的修改,而不会脱离本发明的范围和实质。The present invention will be described in detail below in terms of specific embodiments in conjunction with the accompanying drawings. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It is to be noted that other embodiments may be utilized or structural and functional modifications may be made to the embodiments set forth herein without departing from the scope and spirit of the invention.

在本发明提供的一种适用于电子显示标签的自适应二值图像压缩方法的实施例中,如图1所示,包括In an embodiment of an adaptive binary image compression method suitable for electronic display labels provided by the present invention, as shown in FIG. 1 , it includes

根据本发明提供的一种,包括:According to one provided by the invention, comprising:

步骤1,将待显示图像与当前显示图像进行对比获取有效刷新区域的点阵坐标和对应的更新信息,Step 1, compare the image to be displayed with the currently displayed image to obtain the lattice coordinates of the effective refresh area and the corresponding update information,

步骤2,以两种不同的压缩方式分别对所述更新信息中的图案部分和字符部分进行压缩处理。Step 2: Perform compression processing on the pattern part and the character part in the update information by two different compression methods.

游程算法的实现是用当前数据元素以及该元素连续出现的次数来取代字符串中连续出现的数据部分。本发明中所述游程是指数据元素出现重复的一段数据,游程长度即是指出现重复的数据段中该元素重复出现的个数。例如在1110中第一段游程为重复出现三次的111,其游程长度为3。游程范围是指第1-3位范围上为1。具体可见后部分的具体举例。The implementation of the run-length algorithm is to replace the consecutive data parts in the string with the current data element and the number of consecutive occurrences of the element. The run in the present invention refers to a section of data in which data elements are repeated, and the length of the run refers to the number of repeated occurrences of the element in the repeated data section. For example, the first run in 1110 is 111 that appears three times, and its run length is 3. The run range means that bits 1-3 are 1 in the range. For details, see the specific examples in the latter part.

作为一种可选实施例,所述步骤2对所述更新信息中的图案部分的压缩方式包括:As an optional embodiment, the method of compressing the pattern part in the update information in step 2 includes:

预设一最小游程范围和一个或连续两个以上的分段游程范围;Preset a minimum run range and one or more than two consecutive segmented run ranges;

对所述图案部分进行游程长度检测;performing run length detection on the pattern portion;

当检测到当前数据的游程长度小于或等于所述最小游程范围时,图案类传输数据包括操作标志位和数据内容段,将操作标志位设置为不压缩;When detecting that the run length of the current data is less than or equal to the minimum run length range, the pattern class transmission data includes an operation flag bit and a data content segment, and the operation flag bit is set to be uncompressed;

当检测到当前数据的游程长度属于所述分段游程范围时,图案类传输数据包括操作标志位、类别标志位、数据长度位,将操作标志位设置为压缩,根据所述当前数据的二值属性确定所述类别标志位,根据所述当前数据的游程长度确定所述数据长度位。When it is detected that the run length of the current data belongs to the segmented run range, the pattern transmission data includes an operation flag bit, a category flag bit, and a data length bit, and the operation flag bit is set to compression, according to the binary value of the current data The attribute determines the category flag bit, and determines the data length bit according to the run length of the current data.

作为一种可选实施例,当检测到当前数据的游程长度属于所述分段游程范围时,根据当前数据所属的分段游程范围的最大长度确定预留的所述数据长度位的长度。As an optional embodiment, when it is detected that the run length of the current data belongs to the segmented run range, the length of the reserved data length bit is determined according to the maximum length of the segmented run range to which the current data belongs.

作为一种可选实施例,所述步骤1和步骤2之间还包括:As an optional embodiment, the steps between step 1 and step 2 also include:

将所述更新信息与预设的字符库内的字符特征一一比对,匹配则识别为所述字符部分,不匹配则识别为所述图案部分。The update information is compared with the character features in the preset character library one by one, and if they match, they will be recognized as the character part, and if they don't match, they will be recognized as the pattern part.

作为一种可选实施例,所述步骤2对所述更新信息中的字符部分的压缩方式包括:As an optional embodiment, the method of compressing the character part in the update information in step 2 includes:

提取所述字符部分在所述字符库中匹配的字符特征所对应的编号,字符类传输数据包括所述编号和对应顺序的点阵坐标。The number corresponding to the character feature matched by the character part in the character library is extracted, and the character class transmission data includes the number and the dot matrix coordinates of the corresponding sequence.

作为一种可选实施例,在步骤1之前还包括预设字符库的步骤:根据对字符的特征分析确定每个字符的所述字符特征,将字符和与该字符对应的字符特征一一对应存入所述字符库内并依次设置编号。As an optional embodiment, the step of presetting the character library is also included before step 1: determining the character features of each character according to the feature analysis of the characters, and making a one-to-one correspondence between the character and the character feature corresponding to the character Store them in the character library and set the numbers in sequence.

作为一种可选实施例,所述字符包括中文、英文、数字、特殊字符。As an optional embodiment, the characters include Chinese, English, numbers, and special characters.

实现上述方案还可以通过下述方案流程,该方法包含以下步骤:The above scheme can also be implemented through the following scheme process, and the method includes the following steps:

1、自动识别刷新内容1. Automatically identify and refresh content

扫描全屏点阵图像,与当前图像内容对比换算,得出发生变化的区域,锁定需要刷新内容的有效刷新区域的坐标。Scan the full-screen dot matrix image, compare and convert it with the current image content, get the changed area, and lock the coordinates of the effective refresh area that needs to be refreshed.

2、自动识别电子显示标签图像和字符2. Automatic recognition of electronic display label images and characters

将有效刷新区域的内容与字库字符特征一一比对,比对成功的即可自动识别字符内容。Compare the content of the effective refresh area with the character characteristics of the font library one by one, and the character content can be automatically identified if the comparison is successful.

将无法与字库字符相匹配的区域定义为图像内容。The area that cannot be matched with font characters is defined as the image content.

3、分别用不同压缩引擎处理图像内容和字符内容:3. Use different compression engines to process image content and character content:

对于图像内容,采用低内存占用量、低压缩率的优化游程判定压缩编码算法。For image content, an optimized run length determination compression coding algorithm with low memory usage and low compression rate is adopted.

对于字符内容,采用字符编码方式进行图像压缩。For character content, the character encoding method is used for image compression.

4、终端标签接收到传输内容自动适应解码刷新相应区域的相应内容:4. The terminal label receives the transmitted content and automatically adapts to decode and refresh the corresponding content in the corresponding area:

传输协议采用字符和图像分开传输的方式The transmission protocol adopts the method of separate transmission of characters and images

终端标签接收到字符特征的数据包,直接启动预存字符编码表,读取坐标信息后,对于字符内容读码显示刷新。The terminal label receives the data packet of character characteristics, directly starts the pre-stored character encoding table, and after reading the coordinate information, refreshes the code reading display of the character content.

终端标签接收到图像特征的数据包,启动图像解码引擎,按照协议确定的游程判定压缩编码方式判定图像内容采用何种方式解码,并对解码后的图像内容按照坐标信息进行解码显示刷新。The terminal label receives the data packet of image characteristics, starts the image decoding engine, determines the compression encoding method according to the run length determined by the protocol, determines which method to decode the image content, and decodes and displays the decoded image content according to the coordinate information. Refresh.

具体实施例举例:Specific embodiment example:

如图2、3所示,图2为待显示图像,右图1为当前显示图像。As shown in Figures 2 and 3, Figure 2 is the image to be displayed, and Figure 1 on the right is the currently displayed image.

步骤一、自动识别刷新内容。Step 1. Automatically identify and refresh content.

1、使用图像引擎扫描比对图像1与图像21. Use the image engine to scan and compare image 1 and image 2

2、运算差得出文字5部分与图像3部分内容,锁定文字5和图像3区域坐标分别为:2. Calculate the difference between the text 5 and the image 3. The coordinates of the locked text 5 and image 3 are:

文字5起始坐标=(X1,Y1),文字5终点坐标=(X2,Y2);Text 5 start coordinates = (X1, Y1), text 5 end coordinates = (X2, Y2);

图像3起始坐标=(X3,Y3),图像3终点坐标=(X4,Y4);Image 3 start coordinates=(X3, Y3), image 3 end coordinates=(X4, Y4);

步骤二、自动识别电子显示标签图像和字符的方法:Step 2. The method of automatically identifying the image and characters of the electronic display label:

1、预先对字库中字符进行特征分析,并将每个字符的特征进行存储,1. Perform feature analysis on the characters in the font library in advance, and store the features of each character,

2、运算比对步骤一锁定的内容,与字符特征进行运算比对,文字5比对成功,锁定为字符内容,图像3内容未比对成功,定义为图像内容。2. The content locked in operation comparison step 1 is calculated and compared with the character features. If the comparison of text 5 is successful, it is locked as character content. If the content of image 3 is not successfully compared, it is defined as image content.

3、已通过比对确定了文字5的内容码字字段编码表示为(W1。。Wn)3. It has been confirmed by comparison that the content code word field encoding of text 5 is expressed as (W1..Wn)

3、将文字5字段编码及文字图坐标发送至文字压缩处理引擎进行字符压缩处理3. Send the text 5-field code and text map coordinates to the text compression processing engine for character compression processing

4、将图像3坐标范围内容发送至图案压缩处理引擎进行数据化处理4. Send the image 3 coordinate range content to the pattern compression processing engine for data processing

步骤三、字符压缩处理引擎:对字符内容采用本发明设计预存字符编码表的压缩方式:Step 3, character compression processing engine: adopt the compression mode of the present invention to design prestored character encoding table to character content:

采用本发明的电子显示标签,均已预存字库字符编码表,实际使用中,先要将字符进行编码,并储存到flash中。字库主要包含了中文、英文、数字、特殊字符等。The electronic display label of the present invention has pre-stored the font character encoding table, and in actual use, the characters must first be encoded and stored in the flash. The font library mainly includes Chinese, English, numbers, special characters, etc.

识别到字符内容,进入字符压缩引擎后,对于字符编码,压缩后信息仅包含字符位置坐标文字5起始坐标=(X1,Y1),文字5终点坐标=(X2,Y2)、字符对应编号(W1。。Wn)。Recognize the character content, after entering the character compression engine, for the character encoding, the information after compression only includes the character position coordinates. W1..Wn).

步骤三、图案压缩处理引擎:对图案内容采用本发明设计的优化游程判定压缩编码:Step 3, pattern compression processing engine: adopt the optimized run length judgment compression encoding designed by the present invention to pattern content:

当游程长度不大于最小游程范围7时,不对信息进行压缩,判定信息内容本身就很小,无需压缩,该图案类传输数据内容如图4所示。When the run length is not greater than the minimum run length range 7, the information is not compressed, and it is determined that the content of the information itself is very small and does not need to be compressed. The content of the pattern transmission data is shown in Figure 4.

当游程长度大于256,将采用如图7所示的长压缩方式。When the run length is greater than 256, the long compression method shown in Figure 7 will be used.

当游程长度大于64,且小于256时,将采用如图6所示的中压缩方式。When the run length is greater than 64 and less than 256, the medium compression method shown in Figure 6 will be used.

当游程长度大于7,且小于64时,将采用如图5所示的短压缩方式。When the run length is greater than 7 and less than 64, the short compression method shown in Figure 5 will be used.

对于不压缩操作,第1比特为1表示不进行压缩,剩余7个比特表示图像像素信息。For non-compressed operation, the first bit is 1 to indicate no compression, and the remaining 7 bits represent image pixel information.

对短压缩,第1比特为0表示进行压缩,第2比特表示后续重复像素的具体内容,如果为1,则后续均为黑色;如果为0,则后续均为白色。剩余6位表示游程长度。For short compression, the first bit is 0 to indicate compression, and the second bit indicates the specific content of the subsequent repeated pixels. If it is 1, the subsequent pixels are all black; if it is 0, the subsequent pixels are all white. The remaining 6 bits represent the run length.

对中压缩和长压缩,第一字节均为信息字节,第1比特位0表示进行压缩,第2比特表示后续重复像素的具体内容。后6比特表示长压缩还是中压缩。For medium compression and long compression, the first byte is the information byte, the first bit 0 indicates compression, and the second bit indicates the specific content of subsequent repeated pixels. The last 6 bits represent long compression or medium compression.

对于长压缩,后续2字节表示游程长度;对于中压缩,后续1字节表示游程长度。For long compression, the following 2 bytes represent the run length; for medium compression, the following 1 byte represents the run length.

假设图像3像素信息如下,0表示白,1表示黑:Suppose the 3 pixel information of the image is as follows, 0 means white, 1 means black:

00000001111……1111000……000111…11100000001111...1111000...000111...111

依次为连续8个白像素,连续60个黑像素,连续80个白像素,连续257个黑像素8 consecutive white pixels, 60 consecutive black pixels, 80 consecutive white pixels, 257 consecutive black pixels

对于图像3,进入图案压缩引擎后。从起始位置开始统计重复像素数量,该重复数量定义为游程长度。For image 3, after entering the pattern compression engine. The number of repeated pixels is counted from the start position, which is defined as the run length.

运算得出图像3的第一个重复像素内容为0,游程长度为L=7,L不大于不压缩最小游程范围7,对于该部分内容不进行压缩处理,选取后续连续7位直接传输像素内容。则该部分内容压缩后用8bits表示:The calculation results in that the content of the first repeated pixel of image 3 is 0, and the length of the run is L=7, and L is not greater than the minimum run range 7 without compression. Compression processing is not performed on this part of the content, and the subsequent continuous 7 bits are selected to directly transmit the pixel content . Then the content of this part is expressed in 8bits after compression:

1000000010000000

随后,进入下一部分重复像素统计,重复像素内容为1,统计得出游程长度L=60。L超过不压缩最小游程范围7,小于64,对该部分内容进行短压缩,压缩后用一个8bits表示Then, enter the next part of repeated pixel statistics, the repeated pixel content is 1, and the run length L=60 is obtained from the statistics. L exceeds the non-compressed minimum run length range of 7, and is less than 64. Short compression is performed on this part of the content, and it is represented by an 8bits after compression

大于64,小于256,对于该部分内容,采用中压缩方式编码:More than 64 and less than 256, for this part of the content, use medium compression encoding:

0111110001111100

随后,进入下一部分重复像素统计,重复像素内容为0,统计得出游程长度L=80。L超过不压缩最小游程范围7,Then, enter the next part of repeated pixel statistics, the repeated pixel content is 0, and the run length L=80 is obtained from the statistics. L exceeds the uncompressed minimum run range 7,

大于64,小于256,对于该部分内容,采用中压缩方式编码,压缩后用16bits表示:More than 64 and less than 256, for this part of the content, use the medium compression method to encode, and use 16bits to express after compression:

00000000 0101000000000000 01010000

随后,进入下一部分重复像素统计,重复像素内容为1,统计得出游程长度L=257。L大于256,对于该部分内容,采用长压缩方式编码,压缩后用24bits表示:Then, enter the next part of repeated pixel statistics, the repeated pixel content is 1, and the run length L=257 is obtained from statistics. L is greater than 256. For this part of the content, the long compression method is used to encode it, and it is represented by 24 bits after compression:

01000001 00000001 0000000101000001 00000001 00000001

步骤四、终端标签解压缩,刷新显示新图像2。Step 4. Decompress the terminal label and refresh to display the new image 2.

终端标签收到文字5对应信息,包括字符编码表号(W1。。Wn),搜索该字符编码在f1ash中的坐标为,(f1。。fn),解码成功,对文字5起始坐标=(X1,Y1),文字5终点坐标=(X2,Y2);区域直接读取(f1。。fn),表号的字库flash像素进行局部刷新显示。The terminal label receives the information corresponding to the character 5, including the character code table number (W1..Wn), and searches for the coordinates of the character code in f1ash, (f1..fn), and the decoding is successful, and the initial coordinate of the character 5=( X1, Y1), the coordinates of the end point of text 5 = (X2, Y2); the area is directly read (f1..fn), and the font flash pixels of the table number are partially refreshed and displayed.

终端标签收到图像3编码内容,进行解码。从图像3起始坐标=(X3,Y3),图像3终点坐标=(X4,Y4);开始依次通过解码后,刷新以下内容.The terminal tag receives the encoded content of image 3 and decodes it. Starting coordinates of image 3 = (X3, Y3), end coordinates of image 3 = (X4, Y4); after decoding, refresh the following content.

首先判断第一个bit,为1,则判断该8bits为不压缩内容,剩余7bits为像素内容,连续显示7个白像素.First judge the first bit, if it is 1, then it is judged that the 8 bits are uncompressed content, and the remaining 7 bits are pixel content, and 7 white pixels are continuously displayed.

随后,判断下一个字节第一个bit为0,则后续为压缩内容.第二个bit为1,则后续重复像素内容为黑像素.再读取后续6位,大于2,则仅有该6位表示游程长度.该六位为111100,则解码为游程长度60.连续显示60个黑像素.Then, it is judged that the first bit of the next byte is 0, then the subsequent content is compressed. If the second bit is 1, the subsequent repeated pixel content is a black pixel. Then read the subsequent 6 bits, if it is greater than 2, then only the The 6 bits represent the length of the run length. The six bits are 111100, and it is decoded as a run length of 60. Continuously display 60 black pixels.

随后,判断下一个字节第一个bit为0,则后续为压缩内容.第二个bit为0,则后续重复像素内容为白像素.再读取后续6位,000000,则表示该字节后的8bits为游程长度.即01010000,则解码为游程长度80.连续显示80个白像素.Then, it is judged that the first bit of the next byte is 0, then the subsequent is the compressed content. If the second bit is 0, the subsequent repeated pixel content is a white pixel. Then read the next 6 bits, 000000, it means the byte The last 8bits is the run length. That is, 01010000, it is decoded as a run length of 80. Continuously display 80 white pixels.

随后,判断下一个字节第一个bit为0,则后续为压缩内容.第二个bit为1,则后续重复像素内容为黑像素.再读取后续6位,000001,则表示该字节后的16bits为游程长度.即00000001 00000001,则解码为游程长度257.连续显示257个白像素。Then, it is judged that the first bit of the next byte is 0, then the subsequent content is compressed. If the second bit is 1, the subsequent repeated pixel content is a black pixel. Then read the next 6 bits, 000001, which means the byte The last 16bits is the run length. That is, 00000001 00000001, it is decoded as a run length of 257. Continuously display 257 white pixels.

本发明能够在不增加电子显示标签处理器资源的情况下,提供一种压缩效率高,消耗资源少的图像压缩改进方法。The invention can provide an improved image compression method with high compression efficiency and less resource consumption without increasing the processor resources of the electronic display label.

本发明的图像压缩改进方法可以自动识别图像内容和字符字符内容,不需要人工干预处理。The improved image compression method of the present invention can automatically identify image content and character content without manual intervention.

使用本发明的图像压缩改进方法可以有效的提高电子货架标签的图像传输响应速度,提高电子货架标签的整体工作效率,不但减少了图像刷新传输的时间,并且能够有效的节省能耗,延长电子货架标签的工作寿命。Using the image compression improvement method of the present invention can effectively improve the image transmission response speed of the electronic shelf label, improve the overall work efficiency of the electronic shelf label, not only reduce the time for image refresh transmission, but also effectively save energy consumption and prolong the electronic shelf life. The working life of the label.

以上所述仅为本发明的较佳实施例,本领域技术人员知悉,在不脱离本发明的精神和范围的情况下,可以对这些特征和实施例进行各种改变或等同替换。另外,在本发明的教导下,可以对这些特征和实施例进行修改以适应具体的情况及材料而不会脱离本发明的精神和范围。因此,本发明不受此处所公开的具体实施例的限制,所有落入本申请的权利要求范围内的实施例都属于本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and those skilled in the art know that various changes or equivalent replacements can be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, the features and examples may be modified to adapt a particular situation and material to the teachings of the invention without departing from the spirit and scope of the invention. Therefore, the present invention is not limited by the specific embodiments disclosed here, and all embodiments falling within the scope of the claims of the present application belong to the protection scope of the present invention.

Claims (6)

1.一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,包括:1. An adaptive binary image compression method suitable for electronic display labels, characterized in that, comprising: 步骤1,将待显示图像与当前显示图像进行对比获取有效刷新区域的点阵坐标和对应的更新信息;Step 1, compare the image to be displayed with the currently displayed image to obtain the lattice coordinates of the effective refresh area and the corresponding update information; 将所述更新信息与预设的字符库内的字符特征一一比对,匹配则识别为字符部分,不匹配则识别为图案部分;Comparing the update information with the character features in the preset character library one by one, if they match, they will be recognized as character parts, if they don’t match, they will be recognized as pattern parts; 步骤2,以两种不同的压缩方式分别对所述更新信息中的图案部分和字符部分进行压缩处理;所述图案部分采用优化游程判定压缩编码;所述字符部分采用预存字符编码表的压缩方式。Step 2, respectively compressing the pattern part and the character part in the update information by two different compression methods; the pattern part adopts the optimized run length judgment compression coding; the character part adopts the compression method of the pre-stored character code table . 2.根据权利要求1所述的一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,所述步骤2对所述更新信息中的图案部分的压缩方式包括:2. A kind of self-adaptive binary image compression method suitable for electronic display labels according to claim 1, characterized in that the compression method of the pattern part in the update information in the step 2 comprises: 预设一最小游程范围和一个或连续两个以上的分段游程范围;Preset a minimum run range and one or more than two consecutive segmented run ranges; 对所述图案部分进行游程长度检测;performing run length detection on the pattern portion; 当检测到当前数据的游程长度小于或等于所述最小游程范围时,图案类传输数据包括操作标志位和数据内容段,将操作标志位设置为不压缩;When detecting that the run length of the current data is less than or equal to the minimum run length range, the pattern class transmission data includes an operation flag bit and a data content segment, and the operation flag bit is set to be uncompressed; 当检测到当前数据的游程长度属于所述分段游程范围时,图案类传输数据包括操作标志位、类别标志位、数据长度位,将操作标志位设置为压缩,根据所述当前数据的二值属性确定所述类别标志位,根据所述当前数据的游程长度确定所述数据长度位。When it is detected that the run length of the current data belongs to the segmented run range, the pattern transmission data includes an operation flag bit, a category flag bit, and a data length bit, and the operation flag bit is set to compression, according to the binary value of the current data The attribute determines the category flag bit, and determines the data length bit according to the run length of the current data. 3.根据权利要求2所述的一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,当检测到当前数据的游程长度属于所述分段游程范围时,根据当前数据所属的分段游程范围的最大长度确定预留的所述数据长度位的长度。3. A kind of self-adaptive binary image compression method suitable for electronic display labels according to claim 2, characterized in that, when it is detected that the run length of the current data belongs to the segment run range, according to the current data belongs to The maximum length of the segmented run range determines the length of bits reserved for the data length. 4.根据权利要求1所述的一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,所述步骤2对所述更新信息中的字符部分的压缩方式包括:4. A kind of adaptive binary image compression method suitable for electronic display labels according to claim 1, characterized in that, the compression method of the character part in the update information in the step 2 comprises: 提取所述字符部分在所述字符库中匹配的字符特征所对应的编号,字符类传输数据包括所述编号和对应顺序的点阵坐标。The number corresponding to the character feature matched by the character part in the character library is extracted, and the character class transmission data includes the number and the dot matrix coordinates of the corresponding sequence. 5.根据权利要求1所述的一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,在步骤1之前还包括预设字符库的步骤:根据对字符的特征分析确定每个字符的所述字符特征,将字符和与该字符对应的字符特征一一对应存入所述字符库内并依次设置编号。5. A kind of self-adaptive binary image compression method suitable for electronic display labels according to claim 1, characterized in that, before step 1, also includes the step of preset character library: determine each The character features of a character, the character and the character feature corresponding to the character are stored in the character library in one-to-one correspondence, and the numbers are set in sequence. 6.根据权利要求1所述的一种适用于电子显示标签的自适应二值图像压缩方法,其特征在于,所述字符包括中文、英文、数字、特殊字符。6. An adaptive binary image compression method suitable for electronic display labels according to claim 1, wherein the characters include Chinese, English, numbers and special characters.
CN201710222362.9A 2017-04-06 2017-04-06 Adaptive binary image compression method suitable for electronic display labels Active CN107040791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710222362.9A CN107040791B (en) 2017-04-06 2017-04-06 Adaptive binary image compression method suitable for electronic display labels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710222362.9A CN107040791B (en) 2017-04-06 2017-04-06 Adaptive binary image compression method suitable for electronic display labels

Publications (2)

Publication Number Publication Date
CN107040791A CN107040791A (en) 2017-08-11
CN107040791B true CN107040791B (en) 2019-12-31

Family

ID=59533438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710222362.9A Active CN107040791B (en) 2017-04-06 2017-04-06 Adaptive binary image compression method suitable for electronic display labels

Country Status (1)

Country Link
CN (1) CN107040791B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108777800A (en) * 2018-06-25 2018-11-09 广州科政数码科技有限公司 The compression of electronic shelf label image data, decompression, processing method and system
CN108900843B (en) * 2018-07-31 2021-08-13 高创(苏州)电子有限公司 Monochrome image compression method, device, medium and electronic equipment
CN112051974B (en) * 2019-06-06 2023-12-15 汉朔科技股份有限公司 Electronic price tag information transmission method and system, electronic price tag and server
CN110719105B (en) * 2019-09-16 2023-03-28 上海御渡半导体科技有限公司 Lossless compression and decompression method for test vector
CN112800264B (en) * 2020-12-30 2025-05-30 武汉中科医疗科技工业技术研究院有限公司 Annotation data compression method, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006085326A2 (en) * 2005-02-10 2006-08-17 Siano Mobile Silicon Ltd. System and method for mitigating memory requirements
CN101578062A (en) * 2007-08-20 2009-11-11 株式会社石田 Electronic shelf label and electronic shelf label system
CN102034078A (en) * 2010-12-24 2011-04-27 东信和平智能卡股份有限公司 Coding method for image barcode identification
CN103794134A (en) * 2014-02-17 2014-05-14 立德高科(北京)数码科技有限责任公司 Mark formed by dot matrixes and electronic supervision code and generation and identification method of mark
CN105516540A (en) * 2015-12-14 2016-04-20 天津津芯微电子科技有限公司 Compression method and device of binary image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006085326A2 (en) * 2005-02-10 2006-08-17 Siano Mobile Silicon Ltd. System and method for mitigating memory requirements
CN101578062A (en) * 2007-08-20 2009-11-11 株式会社石田 Electronic shelf label and electronic shelf label system
CN102034078A (en) * 2010-12-24 2011-04-27 东信和平智能卡股份有限公司 Coding method for image barcode identification
CN103794134A (en) * 2014-02-17 2014-05-14 立德高科(北京)数码科技有限责任公司 Mark formed by dot matrixes and electronic supervision code and generation and identification method of mark
CN105516540A (en) * 2015-12-14 2016-04-20 天津津芯微电子科技有限公司 Compression method and device of binary image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于改进型游程编码的FPGA动态重构方法;邵龙;《电子器件》;20141020;第37卷(第5期);全文 *
一种基于符号的二值图像压缩算法;杨丽芳,廖宏,黄孜祺,罗维;《广西计算机学会2008年年会论文集》;20080901;全文 *

Also Published As

Publication number Publication date
CN107040791A (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN107040791B (en) Adaptive binary image compression method suitable for electronic display labels
CN110324706B (en) Video cover generation method and device and computer storage medium
JP4748219B2 (en) Remote display processing method based on server / client structure
US9286698B2 (en) Method and device for storing a compression ratio indication in a pixel value buffer in tile encoding
CN105096367B (en) Method and device for optimizing Canvas rendering performance
CN102244784B (en) Method for compressing and displaying picture including transparent information
CN102156611A (en) Method and apparatus for creating animation message
WO2022095797A1 (en) Image compression method and apparatus, and intelligent terminal and computer-readable storage medium
US10074194B2 (en) Graphical object content rendition
CN101459854B (en) Encoding/decoding apparatus for picture compression and encoding/decoding method therefor
JP4406481B2 (en) Graphic data compression
WO2015196717A1 (en) Image decoding method and apparatus
CN113747167B (en) Image compression coding method and device and electronic equipment
CN112181221A (en) Image processing method and apparatus, computer readable medium and electronic device
CN108668170B (en) Image information processing method and device, and storage medium
KR100327924B1 (en) Compressing ideographic characters
CN108184082A (en) Image data transmission system and method
US8238674B2 (en) Method for encoding and decoding images
JP5197694B2 (en) Image processing apparatus, image processing method, and computer program
CN110572664A (en) A New BMP Image Compression Method and System
US6987891B2 (en) Image display device
CN108154542B (en) Method for adding semitransparent property to JPG file
CN107705340A (en) A kind of method and device of image decoding
CN111882491A (en) Text image encoding and decoding method, device and system
US10283094B1 (en) Run-length compression and decompression of media tiles

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211229

Address after: 215002 room 1506, building e, Science Park, University of nanotechnology, No. 388 Ruoshui Road, Suzhou area, China (Jiangsu) pilot Free Trade Zone, Suzhou, Jiangsu

Patentee after: SUZHOU ETAG-TECHNOLOGY Corp.

Address before: No.1 Zhineng Avenue, Suzhou International Education Park, Suzhou, Jiangsu Province

Patentee before: Suzhou Vocational Institute of Industrial Technology