How can I iterate through pixel indexes of a texture in materials

I want to map the kinect depth texture to real points. I have the formula and have implemented it in materials a material function.
the formula convert each X,Y of the image ( the index of each pixel in depth image texture ) to the real world X,Y. my question is that if I multiply texture coordinate node in materials with Width and height of the desired texture will I get the pixel index of a texture ? if not then how can I ?

you assumption is correct, you will get the pixel index by multiplying coordinate shared with texture to the width and height.
i have done un-distortation of kinect X and Y and is fairly simple