-2

i have a problem with a C program. I want to set a color to my image, load with the openCV library. But i founded only this function that set all the image to one solid color. At this page:

How to fill OpenCV image with one solid color?

But i want to set only my given (i,j) pixel. How could i do?

Thanks

EDIT: ( i are my rows, j my columns ) And <Vec3b> is for what? Because i received this errors:

3Drenderer.c:120:49: error: request for member ‘at’ in something not a structure or union 3Drenderer.c:120:53: error: ‘Vec3b’ undeclared (first use in this function) 3Drenderer.c:120:53: note: each undeclared identifier is reported only once for each function it appears in 3Drenderer.c:120:73: error: ‘B’ undeclared (first use in this function) 3Drenderer.c:121:75: error: request for member ‘at’ in something not a structure or union 3Drenderer.c:121:101: error: ‘G’ undeclared (first use in this function) 3Drenderer.c:122:49: error: request for member ‘at’ in something not a structure or union 3Drenderer.c:122:77: error: ‘R’ undeclared (first use in this function)

Community
  • 1
  • 1
Mattia Baldari
  • 567
  • 1
  • 5
  • 15

1 Answers1

0

If your image is named I

I.at<Vec3b>(j,i) = Vec3b(B,G,R);
Olotiar
  • 3,225
  • 1
  • 18
  • 37