Disclosure of Invention
The invention provides a digital data image processing method and device, which are used for improving the safety of an airplane.
In a first aspect, a method for processing digital data image is provided, which includes:
acquiring an image of a current frame of a received video;
carrying out display identification on the flight characteristics of the image to obtain display data of the flight characteristics;
receiving raw data of the flight characteristics;
and judging whether the original data and the display data of the flight characteristics are consistent or not according to a threshold value.
Optionally, the flight characteristics include: at least one of airspeed, barometric altitude, and engine parameters.
Optionally, the displaying and identifying the flight characteristics of the image to obtain the display data of the flight characteristics includes:
graying the image to obtain a grayscale image;
intercepting an image of data displaying flight characteristics from the gray level image;
and identifying the image to obtain display data of the flight characteristics.
Optionally, the determining, according to the threshold value, whether the original data and the display data of the flight characteristic are consistent includes:
matching the image data with the font template by adopting a block matching algorithm to match the input image data with the font template;
the matching speed is improved by adopting a parallel structure, and the matching operation of the font templates of 21 rows and 14 columns and the graphic data is completed;
the number of taps of each graphic shift register is 14, the width is 8, each unit registers one pixel of the graphic, and each unit is shifted to the right by one unit every other clock, so that the font template moves each operation unit point by point in the image to compare the font template with the image data in real time.
In a second aspect, there is provided an image processing apparatus for digital data, comprising:
the acquisition module is used for acquiring the image of the current frame of the received video;
the identification module is used for displaying and identifying the flight characteristics of the images to obtain display data of the flight characteristics;
a receiving module for receiving raw data of the flight characteristics;
and the judging module is used for judging whether the original data and the display data of the flight characteristics are consistent or not according to a threshold value.
In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the method for processing digital data images as described in any of the above.
The invention utilizes the image processing function and the parallel operation characteristic of the FPGA, combines the display characteristics of digital flight parameters of a cockpit display system, customizes a special display template and a matching technology to realize the monitoring of pictures generated by the figures of the digital key flight parameters. The method can cover each frame of display image, ensure that the digital and graphic processing process of the flight parameters is in a monitoring state, improve the integrity of digital flight parameter display, and improve the navigable evidence obtaining confidence coefficient of ultra-complex commercial shelf electronic components such as a CPU (Central processing Unit), a GPU (graphics processing Unit) and the like in the aviation field, thereby improving the safety of the airplane.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
For better understanding of the present invention, the technical solutions of the present invention are further described below with reference to the accompanying drawings and examples.
FIG. 1 depicts the overall design architecture of the present patent, including the interaction of the cockpit display unit internal data processing path with the present monitor. Firstly, input data enters a cockpit display system from an aircraft network through an I/O bus interface 11, then enters I/Odata processing units 12 and contains an I/O data processing application program and a monitoring processing application program, wherein the data processing application program analyzes the input data and then carries outdisplay application processing 13, the process comprises application software such as PFD (field programmable data processing), EICAS (enhanced interactive application systems) and the like, the application software processes the input data and sends the input data to a GPU (graphics processing unit) for graphics rendering andsymbol generation 14, and as display windows from different applications may be contained in a display picture,video image superposition 15 is needed after each application software generates video data through the GPU, and a frame of display picture is formed. Themonitoring function 16 of the present invention is located after the video images are superimposed, receives the superimposed images, and also receives the original data for generating the images sent by the monitoring processing application program of 12, and returns the flight data monitoring result to the monitoring processing application program of 12, and finally forms a data closed loop. Therefore, the closed loop formed by the monitoring function of the invention can cover 13, 14 and 15 functional units which are the main components of the graphic display function of the display unit.
FIG. 2 illustrates a digital type of flight parameter display feature to which the present invention is directed, wherein 21 is a barometric altitude digital display window, in which a barometric altitude value is displayed under normal conditions, and is a five digit scrolling display, wherein units and tens scroll in units of 20; 22, when the air pressure height data is invalid, displaying the display state of the window as a yellow transverse line; when the barometric altitude data is lost,display window 23 shows a red ALT.24 is an airspeed digital display window, and under normal conditions, airspeed numerical values are displayed in the window, namely three-digit rolling display, wherein the unit digit is continuous rolling display, and the tens digit and the hundreds digit are single rolling display; 25, when airspeed data is invalid, displaying the display state of the window, wherein the display state is a yellow transverse line; when the airspeed data is lost, the display state of the display window is red SPD.27 and 28 respectively display left and right engine N1 parameter information, 29 and 30 respectively display left and right engine EGT parameter information, the engine parameter displays are digital direct jump displays, the highest bit is 0 and is not displayed, wherein N1 has decimal point.
According to the display characteristics, the display characteristics of the digital flight parameters can be summarized, and the display form of the invalid or lost airspeed and the like in the letter state can be displayed, and the display state is fixed, so that the display form can be used as a display template after being intercepted. For the display form displayed as digital information, since the numbers are continuously scrolled or changed, each possible displayed symbol should be included in the comparison template, and if the numbers are scrolled, the correctness of the arrangement sequence of the symbols in the template should be ensured.
Fig. 3 illustrates a partial display template of digital display parameters in the patent of the present invention, in which 31 is an airspeed data display template, except for the normal display sequence from 0 to 9 and then to 0, when the highest bit of the airspeed is 0, it is displayed as a gridline, so that it should add the case that the gridline is scrolled to 1 in the template. The pressure altitudedata display template 32 is a pressure altitude data display template, and unlike the display of the airspeed, in addition to the case where the normal display order from 0 to 9 is carried further to 0 and the case where the highest bit is 0 is displayed as a raster line, the pressure altitude may also be displayed as a negative value, so the display form of a symbol should be added. In fact, due to the negative value of the air pressure, when the air pressure is lower than 0, the sequence of the digital rotation is opposite to that when the air pressure is higher than 0. Thedisplay template 33 is a display template of engine parameters, and since the engine parameters are not displayed in a scrolling manner, it is only necessary to list each display symbol.
FIG. 4 depicts a flow chart of a monitoring implementation of the present invention. The specific flow of the monitoring design is as follows:
first, avideo input 41 from the outside is received, and then a gradation andrange clipping process 42 is performed. The input data is RGB video data in which bits 23-16 represent the R primary, bits 15-8 represent the G primary, and bits 7-0 represent the B primary. According to the formula GRAY = (R4 + G10 + B2) > >4, R, G, B are multiplied by 4,10,2 respectively in a shifting manner, and GRAY image data is obtained after addition and is shifted to the right by 4 bits.
And step two, respectively carrying out display identification on the airspeed, the air pressure height and the engine parameters of the processed image. After theairspeed identification module 44, the air pressurealtitude identification module 45 and the engineparameter identification module 46 receive the images of the respective intercepted ranges, each identification module loads thedisplay template 43 required by the module from the ROM for comparison, and then respectively compares the image input received by the identification module with the display template and judges the current display state. Airspeed and barometric altitude in addition to identifying the number displayed, a determination is also needed as to whether a lost or invalid condition is present.
And step three, each module sends the identification result to a data monitoring and comparingmodule 48, the module not only receives the identification data from the modules, but also receives the original data from the CPUmonitoring application program 47, the module respectively compares the identification data of the airspeed, the air pressure height and the engine parameter with the original data, judges whether the current display data is consistent with the original data according to a threshold value, and finally sends the comparison result to the CPUmonitoring application program 47 and delivers the comparison result to the CPU monitoring application program for the next processing and judgment.
Fig. 5 describes the flow of airspeed number identification in the patent of the present invention, and the identification method of digital flight parameters in the patent is described by taking this as an example. After receiving the data input, the airspeed identification module intercepts thedisplay area 51 of each digit of the unit, ten and hundred digits respectively, and then loads the respective display template from the ROM. Therefore, when each digit is identified, 1 input data cache RAM (52, 53, 54), 1 word template storage ROM (55, 56, 57), 1 matching module (58, 59, 60) and 1 comparison positioning module (61, 62, 63) are required to be instantiated respectively. Matching of the image data and the font template matches the input image data and the font template by using a block matching algorithm. The matching module adopts a parallel structure to improve the matching speed, and can complete the matching operation of the font templates of 21 rows and 14 columns and the graphic data. The number of taps of each pattern shift register in the matching module is 14, the width is 8, each unit registers one pixel of the pattern, and the unit is shifted to the right every other clock, so that the character model is realized. The board moves each arithmetic unit point by point in the image to compare the font template and the image data in real time. The arithmetic unit calculates the square BM _ val of the error value of the image and the font template by using a formula (1); wherein p isij ,qij Representing the values of the corresponding pixels in the image block and the template.
FIG. 6 depicts the workflow of the compare location module. And the comparison positioning module is used for comparing the calculation results of the matching measurement to determine the position of the best matching point. The internal part of the circuit has aninput latch module 71, which is used to latch the matching metric value to ensure the data is stable during operation. The compare andjudge block 72 compares the input data with the previously latched data and latches 73 smaller data for the next comparison. Theaddress counter module 75 is responsible for recording the number of matching metric values in the input latches that participate in the comparison, so that the location of the font template search area to which the metric value corresponds can be determined. When all match metric values are compared, what remains in theaddress latch 76 is the position of the minimum match metric value in the entire sequence of match metric values, and thus the position of the best match point. The position of the matching point is obtained, and the number corresponding to the position can be obtained.
Fig. 7 depicts the results of airspeed number identification in the patent of the present invention. Wherein the sequence number 81 is the current airspeed display state, and three digits are all in the rolling carry. The serial number 82, the serial number 83 and the serial number 84 represent the matching results of the hundred digits, the ten digits and the ones, respectively, taking the serial number 82 as an example, the small box on the left represents the captured image of the hundred digits in the current display picture, the rightmost airspeed hundred digit display template, and the middle represents the comparison positioning result described above. In an example, according to a comparative positioning algorithm, the position of the current screen capture image of the hundred digits in the display template is determined, and the current display result is determined. Through the matching positioning of each digit, the hundred digits are between 2 and 1, the ten digits are between 0 and 9, and the unit digits are identified as 9. And finally, integrating the matching result of each digit, and judging that the current digit is in the process of digit carry, so that the unit digit is judged to be 1, and the tens digit is judged to be 9, and the current display data is 199.
According to the display characteristics of digital flight parameters, only the numerical value of the currently displayed significant digit can be identified and obtained in the identification process, for example, the original data of the airspeed is real data with decimal points, but only integers are identified and obtained, and in addition, a certain time error exists between the process of generating and identifying the symbols and the process of directly sending the original data to the comparison module by considering the original data. Therefore, in thedata comparison module 48 of fig. 4, corresponding thresholds are set according to characteristics of different parameters to ensure normal operation of the monitoring logic. And at this point, the monitoring of the generation of the key parameter graph of the digital class of the display system is completed.
The technical scheme adopted by the embodiment is based on FPGA image processing and pattern recognition technology, aiming at the display characteristics of digital display parameters of an airborne cockpit display system, a pixel normalization matching technology is adopted to recognize the digital flight key parameters in the current display picture. Firstly, corresponding matching templates are formulated according to display characteristics of digital flight parameters, for example, airspeed and barometric altitude are digitally displayed in a rolling mode, engine parameters are in a direct change mode, and each parameter needs to be formulated according to a possible display state. And then carrying out gray level binarization processing on the received image data, reducing matched noise, and intercepting a corresponding area according to the display position of each parameter. And simultaneously carrying out template matching on the regions intercepted by each parameter by utilizing the parallel processing characteristic of the FPGA, carrying out similarity measurement on the pixel values of the intercepted image and the display template line by adopting a pixel-based block matching technology, and selecting the number corresponding to the position with the maximum similarity measurement value as a matching result. The parallel processing characteristic of the FPGA enables the matching identification of different parameters to be carried out simultaneously so as to meet the requirement of flight parameter identification of each frame in 66 frames of images per second. And finally, while data identification is carried out, the FPGA receives original data used for generating an image, and the data comparison module compares the digital flight parameters identified by the FPGA with the original data. Because the raw data and the flight parameter image identification result are acquired with time delay, the comparison result of the raw data and the flight parameter image identification result is not exactly equal but has difference. And under the condition of considering the maximum change rate in the delay time, setting a threshold value, and judging whether the comparison difference between the original data and the flight parameter image identification result falls within the range of the threshold value, so as to judge whether the current data identified by the FPGA is consistent with the original data, thereby realizing the monitoring of the generation of the digital key parameter graph.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.