How to change the color of each pixel of image using openCV : <p>I am new in OpenCV. I have a image what I want is to change the color of each and every pixel of image with any single color.
I found that code but when I run this part of code then a exception is generated.</p>

<pre><code>for (i = 0;i &lt; img1.rows;i++) {
    for (j = 0;j &lt; img1.cols;j++) {
        img1.at&lt;Vec3b&gt;(i, j) = Vec3b(255, 105, 240);
    }
}
</code></pre>

<p>Can anyone please tell me the solution.
Or what I found is that this take a lot of time for the conversion So if their is any other approach then please tell me.</p>
