As presented in Section 3, there are several steps comprising the whole calibration process and each step will operate some devices according to its workflow. So it is necessary to encapsulate these sequential operations into a function module which can be integrated and called by user interface layer or other applications. The function module can realise device operations just by setting properties and calling methods from the corresponding device COM component as described above. The application in user interface layer can exchange information between the user and the program. It can receive user’s instructions, calling subroutines in function module layer, calculating the results, displaying the running status and the results and generating final report, etc. It should also have the capability of fault tolerance which means if some errors happen during the calibration process the application can find and deal with them. V. IMAGE RECOGNITION TECHNOLOGY In the whole automatic calibration process, the most difficult step is to obtain the measured values of SLM. As described in Section 1, the methods provided in [5, 6] could only deal with the SLMs which have electrical output interface. However, quite a lot of SLMs don’t have the interface so that these methods can’t be applied more widely. In order to solve this key problem, we provide a novel method based on image recognition technology. A camera is placed just above the screen of the SLM and it can capture the image and transfer it to the computer at the time when receiving a command from the computer. Then the computer extracts the figures from captured image and sends them to other software modules. The image recognition process as shown in Figure 4 can be divided into four steps including pre-processing, image segmentation, feature extraction and comparison recognition. The pre-processing step is to exclude interferences or noise, such as CMOS noise and optical reflection of display screen, etc, to ensure the correct feature extraction. The image segmentation step uses the projection method to separate each digital from the image. The feature extraction step and comparison recognition step are to analyse the features of the image and compare them with the feature template to obtain the final result of the recognition process respectively.