Statistics
| Revision:

root / org.gvsig.toolbox / trunk / org.gvsig.toolbox / org.gvsig.toolbox.algorithm / src / main / java / es / unex / sextante / imageAnalysis / texture / features / TextureASMAlgorithm.java @ 59

History | View | Annotate | Download (744 Bytes)

1
package es.unex.sextante.imageAnalysis.texture.features;
2

    
3
import es.unex.sextante.core.Sextante;
4
import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm;
5

    
6
public class TextureASMAlgorithm
7
         extends
8
            BaseTextureAnalysisAlgorithm {
9

    
10
   @Override
11
   public void defineCharacteristics() {
12

    
13
      super.defineCharacteristics();
14

    
15
      this.setName(Sextante.getText("Texture_ASM"));
16

    
17
   }
18

    
19

    
20
   @Override
21
   protected double getTextureFeature() {
22

    
23
      double dASM = 0;
24
      for (int i = 0; i < GRAYSCALE_LEVELS; i++) {
25
         for (int j = 0; j < GRAYSCALE_LEVELS; j++) {
26
            dASM += (m_GLCM[i][j] * m_GLCM[i][j]);
27
         }
28
      }
29

    
30
      return dASM;
31

    
32
   }
33

    
34
}