Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

origin pixel in the image coordinate system in opencv

I would like to ask that what's the origin pixel in the image coordinate system used in opencv.

This is closely related to some applications which require sub-pixel accuracies.

In general there may be two kinds of such systems, for the first (0,0) is defined as the center of the upper left pixel, which means the upper left corner of the upper left pixel is (-0,5, -0.5) and the center of the image is ( (cols - 1) / 2, (rows - 1) / 2).

The other one is that (0,0) is the upper left corner of the upper left pixel, so the center of the upper left pixel is (0.5, 0.5) and the center of the image is (cols / 2, rows / 2).

My question is which system is adoted in OpenCV?