CN107124613B - Method for recoding second-class product data of Doppler weather radar - Google Patents

Method for recoding second-class product data of Doppler weather radar Download PDF

Info

Publication number
CN107124613B
CN107124613B CN201710500745.8A CN201710500745A CN107124613B CN 107124613 B CN107124613 B CN 107124613B CN 201710500745 A CN201710500745 A CN 201710500745A CN 107124613 B CN107124613 B CN 107124613B
Authority
CN
China
Prior art keywords
color
data
block
product
byte
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
CN201710500745.8A
Other languages
Chinese (zh)
Other versions
CN107124613A (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.)
Luoyang City Meteorological Bureau
Original Assignee
Luoyang City Meteorological Bureau
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 Luoyang City Meteorological Bureau filed Critical Luoyang City Meteorological Bureau
Priority to CN201710500745.8A priority Critical patent/CN107124613B/en
Publication of CN107124613A publication Critical patent/CN107124613A/en
Application granted granted Critical
Publication of CN107124613B publication Critical patent/CN107124613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/186Methods 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 colour or a chrominance component
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock

Abstract

A method for recoding second-class product data of a Doppler weather radar comprises the following steps: after a system is initialized, extracting product representation block data describing a radar product image, reading the product representation block data row by row and byte by byte, calculating a color index value and a length of a color block of the product image according to each read byte, accumulating length values of continuously appearing color blocks with the same color in each data row until the value is larger than 255 or the color value is changed, storing the accumulated length value and the color index value in pairs, and completing recoding; by adopting the technical scheme of the invention, the storage volume of the second type product data can be reduced to save flow, thereby improving the downloading speed of the data and the loading speed of the client.

Description

