Here you can find the source of absolulteValue(float[][] image)
Parameter | Description |
---|---|
image | the input image |
public static float[][] absolulteValue(float[][] image)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w. j av a 2s. co m * Returns an image where all of the values have been absolute valued * @param image the input image * @return all values absolute valued */ public static float[][] absolulteValue(float[][] image) { float[][] out_float_mat = new float[image.length][image[0].length]; for (int i = 0; i < image.length; i++) { for (int j = 0; j < image[0].length; j++) { out_float_mat[i][j] = Math.abs(image[i][j]); } } return out_float_mat; } }