Device (100) for determining a
joint angle of a trailer (420; 510, 601) in relation to a vehicle, the device comprising: at least a memory, (103) comprising computer-
executable instructions; and at least one processor (101) configured to read and execute the computer-
executable instructions, wherein the computer-
executable instructions cause the at least one processor (101) to: detect an area of a trailer (420; 510; 601) based on a first image (306; 441; 501) of the trailer (420; 510; 601) captured at a first distance, and generate a first bounding frame (302, 431, 511) around the detected area of the trailer (420; 510; 601) in the first image (306; 441; 501); detect the area of the trailer (420; 510; 601) based on a second image (307; 442; 502) of the trailer (420; 510;601), which was recorded at a second distance, and generating a second bounding frame (303; 432, 512) around the detected area of the trailer (420; 510; 601) in the second image (307; 442; 502); Determining a first set of feature points in the first bounding frame (302, 431, 511) and a second set of feature points in the second bounding frame (303; 432, 512) corresponding to the first set of feature points; Determining a correspondence between the first set of feature points and the second set of feature points and a correspondence between the corners of the first bounding frame (302, 431, 511) and the corners of the second bounding frame (303; 432, 512); Estimating at least one dimension of the trailer (420; 510; 601) by performing a
least squares analysis to obtain three-dimensional coordinates (309; 407) of the real world of the first and second sets of feature points and the vertices of the first and second bounding frames (303;432, 512); wherein the computer-executable instructions cause the at least one processor (101) to determine an articulation angle of the trailer (420; 510; 601) with respect to a line through a center of the vehicle (410) based on the estimated at least one dimension and the three-dimensional coordinates (309; 407) of the real world.;