Here you can find the source of averageLuminance(double[] luminance)
Parameter | Description |
---|---|
luminance | a parameter |
private static double averageLuminance(double[] luminance)
//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; } }