Change single pixel color in openCV
<p>I am trying to read specific pixel-colors with openCV from a cv::mat, but i get different results for the same color. So i tried to test to write pixel colors, which results also in strange colors that differs from my input.
for reading pixel colors i use:   </p>

<pre><code>Mat dst;
struct  {
    Vec3b colorrgb[10];
} RGBscan;
int aktivy[11] = {0, 430, 200, 170, 140, 200, 420, 670, 725, 725, 670};
int aktivx[11] = {0, 50, 200, 480, 920, 1200, 1360, 1200, 880, 540, 220};
for (int i = 1; i &lt; 11; i++) {
    RGBscan.colorrgb[i] = dst.at&lt;Vec3b&gt;(aktivy[i], aktivx[i]);
    cout &lt;&lt; "rgbcode: " &lt;&lt; RGBscan.colorrgb[i] &lt;&lt; "  x: " &lt;&lt; aktivx[i] 
         &lt;&lt; "  y: " &lt;&lt; aktivy[i] &lt;&lt; "\n";
};
</code></pre>

<p>though some of the pixels contain the same color in the cv::Mat dst i get different results in the command line. </p>

<p>Also, when i try so set the pixel to another color with:</p>

<pre><code>dst.at&lt;Vec3b&gt;(436, 50) = 255, 255, 255;
dst.at&lt;Vec3b&gt;(437, 50) = 255, 255, 255;
dst.at&lt;Vec3b&gt;(438, 50) = 255, 255, 255;
dst.at&lt;Vec3b&gt;(439, 50) = 0, 0, 0;
dst.at&lt;Vec3b&gt;(440, 50) = 0, 0, 0;
</code></pre>

<p>i get a different color printed on the picture.
When i check the printed pixels with gimp, 
(255, 255, 255) is now: (255, 110, 110)
and (0, 0, 0) is: (0, 210, 210).</p>

<p>The original color of these pixels is in RGB (210, 210, 210).</p>

<p>I just don't get what i'm doing wrong. Appreciate your help! :)</p>