title: workflow for image analysis and metrics using RTextureMetrics
body: <p>I'm working with grayscale (0 black; 255 white) images (2560 x 2048) of surfaces and would like to extract Haralick et al 1973 metrics (ASM, contrast, etc.) using package <code>RTextureMetrics</code>.<br />
  The following are the grayscale values (0 to 255) of the initial 5 rows and columns from the matrix (a sample image):</p>
  <pre><code>Image2[1:5, 1:5]
       [,1] [,2] [,3] [,4] [,5]
  [1,]   35   33   29   29   36
  [2,]   43   41   39   40   47
  [3,]   44   44   44   47   54
  [4,]   46   49   51   54   60
  [5,]   60   64   67   68   71
  </code></pre>
  <p>From here the workflow seems quite straightforward: generate the Grey Level Co-occurrence Matrix  using <code>genGLCM()</code> and extract desired metrics.</p>
  <pre><code>library(RTextureMetrics)
  
  # Generate Grey Level Co-occurrence Matrix (direction east, distance one pixel)
  GLCM = genGLCM(1, 1, Image2)
  
  # Get desired metrics
  calcCON(GLCM)
  calcHOM(GLCM)
  calcDIS(GLCM)
  calcASM(GLCM)
  calcENT(GLCM)
  </code></pre>
  <p>However, results seem odd. Haralik et al report a maximum contrast of 4.709 while the above sample matrix has a contrast of 25.3388 (the below table shows metrics from the sample matrix). Additionally, when looping over files of images, counterintuitive results are obtained.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Cont</th>
  <th style="text-align: left;">Hom</th>
  <th style="text-align: left;">Dis</th>
  <th style="text-align: left;">ASM</th>
  <th style="text-align: left;">ENT</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">25.3388</td>
  <td style="text-align: left;">0.192384</td>
  <td style="text-align: left;">3.9036</td>
  <td style="text-align: left;">0.00028943</td>
  <td style="text-align: left;">-7.6482</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Please note that I am new to texture analysis and my experience is limited. Also have been trying package <code>glcm</code> but an initial workflow with <code>RTextureMetrics</code> seems more desireble.</p>