The invention provides for a medical apparatus (100, 300, 400) comprising a subject support (102) configured for moving a subject (106) from a first position (124) to a second position (130) along a linear path (134). The subject support comprises a support surface (108) for receiving the subject. The subject support is further configured for positioning the subject support in at least one intermediate position (128). The subject support is configured for measuring a displacement (132) along the linear path between the first position and the at least one intermediate position. Each of the at least one intermediate position is located between the first position and the second position. The medical apparatus further comprises a camera (110) configured for imaging the support surface in the first position. Execution of machine executable instructions 116 cause the a processor (116) controlling the medical apparatus to: acquire (200) an initial image (142) with the camera when the subject support is in the first position; control (202) the subject support to move the subject support from the first position to the second position; acquire (204) at least one intermediate image (144) with the camera and the displacement for each of the at least one intermediate image as the subject support is moved from the first position to the second position; and calculate (206) a height profile (150, 600, 604) of the subject by comparing the initial image and the at least one intermediate image. The height profile is at least partially calculated using the displacement. The height profile is descriptive of the spatially dependent height of the subject above the support surface.