Member • Mar 26, 2014
PSNR code in java not working plzz help
*********************************************************************
*/ import java.io.*; public class Psnr { public static double log10(double x) { return Math.log(x)/Math.log(10); } public static void main (String[] args) { int nrows, ncols; int img1[][], img2[][]; double peak, signal, noise, mse; if (args.length != 4) { System.out.println("Usage: Psnr"); return; } nrows = Integer.parseInt(args[0]); ncols = Integer.parseInt(args[1]); img1 = new int[nrows][ncols]; img2 = new int[nrows][ncols]; ArrayIO.readByteArray(args[2], img1, nrows, ncols); ArrayIO.readByteArray(args[3], img2, nrows, ncols); signal = noise = peak = 0; for (int i=0; i