View Single Post
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