Image Processing with Jetson

Hello everyOne,
I am new to Cuda programming, after reading a lot over internet now i am able to run few programs over jetson.
i am using Jetson TX2 for image processing.
i want to know how i can get the Pixel intensity of Grayscale image, and store the required values in vector

looking for you support