PECULIARITIES OF USING HUFFMAN AND RLE METHODS FOR IMAGE COMPRESSION IN MICROCONTROLLER SYSTEMS
DOI:
https://doi.org/10.30857/2786-5371.2023.6.2Keywords:
image compression, Huffman, RLE, Run-length encodingAbstract
Goal: Purpose of this paper is Study of the efficiency of using RLE and Hoffman compression methods for image compression, taking into account the limited resources of microcontrollers and, accordingly, the need to reduce image transmission time and reduce energy consumption in the wireless sensor networks.
Method: An experimental study of the degree of image compression was conducted using the Hoffman and RLE methods. The algorithms are implemented in software for the ESP32-CAM microcontroller module with a built-in camera. The degree of image compression performed using the Hoffman and RLE algorithms was evaluated and compared.
Results: A software module was created to implement the Huffman and RLE compression algorithms on the ESP32-CAM microcontroller. The effectiveness of using Huffman and RLE algorithms for image compression with limited microcontroller resources is investigated, compression efficiency and compressed file sizes are compared. As a result of the research, it was found that the RLE method showed a low compression efficiency (less than 1%) compared to the Huffman method, which provided a compression ratio of 11% for the image under test. The previous use of the Haar wavelet transform has a positive effect on the compression results for both investigated methods: for RLE, the degree of compression increased to 16%; for Huffman to 31% without loss of image quality. The JPEG method was used for efficiency comparison, which provides a degree of compression of the same image up to 70%, but with a loss of compressed data quality.
Scientific innovation: An analysis of the data compression efficiency using the Huffman and RLE methods, implemented taking into account the limited computing capabilities of 32-bit microcontrollers with the use of additional external memory, was performed. The influence of the choice of method on the time of image processing and the amount of memory used was studied.
Practical significance: Software module has been created that implements Huffman and RLE data compression algorithms. The expediency of using the above methods in systems on 32-bit microcontrollers to reduce energy consumption during image transformations and transmission, which makes it possible to extend the battery life of the sensor node, has been confirmed. At the same time, the investigated algorithms for image compression can ensure the quality of the original image with the least possible data loss.