CN114387367B - Radar track display method and device - Google Patents

Radar track display method and device Download PDF

Info

Publication number
CN114387367B
CN114387367B CN202210281127.XA CN202210281127A CN114387367B CN 114387367 B CN114387367 B CN 114387367B CN 202210281127 A CN202210281127 A CN 202210281127A CN 114387367 B CN114387367 B CN 114387367B
Authority
CN
China
Prior art keywords
texture
calculation
vertex
cache
historical track
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
CN202210281127.XA
Other languages
Chinese (zh)
Other versions
CN114387367A (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.)
Nanjing Tianlang Defense Technology Co ltd
Original Assignee
Nanjing Tianlang Defense Technology Co ltd
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 Nanjing Tianlang Defense Technology Co ltd filed Critical Nanjing Tianlang Defense Technology Co ltd
Priority to CN202210281127.XA priority Critical patent/CN114387367B/en
Publication of CN114387367A publication Critical patent/CN114387367A/en
Application granted granted Critical
Publication of CN114387367B publication Critical patent/CN114387367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Abstract

The invention discloses a radar track display method and a device, wherein the method comprises the following steps: and (3) calculating the coordinates of the historical track points: calculating the positions of historical track points in the track file by the calculation thread, and marking the calculated historical track points; and (3) drawing a character label: inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if so, calling character data in a texture format from the texture table; coloring and displaying: establishing a vertex cache region object, and writing a cache into the corresponding vertex cache region object; a plurality of vertex cache objects are written to the vertex array object. By adopting the technical scheme, repeated calculation and calculation of historical track points in the drawing process are avoided, font reading in the font engine library during drawing at each time is avoided, the communication frequency with the display card is reduced, and the radar track display efficiency is improved.

Description

