NI VideoMASTER and NI AudioMASTER

cancel
Showing results for 
Search instead for 
Did you mean: 

PQA Help

Ok.. So what values do I set for upper limit and lower limit ? What does it exactly signify in terms of dropped frames. Does it say the max. allowable difference between the frames ? I am taking data stream refrence and when I play the clip again, I should get a zero difference if I start from the same point ?

 

 

0 Kudos
Message 11 of 15
(5,471 Views)

Hello enigma123

 

I apologize for the delay.  I've put together a simple, toy example to illustrate some points.  I am going to provide the example in the following post.  To answer your questions:

 

So what values do I set for upper limit and lower limit ?

 

I think setting upper and lower limits for the Dropped Frames processor for the single point metric without a data reference could be difficult because you'd need to know exactly how to expect the signal differences to look. 

 

What does it exactly signify in terms of dropped frames. Does it say the max. allowable difference between the frames ?

 

The dropped frames processor single point metric is the average difference between corresponding pixels between consectuive frames  Metric n represents this difference between frame n and frame (n-1).  For let example, let's look at scene transitions.  Take a given scene in a movie where the background doesn't really change.  You are going to get a very low average difference between frames for a given scene.  However, the frame difference at a scene transition where the background changes dramatically will have a high average difference between the last frame of the first scene and first frame of the next scene.

 

I am taking data stream refrence and when I play the clip again, I should get a zero difference if I start from the same point ?

 

Yes.  In general, If you perform an acquisition alongside a processor and create a data reference, then reacquire that identical signal with that processor using your data reference, your metric results should be approximately zero at each step.  If the metric results are not zero, then you're likely experiencing some kind of issue.

 

I am also including the exact text from the NI Picture Quality Analysis Help File for your reference:

 

NI Picture Quality Analysis Help >> NI PQA Executiver and the NI PQA Configuration Panel >> NI PQA Executive Components >> NI PQA Tabs >> Processor Tab >> Video Metric Processors >> Dropped Frames Processor

 

Dropped Frames Processor

This processor detects temporal artifacts such as frozen or duplicated frames by subtracting each pixel in a frame from the corresponding pixel in the previous frame, then calculating the average of the differences.

You can use the dropped frames metric to detect frozen or duplicated frames, even when the difference between pixels in consecutive frames is very low. Compare the Difference metric to a data reference stream to detect temporal noise, which is indicated by a relatively high value, or the loss of information, which is indicated by a relatively low value.

Processor-Specific Controls
Selecting this processor in the Processors control on the Processors tab exposes the following processor-specific control:

Control Description
Number of bins Specifies the number of bins to use. Use this control to reduce the number of points in the multipoint vector for deep color frames. The default value is 256.

Processor-Specific Metrics
Selecting this processor in the Processors control on the Processors tab exposes the following processor-specific metric on the Metrics tab:

Difference—The single-point metric returns the average of the differences between corresponding pixels in consecutive frames. The multipoint metric is a histogram of the differences.

Supported Color Depth
This processor supports deep color video (video with more than 8 bits per color channel).

Sincerely,

Greg S.
0 Kudos
Message 12 of 15
(5,445 Views)

I just want to add to my previous post that you could use the Dropped Frame processor metric without using a data reference.  When setting limits, you would have to be very careful about specifiyng your start and end frame for differenence expected difference values.

Sincerely,

Greg S.
0 Kudos
Message 13 of 15
(5,443 Views)

Example:

Purpose:  Exploring the Dropped Frames Processor - Building a Foundation

Apparatus:  Please download the attached zip file.  (Dropped Frame Example.zip)

  •     Dropped Frame Referemce.AVI - 5 frames of black for the first scene followed by 5 frames of white for the second scene - The scene transition occurs between frame 4 and frame 5 due to zero indexing
  •     Dropped Frame Test.AVI - 4 frames of black for the first scene followed by 6 frames of white for the second scene - The scene transition occurs between frame 4 and frame 5 due to zero indexing
  •     NI Picture Quality Analysis 1.6

