示例#1
0
 private void calculateGreyValues() {
   int size = image.getPixelCount();
   int gray;
   for (int pos = 0; pos < size; pos++) {
     gray = image.get(pos);
     grayValue[pos] = (byte) (gray / GRAY_SCALE); // quantized for texture analysis
     grayHistogram[gray]++;
   }
   Arrays2.div(grayHistogram, size);
 }
示例#2
0
 public Coocurrence(ByteProcessor b, int numGrayValues, int haralickDist) {
   this.NUM_GRAY_VALUES = numGrayValues;
   this.image = b;
   this.GRAY_SCALE = (double) GRAY_RANGES / (double) NUM_GRAY_VALUES;
   this.cooccurrenceMatrices = new double[NUM_GRAY_VALUES][NUM_GRAY_VALUES];
   this.grayValue = new byte[image.getPixelCount()];
   this.grayHistogram = new double[GRAY_RANGES];
   this.HARALICK_DIST = haralickDist;
   calculate();
 }
示例#3
0
 public double getCooccurenceSums() {
   return image.getPixelCount() * 8;
 }