Java Array Average averageLuminance(double[] luminance)

Here you can find the source of averageLuminance(double[] luminance)

Description

average Luminance

License

Open Source License

Parameter

Parameter Description
luminance a parameter

Declaration

private static double averageLuminance(double[] luminance) 

Method Source Code

//package com.java2s;
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* COPYRIGHT 2016.  ALL RIGHTS RESERVED.  THIS MODULE CONTAINS
* CHARTER COMMUNICATIONS CONFIDENTIAL AND PROPRIETARY INFORMATION.
* THE INFORMATION CONTAINED HEREIN IS GOVERNED BY LICENSE AND
* SHALL NOT BE DISTRIBUTED OR COPIED WITHOUT WRITTEN PERMISSION
* FROM CHARTER COMMUNICATIONS./*w w w .  j  a  va 2 s  .  c o m*/
*
* Author:  Nagaraju.Meka
* File:    CommonFunctions.java
* Created: Dec 06, 2016
*
* Description: Class to help normalize startup and usage of
* retrieving the objects from Jenkins/Properties file.
*
*
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/

public class Main {
    /**
     * 
     * @param luminance
     * @return
     */
    private static double averageLuminance(double[] luminance) {
        double avgLum = 0;
        for (double element : luminance) {
            avgLum += element;
        }
        avgLum = avgLum / luminance.length;
        return avgLum;
    }
}

Related

  1. average(long[] vals)
  2. average(Number[] numbers)
  3. average1(double[] d)
  4. average4RGBA(int var0, int var1, int var2, int var3)
  5. averageChroma(float[] chromaSums, int countChromas)
  6. averageNonZeros(int[] array)
  7. averagePt(double[][] ndPoints)
  8. averageX(long[][] intImg, int width, int height, int i, int j, int dl, int dr)
  9. avg(byte[] values)