Osteoporosis is a bone disease in which the amount of bone is decreased and the structural integrity of trabecular bone is impaired and cortical bone becomes more porous and thinner. This makes the bone weaker and more likely to fracture. This paper proposes a method to measure the effectiveness of treatment of osteoporosis by analyzing medical images. The proposed method measures the density changes in the cortical and the trabecular bones by analyzing medical images, which were acquired by computer tomography at different time intervals. The main advantage of the proposed method is that the cortical and the trabecular bone extraction algorithm is fully automatic and it can be used for further analysis of bone microstructure.