Answer the question
In order to leave comments, you need to log in
How to get the RGB value of the XY coordinates of an image using opencv?
All libraries are connected correctly, at least they work.
Here is the code:
int main(){
Mat image = imread("C:\\png\\1.jpg");
Point3_<uchar>* p = image.ptr<Point3_<uchar> >(1, 1);
cout << "RGB: " << p->z << " " << p->y << " " << p->x;
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question