Calibration method and device of system for measuring corneal parameters
The invention provides a calibration method and a calibration device of a system for measuring corneal parameters, and particularly the invention provides a system calibration method and device for geometric distortion, caused by camera shooting angle when measuring cornea-related parameters, of a digital slit lamp and a system of similar principles based on machine vision. The method of the invention comprises the steps of: placing a calibration block on a calibration stand, using a slit lamp to shine light perpendicularly to the calibration block, and then photographing in a manner that four vertexes of a cross section are all within a visual range of a digital camera, so as to obtain the four corners and thus corresponding four edges of the cross section; restoring the position of a real image in the image using a ray tracing method; and then performing geometric distortion correction according to real-image coordinates of the four corners in the image and corresponding real-space lengths thereof, thus geometric distortion caused by the camera shooting angle can be eliminated, and the real dimension represented by each pixel can be obtained.
1. A calibration method of a system for measuring corneal parameters, the method comprising the steps of:
1) providing a calibration block which is a transparent cuboid;
2) shining a slit lamp on the calibration block in an optical path perpendicular to the calibration block to form an optical cross section, and using a camera to photograph at an angle deviating from the optical path of the slit lamp by a to capture an image of the optical cross section, ensuring that an upper surface, a lower surface, a front surface and a rear surface of the transparent calibration block are all within an angle of view of the camera; and
3) correcting the image using a geometric distortion correction method, and according to real three-dimensional data of the calibration block, calculating an actual distance represented by each pixel in the image in a focused and clear state, for conversion of a corneal thickness in the image to a real corneal thickness.
2. The method of claim 1 , wherein the refractive index of the calibration block is equal to or not equal to the refractive index of a cornea.
3. The method of claim 2 , wherein the refractive index of the calibration block is known in the step 1).
4. The method of claim 1 , wherein four corners of the cross section of the calibration block are within a range of the slit lamp in the step 1).
5. The method of claim 1 , wherein the four corners of the image of the cross section are obtained by using a corner detection method in image processing and then corresponding four edges are obtained in the step 3).
6. A calibration device of a system for measuring corneal parameters, the device comprising: a calibration block, a slit lamp system, a camera and a data processing unit;
wherein the calibration block is a transparent cuboid; the slit lamp system is configured for emitting light in an optical path perpendicular to the calibration block to form an optical cross section; the camera is configured for photographing at an angle deviating from the optical path of the slit lamp by a to capture an image of the optical cross section, which angle is the same as a shooting angle for measuring cornea-related parameters, and transmitting the captured image to the data processing unit; and the data processing unit calibrates the image based on the captured image of the cross section using a geometric distortion correction method, and according to real three-dimensional data of the calibration block, calculates an actual distance represented by each pixel in the image in a focused and clear state, for conversion of a corneal thickness in the image to a real corneal thickness.
7. The device of claim 6 , wherein the refractive index of the calibration block is equal to or not equal to the refractive index of a cornea.
8. The device of claim 6 , wherein the refractive index of the calibration block is known.
9. The device of claim 6 , wherein four corners of the cross section of the calibration block are within a range of the slit lamp.
10. The device of claim 6 , wherein the device is configured to perform the method of claim 1 .