Method for recoding second-class product data of Doppler weather radar
Technical Field
The invention relates to the field of meteorological data encoding processing, in particular to a method for recoding second-class product data of a Doppler weather radar.
Background
According to the third-level archive data format of the next-generation weather radar compiled by the national climate data center in 1998, the file formats of the new-generation weather radar (Cinrad) are divided into three major categories: the first type is base data, data obtained by volume scanning of the radar is stored in a polar coordinate mode, and the structure is relatively simple; the second type is radar products, which are hydrometeorology products generated after processing by various algorithms, and the products have more types and complex structures, and can be displayed only by using a Principal user processor (PUP for short) at a PC end; the third type is a product image which is a general format picture such as GIF generated by PUP.
When the second-class product data is used for development at the iOS terminal, it is found that the pixel-by-pixel coding mode of the second-class product data can make all product files consistent in size and good in regularity, but also causes the data file to have a large size, and the downloading and loading speed of the data file is seriously affected under the condition that the system resources of the mobile terminal are insufficient, so that the volume of the second-class product data can be reduced by considering the mode of recoding the second-class product data of the new-generation doppler weather radar, the flow can be saved, and the downloading speed of the data and the loading speed of the client can be improved.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method for recoding the second-class product data of the new-generation Doppler weather radar.
A method of recoding second type product data of a doppler weather radar, wherein: the method comprises the following steps:
1) carrying out system initialization; then, entering step 2);
2) reading second type product data of the Doppler weather radar, wherein the data structure of the second type product of the Doppler weather radar can be divided into a product information block, a product description block and a product representation block, the data of the product representation block describes a radar product image in a line-by-line and pixel-by-pixel mode, the product representation block data is composed of a plurality of data lines, each data line comprises a specified number of bytes, the high 4 bits of each byte represent the length of a color block of the product image, the height of the color block is constant to 1, and the low 4 bits of each byte represent the color index value of the color block; each byte can represent a rectangular color block with the height of 1 and the length of 4-bit numerical value, the color blocks represented by all the bytes in one data row are sequentially arranged from left to right to form a rectangular color block, and the rectangular color blocks represented by all the data rows are arranged from top to bottom to form a complete radar product drawing; storing the read second type product data of the Doppler weather radar into a designated system data storage area; then, entering step 3);
3) reading the product representation block data put into the designated system data storage area in the step 2) line by line, reading the product representation block data byte by byte according to the sequence of the bytes, marking the position index of the currently read byte in the line as i, and setting the initial position index i as 0; then, entering step 4);
4) reading the ith byte (i) of the current line, and calculating the color block length and the color value of the color block; the calculation formulas of the color block length F (i) and the color block color value f (i) are as follows:
F(i)=(Byte(i)&240)>>4
(i) ═ byte (i) &15, where & is a bitwise operator, bitwise and;
if i is equal to 0, recording the same color initial index j is equal to 0, and entering the step 5); if i is not equal to 0, entering the step 6); wherein, color block color values f (j), f (j +1) ·. f (i) represented by the same-color initial index j are equal, and when j is more than 0, f (j-1) ≠ f (i);
5) if i +1 < LengthrowIf so, i is increased by 1 and the step 4) is returned; on the contrary, if i +1 ≧ LengthrowEntering step 9); wherein, LengthrowThe total number of bytes of the current data row;
6) comparing the current color block color value f (i) with the last color block color value f (i-1), and if the current color block color value f (i) is equal to the last color block color value f (i-1), entering the step 7); if not, entering step 8);
7) and calculating the length sum of the same-color blocks from the same-color initial index j to the current index i
Figure BDA0001333606140000031
Comparing with the maximum number 255 represented by one byte, if the color block length sum of the same color
Figure BDA0001333606140000032
If less than 255, returning to the step 5); sum of length of color blocks of the same color
Figure BDA0001333606140000033
Greater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same color
Figure BDA0001333606140000034
Storing the color block color value f (i-1) of the same color in a designated storage area in pair, recording j to i, and entering the step 5);
9) the total length of the color blocks with the same color
Figure BDA0001333606140000035
And color block color values f (i) of the same color are stored in a designated storage area in pairs, and the data recoding of the row is completed; if the product indicates that all data lines of the block are completely read, the recoding processing is completed; otherwise, setting i to be 0, returning to the step 4), and continuing to read the next line of data.
The main principle of the method for recoding the second-class product data of the Doppler weather radar is that 8 binary bits of 1 byte are adopted to represent the length of a color block, the maximum representation length is 255, if a line of continuous color blocks in a product image is black in 255 pixels, an original coding scheme needs 17(255/15) bytes to represent, a new coding scheme only needs 1 byte identification, namely, the color blocks with the same color are merged and stored, and the final result is that the original data are disordered and recombined, so that the file volume is greatly reduced under the condition of better data consistency.
Drawings
FIG. 1 is a flowchart of a method for re-encoding Doppler weather radar second-class product data according to the present invention.
Detailed Description
The invention provides a method for recoding second-class product data of a Doppler weather radar, which comprises the following steps:
1) carrying out system initialization; then, entering step 2);
2) reading second product data of the Doppler weather radar, wherein the data is a binary file compiled according to a third-level archive data format of a next-generation weather radar compiled by a national climate data center, the data structure of the second product of the Doppler weather radar can be divided into a product information block, a product description block and a product representation block, and the data of the product representation block describes a radar product image in a line-by-line and pixel-by-pixel mode and occupies the main part of the data volume of the second product of the Doppler weather radar; product representation block data consists of a plurality of data rows: each data line comprises a specified number of bytes, the high 4 bits of each byte represent the length of a color block of the product image, the height of the color block is constant to 1, and the low 4 bits of each byte represent the color index value of the color block; each byte can represent a rectangular color block with the height of 1 and the length of 4-bit numerical value, the color blocks represented by all the bytes in one data row are sequentially arranged from left to right to form a long rectangular color block, and the rectangular color blocks represented by all the data rows are arranged from top to bottom to form a complete radar product drawing; storing the data into a designated system data storage area; then, entering step 3);
3) reading the product representation block data put into the designated system data storage area in the step 2) line by line, reading the product representation block data byte by byte according to the sequence of the bytes, marking the position index of the currently read byte in the line as i, and setting the initial position index i as 0; then, entering step 4);
4) reading the ith byte (i) of the current line, and calculating the color block length and the color value of the color block; the calculation formulas of the color block length F (i) and the color block color value f (i) are as follows:
F(i)=(Byte(i)&240)>>4
(i) ═ byte (i) &15, where & is a bitwise operator, bitwise and;
(in computer language & sum > > are all bit operators, > > are signed right shifts)
If i is equal to 0, recording the same color initial index j is equal to 0, and entering the step 5); if i is not equal to 0, entering the step 6); wherein, color block color values f (j), f (j +1) ·. f (i) represented by the same-color initial index j are equal, and when j is more than 0, f (j-1) ≠ f (i);
5) if i +1 < LengthrowIf so, i is increased by 1 and the step 4) is returned; on the contrary, if i +1 ≧ LengthrowEntering step 9); wherein, LengthrowThe total number of bytes of the current data row;
6) comparing the current color block color value f (i) with the last color block color value f (i-1), and if the current color block color value f (i) is equal to the last color block color value f (i-1), entering the step 7); if not, entering step 8);
7) and calculating the length sum of the same-color blocks from the same-color initial index j to the current index i
Figure BDA0001333606140000061
Comparing with the maximum number 255 represented by one byte, if the color block length sum of the same color
Figure BDA0001333606140000062
If less than 255, returning to the step 5); sum of length of color blocks of the same color
Figure BDA0001333606140000063
Greater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same color
Figure BDA0001333606140000064
Storing the color block color value f (i-1) of the same color in a designated storage area in pair, recording j to i, and entering the step 5);
9) the total length of the color blocks with the same color
Figure BDA0001333606140000065
And color block color values f (i) of the same color are stored in a designated storage area in pairs, and the data recoding of the row is completed; if the product indicates that all data lines of the block are completely read, the recoding processing is completed; otherwise, setting i to be 0, returning to the step 4), and continuing to read the next line of data.
The main principle of the method for recoding the second-class product data of the Doppler weather radar is that 8 binary bits of 1 byte are adopted to represent the length of a color block, the maximum representation length is 255, if a line of continuous color blocks in a product image is black in 255 pixels, an original coding scheme needs 17(255/15) bytes to represent, a new coding scheme only needs 1 byte identification, namely, the color blocks with the same color are merged and stored, and the final result is that the original data are disordered and recombined, so that the file volume is greatly reduced under the condition of better data consistency.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (1)

