CrazyEngineers
  • It is psnr code that is not working ..can someone help plz
    *********************************************************************
    */
    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
                        
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Anoop Kumar

    MemberMar 26, 2014

    Did you copied this code from somewhere??
    #-Link-Snipped-#

    Clearly ArrayIO is not from standard Java library. You need to find out which library to use.
    Are you sure? This action cannot be undone.
    Cancel
  • zion

    MemberMar 26, 2014

    yeah ..copied it ..
    Are you sure? This action cannot be undone.
    Cancel
  • VimleshMishra

    MemberMar 26, 2014

    zion as anoop told ArrayIO is not from standard java library which giving error while compilation try below link #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register