| With the rapid development of economy and improvement of living standards,more and more people have realized the importance of oral health.The incidence of caries is very high in the oral disease.There is a serious shortage of dentists because of the increasing number of the patients who have the problem of repairing teeth,filling teeth and so on.It is necessary to cultivate more excellent dentists to solve this problem.Specialists dental surgery video is very valuable learning resources for the students in the dentist university.Dental surgery video make patients feel more safely and relax, greatly reducing the contradiction between doctors and patients.Dental surgery video is beneficial to both dentists and patients, and has a broad market prospect.Cradle head control module and zoom control module are designed in this paper on the basis of the fixed camera, which can automatically track the moving object in dental surgery video and make monitoring target to display in the middle of the screen with the appropriate size.Dentists can use mobile to control PTZ camera manually to make sure that dental surgery can be carried out smoothly when there is something wrong with the automatic control system.The main research work is as follows.Firstly, based on the Open CV platform, Android mobile, PTZ camera and video server system and so on, we design the PTZ camera real-time automatic tracking dental surgery video system to make sure that the students can learn more things through the dental surgery video conveniently.Second, a manual control PTZ camera software is designed in this paper based on the android platform,through wireless communication,we can control the PTZ camera remotely by using cradle head control interface and the zoom control interface.The linear relationship between the lens magnification and focusing instruction numbers is summed up in the commissing tests.Third, Gray scale processing of video images and filtering to remove noisea,enhancing image effect, analysising of the advantage and disadvantage of the commonly used detection algorithm, desgning the five frame difference algorithm for moving object detection.In HSV color histogram feature model, barcycentric coordinates of each frame of video image is to obtained through the Camshift algorithm for moving target positioning and the kalman filter to forecast the target position in the next frame of the video image.Calculating the difference between the barycentric coordinates and the horizon center to make a prepare to control the cradle head.Finally, build the cradle head platform automatic tracking model and the lens automatic zoom model.Calculating the rotation angle of the cradle head platform,ifthe difference between the barycentric coordinates and the horizon center is less than the threshold,the cradle head donot rotate.If the horizontal difference is greater than the threshold and the vertical difference is less than the threshold,the cradle head only rotate in horizontal direction.If the vertical difference is greater than the threshold and the horizontal difference is less than the threshold,the cradle head only rotate in vertical direction.If the horizontal difference and the vertical difference are both greater than the threshold,the cradle head is rotated in the direction of high rotation distance.The lens automatic zoom model change zoom through the linear relationship between the lens magnification and focusing instruction numbers to ensure the target can display on the video screen center at the same size. |