1. A method for recoding second-class product data of a Doppler weather radar is characterized by comprising the following steps: the method comprises the following steps:
1) carrying out system initialization; then, entering step 2);
2) reading second type product data of the Doppler weather radar, wherein the data structure of the second type product of the Doppler weather radar can be divided into a product information block, a product description block and a product representation block, the data of the product representation block describes a radar product image in a line-by-line and pixel-by-pixel mode, the product representation block data is composed of a plurality of data lines, each data line comprises a specified number of bytes, the high 4 bits of each byte represent the length of a color block of the product image, the height of the color block is constant to 1, and the low 4 bits of each byte represent the color index value of the color block; each byte can represent a rectangular color block with the height of 1 and the length of 4-bit numerical value, the color blocks represented by all the bytes in one data row are sequentially arranged from left to right to form a rectangular color block, and the rectangular color blocks represented by all the data rows are arranged from top to bottom to form a complete radar product drawing; storing the read second type product data of the Doppler weather radar into a designated system data storage area; then, entering step 3);
3) reading the product representation block data put into the designated system data storage area in the step 2) line by line, reading the product representation block data byte by byte according to the sequence of the bytes, marking the position index of the currently read byte in the line as i, and setting the initial position index i as 0; then, entering step 4);
4) reading the ith byte (i) of the current line, and calculating the color block length and the color value of the color block; the calculation formulas of the color block length F (i) and the color block color value f (i) are as follows:
F(i)=(Byte(i)&240)>>4
(i) ═ byte (i) &15, where & is a bitwise operator, bitwise and;
if i is equal to 0, recording the same color initial index j is equal to 0, and entering the step 5); if i is not equal to 0, entering the step 6); wherein, color block color values f (j), f (j +1) ·. f (i) represented by the same-color initial index j are equal, and when j is more than 0, f (j-1) ≠ f (i);
5) if i +1 < LengthrowIf so, i is increased by 1 and the step 4) is returned; on the contrary, if i +1 ≧ LengthrowEntering step 9); wherein, LengthrowThe total number of bytes of the current data row;
6) comparing the current color block color value f (i) with the last color block color value f (i-1), and if the current color block color value f (i) is equal to the last color block color value f (i-1), entering the step 7); if not, entering step 8);
7) and calculating the length sum of the same-color blocks from the same-color initial index j to the current index i
Figure FDA0001333606130000021
Comparing with the maximum number 255 represented by one byte, if the color block length sum of the same color
Figure FDA0001333606130000022
If less than 255, returning to the step 5); sum of length of color blocks of the same color
Figure FDA0001333606130000023
Greater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same color
Figure FDA0001333606130000024
Storing the color block color value f (i-1) of the same color in a designated storage area in pair, recording j to i, and entering the step 5);
9) the total length of the color blocks with the same color
Figure FDA0001333606130000025
And color block color values f (i) of the same color are stored in a designated storage area in pairs, and the data recoding of the row is completed; if the product indicates that all data lines of the block are completely read, the recoding processing is completed; otherwise, setting i to be 0, returning to the step 4), and continuing to read the next line of data.
CN201710500745.8A 2017-06-27 2017-06-27 Method for recoding second-class product data of Doppler weather radar Active CN107124613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710500745.8A CN107124613B (en) 2017-06-27 2017-06-27 Method for recoding second-class product data of Doppler weather radar

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710500745.8A CN107124613B (en) 2017-06-27 2017-06-27 Method for recoding second-class product data of Doppler weather radar