Radar track display method and device
Technical Field
The invention relates to the technical field of radar data processing, in particular to a radar track display method and device.
Background
And dividing display contents according to general radar track data, wherein the display contents comprise display elements such as historical track points, track signs and the like.
In the prior art, a display mode is that a UI thread reads track data at a certain period for display, for example, qpair is used in a Qt frame or glVertex based on OpenGL is used for drawing, but both drawing methods have a defect that operations of historical track point positions and track labels are performed in the drawing thread, and once the data size is large and the performance of a processor is low, response events cannot be received in other windows in time, and an interface is in a stuck state. In addition, when the qpair performs drawing, since the calculation and rendering capabilities of the graphics card are not used, the drawing efficiency is low, and although the calculation and rendering capabilities of the graphics card are used by the glVertex, each glVertex needs to communicate with the graphics card once, and frequent switching and communication lead to reduction in display efficiency.
In summary, in order to display a large number of radar tracks on a home-made (lower-performance) device, there are problems in that the calculation capability of the track history point is poor, the display efficiency of the placard characters is low, and the number of times of communication with the display card is large.
Disclosure of Invention
The purpose of the invention is as follows: the invention provides a radar track display method and device, aiming at avoiding repeated calculation of historical track points and calculation of coordinates of the historical track points in the drawing process by labeling the calculated historical track points and storing the labeled historical track points in a vertex array; by establishing a texture table and storing the character data in the texture table in a texture format, reading and loading in a font engine library during each drawing are avoided; by establishing the vertex cache region object and the vertex group object, the cache is written into the display card at one time at regular time, and the communication frequency with the display card is reduced.
The technical scheme is as follows: the invention provides a radar track display method, which comprises the following steps: and (3) calculating the coordinates of the historical track points: starting a computing thread and a timer; the timer is updated at fixed time intervals, and the calculation identifier of the calculation thread is modified into a first identifier during updating; when the calculation identifier of the calculation thread is a first identifier, traversing and calculating the positions of the historical track points in the track file, marking the calculated historical track points, and storing the marked historical track points in the vertex array; after the calculation thread completes traversal and calculation, modifying the calculation identifier of the calculation thread into a second identifier;
and (3) drawing a character label: establishing a texture table; traversing label information in the track file, and reading corresponding character data in a font engine library; inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if yes, calling character data in a texture format from the texture table; calling an OpenGL function to draw characters according to a texture drawing mode;
coloring and displaying: calculating the position and coloring the color of the calculated and drawn historical track points and the character signs; establishing a historical track point position cache, a character label texture cache and a corresponding color cache; establishing a vertex cache region object, and writing the historical track point position cache, the character label texture cache and the corresponding color cache into the corresponding vertex cache region object; writing a plurality of vertex cache region objects into a vertex group object; and writing the vertex group object into the GPU for displaying.
Specifically, the historical track points marked and stored in the vertex array do not participate in the calculation of the subsequent calculation thread.
Specifically, whether the text data exists in the texture table is inquired according to the text subscript of the text data in the texture format in the texture table.
Specifically, a vertex shader is used for calculating the positions of the historical track points and the text label textures, and a fragment shader is used for coloring the colors of the historical track points and the text label textures.
Specifically, the vertex group object is written into the GPU at regular time for display.
Specifically, the vertex group object includes an index of a written vertex cache region object; the vertex cache object includes the cached index of the write.
The present invention also provides a radar track display device, comprising: historical track point coordinate calculation unit, characters sign drawing unit and painted display element, wherein:
the historical track point coordinate calculating unit is used for starting a calculating thread and a timer; the timer is updated at fixed time intervals, and the calculation identifier of the calculation thread is modified into a first identifier during updating; when the calculation identifier of the calculation thread is a first identifier, traversing and calculating the positions of historical track points in the track file, marking the calculated historical track points, and storing the marked historical track points in a vertex array; after the calculation thread completes traversal and calculation, modifying the calculation identifier of the calculation thread into a second identifier;
the character label drawing unit is used for establishing a texture table; traversing label information in the track file, and reading corresponding character data in a font engine library; inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if yes, calling character data in a texture format from the texture table; calling an OpenGL function to draw characters according to a texture drawing mode;
the coloring display unit is used for calculating the position and coloring the color of the calculated and drawn historical track points and the character signs; establishing a historical track point position cache, a character label texture cache and a corresponding color cache; establishing a vertex cache region object, and writing the historical track point position cache, the character label texture cache and the corresponding color cache into the corresponding vertex cache region object; writing a plurality of vertex cache region objects into a vertex group object; and writing the vertex group object into the GPU for displaying.
Specifically, the historical track points marked and stored in the vertex array do not participate in the calculation of the subsequent calculation thread.
Specifically, the text label drawing unit is configured to query whether text data exists in the texture table according to a text subscript of the text data in the texture format in the texture table.
Specifically, the coloring display unit is configured to write the vertex group object into the GPU at regular time for display.
Has the beneficial effects that: compared with the prior art, the invention has the following remarkable advantages: the repeated calculation of the historical track point coordinates and the calculation of the historical track points in the drawing process are avoided, reading and loading in a font engine library during drawing at each time are avoided, the communication times with a display card are reduced, the calculation amount is reduced on the whole, and the radar track display efficiency is improved.
Drawings
Fig. 1 is a schematic step diagram of a radar track display method provided by the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
Referring to fig. 1, a schematic step diagram of a radar track display method provided by the present invention is shown, and the present invention is applied to radar track display in a domestic environment.
In the step of calculating the coordinates of the historical track points, step 1, starting a calculation thread and a timer; and the timer is updated at fixed time intervals, and the calculation identification of the calculation thread is modified during updating.
In specific implementation, the fixed time updated by the timer may be set according to an actual application scenario.
In the historical track point calculating step, in the step 2, when the calculation identification of the calculation thread is the first identification, traversing and calculating the position of the historical track point in the track file, marking the calculated historical track point, and storing the marked historical track point in the vertex array.
In the embodiment of the invention, the historical track points which are marked and stored in the vertex array do not participate in the calculation of the subsequent calculation thread.
In specific implementation, a vertex array is put into the historical track points which are calculated, calculation of subsequent calculation threads is not involved, the historical track points are calculated in a single thread or multiple threads, repeated calculation of the historical track points and calculation of the historical track points in the drawing process are avoided, cache data put into the vertex array can be defined in a unified mode, subsequent coloring drawing is waited, calculation amount is reduced, and display efficiency is improved.
In the historical track point calculating step, step 3, after the calculation thread completes traversal and calculation, the calculation identifier of the calculation thread is modified to be a second identifier.
In specific implementation, the calculation thread starts calculation work only when the timer modifies the calculation identifier of the calculation thread to be the first identifier, and the calculation thread is in a waiting state when the calculation identifier of the calculation thread is other, that is, the calculation thread does not need to continuously work, so that calculation resources can be saved, and display efficiency is improved.
In specific implementation, the fundamental problem of interface deadlock caused by large data calculation amount is that excessive UI thread resources are occupied, data calculation can be carried out in a single thread or multiple threads, calculation results are placed in a cache, and unnecessary query and calculation work is reduced.
In the step of drawing the character label, step 1, a texture table is established.
In implementations, the initial texture table is typically blank.
In the step of drawing the character label, step 2, label information in the track file is traversed, and corresponding character data is read in a font engine library.
In the step of drawing the text label, step 3, inquiring whether text data exists in a texture table, if not, storing the text data in the texture table in a texture format from a font engine library, and calling the text data in the texture format; if the texture exists, the text data in the texture format is called from the texture table.
In the embodiment of the invention, whether the text data exists in the texture table is inquired according to the text subscript of the text data of the texture format in the texture table.
In a specific implementation, since the radar display in the domestic environment is based on OpenGL, and the function only has a texture drawing function and no text drawing function, the text data read from the font engine library needs to be stored in a texture table in a texture format, and for convenience of query, the text data in the texture format is attached to corresponding text subscripts.
In specific implementation, the texture table is arranged, the number of characters is stored in the texture table, when the character label needs to be drawn, the character data can be directly called from the texture table, a font engine library does not need to be read every time, and the stored texture format data can be directly called due to the fact that the drawing calculation of the texture format data occupies a large calculation amount, so that the calculation amount can be remarkably reduced, and the display efficiency is improved.
In a specific implementation, a freetype font engine library is used in view of the localization requirements.
In the text label drawing step, step 4, an OpenGL function is called to draw text in a texture drawing mode.
In the coloring display step, step 1, position calculation and color coloring are carried out on the historical track points and the character labels which are calculated and drawn.
In the embodiment of the invention, a vertex shader is used for calculating the positions of the historical track points and the text label textures, and a fragment shader is used for coloring the colors of the historical track points and the text label textures.
In a specific implementation, after calculation and shading are performed by using a vertex shader (. vert) and a fragment shader (. frag), historical track point position cache data, text label texture cache data and corresponding color cache data are generated. The vertex shader inputs two attributes of position and color data and outputs the transformed position and color.
In the coloring display step, step 2, a historical track point position cache, a character label texture cache and a corresponding color cache are established, wherein the caches specifically refer to corresponding cache data files.
In the coloring display step, step 3, a vertex cache region object is established, and the historical track point position cache, the character label texture cache and the corresponding color cache are written into the corresponding vertex cache region object.
In the coloring display step, step 4, a plurality of vertex cache objects are written into the vertex group object.
In the embodiment of the invention, the vertex group object comprises an index of a written vertex cache region object; the vertex cache object includes the cached index of the write.
In specific implementation, after the cache data files (vert files and frag files) are compiled, a Vertex cache region Object (VBO, Vertex Buffer Object) is created, actual vertices (historical track point position cache and text label texture cache) and corresponding color data cache are stored according to data types, a Vertex Array Object (VAO, Vertex Array Object) is created, and the VAO is connected with each VBO through indexes and used for searching subsequent OpenGL contexts.
In the embodiment of the invention, the vertex group object is written into the GPU for display at regular time.
In the specific implementation, the cache is written into the display card at regular time and one time by establishing the vertex cache region object and the vertex group object, compared with the prior art that each glVertex needs to be communicated with the display card once, the communication frequency with the display card is reduced, the calculation resource is saved, and the display efficiency is improved.
The present invention also provides a radar track display device, comprising: the device comprises a historical track point calculation coordinate unit, a character label drawing unit and a coloring display unit, wherein:
the historical track point coordinate calculating unit is used for starting a calculating thread and a timer; the timer is updated at fixed time intervals, and the calculation identifier of the calculation thread is modified into a first identifier during updating; when the calculation identifier of the calculation thread is a first identifier, traversing and calculating the positions of historical track points in the track file, marking the calculated historical track points, and storing the marked historical track points in a vertex array; after the calculation thread completes traversal and calculation, modifying the calculation identifier of the calculation thread into a second identifier;
the character label drawing unit is used for establishing a texture table; traversing label information in the track file, and reading corresponding character data in a font engine library; inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if so, calling character data in a texture format from the texture table; calling an OpenGL function to draw characters according to a texture drawing mode;
the coloring display unit is used for calculating the position and coloring the color of the calculated and drawn historical track points and character labels; establishing a historical track point position cache, a character label texture cache and a corresponding color cache; establishing a vertex cache region object, and writing the historical track point position cache, the character label texture cache and the corresponding color cache into the corresponding vertex cache region object; writing a plurality of vertex cache region objects into a vertex group object; and writing the vertex group object into the GPU for displaying.
In the embodiment of the invention, the historical track points which are marked and stored in the vertex array do not participate in the calculation of the subsequent calculation thread.
In the embodiment of the present invention, the text label drawing unit is configured to query whether text data exists in the texture table according to a text subscript of the text data in the texture format in the texture table.
In the embodiment of the invention, the coloring display unit is used for writing the vertex group object into the GPU for display at regular time.
In the embodiment of the invention, the vertex group object comprises an index of a written vertex cache region object; the vertex cache object includes the cached index of the write.

