CN114827625A - High-speed image cloud transmission method based on gray scale image compression algorithm - Google Patents

High-speed image cloud transmission method based on gray scale image compression algorithm Download PDF

Info

Publication number
CN114827625A
CN114827625A CN202210453550.3A CN202210453550A CN114827625A CN 114827625 A CN114827625 A CN 114827625A CN 202210453550 A CN202210453550 A CN 202210453550A CN 114827625 A CN114827625 A CN 114827625A
Authority
CN
China
Prior art keywords
image
compression algorithm
gray
instruction
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210453550.3A
Other languages
Chinese (zh)
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.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
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 Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202210453550.3A priority Critical patent/CN114827625A/en
Publication of CN114827625A publication Critical patent/CN114827625A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to the technology of image transmission of the Internet of things, in particular to a high-speed image cloud transmission method based on a gray scale image compression algorithm, which comprises the following steps: acquiring an original image through a camera module, and extracting a chrominance channel value by using a color space transformation algorithm to convert a color image into a gray image; adopting a coding compression algorithm aiming at a binary image or a coding compression algorithm aiming at a gray image to compress and code the gray image to generate a new image array; and accessing a serial port and a communication module of the cloud platform by using the AT instruction, and uploading the compressed image. The compression method of the binary image proposed by the method can losslessly compress the size of the image to 1/8, and the compression method of the gray scale image can losslessly compress the size of the image to 1/10. Under the condition that the transmission rate is kept unchanged, the transmission time becomes 1/8-1/10. The performance of image transmission is obviously improved, and the obstacle of transmission rate is overcome.

Description

