Skip to content

Commit

Permalink
Updates to QC graph Version 2 and documentation: (#373)
Browse files Browse the repository at this point in the history
* Updates to QC graph Version 2:

Updates in version 2 include:
-The version number is now included into the Graph’s title
-The color range for the plot of %Outside of Broadcast Range was
widened from 0-3% to 0-5%. The new range defines 0 as green, 2% as
yellow, and 5% as red
-The label of for each plot has been moved to the top center of each
plot and displayed over the plotted data
-Minor changes have been made to fonts, size, and position of scales
and keys
Additions were also made to the documentation page for Analog
Digitization, which now includes a description of the QC Graphs
function and an example of the output. The documentation for
Installation and Setup now also includes a note about installing
gnuplot to enable the QC graph functionality.
  • Loading branch information
nkaplan4250 authored and dericed committed Aug 9, 2018
1 parent 7edc65c commit 7dc0f13
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 11 deletions.
23 changes: 19 additions & 4 deletions Resources/Documentation/analog_digitization.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,26 @@ You may also see a warning that says "packet too small." You can safely ignore t
Next, check to make sure vrecord produced the correct files. These are:

1. The video file itself
1. Bmdcapture log (filename_bmdcapture.log)
1. FFmpeg log (filename_ffmpeg_date_time.log)
1. FFplay log (filename_ffplay_date_time.log)
1. Bmdcapture log (filename\_bmdcapture.log)
1. FFmpeg log (filename\_ffmpeg\_date\_time.log)
1. FFplay log (filename\_ffplay\_date\_time.log)
1. Frame MD5 file (filename.framemd5) if you chose to record frame MD5s, which you should do
1. A capture options log (filename_capture_options.log)
1. A capture options log (filename\_capture\_options.log)
1. A QCTools XML file, if you chose to create it (filename.qctools.xml.gz)
1. An image file of QC graphs (filename\_QC\_output\_graphs.jpeg) if you chose to create the QCTools XML file

Scroll through the video file to make sure it is complete; in other words, you've captured the entire tape. If all these files exist and the video file looks complete you can move on to further QC.

### QC Graphs
Vrecord can now create an image that contains seven graphs of the data collected during the QCTools analysis. These graphs include the min/max audio levels, the peak audio levels the audio phase, the percentage outside of broadcast range, percentage of temporal outliers, the saturation levels (avg and max), and the structural similarity metric (Y,U,V). These characteristics are plotted and colored to highlight values that fall outside acceptable ranges. This feature was introduced to help with the rapid assessment of a recording immediately after it has been generated. The characteristics selected and the highlighted values are intended to clearly illustrate the general success or failure of a recording without the need for additional QC. For example, if a recording is far too loud or the blacks are too dark, that will be immediately apparent and the recording can be redone without having to be extensively reviewed.

Version 2 introduces the following updates:

1. The version number is now included into the Graph’s title
1. The color range for the plot of %Outside of Broadcast Range was widened from 0-3% to 0-5%. The new range defines 0 as green, 2% as yellow, and 5% as red
1. The label of for each plot has been moved to the top center of each plot and displayed over the plotted data
1. Minor changes have been made to fonts, size, and position of scales and keys

**Example of QC Graphs Version 2**

<img src="../vrecord_QC_output_graphs_ver2.jpeg" alt="vrecord_QC_output_graphs_ver2" width="1024px" height="576px" alt=text text="QC Graphs" title="QC Rapid Assessment Graphs"/>
7 changes: 7 additions & 0 deletions Resources/Documentation/installation_and_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Alternatively, you can run the following command:
brew install amiaopensource/amiaos/vrecord
```

Gnuplot is the program that vrecord uses to generate the jpeg of the QC graphs. It must be installed separately due to a conflicting dependency on a newer version of lua. You will be prompted to install by running the following command:
```
brew install gnuplot --without-lua
```

(This will install gnuplot without lua and allow vrecord to produce an image of the QC graphs along with the qctools report)

Once vrecord has been successfully installed, you can update it to the latest release by first running:
```
brew update
Expand Down
Binary file added Resources/vrecord_QC_output_graphs_ver2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 18 additions & 7 deletions vrecord
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ _writeingestlog(){
fi
}

# create a png of qc data graphs for quick assessment
# create a jpeg of qc data graphs for quick assessment
_qcgraphimage(){
# get audio data
qctools_CONFIGFILE_A="$(/usr/bin/mktemp /tmp/astats_A_XXXXXXXXX).csv"
Expand Down Expand Up @@ -532,46 +532,53 @@ _qcgraphimage(){
echo "set terminal jpeg size 1920, 1080
set output '${LOGDIR}/${ID}_QC_output_graphs.jpeg'
set term jpeg font 'times,12'
set multiplot layout 7, 1 title '${ID} QC Data' margins screen .05,.93, .05, .93 spacing screen 0, char .7
set multiplot layout 7, 1 title '${ID} QC Data Graphs (ver.2)' margins screen .05,.93, .05, .93 spacing screen 0, char .7
set style line 11 lc rgb '#808080' lt 1
set border 15 back ls 11
set format x '%tH:%tM:%.1tS' time
set format x2 '%tH:%tM:%.1tS' time
set x2tics border out nomirror
set xtics border mirror in scale 1.5,.7 format ''
set ytics border out nomirror
set ytics border out nomirror font 'times,10'
set grid y
set grid x
set grid mxtics
set colorbox vertical back user origin graph 1.02,0 size char 1,6
set colorbox vertical back user origin graph 1.01,0 size char 1,6
set cbtics font 'times,10'
set key inside right top reverse samplen .00
unset key
set yrange [-2147483648.:2147483648.]
set palette model RGB defined (-0.8'#ff0000',-0.6'#ffa500',-0.4'#a0ff20',-0.2'#00ff00',0'#006400',0.2'#00ff00',0.4'#a0ff20',.6'#ffa500',0.8'#ff0000') maxcolors 128
set cbrange [-2147483648.:2147483648.]
set style fill solid
set label 1 'Min/Max Level' at graph .5,.9 center front
plot '${qctools_CONFIGFILE_A}' using 1:2:2 with boxes palette title 'Max Level', '' using 1:3:3 with boxes palette title 'Min Level'
unset cbrange
unset x2tics
set yrange [-70:0]
set cbrange [0:-50.]
set palette model RGB defined (-50'#006400',-35'#00ff00',-15'#a0ff20',-5'#ffa500',-0.5'#ff0000') maxcolors 128
set style line 15 linecolor palette lw 4
set label 1 'Peak Level (dB)' at graph .5,.9 front
plot '' using 1:4:4 with lines ls 15 title 'Peak Level (dB)'
unset yrange
unset cbrange
set palette model RGB defined (-0.8'#ff0000',-0.6'#ffa500',-0.4'#a0ff20',0'#00ff00',1'#006400') maxcolors 128
set cbrange [-0.8:1]
set yrange [-1:1]
set style line 25 linecolor palette lw 4
set label 1 'Audio Phase' at graph .5,.9 front
plot '' using 1:5:5 with lines ls 25 title 'Audio Phase'
unset yrange
unset cbrange
set palette model RGB defined (0'#006400',0.01'#00ff00',0.02'#a0ff20',.04'#ffa500',0.05'#ff0000') maxcolors 128
set cbrange [0:.03]
set palette model RGB defined (0'#006400',0.01'#00ff00',0.02'#fffb20',.04'#ffa500',0.05'#ff0000') maxcolors 128
set cbrange [0:.05]
set yrange [0:.1]
set label 1 '% Outside of Broadcast Range' at graph .5,.9 front
plot '${qctools_CONFIGFILE_V}' using 1:3:3 with boxes palette title '% Outside of Broadcast Range'
unset yrange
set style line 10 linecolor '#804080' lw 2
set label 1 '% Temporal OUTliers' at graph .5,.9 front
plot '' using 1:2 with lines ls 10 title '% Temporal OUTliers'
unset yrange
unset cbrange
Expand All @@ -584,14 +591,18 @@ _qcgraphimage(){
set yrange ${SATyrange}
set palette model RGB defined ${SATpalette} maxcolors 128
set cbrange ${SATcbrange}
unset label
set key at graph 1.06,.5 center vertical Left noopaque noreverse font 'times,9'
set label 1 'Saturation Level' at graph .5,.9 center front
plot '' using 1:4:4 with boxes palette title 'SatMax', '' using 1:5 with lines ls 5 title 'SatAvg'
unset yrange
unset cbrange
unset xtics
unset key
set key at graph 1.07,.8 noreverse samplen 1
set key at graph 1.06,.5 right vertical Right noopaque noreverse
set x2tics border mirror in scale 1.5,.7 format ''
set xtics border out nomirror format '%tH:%tM:%.1tS' time
set label 1 'Structural SImilarity Metric' at graph .5,.1 center front
plot '' using 1:6 with lines ls 5 title 'SSIM-Y', '' using 1:7 with lines ls 2 title 'SSIM-U', '' using 1:8 with lines ls 6 title 'SSIM-V'
" | gnuplot
}
Expand Down

0 comments on commit 7dc0f13

Please sign in to comment.