Claims (9)

1. A radar track display method is characterized by comprising the following steps:
and (3) calculating the coordinates of the historical track points:
starting a computing thread and a timer; the timer is updated at fixed time intervals, and the calculation identifier of the calculation thread is modified into a first identifier during updating;
when the calculation identifier of the calculation thread is a first identifier, traversing and calculating the positions of historical track points in the track file, marking the calculated historical track points, and storing the marked historical track points in a vertex array;
after the calculation thread completes traversal and calculation, modifying the calculation identifier of the calculation thread into a second identifier;
and (3) drawing a character label:
establishing a texture table;
traversing label information in the track file, and reading corresponding character data in a font engine library;
inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if so, calling character data in a texture format from the texture table;
calling an OpenGL function to draw characters according to a texture drawing mode;
coloring and displaying:
calculating the position and coloring the color of the calculated and drawn historical track points and the character signs;
establishing a historical track point position cache, a text label texture cache and a corresponding color cache;
establishing a vertex cache region object, and writing the historical track point position cache, the character label texture cache and the corresponding color cache into the corresponding vertex cache region object;
writing a plurality of vertex cache region objects into the vertex group object; the vertex array object comprises an index of a written vertex cache region object; the vertex cache object includes the index of the cache written;
and writing the vertex group object into the GPU for displaying.
2. The radar track display method according to claim 1, wherein the historical track points marked and stored in the vertex array do not participate in the calculation of subsequent calculation threads.
3. The radar track display method of claim 2, wherein the querying whether the text data exists in a texture table comprises:
and inquiring whether the text data exists in the texture table or not according to the text subscript of the text data in the texture format in the texture table.
4. The radar track display method according to claim 3, wherein the calculating the position and coloring the historical track points and the text labels which are calculated and drawn comprises the following steps:
and performing position calculation on the historical track point position and the character label texture by using a vertex shader, and performing color shading on the historical track point position and the character label texture by using a fragment shader.
5. The radar track display method of claim 4, wherein writing the vertex group object into a GPU for display comprises:
and writing the vertex group object into the GPU for displaying at regular time.
6. A radar track display device, comprising: historical track point coordinate calculation unit, characters sign drawing unit and painted display element, wherein:
the historical track point coordinate calculating unit is used for starting a calculating thread and a timer; the timer is updated at fixed time intervals, and the calculation identifier of the calculation thread is modified into a first identifier during updating; when the calculation identifier of the calculation thread is a first identifier, traversing and calculating the positions of historical track points in the track file, marking the calculated historical track points, and storing the marked historical track points in a vertex array; after the computing thread finishes traversing and computing, modifying the computing identifier of the computing thread into a second identifier;
the character label drawing unit is used for establishing a texture table; traversing label information in the track file, and reading corresponding character data in a font engine library; inquiring whether the character data exist in a texture table, if not, storing the character data in the texture table in a texture format from a font engine library, and calling the character data in the texture format; if yes, calling character data in a texture format from the texture table; calling an OpenGL function to draw characters according to a texture drawing mode;
the coloring display unit is used for calculating the position and coloring the color of the calculated and drawn historical track points and character labels; establishing a historical track point position cache, a character label texture cache and a corresponding color cache; establishing a vertex cache region object, and writing the historical track point position cache, the character label texture cache and the corresponding color cache into the corresponding vertex cache region object; writing a plurality of vertex cache region objects into a vertex group object; the vertex array object comprises an index of a written vertex cache region object; the vertex cache object includes the index of the cache written to; and writing the vertex group object into the GPU for displaying.
7. The radar track display device of claim 6, wherein historical track points marked and stored in the vertex array do not participate in the calculation of subsequent calculation threads.
8. The radar track display apparatus of claim 7, wherein the text label drawing unit is configured to query whether text data exists in the texture table according to a text subscript of the text data in the texture format in the texture table.
9. The radar track display device of claim 8, wherein the shader display unit is configured to periodically write the vertex group object into the GPU for display.
CN202210281127.XA 2022-03-22 2022-03-22 Radar track display method and device Active CN114387367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210281127.XA CN114387367B (en) 2022-03-22 2022-03-22 Radar track display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210281127.XA CN114387367B (en) 2022-03-22 2022-03-22 Radar track display method and device

