title: Translate image by very small step by OpenCV in C++
body: <p>I'm doing image translation by very small step sizes (like translate in column by 1/1024)</p>
  
  <p>Consider I have the following image (I create the image with "Mat" in opencv and with the type CV_64F):</p>
  
  <pre><code>255  0
   0   0
  </code></pre>
  
  <p>Now by doing translation in column by (1/1024) I would expect the following:</p>
  
  <pre><code>254.7509765625 0.2490234375
       0               0
  </code></pre>
  
  <p>But what I get is the same source image!:</p>
  
  <pre><code>255  0
   0   0 
  </code></pre>
  
  <p>How can I get the expected result?</p>
  
  <p>Here is the code I'm doing the translation:</p>
  
  <pre><code>Mat sourceImg = (Mat_&lt;double&gt;(2, 2) &lt;&lt; 255.0, 0, 0, 0);
  double translateColumn, translateRow;
  translateColumn = 1.0/1024.0;
  translateRow = 0.0;   
  
  Mat translationMatrix = (Mat_&lt;double&gt;(2, 3) &lt;&lt; 1, 0, translateColumn, 0, 1, translateRow);
  
  Mat translatedImage;
  warpAffine(sourceImage, translatedImage, translationMatrix , sourceImage.size());
  </code></pre>
  
  <p>Any idea would be appreciated. </p>