Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

vec3b has more than 3 elements?

I was using imread to load a 3-channel png image and accessing the bgr pixel values through: image.at<vec3b>(x,y)[0] image.at<vec3b>(x,y)[1] image.at<vec3b>(x,y)[2]

However, I found that vec3b[n] (n>=3) also contain some values. Any ideas on what these values indicate? Shouldn't vec3b only contain three values representing bgr channels?

vec3b has more than 3 elements?

I was using imread to load a 3-channel png image and accessing the bgr pixel values through: image.at<vec3b>(x,y)[0] image.at<vec3b>(x,y)[1] through:

image.at<vec3b>(x,y)[0]

image.at<vec3b>(x,y)[1]

image.at<vec3b>(x,y)[2]

However, I found that vec3b[n] (n>=3) also contain some values. Any ideas on what these values indicate? Shouldn't vec3b only contain three values representing bgr channels? channels?