Publications (2)

Publication Number Publication Date
CN107124613A CN107124613A (en) 2017-09-01
CN107124613B true CN107124613B (en) 2020-08-14

Family

ID=59720187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710500745.8A Active CN107124613B (en) 2017-06-27 2017-06-27 Method for recoding second-class product data of Doppler weather radar

Country Status (1)

Country Link
CN (1) CN107124613B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109891267A (en) 2016-10-28 2019-06-14 Ppg工业俄亥俄公司 For increasing the coating of near infrared detection distance

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669233A (en) * 2002-10-01 2005-09-14 阿沃森特公司 Video compression system
CN1694058A (en) * 2005-04-30 2005-11-09 广东威创日新电子有限公司 Remote display processing method based on server end/client end structure
CN101217655A (en) * 2008-01-04 2008-07-09 广东威创视讯科技股份有限公司 Data compressing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010000443A (en) * 2000-09-29 2001-01-05 서정헌 Media that can record computer program sources for extracting building by fusion with photogrammetric image and lidar data, and system and method thereof
US7724979B2 (en) * 2004-11-02 2010-05-25 Broadcom Corporation Video preprocessing temporal and spatial filter
CN201639712U (en) * 2010-01-11 2010-11-17 大连海事大学 Maritime shore-based radar image transmission system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1669233A (en) * 2002-10-01 2005-09-14 阿沃森特公司 Video compression system
CN1694058A (en) * 2005-04-30 2005-11-09 广东威创日新电子有限公司 Remote display processing method based on server end/client end structure
CN101217655A (en) * 2008-01-04 2008-07-09 广东威创视讯科技股份有限公司 Data compressing method

Also Published As

Publication number Publication date
CN107124613A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
US11754685B2 (en) Point cloud compression using a space filling curve for level of detail generation
CN111145090B (en) Point cloud attribute coding method, point cloud attribute decoding method, point cloud attribute coding equipment and point cloud attribute decoding equipment
US20210029381A1 (en) Method and apparatus for obtaining global matched patch
CN113557745A (en) Point cloud geometry filling
US8620111B2 (en) Device, system, and method for indexing digital image frames
CN110139104B (en) Video decoding method, video decoding device, computer equipment and storage medium
CN109977952B (en) Candidate target detection method based on local maximum
CN110189384B (en) Image compression method, device, computer equipment and storage medium based on Unity3D
CN113014903A (en) Point cloud neighbor determination, point cloud prediction, point cloud encoding, point cloud decoding methods and devices
CN110853063B (en) Image segmentation information processing method, device, equipment and storage medium
EP3758373B1 (en) Video encoding method, electronic device, and storage medium
CN107124613B (en) Method for recoding second-class product data of Doppler weather radar
US9633414B2 (en) Update region detection device
Yang et al. No‐reference image quality assessment via structural information fluctuation
CN110166770B (en) Video encoding method, video encoding device, computer equipment and storage medium
CN112583900A (en) Data processing method for cloud computing and related product
CN113435515B (en) Picture identification method and device, storage medium and electronic equipment
CN111246249A (en) Image encoding method, encoding device, decoding method, decoding device and storage medium
JP2013008142A (en) Image processing device, image processing method and image processing program
CN116126957A (en) Data format conversion method, device, equipment and storage medium
CN110321759A (en) A kind of video feature extraction method and device
CN113473150B (en) Image processing method and device and computer readable storage device
CN106331720B (en) Video decoding related information storage method and device
CN107124559A (en) A kind of communication data compression method
CN114554175B (en) Classification rearrangement-based lossless compression method for two-dimensional point cloud distance images

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