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 PDFInfo
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/186—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Radar Systems Or Details Thereof (AREA)
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
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 iComparing with the maximum number 255 represented by one byte, if the color block length sum of the same colorIf less than 255, returning to the step 5); sum of length of color blocks of the same colorGreater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same colorStoring 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 colorAnd 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 iComparing with the maximum number 255 represented by one byte, if the color block length sum of the same colorIf less than 255, returning to the step 5); sum of length of color blocks of the same colorGreater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same colorStoring 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 colorAnd 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 iComparing with the maximum number 255 represented by one byte, if the color block length sum of the same colorIf less than 255, returning to the step 5); sum of length of color blocks of the same colorGreater than or equal to 255, go to step 8);
8) the total length of the color blocks with the same colorStoring 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 colorAnd 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.
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 (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA3039666C (en) | 2016-10-28 | 2022-08-23 | Ppg Industries Ohio, Inc. | Coatings for increasing near-infrared detection distances |
KR20240144457A (en) | 2018-11-13 | 2024-10-02 | 피피지 인더스트리즈 오하이오 인코포레이티드 | Method of detecting a concealed pattern |
US11561329B2 (en) | 2019-01-07 | 2023-01-24 | Ppg Industries Ohio, Inc. | Near infrared control coating, articles formed therefrom, and methods of making the same |
Citations (3)
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)
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 | 大连海事大学 | A maritime shore-based radar image transmission system |
-
2017
- 2017-06-27 CN CN201710500745.8A patent/CN107124613B/en active Active
Patent Citations (3)
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 | |
US20210029381A1 (en) | Method and apparatus for obtaining global matched patch | |
CN111145090A (en) | Point cloud attribute encoding method, point cloud attribute decoding method, point cloud attribute encoding equipment and point cloud attribute decoding equipment | |
CN111405284B (en) | Point cloud density-based attribute prediction method and device | |
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 | |
CN107124613B (en) | Method for recoding second-class product data of Doppler weather radar | |
CN109977952B (en) | Candidate target detection method based on local maximum | |
EP3758373B1 (en) | Video encoding method, electronic device, and storage medium | |
CN117915088A (en) | Video processing method, video processing device, electronic equipment and computer readable storage medium | |
CN104428793A (en) | Method for transforming image descriptor based on gradient histogram and relative image processing apparatus | |
CN110853063B (en) | Image segmentation information processing method, device, equipment and storage medium | |
US9633414B2 (en) | Update region detection device | |
Yang et al. | No‐reference image quality assessment via structural information fluctuation | |
CN112583900B (en) | Data processing method for cloud computing and related product | |
US9311342B1 (en) | Tree based image storage system | |
CN111246249A (en) | Image encoding method, encoding device, decoding method, decoding device and storage medium | |
CN113435515A (en) | Picture identification method and device, storage medium and electronic equipment | |
CN113473150B (en) | Image processing method and device and computer readable storage device | |
CN114067008A (en) | Image processing method and device, electronic equipment and image display system | |
CN106331720B (en) | Video decoding related information storage method and device | |
CN116612287B (en) | Image recognition method, device, computer equipment and storage medium | |
CN119211554B (en) | Image compression method, apparatus, computer device, storage medium, and program product | |
CN114296643B (en) | Data processing method and device |
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 |