Part 1:  Acquiring the Reference AVI with the Dropped Frames Processor and Creating the Data Reference

 

  • In the Provider tab, choose the AVI Provider and specify Dropped Frame Referemce.AVI as the source AVI.
  • In the Processors tab, select the Dropped frames processor
  • In the Refs and disk tab, specify an Output directory and ensure the check box to the right of "Data Stream" is checked.
  • Set the Frames to process to 10 and the Buffer size to 10.
  • Run the acquisition
  • Observe that your metrics graph appears as below

Dropped Frame Reference.AVI - Dropped Frames Processor.png

 

This is exactly what we expect.  The difference between frames i and (i-1) from 0-4 are zero because they are identical frames.  The average difference between frame 5 and 4 is 255 which is exactly how the AVI was designed.  The differences between frames 5-6 up to 9 are all zero because these are all identical frames.

 

  • In Refs and disk tab, uncheck Data Stream in the Output Streams section.  In the Reference Streams section, specify the Data.bin resulting from the previous acquisition as the Data ref stream and ensure the checkbox to the right is checked. 
  • Run this acquisiton and very the following results

Dropped Frame Reference.AVI - Dropped Frames Processor with Data Reference.png

This is the results of using a reference stream's data reference against itself for a given processor in an acquisition.

 

Part 2:  Simulating the Dropped Frame

 

The test AVI included in the zip file simulates a dropped frame by removing one frame before the scene transition.  Follow the initials steps of Part 1 for the first aquisition without creating a data reference and observe the following results.

 

Dropped Frame Test.AVI - Dropped Frames Processor.png

 

Notice now we can observe the scene transition between frame 3 and 4 as indicated by the metric at frame 4.

 

Now just to reiterate, the metrics comapred to a data reference are calculated using a relative measurement.  That is the Test metric subtract the Reference Metric divided by the Reference Metric.

 

If we now include the data reference in this acquisition/process, we get the following result.

 

Dropped Frame Test.AVI - Dropped Frames Processor with Data Reference.png

Now, the results seem very similar to the previous acquisition without the data reference but now it could be easier to catch errors depending on your signals.

 

Notice that our reference data corresponds with our first image/acquisition.

 

Now, we know we have different metric results for frames 4  and 5 between the rest and reference streams.  Take the result at frame for 4 for the latest image, the test data is 255, the reference data is 0, since our ref data is zero the metric returns the maximum difference which is 255.  Take the result at frame 5, the test data is 0 and the reference data is 255, in this case the metric is returing a result less than 0 -- (0 - 255)/255.  A good practice in setting limits for the dropped frames processor data reference would be to set the lower limit to a hard zero due to those values incating large negative differences with a large reference value while allowing some slight variation for the upper limit above zero depending on the SNR of your test and reference signal.

 

Extra:   Setting Limits without a Data Reference for the Dropped Frames processor.

 

Let's take an aside and return to our  first acquisition to see how to set limits without a data reference.

 

Setting Limits - Dropped Frame Reference.AVI - Dropped Frames Processor.png


Now, using these limits, acquire the test AVI and observe the results.

 

Using Limits - Dropped Frame Test.AVI - Dropped Frames Processor.png

As you can see, we caught two errors, one where a different scene transition occured and one where we expected the scene transition to occur.  Let's summarize everything we've gone over.

 

Setting Limits Using the Dropped Frames Processor:

  • Without the use of a data reference will require you to run a known reference acquisition of have prior knowledge of scene transitions, then set the limits around those points of interest.
  • Using a data reference will only require you to set limit tolerances around zero to account for numeric varations and noise.

I'm still experimenting with teaching these topics  so please let me know if anything is unclear and I will be sure to clarify it.

 

Thank you very much for your understanding.

 

 

Sincerely,

Greg S.
0 Kudos
Message 14 of 15
(5,438 Views)

I just noticed a typo in my apparatus section.

 

Dropped Frame Test.AVI - 4 frames of black for the first scene followed by 6 frames of white for the second scene - The scene transition occurs between frame 3 and frame 4 due to zero indexing -- this is obvious from results graph.

 

Sorry about that and thank you for your understanding.

Sincerely,

Greg S.
0 Kudos
Message 15 of 15
(5,389 Views)