System and method for monitoring video transmission frame loss based on FPGA
By using digital watermark technology in the FPGA system to extract and embed the frame sequence number and calculate the number of frames lost during the video transmission process, the problem of the lack of quantitative indicators in the existing technology is solved, and the degree of picture freeze during the video transmission process is realized. Objective measurement.
Patent Information
- Application Number
- CN202410596079.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
The existing technology lacks quantitative indicators for the number of frames lost during video transmission, resulting in the degree of screen freezes mainly relying on the subjective perception of the human eye and lacking objective measurement.
Using FPGA-based systems and methods, digital watermarking technology is used to perform discrete wavelet and discrete cosine transforms on video signals, embed and extract frame sequence numbers, calculate the cumulative value of lost frames within a preset time, and convert it into layer information. Display through the monitor to quantify the degree of screen lag.
It achieves objective quantification of the number of frames lost during video transmission, provides quantitative indicators to measure the degree of screen freezes, and helps evaluate and optimize video transmission quality.
Smart Images

Figure CN118540520A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a system and method for monitoring frame loss in video transmission based on FPGA. Background Art
[0002] The transmission process of video images involves various links such as image acquisition, processing, transmission and display. In this process, problems such as signal interference, transmission disturbance and processing failure are inevitable, which may lead to frame loss in the final displayed image.
[0003] If the number of frame drops within a period of time is small, the video image will not be subjectively detected as being stuck due to the persistence of vision of the human eye; if the number of frame drops within a period of time is large, the image will be subjectively seen as being severely stuck.
[0004] At present, the degree of screen freeze mainly depends on people's subjective feelings, and there is a lack of quantitative indicators for the degree of screen freeze. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a system and method for monitoring frame loss in video transmission based on FPGA, and to quantify the degree of image freeze by monitoring the number of frame losses in the video image within a preset time.
[0006] In a first aspect, an embodiment of the present invention provides a system for monitoring frame loss in video transmission based on FPGA, the system comprising: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display;
[0007] The digital watermark embedding device is used to receive the first video signal output by the video source output interface, convert the first video signal into a first video data parallel signal; perform discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix; count each frame of the first video data parallel signal to obtain a frame sequence number of each frame; embed the watermark information of the frame sequence number of each frame into the transformation domain of the first transformed matrix to obtain a second transformed matrix; perform inverse discrete cosine transform and inverse discrete wavelet transform on the second transformed matrix to obtain a second video data parallel signal;
[0008] The digital watermark de-embedding device is used to perform discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain the second transformed matrix; extract the watermark information of the frame serial number of each frame from the intermediate frequency coefficient of the matrix transformation domain after the second transform; calculate the accumulated value of frame loss within a preset time according to the frame serial number; convert the accumulated value of frame loss into layer information; superimpose the layer information on the second video data parallel signal, and display it through the display.
[0009] Further, the digital watermark embedding device includes a first receiver;
[0010] The first receiver is used to receive the first video signal output by the video source output interface, and convert the first video signal into the first video data parallel signal.
[0011] Furthermore, the digital watermark embedding device is used to perform discrete wavelet transform on the first video data parallel signal to obtain a first low-frequency LL component matrix; and perform discrete cosine transform on the first low-frequency LL component matrix to obtain the first transformed matrix.
[0012] Furthermore, the digital watermark embedding device is used to perform an inverse discrete cosine transform on the second transformed matrix to obtain a second low-frequency LL component matrix; and perform an inverse discrete wavelet transform on the second low-frequency LL component matrix to obtain the second video data parallel signal.
[0013] Further, the digital watermark embedding device includes a first transmitter;
[0014] The first transmitter is used to convert the second video data parallel signal into a second video signal and send the second video signal to the device under test.
[0015] Further, the digital watermark de-embedding device includes a second receiver;
[0016] The second receiver is used to convert the second video signal sent by the device under test into a second video data parallel signal.
[0017] Furthermore, the video source is a video output device, and the video output device includes a camera and a set-top box.
[0018] In a second aspect, an embodiment of the present invention provides a method for monitoring frame loss in video transmission based on FPGA, which is applied to the system for monitoring frame loss in video transmission based on FPGA as described above, wherein the system comprises: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; the method comprises:
[0019] The digital watermark embedding device receives the first video signal output by the video source output interface, and converts the first video signal into a first video data parallel signal;
[0020] Performing discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix;
[0021] Counting each frame of the first video data parallel signal to obtain a frame sequence number of each frame;
[0022] Embedding the watermark information of the frame sequence number of each frame into the transformation domain of the first transformed matrix to obtain a second transformed matrix;
[0023] Performing inverse discrete cosine transform and inverse discrete wavelet transform on the matrix after the second transformation to obtain a second video data parallel signal;
[0024] The digital watermark de-embedding device performs discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain the second transformed matrix;
[0025] Extracting watermark information of the frame sequence number of each frame from the intermediate frequency coefficients in the matrix transformation domain after the second transformation;
[0026] Calculate the accumulated value of frame loss within a preset time according to the frame sequence number; convert the accumulated value of frame loss into layer information;
[0027] The layer information is superimposed on the second video data parallel signal and displayed through the display.
[0028] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described above when executing the computer program.
[0029] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute the method as described above.
[0030] The embodiment of the present invention provides a system and method for monitoring frame loss in video transmission based on FPGA. The system includes: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; the digital watermark embedding device is used to receive a first video signal output by an output interface of the video source, and convert the first video signal into a first video data parallel signal; the first video data parallel signal is subjected to discrete wavelet transform and discrete cosine transform to obtain a first transformed matrix; each frame of the first video data parallel signal is counted to obtain a frame sequence number of each frame; the watermark information of the frame sequence number of each frame is embedded in the transformation domain of the first transformed matrix to obtain a second transformed matrix matrix; performing inverse discrete cosine transform and inverse discrete wavelet transform on the matrix after the second transformation to obtain a second video data parallel signal; the digital watermark de-embedding device is used to perform discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain a second transformed matrix; extracting watermark information of the frame sequence number of each frame from the intermediate frequency coefficient of the matrix transformation domain after the second transformation; calculating the cumulative value of frame loss within a preset time according to the frame sequence number; converting the cumulative value of frame loss into layer information; superimposing the layer information on the second video data parallel signal and displaying it through a display; quantifying the degree of image freeze by monitoring the number of frame losses in the video image within a preset time.
[0031] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of a system for monitoring video transmission frame loss based on FPGA provided in Embodiment 1 of the present invention;
[0035] Figure 2 A schematic diagram of a flow chart of displaying embedded frame sequence number watermark information provided in the first embodiment of the present invention;
[0036] Figure 3A schematic diagram of a flow chart of displaying and de-embedding frame sequence number watermark information provided in the first embodiment of the present invention;
[0037] Figure 4 A schematic diagram of another system for monitoring video transmission frame loss based on FPGA provided in the second embodiment of the present invention;
[0038] Figure 5 This is a flow chart of a method for monitoring video transmission frame loss based on FPGA provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.
[0041] Embodiment 1:
[0042] Figure 1 A schematic diagram of a system for monitoring frame loss in video transmission based on FPGA provided in Embodiment 1 of the present invention.
[0043] Reference Figure 1 The system includes: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; wherein the digital watermark embedding device is used to embed the frame sequence number of each frame. The digital watermark de-embedding device is used to de-embed the frame sequence number of each frame and calculate the number of frame drops within a preset time. By monitoring the number of frame drops of the video screen within the preset time, the degree of screen freeze can be quantified.
[0044] A digital watermark embedding device is used to receive a first video signal output from a video source output interface, convert the first video signal into a first video data parallel signal; perform discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix; count each frame of the first video data parallel signal to obtain a frame sequence number of each frame; embed watermark information of the frame sequence number of each frame into a transform domain of the first transformed matrix to obtain a second transformed matrix; perform inverse discrete cosine transform and inverse discrete wavelet transform on the second transformed matrix to obtain a second video data parallel signal;
[0045] The digital watermark de-embedding device is used to perform discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain a second transformed matrix; extract the watermark information of the frame sequence number of each frame from the intermediate frequency coefficients in the transformation domain of the second transformed matrix; calculate the accumulated value of frame loss within a preset time according to the frame sequence number; convert the accumulated value of frame loss into layer information; superimpose the layer information on the second video data parallel signal, and display it through a display.
[0046] In this embodiment, watermark information of the frame sequence number is embedded in each image, and after passing through the device under test, the frame sequence number is de-embedded from each image, so as to count the number of frame losses of the device under test; the degree of image freeze is measured by the number of frame losses.
[0047] Further, the digital watermark embedding device includes a first receiver;
[0048] The first receiver is used to receive a first video signal output by the video source output interface, and convert the first video signal into a first video data parallel signal.
[0049] Furthermore, the digital watermark embedding device is used to perform discrete wavelet transform on the first video data parallel signal to obtain a first low-frequency LL component matrix; and perform discrete cosine transform on the first low-frequency LL component matrix to obtain a first transformed matrix.
[0050] Furthermore, the digital watermark embedding device is used to perform an inverse discrete cosine transform on the second transformed matrix to obtain a second low-frequency LL component matrix; and perform an inverse discrete wavelet transform on the second low-frequency LL component matrix to obtain a second video data parallel signal.
[0051] Further, the digital watermark embedding device includes a first transmitter;
[0052] The first transmitter is used to convert the second video data parallel signal into a second video signal and send the second video signal to the device under test.
[0053] Further, the digital watermark de-embedding device includes a second receiver;
[0054] The second receiver is used to convert the second video signal sent by the device under test into a second video data parallel signal.
[0055] Furthermore, the video source is a video output device, and the video output device includes a camera and a set-top box.
[0056] Reference Figure 2, shows the process of embedding one bit of the frame sequence number in a 16*16 macroblock. An image can be divided into multiple 16*16 macroblocks. Therefore, an image can embed all the bits of the frame sequence number; and in order to improve the robustness of the digital watermark, the frame sequence number bits can be embedded in an image multiple times.
[0057] Reference Figure 3 , shows the process of de-embedding one bit of the frame sequence number of a 16*16 macroblock. All bits of the frame sequence number can be de-embedded in an image; and in order to improve the robustness of the digital watermark, the frame sequence number information can be de-embedded multiple times in an image, and the frame sequence number of the image can be obtained through probability statistics.
[0058] Embodiment 2:
[0059] Figure 4 A schematic diagram of another system for monitoring frame loss in video transmission based on FPGA provided in Embodiment 2 of the present invention.
[0060] Reference Figure 4 In this application, watermark information representing the image sequence number is embedded in the image acquisition end, the watermark information representing the image sequence number is extracted in the image display end, and the accumulated value of frame loss within a preset time is calculated according to the frame sequence number.
[0061] The video source can be a camera, set-top box or other device that can output video. The video source output interface can be HDMI, VGA or SDI. Figure 4 HDMI is used as an example for explanation.
[0062] The HDMI receiver 1 receives a first video signal from a video source, and converts the first video signal into a first video data parallel signal, wherein the format of the first video data parallel signal is YUV444 or YUV422.
[0063] Discrete wavelet transform (DWT), the first video data parallel signal is sequentially subjected to discrete wavelet row transform and discrete wavelet column transform to extract the first low-frequency LL component matrix, which is a block 8*8 matrix.
[0064] Discrete cosine transform (DCT), performing discrete cosine transform on the first low-frequency LL component matrix of the wavelet transform to obtain a first transformed matrix.
[0065] The frame counting module is used to count each frame of the first video data parallel signal to obtain a frame sequence number of each frame; it is represented by 8-bit binary and has a value range of 0-255.
[0066] The intermediate frequency coefficient embedding watermark module modifies the intermediate frequency coefficient in the discrete cosine transform domain according to the information of the 8-bit binary number of the frame counting module, and embeds the watermark information of the frame sequence number into the transform domain.
[0067] The timer module is used to provide timing information, with a timing unit of 1ms.
[0068] The HDMI transmitter 1 is used for converting the second video data parallel signal into a second video signal, and outputting the second video signal to the device under test.
[0069] The HDMI receiver 2 is used to receive a second video signal outputted from the device under test, and convert the second video signal into a second video data parallel signal, wherein the format of the parallel signal is RGB, YUV444 or YUV422.
[0070] The HDMI transmitter 2 converts the second video data parallel signal into a second video signal, and outputs the second video signal to the display device.
[0071] The intermediate frequency coefficient extraction watermark module extracts the watermark information of the frame sequence number from the intermediate frequency coefficient in the discrete cosine transform domain.
[0072] The frame loss statistics module is used to calculate the cumulative value of frame loss within a preset time according to the frame sequence number.
[0073] The frame loss statistics layer embedding is used to convert the accumulated frame loss value obtained by the frame loss statistics module into layer information, which is superimposed on the second video data parallel signal and displayed on the display.
[0074] Through the digital watermark embedding device, watermark information representing the frame sequence number is embedded in each frame image from the video source. After passing through the device under test, the looped video image passes through the digital watermark de-embedding device to calculate the cumulative value of frame loss within a preset time. The number of frame losses of the device under test within a period of time can be quantified, and then used as an indicator to measure the degree of picture freeze within a period of time.
[0075] Embodiment three:
[0076] Figure 5 This is a flow chart of a method for monitoring video transmission frame loss based on FPGA provided in Embodiment 3 of the present invention.
[0077] Reference Figure 5 , applied to the above-mentioned system for monitoring video transmission frame loss based on FPGA, the system includes: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; the method includes the following steps:
[0078] Step S101, the digital watermark embedding device receives a first video signal output by a video source output interface, and converts the first video signal into a first video data parallel signal;
[0079] Step S102, performing discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix;
[0080] Step S103, counting each frame of the first video data parallel signal to obtain a frame sequence number of each frame;
[0081] Step S104, embedding the watermark information of the frame sequence number of each frame into the transformation domain of the first transformed matrix to obtain a second transformed matrix;
[0082] Step S105, performing inverse discrete cosine transform and inverse discrete wavelet transform on the second transformed matrix to obtain a second video data parallel signal;
[0083] Step S106, the digital watermark de-embedding device performs discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain a second transformed matrix;
[0084] Step S107, extracting watermark information of the frame sequence number of each frame from the intermediate frequency coefficients in the matrix transformation domain after the second transformation;
[0085] Step S108, calculating the cumulative value of frame loss within a preset time according to the frame sequence number; converting the cumulative value of frame loss into layer information;
[0086] Step S109: superimpose the layer information onto the second video data parallel signal and display it through a display.
[0087] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for monitoring video transmission frame loss based on FPGA provided in the above embodiment are implemented.
[0088] An embodiment of the present invention also provides a computer-readable medium having a non-volatile program code executable by a processor, wherein a computer program is stored on the computer-readable medium, and when the computer program is executed by the processor, the steps of the method for monitoring video transmission frame loss based on FPGA in the above embodiment are executed.
[0089] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.
[0090] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0091] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0092] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0093] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0094] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A system for monitoring video transmission frame loss based on FPGA, characterized in that: The system comprises: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; The digital watermark embedding device is used to receive the first video signal output by the video source output interface, convert the first video signal into a first video data parallel signal; perform discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix; count each frame of the first video data parallel signal to obtain a frame sequence number of each frame; embed the watermark information of the frame sequence number of each frame into the transformation domain of the first transformed matrix to obtain a second transformed matrix; perform inverse discrete cosine transform and inverse discrete wavelet transform on the second transformed matrix to obtain a second video data parallel signal; The digital watermark de-embedding device is used to perform discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain the second transformed matrix; extract the watermark information of the frame serial number of each frame from the intermediate frequency coefficient of the matrix transformation domain after the second transform; calculate the accumulated value of frame loss within a preset time according to the frame serial number; convert the accumulated value of frame loss into layer information; superimpose the layer information on the second video data parallel signal, and display it through the display.
2. The system for monitoring video transmission frame loss based on FPGA according to claim 1 is characterized in that: The digital watermark embedding device comprises a first receiver; The first receiver is used to receive the first video signal output by the video source output interface, and convert the first video signal into the first video data parallel signal.
3. The system for monitoring video transmission frame loss based on FPGA according to claim 1, characterized in that: The digital watermark embedding device is used to perform discrete wavelet transform on the first video data parallel signal to obtain a first low-frequency LL component matrix; and perform discrete cosine transform on the first low-frequency LL component matrix to obtain the first transformed matrix.
4. The system for monitoring video transmission frame loss based on FPGA according to claim 1, characterized in that: The digital watermark embedding device is used to perform inverse discrete cosine transform on the second transformed matrix to obtain a second low-frequency LL component matrix; and perform inverse discrete wavelet transform on the second low-frequency LL component matrix to obtain the second video data parallel signal.
5. The system for monitoring video transmission frame loss based on FPGA according to claim 1, characterized in that: The digital watermark embedding device comprises a first transmitter; The first transmitter is used to convert the second video data parallel signal into a second video signal and send the second video signal to the device under test.
6. The system for monitoring video transmission frame loss based on FPGA according to claim 5, characterized in that: The digital watermark de-embedding device comprises a second receiver; The second receiver is used to convert the second video signal sent by the device under test into a second video data parallel signal.
7. The system for monitoring video transmission frame loss based on FPGA according to claim 1, characterized in that: The video source is a video output device, and the video output device includes a camera and a set-top box.
8. A method for monitoring video transmission frame loss based on FPGA, characterized in that: The system for monitoring video transmission frame loss based on FPGA as described in any one of claims 1 to 7 comprises: a video source, a digital watermark embedding device, a digital watermark de-embedding device and a display; the method comprises: The digital watermark embedding device receives the first video signal output by the video source output interface, and converts the first video signal into a first video data parallel signal; Performing discrete wavelet transform and discrete cosine transform on the first video data parallel signal to obtain a first transformed matrix; Counting each frame of the first video data parallel signal to obtain a frame sequence number of each frame; Embedding the watermark information of the frame sequence number of each frame into the transformation domain of the first transformed matrix to obtain a second transformed matrix; Performing inverse discrete cosine transform and inverse discrete wavelet transform on the matrix after the second transformation to obtain a second video data parallel signal; The digital watermark de-embedding device performs discrete wavelet transform and discrete cosine transform on the second video data parallel signal to obtain the second transformed matrix; Extracting watermark information of the frame sequence number of each frame from the intermediate frequency coefficients in the matrix transformation domain after the second transformation; Calculate the accumulated value of frame loss within a preset time according to the frame sequence number; convert the accumulated value of frame loss into layer information; The layer information is superimposed on the second video data parallel signal and displayed through the display.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method according to claim 8 is implemented.
10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code causes the processor to execute the method of claim 8.
