02-12-2013 02:42 PM
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 ?
02-16-2013 01:51 PM
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).
02-16-2013 02:00 PM
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.
02-16-2013 03:56 PM - edited 02-16-2013 03:57 PM
Example:
Purpose: Exploring the Dropped Frames Processor - Building a Foundation
Apparatus: Please download the attached zip file. (Dropped Frame Example.zip)
Part 1: Acquiring the Reference AVI with the Dropped Frames Processor and Creating the Data Reference
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.
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.
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.
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.
Now, using these limits, acquire the test AVI and observe the results.
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:
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.
02-28-2013 08:56 AM
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.