The invention relates to a method for calculating a head-to-body ratio generated by a
virtual image. According to the method, a
depth map and two color images (one is a low-definition ILD image and the other is a high-definition Ihd image, wherein the low-definition image is registered with the
depth map) are obtained. The method for obtaining the ratio of the distance of the outer
canthus of a
human body to the height of the
human body comprises the following steps of calibrating the
focal length f of a high-definition camera in the direction of the double-eye connecting line; extracting thefeature point lld of a human face in the low-definition image; extracting the feature point lhd of the human face in the high-definition image; extracting the average depth ddepth of the two eyes in the
depth map, so as to obtain the feature points lld of two eye positions; calculating the pixel
euclidean distance dpixel between the feature points of two outer
canthus in the human face in the high-definition image lhd; calculating the physical distance dphysics between the two outer
canthus; and calculating the ratio alpha of the distance between the two outer canthus to the height of the
human body. The method is fast in
image acquisition speed and can quickly complete the human body five-sense measurement. In addition, during the
image acquisition process, no radioactive substance is generated, so that the method is harmless to the human body. Meanwhile, the human body does not need to be in the naked state or worn in the approximately naked way. Therefore, the privacy of the human body is protected. The collection and the measurement do not need to be completed in a closed environment, so that the dimension space is saved. The method is beneficial to the mental states of measured people.