High-speed image cloud transmission method based on gray scale image compression algorithm
Technical Field
The invention belongs to the technical field of image transmission of the Internet of things, and particularly relates to a high-speed image cloud transmission method based on a gray-scale image compression algorithm.
Background
With the generation-by-generation optimization of camera modules, various cameras with high definition and high resolution have been applied in various aspects of our lives. The camera is used as real-time scene capturing front-end equipment, and various rear-end processing platforms such as a single chip microcomputer, an FPGA (field programmable gate array), a cloud platform and the like are matched, so that various requirements can be conveniently and effectively met. In some instances, grayscale images are commonly used because they are only one-third the size of color maps and are often a preliminary operation prior to the implementation of various image processing algorithms. There is also a special class of binary images in grayscale images, i.e. blocks of pixels whose color is not black or white. The method can be specially used for extracting the edge contour of an object with a specific color or displaying the edge contour of the object, and is also widely applied. However, in the current application environment, the increase of the resolution of the camera often results in the increase of the size of each frame of image, and in some scenes with limited transmission rate, for example, when the devices communicate with each other in a uart mode with the highest speed of 115200b/s, the transmission speed of the image is too slow, and the design requirements cannot be well met.
Disclosure of Invention
Aiming at the problems in the background art, the invention provides a lossless gray scale image compression and cloud transmission scheme, so that the transmission time of a high-resolution image under the condition of rate limitation is reduced, and the design target is met.
In order to solve the technical problems, the invention adopts the following technical scheme: a high-speed image cloud transmission method based on a gray-scale image compression algorithm comprises a hardware part, an algorithm part and a software part; the hardware part comprises a C language programming platform, a communication module and a camera module; the algorithm part comprises a coding compression algorithm for a binary image and a coding compression algorithm for a gray level image; the software part comprises a cloud platform; the camera module is sequentially connected with the C language programming platform, the communication module and the cloud platform; the transmission method comprises the following steps:
step 1, acquiring an original image through a camera module, and extracting a chromaticity channel value by using a color space transformation algorithm to convert a color image into a gray image;
step 2, compressing and coding the gray level image by adopting a coding compression algorithm aiming at a binary image or a coding compression algorithm aiming at the gray level image to generate a new image array;
and 3, accessing the serial port and the communication module of the cloud platform by using the AT instruction, and uploading the compressed image.
In the above high-speed image cloud transmission method based on a gray scale map compression algorithm, the encoding compression algorithm for the binary image includes the following steps:
step 2.1, acquiring the pixel value of the current binary image, and storing the pixel value in an unsigned character array form;
2.2, creating bit type arrays with the same size and initializing the bit type arrays into arrays of zero-value traversal storage pixels, and setting elements of corresponding bit arrays to be 1 if the current values are nonzero;
2.3, respectively representing the elements in the bit array by 8 unsigned characters;
and 2.4, the obtained compressed binary image is 1/8 of the original binary image.
In the above high-speed image cloud transmission method based on a gray scale image compression algorithm, the encoding compression algorithm for a gray scale image includes the following steps:
step 2.5, performing Discrete Cosine Transform (DCT) on the pixel block of the gray level image to obtain a new pixel block matrix;
step 2.6, optimizing the JPEG compression coding on the embedded multi-core processor, and gradually quantizing a frame of image by using a brightness channel 8 × 8 quantization table and taking an 8 × 8 pixel matrix as a basic unit;
step 2.7, extracting the first pixel of each quantized pixel matrix to form a first pixel matrix, and recombining the rest pixels into a new matrix called a residual pixel matrix; adopting differential coding for the first pixel matrix and adopting Huffman coding for the residual pixel matrix;
and 2.8, the gray level compressed image after the encoding is 1/10 of the original gray level image.
In the above high-speed image cloud transmission method based on the gray-scale map compression algorithm, the image uploading cloud platform includes the following steps:
step 3.1, sending an instruction AT to the communication module by using the ps end of zynq to open the serial port;
step 3.2, sending an instruction AT + CSTT ═ CMNET ", to set APN;
step 3.3, sending an instruction AT + CGACT which is 1, and 1 activating the PDP;
step 3.4, sending an instruction AT + MQTTCFG which is an address instruction to request the cloud platform; the address is a link address of the cloud platform;
step 3.5, sending an instruction AT + mqtotapen ═ 1,1,0,0,0, "" to establish a link;
step 3.6, sending an instruction AT + MQTTPUB which is equal to "address", and reporting data by the "data"; the data is a pixel array of the compressed picture.
In the high-speed image cloud transmission method based on the gray-scale image compression algorithm, ZYNQ is selected as a C language programming platform, a 4G module is adopted as a communication module, and a cloud platform is an Internet of things platform.
Compared with the prior art, the invention has the beneficial effects that: the compression method of the binary image can losslessly compress the size of the image to 1/8, and the compression method of the gray scale image can losslessly compress the size of the image to 1/10. Under the condition that the transmission rate is kept unchanged, the transmission time becomes 1/8-1/10. The performance of image transmission is obviously improved, and the obstacle of transmission rate is overcome.
Drawings
FIG. 1 is a hardware part structure diagram of a high-speed image cloud transmission method based on a gray scale image compression algorithm according to an embodiment of the invention;
FIG. 2 is a flowchart of a high-speed image cloud transmission method based on a gray-scale map compression algorithm according to an embodiment of the present invention;
fig. 3 is a flow chart of processing three images of the high-speed image cloud transmission method based on the gray-scale map compression algorithm according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the following embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention is further illustrated by the following examples, which are not to be construed as limiting the invention.
The embodiment provides a gray scale image compression method and an image cloud transmission scheme. The algorithm level mainly comprises a coding compression algorithm aiming at the binary image and a coding compression algorithm aiming at the gray level image. The hardware layer mainly includes a platform programmable by C language (in this embodiment, ZYNQ is taken as an example), a communication module, and a camera module. The software layer is the cloud platform technology.
A high-speed image cloud transmission method based on a gray scale image compression algorithm comprises the following steps:
s1, a camera acquires an original image, and a color space transformation algorithm is utilized to extract a chrominance channel value to convert a color image into a gray image.
And S2, adopting one of the two schemes for compression coding of the gray level image to generate a new image array.
And S3, accessing a serial port and a communication module of the cloud platform by using the AT instruction, and uploading the compressed image.
The encoding and compression algorithm for the binary image is as follows:
1) and acquiring the pixel value of the current binary image, and storing the pixel value in an unsigned character array form.
2) And creating a bit type array with the same size, initializing the bit type array to be a zero value, traversing the array of the storage pixels, and setting the element of the corresponding bit array to be 1 if the current value is nonzero.
3) The elements in the bit array are respectively expressed by 8 units by using unsigned characters.
4) The final representation will be compressed to 1/8 as it is before compression and no information is lost.
The flow of the encoding compression algorithm for the gray level image is as follows:
DCT (discrete cosine transform) is carried out on the pixel blocks of the gray-scale image to obtain a new pixel block matrix.
And secondly, using a brightness channel 8-8 quantization table (an optimization technology of JPEG compression coding on an embedded multi-core processor) to gradually quantize a frame of image by taking an 8-8 pixel matrix as a basic unit.
Thirdly, extracting the first pixel of each quantized pixel matrix to form a first pixel matrix, and recombining the rest pixels to form a new matrix called a residual pixel matrix. Differential encoding is applied to the first pixel matrix, and Huffman encoding is applied to the residual pixel matrix.
And fourthly, the compressed image after the encoding is only 1/10 compared with the original image before the compression.
The application flow of the hardware and software platform is as follows:
the method comprises the steps of acquiring an original image by a camera, and converting a color image into a gray image by extracting a chrominance channel value by using a color space transformation algorithm.
And secondly, generating a new image array by adopting one compression coding of the two schemes for the gray level image.
And thirdly, sending an instruction AT to the 4G module by using the ps end of the zynq so as to open the serial port.
The command AT + CSTT is transmitted as "CMNET", "" to set APN.
Fourth, the command AT + CGACT is sent to 1,1 to activate the PDP.
Sixthly, sending an instruction AT + MQTTCFG which is an address instruction to request the Internet of things platform (the address is a link address of the cloud platform).
Sending instruction AT + mqtpten ═ 1,1,0,0,0, "" establishes a link.
And sending an instruction AT + mqtttpub of "address" and "data" (data is a pixel array of the compressed picture) to report the data.
Example (b):
and acquiring a real-time road condition picture through the camera and uploading the picture to the cloud. And the image compression processing algorithm of the scheme is realized on a ZYNQ platform by utilizing a Verilog language and a C language. The ZYNQ platform-based implementation has strong flexibility and high efficiency. A hardware part of a high-speed image cloud transmission method based on a gray-scale map compression algorithm is built according to a system framework shown in FIG. 1.
The system is placed on a road to monitor the vehicle condition in real time, and a high-speed image cloud transmission method based on a gray scale image compression algorithm is used for acquiring, processing and uploading real-time road vehicle condition pictures, and as shown in fig. 2, a camera is used for acquiring images. And then judging whether the working mode of the camera is a gray scale mode. If the gray pattern is not the gray pattern, firstly, a color space conversion algorithm for converting the color image into the gray pattern is adopted to generate the gray pattern, so that the subsequent efficient compression is facilitated. Whether gray level compression is needed or not is judged according to application scenes, and under the condition that only some simple application scenes such as traffic flow needs to be counted, gray level compression can be adopted to further improve compression efficiency. But the gray map is kept unchanged if more detailed vehicle information such as license plate number and the like needs to be counted. If the image needs to be binarized, the image is compressed by adopting the binarization compression algorithm shown in FIG. 3, the scheme has strong simplicity, the compression is very effective, and the compressed image can be easily recovered after being kept lossless. If the image keeps the gray scale image, the gray scale compression algorithm shown in fig. 3 is adopted to compress the image, and the algorithm performs lossless compression on the gray scale image, and can also restore the image without loss. And accessing the cloud platform by using the AT instruction, and uploading the compressed image through the serial port and the communication module shown in FIG. 1.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.

