This is related to this question: What is blender's camera projection matrix model?
In the answer of this question, it is stated that the center coordinate of the blender camera is given by
u_0 = resolution_x_in_px*scale / 2 (=width/2)
v_0 = resolution_y_in_px*scale / 2 (=height/2)
I am not really sure if I interpret this correctly. If the raw coordinates of the image are given 0-based (i.e., x in [0,...,width-1] and y in [0,...,height-1]), this definition would lead to an asymmetric camera center. A symmetric camera center would be given by
u_0 = width/2 - 0.5
v_0 = height/2 - 0.5
I have tried to test this with a simple scene consisting of two black planes touching exactly at the camera center. I rendered two 16x16 image of that scene, one with an unrotated camera and one with a 180° rotated camera. The expectation is that the second image can also be generated by flipping the first image in both dimensions. This is the output:
image1 =
[[255, 255, 255, 255, 255, 255, 255, 253, 243, 241, 241, 241, 241, 241, 243, 253],
[255, 255, 255, 255, 255, 255, 255, 243, 130, 97, 97, 97, 97, 97, 130, 243],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 0, 0, 1, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 0, 1, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 1, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 96, 0, 0, 0, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 96, 1, 0, 0, 0, 0, 97, 241],
[253, 243, 241, 241, 241, 241, 241, 230, 127, 96, 97, 97, 97, 97, 130, 243],
[243, 130, 97, 97, 97, 97, 97, 125, 230, 241, 241, 241, 241, 241, 243, 253],
[241, 97, 0, 0, 0, 0, 1, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 1, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 1, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[243, 130, 97, 96, 97, 97, 97, 130, 243, 255, 255, 255, 255, 255, 255, 255],
[254, 243, 241, 241, 241, 241, 241, 243, 254, 255, 255, 255, 255, 255, 255, 255]]
image2 =
[[255, 255, 255, 255, 255, 255, 255, 253, 243, 241, 241, 241, 241, 241, 243, 253],
[255, 255, 255, 255, 255, 255, 255, 243, 130, 97, 97, 97, 97, 97, 130, 243],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 0, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 0, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 97, 0, 0, 0, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 96, 0, 0, 0, 0, 0, 97, 241],
[255, 255, 255, 255, 255, 255, 255, 241, 96, 0, 0, 0, 0, 0, 97, 241],
[253, 243, 241, 241, 241, 241, 241, 230, 127, 96, 97, 97, 97, 97, 130, 243],
[243, 130, 97, 97, 97, 97, 97, 125, 230, 241, 241, 241, 241, 241, 243, 253],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[241, 97, 0, 0, 0, 0, 0, 97, 241, 255, 255, 255, 255, 255, 255, 255],
[243, 130, 97, 96, 97, 97, 97, 130, 243, 255, 255, 255, 255, 255, 255, 255],
[253, 243, 241, 241, 241, 241, 241, 243, 254, 255, 255, 255, 255, 255, 255, 255]]
As you can see, the expectation is met (almost). Is this the correct interpretation, that the image center is (symmetrically) in the center of the image?
pixel_width / 2, pixel_height / 2) The last pixel will be at image coordinate (resx-1, resy-1) and have a corner at u, v coordinate 1, 1. Just can't come at how the centre would be(res - 1) / 2Even with placing the pixel "origin" at half pixel steps, the first is going to have a corner at uv (0, 0) and the last at uv (1, 1) you've chopped off two half pixels when calculating from centre of first to last. Add them back and guess what you get. – batFINGER Oct 25 '17 at 16:28