~repos /gdx-studio
git clone https://pyrossh.dev/repos/gdx-studio.git
An IDE for creating Games using libgdx and Java supported on all platforms Android, iOS, Desktop
src_libs/com/github/axet/lookup/common/ImageZeroMean.java
package com.github.axet.lookup.common;
/** * Zero Mean Image is an image where every pixel in the image substracted by * mean value of the image. Mean value of the image is sum of all pixels values * devided by number of pixels. * * @author axet * */public class ImageZeroMean extends SArray {
double m;
public ImageZeroMean() { }
public ImageZeroMean(SArray s1) { init(s1);
for (int x = 0; x < cx; x++) { for (int y = 0; y < cy; y++) { step(x, y); } } }
public void init(SArray s1) { base = s1.base;
cx = s1.cx; cy = s1.cy;
s = new double[cx * cy];
m = s1.mean(); }
public void step(int x, int y) { s(x, y, base.s(x, y) - m); }}