Claims (5)

1. A high-speed image cloud transmission method based on a gray scale image compression algorithm comprises a hardware part, an algorithm part and a software part; the hardware part comprises a C language programming platform, a communication module and a camera module; the algorithm part comprises a coding compression algorithm for a binary image and a coding compression algorithm for a gray level image; the software part comprises a cloud platform; the camera module is sequentially connected with the C language programming platform, the communication module and the cloud platform; the method is characterized in that: the transmission method comprises the following steps:
step 1, acquiring an original image through a camera module, and extracting a chromaticity channel value by using a color space transformation algorithm to convert a color image into a gray image;
step 2, compressing and coding the gray level image by adopting a coding compression algorithm aiming at a binary image or a coding compression algorithm aiming at the gray level image to generate a new image array;
and 3, accessing the serial port and the communication module of the cloud platform by using the AT instruction, and uploading the compressed image.
2. The high-speed image cloud transmission method based on the gray scale image compression algorithm according to claim 1, characterized in that: the coding compression algorithm for the binary image comprises the following steps:
step 2.1, acquiring the pixel value of the current binary image, and storing the pixel value in an unsigned character array form;
2.2, creating bit type arrays with the same size and initializing the bit type arrays into arrays of zero-value traversal storage pixels, and setting elements of corresponding bit arrays to be 1 if the current values are nonzero;
2.3, respectively representing the elements in the bit array by 8 unsigned characters;
and 2.4, the obtained compressed binary image is 1/8 of the original binary image.
3. The high-speed image cloud transmission method based on the gray scale image compression algorithm according to claim 1, characterized in that: the encoding compression algorithm for the gray-scale image comprises the following steps:
step 2.5, performing Discrete Cosine Transform (DCT) on the pixel block of the gray level image to obtain a new pixel block matrix;
step 2.6, optimizing the JPEG compression coding on the embedded multi-core processor, and gradually quantizing a frame of image by using a brightness channel 8 × 8 quantization table and taking an 8 × 8 pixel matrix as a basic unit;
step 2.7, extracting the first pixel of each quantized pixel matrix to form a first pixel matrix, and recombining the rest pixels into a new matrix called a residual pixel matrix; adopting differential coding for the first pixel matrix and adopting Huffman coding for the residual pixel matrix;
and 2.8, the gray level compressed image after the encoding is 1/10 of the original gray level image.
4. The high-speed image cloud transmission method based on the gray scale image compression algorithm according to claim 1, characterized in that: the image uploading cloud platform comprises the following steps:
step 3.1, sending an instruction AT to the communication module by using the ps end of zynq to open the serial port;
step 3.2, sending an instruction AT + CSTT ═ CMNET ", to set APN;
step 3.3, sending an instruction AT + CGACT which is 1, and 1 activating the PDP;
step 3.4, sending an instruction AT + MQTTCFG which is an address instruction to request the cloud platform; the address is a link address of the cloud platform;
step 3.5, sending an instruction AT + mqtopen ═ 1,1,0,0,0, "" to establish a link;
step 3.6, sending an instruction AT + MQTTPUB which is equal to "address", and reporting data by the "data"; the data is a pixel array of the compressed picture.
5. The high-speed image cloud transmission method based on the gray scale map compression algorithm as claimed in claim 1, wherein: ZYNQ is selected for the platform of C language programming, a 4G module is adopted for the communication module, and a cloud platform is an internet of things platform.
CN202210453550.3A 2022-04-27 2022-04-27 High-speed image cloud transmission method based on gray scale image compression algorithm Pending CN114827625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210453550.3A CN114827625A (en) 2022-04-27 2022-04-27 High-speed image cloud transmission method based on gray scale image compression algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210453550.3A CN114827625A (en) 2022-04-27 2022-04-27 High-speed image cloud transmission method based on gray scale image compression algorithm

