| With the progress of the radiation therapy and image processing, image-guided radiation therapy (IGRT) must be the leading technology of radiation therapy in the 21st century. Camera-based IGRT is used to realize precise radiation therapy by automatically positioning and repositioning, and detecting the patient's position. And it is very promising in this field. In the paper, we chose the active ranging which is based on bio-stereo vision, and extract the marks with image segmentation, match them by techniques of image matching and some pre-experience, and finally reconstruct corresponding 3D points. The most difficulty of this paper is camera calibration and image matching which is also our main work. The system is very strict in precision, and the paper is to assure the system precision according to two aspects: camera calibration and image matching. After analyzing a lot of experiments, a new algorithm has been presented to optimize the calibration of the system in one by a nonlinear method according to the initial camera parameters obtained from calibrating cameras respectively. In order to assure matching, a new matching method consisting of several algorithms has been proposed to avoid the failure of 3D reconstruction. The method first gets a set of candidate matching points in the other image for a feature point with epipolar constraint, and reorders the candidate points with similarity constraint, and finally determines the best correspondence for every feature point. The algorithms in this paper will meet the requirement of automatically positioning and repositioning in radiation therapy. |