Calculate image width
cv2.selectROI() returns a 2D rectangle with (x, y, width, height) (see the Rect constructor - that object is created from selectROI()).

So, if you want to measure the apparent width in pixels, you need marker[2].