Here you can find the source of divideImage(float[][] base, float[][] divisor)
Parameter | Description |
---|---|
base | the numerator image |
divisor | the denominator image |
public static float[][] divideImage(float[][] base, float[][] divisor)
//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; } }