A method of determining a transformation matrix for transformation of ranging data from a first coordinate system for a ranging sensor to a second coordinate system for an image sensor, the method comprising providing a ranging sensor and an image sensor having at least partly overlapping field of views (31, 32), acquiring, by the ranging sensor, a ranging frame sequence, and acquiring, by the image sensor, an image frame sequence, determining points of motion in frames of each of the ranging frame sequence and the image frame sequence, wherein a point of motion is determined by determining a group of motion detections and selecting or forming a point of motion to represent the group, for each frame in one of the ranging frame sequence and the image frame sequence, evaluating if a single motion point has been determined in the frame, and if a single motion point has been determined, evaluating if a single motion point has been determined in a temporally corresponding frame of the other one of the ranging frame sequence and the image frame sequence and, only in that case, pairing the temporally corresponding frames to form a frame pair, iterating the acts of acquiring a ranging frame sequence and an image frame sequence, determining points of motion, evaluating (204, 206) if single motion points have been determined, and pairing temporally corresponding frames, until a threshold number of frame pairs is reached, provided that the threshold number of frame pairs is reached, determining the transformation matrix based on the frame pairs. providing a ranging sensor and an image sensor having at least partly overlapping field of views (31, 32), acquiring, by the ranging sensor, a ranging frame sequence, and acquiring, by the image sensor, an image frame sequence, determining points of motion in frames of each of the ranging frame sequence and the image frame sequence, wherein a point of motion is determined by determining a group of motion detections and selecting or forming a point of motion to represent the group, for each frame in one of the ranging frame sequence and the image frame sequence, evaluating if a single motion point has been determined in the frame, and if a single motion point has been determined, evaluating if a single motion point has been determined in a temporally corresponding frame of the other one of the ranging frame sequence and the image frame sequence and, only in that case, pairing the temporally corresponding frames to form a frame pair, evaluating if a single motion point has been determined in the frame, and if a single motion point has been determined, evaluating if a single motion point has been determined in a temporally corresponding frame of the other one of the ranging frame sequence and the image frame sequence and, only in that case, pairing the temporally corresponding frames to form a frame pair, iterating the acts of acquiring a ranging frame sequence and an image frame sequence, determining points of motion, evaluating (204, 206) if single motion points have been determined, and pairing temporally corresponding frames, until a threshold number of frame pairs is reached, provided that the threshold number of frame pairs is reached, determining the transformation matrix based on the frame pairs.