PURPOSE: The purpose of this study is to develop a practical method for determining accurate marker positions for prostate cancer radiotherapy using CT images and kV x-ray images obtained from the use of the on-board imager (OBI). MATERIALS AND METHODS: Three gold seed markers were implanted into the reference position inside a prostate gland by a urologist. Multiple digital image processing techniques were used to determine seed marker position and the center-of-mass (COM) technique was employed to determine a representative reference seed marker position. A setup discrepancy can be estimated by comparing a computed COMOBI with the reference COMCT. A proposed algorithm was applied to a seed phantom and to four prostate cancer patients with seed implants treated in our clinic. RESULTS: In the phantom study, the calculated COMCT and COMOBI agreed with COMactual within a millimeter. The algorithm also could localize each seed marker correctly and calculated COMCT and COMOBI for all CT and kV x-ray image sets, respectively. Discrepancies of setup errors between 2D-2D matching results using the OBI application and results using the proposed algorithm were less than one millimeter for each axis. The setup error of each patient was in the range of 0.1+/-2.7~1.8+/-6.6 mm in the AP direction, 0.8+/-1.6~2.0+/-2.7 mm in the SI direction and -0.9+/-1.5~2.8+/-3.0 mm in the lateral direction, even though the setup error was quite patient dependent. CONCLUSION: As it took less than 10 seconds to evaluate a setup discrepancy, it can be helpful to reduce the setup correction time while minimizing subjective factors that may be user dependent. However, the on-line correction process should be integrated into the treatment machine control system for a more reliable procedure.