Question for accessing raw pixels intensity

Good day to all,
I hope you guys can help me with this question:
-Is there a way to access the pixel intensity in a raw image? (14bit/channel)

For details:
I could do it easily with .jpg through opencv by: reading the image to a matrix, then access the matrix element: image.at(row,column). However, it is a 8bit/channel image, therefore the intensity is compressed in the range of [0,255].
I would want to access the intensity of raw data (in my case 14bit/channel), is there a way to do that with LibRaw?

Thank you very much for your kind support!

Forums: 

I did not understand the

I did not understand the question. What values you want to access:
- unaltered raw data (as decoded from RAW file)
- linearized data (black level subtracted)
- processed data (w/ white balance, demosaic, data scaling applied)

?

-- Alex Tutubalin

Hi Alex,

Hi Alex,
Thank you for the quick support.
For now, I think unaltered raw data would be enough for my purpose.

Use imgdata.rawdata.*

Use imgdata.rawdata.* pointers to access data after unpack()

-- Alex Tutubalin

Please help with getting the processed data

Hi Alex,
Now I am looking for a way to get the process data where you have subtracted the black level, w/ white balance and demosaic, can you please help to explain the procedure? Thanks!