Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th August 2007, 18:15   #1  |  Link
jigole
Registered User
 
Join Date: Aug 2006
Posts: 9
How to compute SAD and SSD

I need to compute PSNR, SSIM, SAD and SSD for a lot of images. For SSIM it's Ok. How to do it for SAD and SSD? I am using wmplayer but I have to close each time each file. Is there a simple way=?

I have created a batch file "run.bat"

echo LoadPlugin("rawsource.dll") > file.avs
echo LoadPlugin("CompareYV12.dll") >> file.avs
echo LoadPlugin("SSIM.dll") >> file.avs

echo img1 = rawsource("source.yuv",width=352,height=288,pixel_type="I420").trim(0,297) >> file.avs
echo img2 = rawsource("%1",width=352,height=288,pixel_type="I420") >> file.avs
echo c1=SSIM(img1,img2,"%1.ssim.txt","%1.ssim.txt",lumimask=2) >> file.avs

echo stackhorizontal(source,c1) >> file.avs
echo return

"C:\Program Files\Windows Media Player\wmplayer.exe" "file.avs"

I then use a cmd and type

for %f in (*.yuv) do run %f

Thanks!
jigole is offline   Reply With Quote
Old 26th August 2007, 18:23   #2  |  Link
jigole
Registered User
 
Join Date: Aug 2006
Posts: 9
Psnr

and I forget to compute PSNR

echo Compare(img1,img2,"","%1.psnr.log") >> file.avs

Thanks!
jigole is offline   Reply With Quote
Old 26th August 2007, 19:18   #3  |  Link
jigole
Registered User
 
Join Date: Aug 2006
Posts: 9
CompareYV12 solves my problem. Regarding the batch help with be most apreciated.
jigole is offline   Reply With Quote
Old 27th August 2007, 11:56   #4  |  Link
jigole
Registered User
 
Join Date: Aug 2006
Posts: 9
CompareYV doesn't work properly (writes only header). Is there a FAQ?
jigole is offline   Reply With Quote
Old 27th August 2007, 12:15   #5  |  Link
mitsubishi
Registered User
 
Join Date: Sep 2006
Location: UK
Posts: 416
Regarding the executing of the script, you can use vdub or avsutil, both without rendering, see here when I was doing the same thing: http://forum.doom9.org/showthread.php?t=128418&
mitsubishi is offline   Reply With Quote
Old 27th August 2007, 12:16   #6  |  Link
jigole
Registered User
 
Join Date: Aug 2006
Posts: 9
Thanks! I will try it.
jigole is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.