Reputation: 1
I am new at image processing and I use emgu cv with c# and I have a problem. How can I get R,G,B pixel value from RGB value from an image?
Upvotes: 0
Views: 5556
Reputation: 696
Here's what you need to get the RGB values:
//load image
Image<Bgr, byte> image = new Image<Bgr, byte>("sample.png");
//get the pixel from [row,col] = 24,24
Bgr pixel = image[24, 24];
//get the b,g,r values
double b = pixel.Blue;
double g = pixel.Green;
double r = pixel.Red;
Upvotes: 2