Java Array Divide divideImage(float[][] base, float[][] divisor)

Here you can find the source of divideImage(float[][] base, float[][] divisor)

Description

Calculates the value of one image divided by another, pixel by pixel

License

Open Source License

Parameter

Parameter Description
base the numerator image
divisor the denominator image

Return

base / divisor

Declaration

public static float[][] divideImage(float[][] base, float[][] divisor) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from w  w w .  ja va2  s  . c  o  m
     * Calculates the value of one image divided by another, pixel by pixel
     * @param base the numerator image
     * @param divisor the denominator image
     * @return base / divisor
     */
    public static float[][] divideImage(float[][] base, float[][] divisor) {
        float[][] output = new float[base.length][base[0].length];
        for (int i = 0; i < base.length; i++) {
            for (int j = 0; j < base[0].length; j++) {
                output[i][j] = base[i][j] / divisor[i][j];
            }
        }
        return output;
    }
}

Related

  1. divideElements(final int j, final int numRows, final double[] u, final int startU, final double realA, final double imagA)
  2. divideElements(final int j, final int numRows, final float[] u, final float u_0)
  3. divideElements4arg(final int j, final int numRows, final double[] u, final double u_0)
  4. divideElements_Bcol(int j, int numRows, int numCols, double[] u, double b[], int startB, double u_0)
  5. divideElementwise(int[] a, int[] b)
  6. divideInPlace(double denominator, double[] target)
  7. divideInPlace(float[] vector, float val)
  8. divideIntoChunks(Object[] objs, int chunkSize)
  9. divideNonSingular(int[] array1, int[] array2)