Accessing Pixel Values of RAW 8 image

asked 2016-05-18 13:51:54 -0500

Hi all,

Im using XIMEA camera and I am capturing RAW 8 images using OpenCV 3.1.0. Therefore my images are in gray scale. Ive read a lot in forums about how to access pixel values.

When I use the following code it will give me 3 different values (R,G and B) but I dont understand why this is happening since my images are in gray scale so I should get only one value per pixel.

image.at<veb3b>(i,j)

So I used other suggestions such as the following code but what I see is a very very strange output!

image.at< unsigned char > (i,j)

I would be grateful if you guys can help me regarding this problem. I want to see all my pixel values of gray image. What type should I use? Thanks!

edit retag flag offensive close merge delete

Comments

could you please post the full code so as to make things more clearer

lama123 gravatar imagelama123 ( 2016-05-19 01:22:26 -0500 )edit