How to use GLSL texelFetch?
OK, I have figured out this problem.

For the texture coordinates, there are two kind of texture coordinates. One is normalized texture coordinates, which is in the range [0, 1]. The other is texel space, which is in the range [0, size), where size is the size of the texture. For texelFetch(), the texel space is used.

For lod, it means the level of detail in the mipmap. We can simply use 0 for the base level (the original size).

Thus, an example of using texelFetch() should be:

vec4 texelValue= texelFetch(texture2D, ivec2(gl_FragCoord.xy), 0);