Publications (2)

Publication Number Publication Date
CN114387367A CN114387367A (en) 2022-04-22
CN114387367B true CN114387367B (en) 2022-06-10

Family

ID=81206159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210281127.XA Active CN114387367B (en) 2022-03-22 2022-03-22 Radar track display method and device

Country Status (1)

Country Link
CN (1) CN114387367B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682628A (en) * 2012-05-04 2012-09-19 北京民航天宇科技发展有限公司 General aviation operation monitoring system
CN111222301A (en) * 2020-01-07 2020-06-02 天津麒麟信息技术有限公司 3D character drawing method, system, readable storage medium and device
CN112270375A (en) * 2020-11-10 2021-01-26 中煤航测遥感集团有限公司 Method, device and equipment for determining accompanying track and storage medium
CN113593027A (en) * 2021-08-02 2021-11-02 四川汉科计算机信息技术有限公司 Three-dimensional avionics display control interface device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10134171B2 (en) * 2014-09-29 2018-11-20 Arm Limited Graphics processing systems
CN113012269A (en) * 2019-12-19 2021-06-22 中国科学院深圳先进技术研究院 Three-dimensional image data rendering method and equipment based on GPU

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682628A (en) * 2012-05-04 2012-09-19 北京民航天宇科技发展有限公司 General aviation operation monitoring system
CN111222301A (en) * 2020-01-07 2020-06-02 天津麒麟信息技术有限公司 3D character drawing method, system, readable storage medium and device
CN112270375A (en) * 2020-11-10 2021-01-26 中煤航测遥感集团有限公司 Method, device and equipment for determining accompanying track and storage medium
CN113593027A (en) * 2021-08-02 2021-11-02 四川汉科计算机信息技术有限公司 Three-dimensional avionics display control interface device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
参数自定义的雷达航迹曲线窗设计;沈君;《长江信息通信》;20210831;全文 *
基于ADS-B记录数据的航迹重绘方法的设计与实现;曾培彬;《桂林航天工业学院学报》;20200930;正文第2节 *

