| As a new method to diagnose tuberculosis infection,T-SPOT.TB is usually determined by manual counting,which is not only inefficient,but also affected by subjective factors.In this paper,a T-SPOT automatic detection platform is designed and developed,which can realize the collection of T-SPOT.TB plates by hole,detection and report generation.The automatic detection platform reduces the manual workload and improves the detection and diagnosis efficiency.According to the actual functional requirements,an automatic detection platform composed of a vision system and a motion platform is designed and built.The overall control system architecture of "PC + motion controller + motion platform" is established.A real-time communication network of upper and lower computers based on CAN bus is built.The workflow of automatic detection platform is designed as follows: taking in T-SPOT.TB plates → locating A1 reagent hole → centering calibration of A1 reagent hole → image acquisition and image processing →locating A2 reagent hole →…→ image acquisition and image processing of the last reagent hole → generating test report → exiting T-SPOT.TB plate.In the aspect of motion control,an motion controller based on STM32F407VGT6 chip is designed in this paper.The hardware circuit includes the minimum system circuit,power supply circuit,stepper motor control signal interface circuit,sensor signal interface circuit and communication module circuit.The PCB design and sample making is completed.The software program includes the transplantation of μC/OS-II real-time operating system,stepper motor motion control and can bus communication,which realizes the control of the motion platform and the communication with the host computer.In the aspect of image processing,in this paper,the area to be detected in the T-SPOT image is extracted by automatic threshold segmentation,edge contour extraction,edge contour screening and edge fitting.Spots segmentation is realized by the method of combining distance transform and watershed algorithm.Then the number of spots after segmentation is counted.Through the function test of each module of the control system and the whole machine test of the automatic detection platform,it is proved that the platform can achieve the original design goal.The automatic detection platform system runs stably during the whole machine test.The final determination accuracy is 96.53%.It can replace manual counting and has certain practical application value. |