Home / YUVTools / YUV Comparision

YUV Analyzer:

YUV Analyzer actually contains four tools, PSNR calculation, YUV comparison, data overlay and checking motion.
  1. PSNR calculation between two image clips
  2. Comparison between two image clips
  3. Overlaying information on top of an image
  4. Checking motion between two consecutive frames

Comparison

This module can be used to compare the difference between two YUV files, frame by frame, pixel by pixel. The difference image will be displayed, with many display options. The two YUV files to be compared must have the same YUV format, including the resolution.

From the main menu, choose "YUV Analyzer", then select "Compare", or click on   from the toolbar, a dialog will pop up.

  1. Load File 1:   Click on "Browse" to pick a YUV file, and a YUV format dialog will help you to select a right YUV format. Refer to YUV / RGB format selection .
  2. Load File 2:   Click on "Browse" to pick a YUV file, and a YUV format dialog will help you to select a right YUV format. Refer to YUV / RGB format selection .
  3. Play controls: After you load the two YUV files with correct YUV format, you can:
    • Click on button "Start" to start the comparison, the difference images will be displayed frame by frame
    • Click on button "Play" to start play the YUV file;
    • Click on button "Pause" to pause the play
    • Click on button "Stop" to stop the play
    • Click on button "Reverse play" to play backward, from last frame to the first frame
    • Click on button ">" to play one frame forewords.
    • Click on button "<" to play one frame backward.
    • Click on dragging bar and drag to any frame directly.
    • Click on button "Exit" to exit the player. 
    • Frame #: Current frame number will be displayed to show where you are.
  4. Display options:  The two files will be compared pixel by pixel, and the sum of absolute difference (SAD) is sued for the measurement of the difference values. You have two ways to display the SAD values:
    • Display SAD as grey scale image. You can adjust the brightness of the grey scale image by dragging the slide bar. The pixels with brighter color have larger difference. In following example, we will compare one frame in foreman in original quality and the same frame decoded from 400Kb compression format.

                    (Click on above image to display a full resolution image)

    • Display SAD as binary image, or overlay the difference on top of file 1 or file 2. You can specify a SAD clipping range to select which pixel to display. In the following example, only pixels whose SAD value is between 8 and 64 (inclusive) will be displayed as red color. The pixel in red will be overlaid on image file 2:

                    (Click on above image to display a full resolution image)

      If you give a range like [1, 0], no difference pixels will be displayed, only the original is displayed as background:

                    (Click on above image to display a full resolution image)

  5. Comparison options:    
    • You can select to compare which color components, YUV all components, Y only, or U, V component only.
    • You can click on button "Diff value histogram" to display the distribution (SAD value counts) of each difference value.

                    (Click on above image to display a full resolution image)

    • Or, click on button "Diff position distribution", to check how the SAD values are distributed related to pixel positions inside the image. In the following example, we like to check how the SAD is distributed around boundary of all blocks with size 8.  For all 8x8 blocks, we will check all [0...7] rows and [0...7] columns. We can see the SAD values are much bigger on the block boundary, either on row 0 or row 7, and column 0 and column 7.  At bit rate of 400K, the compression algorithm creates many artifacts around block boundaries.

                    (Click on above image to display a full resolution image)

      Another option is to check how the SAD values are distributed across the whole image:

                    (Click on above image to display a full resolution image)

      If you adjust the bar height to 0, you will see the one of the original image, mapped on the floor.

                    (Click on above image to display a full resolution image)

 
Copyright, www.sunrayimage.com, 2017