Here you can find the source of subtractImages(float[][] top, float[][] base)
Parameter | Description |
---|---|
top | the top image |
base | the base image |
public static float[][] subtractImages(float[][] top, float[][] base)
//package com.java2s; //License from project: Open Source License public class Main { /**//w ww. ja v a 2 s . c o m * Subtracts two images from each other * @param top the top image * @param base the base image * @return top - base */ public static float[][] subtractImages(float[][] top, float[][] base) { int row_count = top.length; int column_count = top[0].length; float[][] subtracted_image_mat = new float[row_count][column_count]; for (int row = 0; row < row_count; row++) { for (int column = 0; column < column_count; column++) { subtracted_image_mat[row][column] = top[row][column] - base[row][column]; } } return subtracted_image_mat; } }