Publications (1)

Publication Number Publication Date
CN114827625A true CN114827625A (en) 2022-07-29

Family

ID=82509874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210453550.3A Pending CN114827625A (en) 2022-04-27 2022-04-27 High-speed image cloud transmission method based on gray scale image compression algorithm

Country Status (1)

Country Link
CN (1) CN114827625A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055676A1 (en) * 2022-09-15 2024-03-21 深圳Tcl新技术有限公司 Image compression method and apparatus, computer device, and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165680A (en) * 1998-11-30 2000-06-16 Oki Electric Ind Co Ltd Binary image companding method, image compressor and image expander
CN1365483A (en) * 1999-06-15 2002-08-21 索利斯蒂克有限公司 Image binarization method
CN103020831A (en) * 2012-12-12 2013-04-03 苏州亚安智能科技有限公司 Screening type e-commerce platform based on Internet of Things technology
CN107071324A (en) * 2017-01-25 2017-08-18 上海电气集团股份有限公司 A kind of visual pattern processing system and its design method
CN209517357U (en) * 2018-12-14 2019-10-18 南京华讯方舟通信设备有限公司 A kind of real-time video bidirectional transmission system
CN111604909A (en) * 2020-06-24 2020-09-01 辽宁工业大学 Visual system of four-axis industrial stacking robot

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165680A (en) * 1998-11-30 2000-06-16 Oki Electric Ind Co Ltd Binary image companding method, image compressor and image expander
CN1365483A (en) * 1999-06-15 2002-08-21 索利斯蒂克有限公司 Image binarization method
US7057595B1 (en) * 1999-06-15 2006-06-06 Solystic Image binarization method
CN103020831A (en) * 2012-12-12 2013-04-03 苏州亚安智能科技有限公司 Screening type e-commerce platform based on Internet of Things technology
CN107071324A (en) * 2017-01-25 2017-08-18 上海电气集团股份有限公司 A kind of visual pattern processing system and its design method
CN209517357U (en) * 2018-12-14 2019-10-18 南京华讯方舟通信设备有限公司 A kind of real-time video bidirectional transmission system
CN111604909A (en) * 2020-06-24 2020-09-01 辽宁工业大学 Visual system of four-axis industrial stacking robot

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韦博荣,朴大志,张乃谦, 中国传媒大学出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024055676A1 (en) * 2022-09-15 2024-03-21 深圳Tcl新技术有限公司 Image compression method and apparatus, computer device, and computer readable storage medium

