title: Detect the edge where a lattice changes orientation
body: <p>Rendering the results of a molecular dynamics simulation I've got an image like this,</p>
  
  <p><a href="https://i.stack.imgur.com/EZlLv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EZlLv.jpg" alt="enter image description here"></a></p>
  
  <p>where the little spheres represent the atoms of the structure. My goal is to identify the nanoparticles that are distinguishable by the orientation change of the lattice.<br>
  For example, I'd like to recognize the edges marked in red, where the lattice changes orientation. </p>
  
  <p>I could apply classification methods directly on the simulation results, rather then render them and analyze the resulting image. But it is not my purpose, because I need a general method suitable for experimental (AFM) images (where the atoms' positions are not given) as well.  </p>
  
  <p><a href="https://i.stack.imgur.com/tOlcd.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tOlcd.gif" alt="AFM image"></a></p>
  
  <p>I've tried classical edge detection methods (openCV2/python), they identify the edges of every sigle atom, but do not detect the edges of the nanoparticles where the chage of orientation occurs.  </p>