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.
for (i = 0;i < img1.rows;i++) {
for (j = 0;j < img1.cols;j++) {
img1.at<Vec3b>(i, j) = Vec3b(255, 105, 240);
}
}
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.