Similar Documents

Publication Publication Date Title
Li et al. Learning convolutional networks for content-weighted image compression
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
KR100491333B1 (en) Real time algorithms and architectures for coding images compressed by dwt-based techniques
JP6141295B2 (en) Perceptually lossless and perceptually enhanced image compression system and method
CN111726634B (en) High-resolution video image compression transmission method and system based on FPGA
JP2002516540A (en) Color image compression based on two-dimensional discrete wavelet transform resulting in perceptually lossless images
CN103458242A (en) Method for compressing and uncompressing image based on color classification and cluster
CN105100814A (en) Methods and devices for image encoding and decoding
CN111131828B (en) Image compression method and device, electronic equipment and storage medium
CN114827625A (en) High-speed image cloud transmission method based on gray scale image compression algorithm
Chawla et al. Image compression techniques: a review
CN102271251B (en) Lossless image compression method
US20230396810A1 (en) Hierarchical audio/video or picture compression method and apparatus
CN117560511A (en) Spacer image compression method and system based on graph segmentation technology and electric power inspection
CN108156461A (en) A kind of Bayer method for compressing image and device
CN115209147B (en) Camera video transmission bandwidth optimization method, device, equipment and storage medium
CN109474825B (en) Pulse sequence compression method and system
CN114066914A (en) Image processing method and related equipment
Wang et al. A unified LZ and hybrid coding for compound image partial-lossless compression
US7450769B2 (en) Image processing method for facilitating data transmission
EP4300958A1 (en) Video image encoding method, video image decoding method and related devices
CN114693818A (en) Compression method suitable for digital ortho image data
CN106101711A (en) A kind of quickly real-time video codec compression algorithm
Fathahillah et al. Homogeneous Image Compression Techniques with the Shannon-Fano Algorithm
CN112749802A (en) Neural network model training method and device and computer readable 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