Also Published As

Publication number Publication date
CN114387367A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
JP4071196B2 (en) Automatic memory management for zone rendering
US5883634A (en) System and method for clipping pixels drawn in one of a plurality of windows in a computer graphics system
US4941111A (en) Video picking and clipping method and apparatus
EP0515076A1 (en) Computer graphics system
CN101604454A (en) Graphic system
CN110489682A (en) A kind of page loading method and device
CN1506879A (en) Management system and method for data entity and relation data base structure display
US7038692B1 (en) Method and apparatus for providing a vertex cache
CN110223216B (en) Data processing method and device based on parallel PLB and computer storage medium
JP3734226B2 (en) Method and apparatus for high speed block transfer of compressed, word aligned bitmaps
EP0607130A1 (en) Image position interpretation in a graphics system.
JPH10320573A (en) Picture processor, and method for processing picture
CN114387367B (en) Radar track display method and device
US20200013137A1 (en) Fixed-stride draw tables for tiled rendering
CN111330270A (en) User interface rendering method
WO2023024959A1 (en) Image labeling method and system, and device and storage medium
JPH0562348B2 (en)
CN113988007A (en) Text display method and device, electronic equipment and storage medium
US7551183B2 (en) Clipping and scissoring technique
US8780124B2 (en) Graphic processing apparatus and computer-readable medium storing graphic processing program
CN115809207B (en) Address marking method and device in Cache, graphic processing system and electronic equipment
CN111210526A (en) GPU geometric primitive initial mark management method in plane clipping
CN116958375A (en) Graphics processor, system, apparatus, device, and method
CN114596389B (en) Large-batch text label drawing method based on OpenGL instantiation technology
CN118012316A (en) Method and device for map interaction

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