1 | initial version |
DPI are used to print, scan or display ... from/to real world. DPI is a scale factor to convert inches coordinates into pixel coordinates and back.
OpenCV doesn't know about DPI it just uses matrix cols and rows as pixel coordinates x,y. If you have coordinates in inches and you know source DPI you can convert them in rows and cols:
x_px = x_inch * DPI
y_px = y_inch * DPI
Remember that in OpenCV
0,0
is top leftX
are columns and increases on the rightY
are rows and increases on the bottom