This study relates to the vision module configuration and auto-focus algorithm method to accurately measure misalignment of top and bottom align-keys on the interface of bonded wafer. In general, to measure the center difference of align-keys that exists in the interface between wafers, focus on align-keys and acquire image. However, there is a height difference between align-keys of top and bottom, and the accuracy varies considerably depending on where it is focused on. To improve the accuracy, this study developed a vision module and an auto-focus algorithm to accurately focus and calculate alignkey center value differences. The vision module consists of an IR CCD camera and IR lamp to transmit wafers, a laser sensor to measure the interface between bonded wafers, and a piezo z stage to adjust the focal height. In conventional auto-focus algorithms, the Auto-Focus Value(AFV) is simply selected to find the optimal focal height. In this study, each AFV was analyzed through multi-AFV for more precise measurement, and the optimal focal height was derived based on the analyzed results. Finally, the vision repeatability was measured in the whole range in order to verify whether it was measured most precisely at the focal height derived from the auto-focus algorithm developed through this study. Each vision repeatability was calculated and compared. The results showed that the vision repeatability at the optimal focal height derived from the developed algorithm was the best. That is to say, the optimal focal height was well chosen. This research result can he used for wafer alignment when wafer to wafer bonding, and it can he actively used for misalignment measurement of bonded wafers after bonding. In addition, not only wafer level measurements, but also chip to wafer, chip to chip bonding. Also, it can be used for various vision analysis such as alignment analysis and misalignment measurement.