title: Check for similarity on different size images
body: <p>I have a video source that produce many streams for different devices (such as: HD television, Pads, smart phones, etc.), every of them has to be checked within each other for similarity. The video stream release 50 images per second, one image every 20 milliseconds.</p>
  
  <p>Lets take for instance img1 coming from stream1 at time ts1=1, img2 coming from stream2 at ts2=1 and img1.1 taken from stream1 at ts=2 (20 milliseconds later than ts=1), the comparison result should look something like this:</p>
  
  <p>compare(img1, img1) =   1          same image same size</p>
  
  <p>compare(img1, img2) =   0.9       same image different size</p>
  
  <p>compare(img1, img1.1) =     0.8       different images same size</p>
  
  <p>ideally this should be done real time, so within 20 millisecond, the goal is to understand if the streams are out of synchronization, I already implemented some compare methods (nobody of them works for this case yet):</p>
  
  <p>1) histogram (SSE and OpenCV cuda), result compare(img1, img2) ~= compare(img1, img1.1)</p>
  
  <p>2) pnsr (SSE and OCV cuda), result compare(img1, img2) &lt; compare(img1, img1.1)</p>
  
  <p>3) ssim (SSE and OCV cuda), resulting the same as pnsr</p>
  
  <p>Maybe I get bad results because of the resize interpolation method?</p>
  
  <p>Is it possible to realize a comparison method that fulfill my requirements, any ideas?</p>