title: Euclidean Distance in Image Comparison
body: <p>I am trying to compare images based on their <a href="https://en.wikipedia.org/wiki/Euclidean_distance" rel="nofollow">Euclidean Distance</a>. I have come across this pseudo code:</p>
  
  <pre><code>sqrt((r1-r2)^2 + (g1-g2)^2 + (b1-b2)^2)
  </code></pre>
  
  <p>What I am trying to figure out is- in the pseudo code above, does <code>(r1-r2)</code> mean: subtract <strong>red</strong> values in <strong>image-1</strong> from the <strong>red</strong> values in <strong>image-2</strong>?</p>