Popular recipes tagged "yuv"http://code.activestate.com/recipes/tags/yuv/2011-04-08T07:26:45-07:00ActiveState Code RecipesA script evaluating PSNR metric of two YUV420 frames (Python)
2011-04-08T07:26:45-07:00Denis Gorodetskiyhttp://code.activestate.com/recipes/users/4177587/http://code.activestate.com/recipes/577645-a-script-evaluating-psnr-metric-of-two-yuv420-fram/
<p style="color: grey">
Python
recipe 577645
by <a href="/recipes/users/4177587/">Denis Gorodetskiy</a>
(<a href="/recipes/tags/comparison/">comparison</a>, <a href="/recipes/tags/difference/">difference</a>, <a href="/recipes/tags/frame/">frame</a>, <a href="/recipes/tags/metric/">metric</a>, <a href="/recipes/tags/psnr/">psnr</a>, <a href="/recipes/tags/video/">video</a>, <a href="/recipes/tags/yuv/">yuv</a>).
Revision 2.
</p>
<p>A script evaluating PSNR metric of two YUV420 frames
<strong>usage: psnr.py filename1.yuv filename2.yuv frame_width frame_height</strong></p>
<p>Alternatively if filename1 contains width and height in the form <strong>file-1200x1600.yuv</strong>,
the script will extract width and height of a frame from the filename. Then usage even simplier:
<strong>psnr.py filename1-1200x1600.yuv filename2.yuv</strong></p>