Embodiment
For making the technical problem to be solved in the present invention, technical scheme and advantage clearly, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
As shown in Figure 1, for the invention provides a kind of method for evaluating quality of video flowing, comprising:
Step 11, obtains and processes original video sequence and the first compressing video frequency flow generated; Described first compressing video frequency flow carries sequence identifier corresponding to described original video sequence and image sequence number.That is, each video sequence is that a series of video image is formed, and plays will form live image by certain frame per second.The present invention has multiple original video sequence, the sequence identifier that different original video sequences is corresponding different.The video image that same original video sequence is corresponding different, the image sequence number that the different video image of same original video sequence is corresponding different.
Wherein, described the process that original video sequence carries out to be comprised: to the coded treatment of described original video sequence; Or, to the transmission process of the original compression video flowing that described original video sequence generates; Or, to the decoding process of the original compression video flowing generated according to described original video sequence received.Accordingly, step 11 is: step 11A, receives the video of described original compression video flowing through transmission process, as the first compressing video frequency flow; Or step 11B, receives the video of described original compression video flowing through decoding process, as the first compressing video frequency flow; Or step 11C, gathers the video to described original compression video flowing display, as the first compressing video frequency flow.To be treated to transmission process, original video sequence and corresponding original compression video flowing are positioned at transmitting terminal, and the first video sequence and the first corresponding compressing video frequency flow are positioned at receiving terminal.
Step 12, according to described sequence identifier, obtains the described original video sequence that described first compressing video frequency flow is corresponding;
Step 13, according to described sequence identifier and image sequence number, obtains the original compression video flowing that described original video sequence is corresponding;
Step 14, according to described first compressing video frequency flow and described original compression video flowing, assesses the video quality of described first compressing video frequency flow.
Described method, also comprises:
Step 15, obtains the first video sequence that described first compressing video frequency flow is corresponding; Step 15 is specially:
Step 15A, decodes to described first compressing video frequency flow, generates the first video sequence; Or
Step 15B, gathers the video to described original compression video flowing display, generates the first video sequence.
Step 16, according to described first video sequence and described original video sequence, assesses the video quality of described first video sequence.
Optionally, before step 16, described method also comprises:
Step 16A, judges whether described first video sequence has frame losing:
Step 16B, if any frame losing, then the frame of video of polishing loss, generates the first video sequence after mending frame;
Step 16 is specially: according to described first video sequence mended after frame and described original video sequence, assesses the video quality of described first video sequence after benefit frame.
In one embodiment, step 12 comprises:
Step 121A, extracts the sequence identifier that described first compressing video frequency flow carries;
Step 122A, according to the corresponding relation between described sequence identifier and original video sequence, obtains the original video sequence that described sequence identifier is corresponding.
In another embodiment, step 12 comprises:
Step 121B, extracts the sequence identifier that described first compressing video frequency flow carries;
Step 122B, according to described sequence identifier, generates the original video sequence that described sequence identifier is corresponding.
In one embodiment, step 13 comprises:
Step 131A, extracts sequence identifier and image sequence number that described first compressing video frequency flow carries;
Step 132A, according to the corresponding relation between described sequence identifier and image sequence number and original compression video flowing, obtains described sequence sequence identifier and image sequence number corresponding original compression video flowing.
In another embodiment, step 13 comprises:
Step 131B, extracts sequence identifier and image sequence number that described first compressing video frequency flow carries;
Step 131B, the frame of described original video sequence superposes described sequence identifier and described image sequence number, generates original compression video flowing.
Step 14 step is specially: step 141, according to described first compressing video frequency flow and described original compression video flowing, calculates the video packet loss of described first compressing video frequency flow relative to described original compression video flowing.
Or step 14 step is specially: step 142, according to described first compressing video frequency flow and described original compression video flowing, calculate the video source error rate of described first compressing video frequency flow relative to described original compression video flowing.
Step 141 is specially:
Step 142 is specially:
The computational methods of error bit number are: the first compressing video frequency flow and original compression video flowing directly mutually after can determine wrong bit quantity has how many, and comparative approach is: the different number of bits in more corresponding two binary files centre.
Step 16 is specially: step 161, described according to described first video sequence and described original video sequence, calculates the mean square error of described first video sequence relative to described original video sequence;
Or step 16 is specially: step 162, described according to described first video sequence and described original video sequence, calculate the Y-PSNR of described first video sequence relative to described original video sequence;
Or step 16 is specially: step 163, described according to described first video sequence and described original video sequence, calculate the structural similarity average of described first video sequence relative to described original video sequence.
Step 161 is specially:
Wherein,
side's error; The frame resolution of described first compressing video frequency flow is M pixel × N pixel, and the wherein two field picture that X (i, j) is described original video sequence is at the pixel value at point (i, j) place; Y (i, j) represents the corresponding two field picture pixel value at point (i, j) place of a described two field picture in described first video sequence; Pixel value can be gray scale or aberration.
Step 162 is specially:
Wherein, PSNR is Y-PSNR, and the frame resolution of described first compressing video frequency flow is M pixel × N pixel, and the wherein two field picture that X (i, j) is described original video sequence is at the pixel value at point (i, j) place; Y (i, j) represents the corresponding two field picture pixel value at point (i, j) place of a described two field picture in described first video sequence; E is the peak amplitude of described first compressing video frequency flow under the sampling condition subscribing bit;
Step 163 is specially:
Wherein, SSIM is structural similarity parameter, and k is the sequence number of the wherein local window of a two field picture of described first video sequence; M is total number of the local window of a wherein two field picture of described first video sequence; Xk and yk is the content of the frame of video of a kth local window; Content is the general designation of all digital pictures in window.
SSIM is according to following formulae discovery;
SSIM=[l(x,y)]
α·[c(x,y)]
β·[s(x,y)]
γ(6);
Wherein, α, beta, gamma >0 are the weight coefficient of brightness comparison function l (x, y), contrast comparison function c (x, y) and structural information comparison function s (x, y) respectively;
Wherein,
represent the mean flow rate of original video sequence; N is the totalframes of original video sequence.
represent the mean flow rate of the first video sequence;
represent the standard deviation of original video sequence,
represent the standard deviation of the first video sequence;
represent the covariance of original video sequence and the first video sequence;
C
1, C
2, C
3for constant;
K
1, K
2<<1, L represent the dynamic range of pixel value.
As shown in Figure 2, the present invention also provides a kind of quality assessment device of video flowing, comprising:
First acquiring unit 21, obtains and processes original video sequence and the first compressing video frequency flow generated; Described first compressing video frequency flow carries sequence identifier corresponding to described original video sequence and image sequence number;
Second acquisition unit 22, according to described sequence identifier, obtains the described original video sequence that described first compressing video frequency flow is corresponding;
3rd acquiring unit 23, according to described sequence identifier and image sequence number, obtains the original compression video flowing that described original video sequence is corresponding;
First assessment unit 24, according to described first compressing video frequency flow and described original compression video flowing, assesses the video quality of described first compressing video frequency flow.
Described device, also comprises:
4th acquiring unit 25, obtains the first video sequence that described first compressing video frequency flow is corresponding;
Second assessment unit 26, according to described first video sequence and described original video sequence, assesses the video quality of described first video sequence.
Described first acquiring unit 21 comprises:
Transport module, receives the video of described original compression video flowing through transmission process, as the first compressing video frequency flow;
Decoder module, receives the video of described original compression video flowing through decoding process, as the first compressing video frequency flow; Or
First acquisition module, gathers the video to described original compression video flowing display, as the first compressing video frequency flow.
State the 4th acquiring unit 25 to comprise:
Decoder module, decodes to described first compressing video frequency flow, generates the first video sequence; Or
Second acquisition module, gathers the video to described original compression video flowing display, generates the first video sequence.
Described second acquisition unit 22 comprises:
First extraction module, extracts the sequence identifier that described first compressing video frequency flow carries;
First acquisition module, according to the corresponding relation between described sequence identifier and original video sequence, obtains the original video sequence that described sequence identifier is corresponding.
Optionally, described second acquisition unit 22 comprises:
Second extraction module, extracts the sequence identifier that described first compressing video frequency flow carries;
First generation module, according to described sequence identifier, generates the original video sequence that described sequence identifier is corresponding.
Described 3rd acquiring unit 23 comprises:
3rd extraction module, extracts sequence identifier and image sequence number that described first compressing video frequency flow carries;
Second acquisition module, according to the corresponding relation between described sequence identifier and image sequence number and original compression video flowing, obtains described sequence sequence identifier and image sequence number corresponding original compression video flowing.
Optionally, described 3rd acquiring unit 23 comprises:
4th extraction module, extracts sequence identifier and image sequence number that described first compressing video frequency flow carries;
Second generation module, the frame of described original video sequence superposes described sequence identifier and described image sequence number, generates original compression video flowing.
The embodiment of the present invention is by different configuration modes, can when not increasing Internet Transmission burden, at compressed video bit stream corresponding to receiving terminal identification and original video sequence, thus realize respectively for video objective quality complete in assessment of the generation of video flowing, transmission and phase of regeneration, have applying flexible, precision higher, evaluate the features such as objective, can video field be widely used in.
The application scenarios of method of the present invention is below described.
As shown in Figure 4, the invention provides a kind of generation method of testing special video flowing (being equal to above-mentioned original compression video flowing), comprising:
First, original video cycle tests (being equal to above-mentioned original video sequence) is divided into static, fast moving according to camera motion feature, moves and convergent-divergent Four types at a slow speed, and alpha code (being equal to above-mentioned sequence identifier) is carried out to all sequences, cycle tests quantity and coding control parameters can determine according to concrete test environment.
Then, according to the video compression mode chosen and reference frame structure, to image sequence number (the Picture Order Count of described single cycle tests, be called for short POC) carry out alpha code (being equal to above-mentioned image sequence number), and on the ad-hoc location of each original video frame, (position can be determined according to actual conditions) superposes sequence alpha code and POC numbering.
Video compression standard needed for selection, and according to the coding parameter table (mainly comprising the coding control parameters such as the code check of class rank, quantization step and preset value) of standard recommendation, generate the compressing video frequency flow that test is special, record average peak signal to noise ratio and the code check of the video flowing generated simultaneously.
The embodiment of the present invention additionally provides the complete in apparatus for evaluating of a kind of video code flow objective quality, can for mutually carrying out two user side tests of video communication.Comprise: video flowing generation unit, video flowing receive to be rebuild and display unit, video acquisition and frame information recognition unit and video objective quality computing unit with analytic unit, video flowing.Wherein, video flowing generation unit connects video flowing reconstruction and display unit, video objective quality computing unit; Video flowing reception is connected video flowing with analytic unit and rebuilds and display unit; Video flowing is rebuild and is connected video acquisition and frame information recognition unit with display unit; Video acquisition is connected video objective quality computing unit with frame information recognition unit; Video objective quality computing unit connects video flowing generation unit.
At transmitting terminal and the concurrently deployed video flowing generation unit of receiving terminal, produce the special compressing video frequency flow of test;
Video flowing receives and analytic unit, after receiving terminal receives video flowing, extract network abstraction layer unit (the Network Abstract Layer Unit in video flowing, be called for short NALU) in the parameter such as coding class rank, quantization step, the code check state modulator parameter of preset value and POC analyze, the compressing video frequency flow consistent with the video flowing of current reception can be produced according to the parameter synchronization received simultaneously, use for video flowing objective quality computing unit;
Video flowing is rebuild and display unit, completes decoding and the Presentation Function of video flowing;
Video acquisition and frame information recognition unit, by to the collection of video display unit and the picture signal identification of appointed area, collect the local video sequence gathered, and identify current receiver, video sequence numbering and POC numbering, use for video objective quality computing unit;
Video objective quality computing unit, by the detection and Identification to the video flowing be currently received, utilizes video flowing generation unit synchronously to produce consistency video flowing, for video objective quality evaluates calculation at receiving terminal; Or extracting directly is stored in consistency video flowing and the original video data of receiving terminal, for video objective quality evaluates calculation; Meanwhile, also can utilize consistency video code flow, calculate the objective quality index such as packet loss, the error rate of video code flow during transmission.
The beneficial effect that the present invention produces is:
On the one hand, first the type information of video sequence and correspondence image sequence number directly superpose by the present invention, as a part for test video sequence image, facilitate the video information identification at receiving terminal; Meanwhile, when not needing individual transmission original video stream and can not increase Internet Transmission burden, the video flowing objective quality that can realize under full reference conditions detects.
On the other hand, the device that the present invention announces possesses original video stream output simultaneously, compressing video frequency flow exports and receiver, video stream input processing function, thus can test separately single video communication node; Or, test multiple video communication node simultaneously, separately for the generation of video flowing, transmission and phase of regeneration configuration testing environment, configuration mode more flexibly can be had.
On the other hand, the present invention can objective quantification video compression, the video quality introduced in transmission and process of reconstruction degrade, and avoids the subjectivity that method for subjective testing is introduced; Meanwhile, authoritative objective evaluation index can be adopted accurately to describe the reliability of video flow quality and Video transmission system.The present invention is not only applicable to all kinds of video communication system, and may be used for the equipment evaluation of video acquisition, coded system.
Below embodiments of the invention are described.
Embodiment one:
The present embodiment is the method for a kind of accurate detection by the video flowing objective quality after Internet Transmission, the hardware system that described method uses comprises: at transmitting terminal, video code flow objective quality assessment device described in the embodiment of the present invention is connected with video code flow dispensing device, as shown in Figure 7; At receiving terminal, video code flow receiving system is connected with the video code flow objective quality assessment device described in the embodiment of the present invention, as shown in Figure 7.
If accompanying drawing 7 is with shown in accompanying drawing 4, described in the present embodiment, the general principle of method is:
At transmitting terminal, first, determine current test video used classification and concrete sequence, select corresponding coding control parameters according to selected video-frequency compression method simultaneously;
Then, the video flowing generation unit of video code flow objective quality assessment device is utilized to choose corresponding original video sequence, and produce video sequence numbering and image sequence number, be added on original video sequence, then become the special compressing video frequency flow of test by corresponding video encoder compresses.
For saving video flowing generation time, also can in advance by determining that all types of original video sequence is compressed into all types of video flowing and deposits by parameter, directly in use choose corresponding video flowing according to Video coding controling parameters and export, Internet Transmission is sent in the test special compressing video frequency flow circulation finally utilizing video stream device to be no less than 10s.Circulation transmitting time can determine according to concrete test request, and transformat and agreement can determine according to concrete networked physics layer host-host protocol.
The method of the invention can adapt to following situation; At receiving terminal, video flowing receiving system is first utilized to receive and be reduced into the accessible video flowing sequence of Video Decoder according to the concrete network transmission protocol;
Then, the process of video code flow objective quality assessment device is sent into.Wherein, video flowing receives the NALU unit extracting video code flow with analytic unit and also analyzes the basic parameter extracting video flowing, as frame type, No. POC, video resolution and quantization step etc. use for subsequent analysis;
Video flowing is rebuild to decode with display unit and store the compressing video frequency flow that receives and be delivered to display device and is play;
Video acquisition and the collection of frame information recognition unit also store the decoded video that display device is play, and the information character extracting assigned address obtains decoded video type and No. POC, uses for subsequent analysis;
Video objective quality computing unit, according to the video flowing parameter of aforementioned each unit output and all types of video sequence, extracts original video sequence corresponding in video flowing generation unit and compressing video frequency flow, and calculates outputting video streams objective quality assessment result.
As shown in Figure 5, wherein, the method for the corresponding original video sequence of described extraction and compressing video frequency flow comprises: binary code stream comparison method and video frame information extraction method.Two class methods can be used alone or together mutually to verify according to the configuration of testing environment.
Wherein, all types of original video sequence need be compressed into all types of video flowing at receiving terminal and deposit by binary code stream comparison method in advance; Or, after acquisition receiver, video stream type and coding parameter, call receiving terminal video flowing generation unit and generate corresponding compressing video frequency flow.Be specially: binary code stream comparison method utilizes video flowing to receive the parameter extracted with analytic unit, limits the scope of looking the flow analysis of receiving terminal compressed video.After acquisition one is no less than the code flow structure of the special compressing video frequency flow of test of 10s, video objective quality computing unit utilizes binary comparator, the compressing video frequency flow that each NALU unit and the receiving terminal of this code stream are deposited is compared, obtain the compressing video frequency flow matched with the video code flow received, extract corresponding original video sequence and compressing video frequency flow accordingly to calculate for video objective quality and use, the method is more accurate.
Video frame information extracts rule and directly from decoding video sequence, extracts Video Stream type and image sequence number.Be specially: video frame information extraction method extracts the video sequence numbering letter image of assigned address superposition in frame of video, relevant matches is carried out with the alphabetic feature in character feature storehouse, to determine alphabetical information and corresponding sequence numbering, extract corresponding original video sequence and compressing video frequency flow accordingly, calculate for video objective quality and use.The video that the method causes after being subject to Network Packet Loss degrades impact, if read inaccurate, then needs after network recovery is stable, to obtain recognition result accurately by extending observation time.
Wherein, the compressing video frequency flow that described basis receives comprises with the step that the corresponding original video sequence of extraction calculates video objective quality:
Be no less than decoding the compressing video frequency flow unit of 10s from one that receives and produce video sequence;
Judge to produce with or without packet loss in No. POC analysis compressing video frequency flow that foregoing units extracts;
If there is packet drop, then need polishing is lost in decoding video sequence frame of video.Polishing method can with directly copying method or motion compensation method with frame.Last frame of video is directly copied to the frame of video position of current loss by frame copy method; Motion compensation method is according to the information of the current lost frames position of motion compensation relation completion of front and back frame.
As shown in Figure 6, when after decoding video sequence polishing, the objective error between its with corresponding original video sequence can be calculated.Mean square error (Mean Squared Error can be adopted, be called for short MSE), Y-PSNR (Peak Signal to Noise Ratio, be called for short PSNR) with the full reference video objective quality assessment parameter such as structural similarity average (MeanStructural Similarity Index Method, be called for short MSSIM).
Suppose that video frame resolution is M × N (pixel), X represents original video sequence, and Y represents decoding video sequence, then above-mentioned evaluate parameter can be respectively calculated as follows:
MSE can obtain by formula (10):
Wherein, X (i, j) is the pixel value of a certain two field picture of original video sequence at point (i, j) place, and Y (i, j) represents the pixel value of image at point (i, j) place of the corresponding frame of decoding video sequence.
PSNR can obtain by formula (11):
Wherein X (i, j) for a certain two field picture of original video sequence is at point (i, j) pixel value at place, Y (i, j) represent that the image of the corresponding frame of decoding video sequence is at point (i, j) pixel value at place, 255 is vision signal peak amplitudes under the sampling condition of 8bit.
MSSIM can obtain by formula (12), (13), (14), (15), (16):
First, computation structure similarity parameter (Structural Similarity Index Method is called for short SSIM), calculation expression is as follows:
SSIM=[l(x,y)]
α·[c(x,y)]
β·[s(x,y)]
γ(12)
Wherein, α, beta, gamma >0 are the weight coefficient of brightness comparison function l (x, y), contrast comparison function c (x, y) and structural information comparison function s (x, y) respectively.The calculation expression of these three functions is as follows:
Wherein,
represent the mean flow rate of original video sequence,
represent the mean flow rate of decoding video sequence;
represent the standard deviation of original video sequence,
Represent the standard deviation of decoding video sequence;
Represent the covariance of original video sequence and decoding video sequence; C
1, C
2, C
3for constant, K
1, K
2<<1.L represents the dynamic range of pixel value.Work as L=255, illustrate that video image is 8 bit images.
The quality assessment value structural similarity average (MSSIM, Mean StructuralSimilarity) of whole frame of video represents:
Wherein M is the number of local window in video one two field picture (size of local window is 8X8), x
kand y
kit is the content of a kth local window frame of video.
The compressing video frequency flow that described basis receives is specially with the step of the compressed video stream calculation video network transmission quality that corresponding this locality of extraction stores: be no less than No. POC that extracts in the compressing video frequency flow unit of 10s according to foregoing units at one, analyzes in the compressing video frequency flow received and produces with or without packet loss.The packet loss in video network transmission can be calculated by (17) formula:
Meanwhile, the error rate of video compression information source in Internet Transmission can be calculated by (18) formula:
Due in network transmission process, network state is also unstable, accurate for ensureing test result, circulation can be tested in a large number, export after above-mentioned objective quality assessment result decoding in the compressing video frequency flow unit being no less than 10s in a large number being produced video sequence carries out arithmetic average.
Embodiment two:
The present embodiment is the appraisal procedure of the compression quality of video encoder in a kind of accurate detection video communication system.The hardware system that described method uses comprises: the video code flow objective quality assessment device described in the embodiment of the present invention is connected with video encoder apparatus, as shown in Figure 8.
As shown in accompanying drawing 8 and accompanying drawing 3, described in embodiment, method comprises:
First, by the video flowing generation unit in video code flow objective quality assessment device according to the test video classification inputted and parameter, generate original video sequence;
Then, this sequence is sent in video encoder to be evaluated generate compressing video frequency flow;
Then, compressing video frequency flow is returned to video code flow objective quality assessment device, rebuild by video flowing reception and analytic unit and video flowing and after display unit process, generate decoding video sequence.
Finally, by video objective quality computing unit with reference to original video sequence and decoding video sequence, calculate the full reference video objective quality assessment parameter such as MSE, PSNR and MSSIM.
Said method can more conveniently realize assessing the compression quality of the video encoder of video flowing generation phase in video communication system.
Embodiment three:
The present embodiment is a kind of accurately detection in video communication system in video code flow phase of regeneration, the appraisal procedure of the video reconstruction quality of video playback and display device.The hardware system that described method uses comprises: the video code flow objective quality assessment device described in the embodiment of the present invention is connected with display unit with independently playing, as shown in Figure 9.
As shown in accompanying drawing 9 Fig. 3, described in the present embodiment, method comprises:
First, by the video flowing generation unit in video code flow objective quality assessment device according to the test video classification inputted and parameter, produce original video sequence;
Then, this sequence is sent into video flowing and rebuilds and display unit, by this unit controls outside, independently video playback and display unit play original video sequence;
Then, video acquisition and the collection of frame information recognition unit, identification store the video sequence obtained from outside independently video playback and display unit is utilized;
Finally, the full reference video objective quality assessment parameter such as MSE, PSNR and MSSIM is calculated by the displaying video sequence of video objective quality computing unit reference original video sequence and storage.
Above-mentionedly to look in original video sequence production process overlay video numbering and image sequence number, the identification that can realize gathering video sequence and original video sequence in video objective quality assessment with align, thus more conveniently can realize the video quality assessment to video reconstruction stage generation in video communication system.
The present invention also provides a kind of method for evaluating quality of video flowing, can be applied to transmitting terminal, comprise:
Obtain sequence identifier corresponding to original video sequence, described original video sequence and an image sequence number corresponding to described original video sequence;
According to described sequence identifier and described image sequence number, generate the original compression video flowing that described original video sequence is corresponding.
Described according to described sequence identifier and described image sequence number, the step generating original compression video flowing corresponding to described original video sequence is specially:
The frame of described original video sequence superposes described sequence identifier and described image sequence number, generates original compression video flowing.
The present invention also provides a kind of quality assessment device of video flowing, can be arranged on transmitting terminal, comprise:
Acquiring unit, obtains sequence identifier corresponding to original video sequence, described original video sequence and an image sequence number corresponding to described original video sequence;
Generation unit, according to described sequence identifier and described image sequence number, generates the original compression video flowing that described original video sequence is corresponding.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.