To provide stroke patients with good rehabilitation training, the rehabilitation robot should ensure that each joint of the limb of the patient does not exceed its joint range of motion. Based on the machine vision combined with an RGB-Depth (RGB-D) camera, a convenient and quick human-machine interaction method to measure the lower limb joint range of motion of the stroke patient is proposed. By analyzing the principle of the RGB-D camera, the transformation relationship between the camera coordinate system and the pixel coordinate system in the image is established. Through the markers on the human body and chair on the rehabilitation robot, an RGB-D camera is used to obtain their image data with relative position. The threshold segmentation method is used to process the image. Through the analysis of the image data with the least square method and the vector product method, the range of motion of the hip joint, knee joint in the sagittal plane, and hip joint in the coronal plane could be obtained. Finally, to verify the effectiveness of the proposed method for measuring the lower limb joint range of motion of human, the mechanical leg joint range of motion from a lower limb rehabilitation robot, which will be measured by the angular transducers and the RGB-D camera, was used as the control group and experiment group for comparison. The angle difference in the sagittal plane measured by the proposed detection method and angle sensor is relatively conservative, and the maximum measurement error is not more than 2.2 degrees. The angle difference in the coronal plane between the angle at the peak obtained by the designed detection system and the angle sensor is not more than 2.65 degrees. This paper provides an important and valuable reference for the future rehabilitation robot to set each joint range of motion limited in the safe workspace of the patient.