title: Covariogram Method for a Binary Image in R
body: <p>I am trying to obtain a covariogram plot in order to calculate some values over it. Here is the work which is done before; <a href="https://www.ias-iss.org/ojs/IAS/article/viewFile/872/775" rel="nofollow noreferrer">Quantitative Analysis of Banded Structures in Dual-Phase Steels</a> </p>
  
  <blockquote>
    <p>Just read the 2. page, that will be enough to understand the method.</p>
  </blockquote>
  
  <p>There is an image for illustrating the method in this document as follows:
  <a href="https://i.stack.imgur.com/3cxVi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3cxVi.jpg" alt="Covariogram"></a> </p>
  
  <p>You can see that the authors used an image in the example on plot, then they obtained that plot.</p>
  
  <p>Here is the image that I am using, as a binary image:
  <a href="https://i.stack.imgur.com/YMBQO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YMBQO.jpg" alt="My Image"></a> </p>
  
  <p>I just want to obtain that plot by using my image.</p>
  
  <p>Code: </p>
  
  <pre><code>setwd(".../Project/R/Workspace/Task1")
  library("EBImage", lib.loc="~/R/win-library/3.2")
  img &lt;- readImage(".../Project/Beispielbilder/example.jpg")
  display(img,  title='Image')
  M &lt;- img_ithr
  plot(cov(M),xlim=c(0,1), ylim=c(0,300))
  </code></pre>
  
  <p>Thank you for your help and time, people.</p>