Improvements in or relating to slit lamps
The method automates pupil centering in slit lamps using dual algorithms to isolate and align the camera on the pupil, improving efficiency and enabling remote operation.
Patent Information
- Application Number
- GB2024005257
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-10-22
AI Technical Summary
Conventional slit lamps require time-consuming and awkward manual adjustment to focus the eyepiece and/or camera on a patient's eye for accurate examination.
A method for automatically centering a camera on a patient's pupil using dual pupil center determination algorithms that isolate darkest and lightest portions of the frame, identify potential centers, and define a final center based on the midpoint of closest potential centers, combined with a camera movement apparatus to align the camera accurately.
Enables efficient and accurate automated pupil center determination, reducing operator effort and time, and allowing for remote operation of digital slit lamps.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
The present invention relates to digital slit lamps. Particularly, but not exclusively, it relates to remote digital slit lamps (RDSLs). Background to the Invention Slit lamps are well known in the fields of ophthalmology and optometry. Conventional slit lamps comprise a light source which produces a high intensity light beam, and a mechanism by which an operator (typically an ophthalmologist or optician) can adjust manipulate said light beam so as to examine a patient’s eye. To enable operators to examine a patient’s eye, slit lamps comprise an eyepiece which can be used by the operator to examine the eye in person and / or a camera, to allow an ophthalmologist or operator to later review the frames / images and / or videos recorded by the camera so as to examine the patient’s eye. Per convention, the terms ‘frame’ and ‘image’ are used interchangeably throughout the below description. Naturally, in order to properly examine an eye, the operator must focus the eyepiece and / or camera onto the patient's eye, in order to achieve an adequate quality of image through the eyepiece and / or camera. For both traditional eyepieces and digital slit lamps with cameras, the process of moving the camera to the position of the eye of the patient can be time-consuming and awkward for the operator, which takes both time and effort on behalf of the operator. It is an objection of the present invention to provide an improved digital slit lamp in view of the above issue. Summary of the Invention According to a first aspect of the present invention, there is provided a method of centring a camera of a digital slit lamp (DSL) onto an eye of a patient, the method comprising: capturing a frame using the camera, performing a first pupil centre determination algorithm on the captured frame, the first determination algorithm comprising: isolating the darkest portions of the captured frame, using contour detection to determine the contours of the said darkest portions, determining the area and circularity of each of the contours of said darkest portions, identifying the Xd largest and / or most circular of said darkest portions, and defining the centre of each of the identified Xd darkest portions as first potential pupil centres Pn. performing a second pupil centre determination algorithm on the captured frame, the second determination algorithm comprising: isolating the lightest portions of the captured frame, clustering the lightest portions of said frame, identifying the Xr largest clusters of said lightest portions, and defining the centre of each of the Xl largest clusters as second potential pupil centres Pi.. wherein the first and second pupil centre determination algorithms are simultaneously performed in respect of the captured frame, a final pupil centre is defined as the midpoint of the closest pair of first and second potential pupil centres Pd, Pl if said first and second potential pupil centres are within a predetermined distance of one another and the camera is moved to a position where the centre of the frame is aligned with said final pupil centre, wherein if no final pupil centre has been determined in respect of a captured frame and a termination condition is not satisfied, the camera is moved, a new frame is captured, and the first and second pupil centre determination algorithms are subsequently performed on the new captured frame, or wherein if no final pupil centre has been determined in respect of a captured frame and a termination condition is satisfied, the method will terminate without finding a final pupil centre. The method may comprise moving the camera between a selection of predetermined positions. The camera may be operable to capture a frame (i.e. take an image) at the or each predetermined position. The camera may be moved to a next predetermined position if no pupil centre is found at one of the predetermined positions. Alternatively, the camera may be moved continuously. In such cases, the camera may be operable to capture a frame (i.e. take an image) at any point within the camera’s movement. The selection of predetermined positions may include an ‘average’ pupil position calculated from measured data from people’s pupil positions. The selection of predetermined positions may include an array of positions centred around said ‘average’ pupil position. The array may be in the form of concentric circles with increasing diameter. The method of the In an alternative embodiment, the camera may be operable to record and / or stream video. In such embodiments, the camera may be moved continuously in a set direction. In this embodiment, the method may be operable in respect of every frame of video. Alternatively, the methods may be operable in respect of every 2nd, 3rd, 4th, 5lh. or 10th frame of video. In a particular embodiment, the present invention is operable in respect of every 7th frame of video. In this alternative embodiment, if no final pupil centre has been determined by the time the camera has moved to an extreme position, the camera will move according to a pred-determined pattern until a final pupil centre is determined, or until another termination condition is satisfied. This may comprise moving a set distance in a direction perpendicular to the set direction and move back towards the original position. Alternative patterns comprise moving in circles around the average pupil position and moving in a snake-like pattern across a grid containing the average pupil position. In both such embodiments, the method of the first aspect of the present invention may be performed prior to focusing the camera onto the pupil. The method of the first aspect of the present invention may be performed after the camera is focused on to the pupil. In some embodiments, the method of the first aspect of the present invention may be performed both before and after the camera is focused onto the pupil. The method of the first aspect may be initiated via an appropriate control signal. The method of the first aspect of the present invention may begin with moving the camera to an initial position. The initial position may be the ‘average’ pupil position discussed above. There may be one or more predetermined positions which may be used as an initial position. In a particular embodiment, there may be two initial positions, these being the average position of a patient’s left and right pupil. In such embodiments, the control signal which initiates the method may contain information as to which of the predetermined positions are to be used in the method. The control signal may be triggered by the operator. The operator may be able to choose which pre-determined position is used via a user-actuable input means. The predetermined distance between the first and second potential pupil centres may be given in terms of pixels. The predetermined distance between the first and second potential pupil centres may be given in terms of an average iris diameter. The skilled person will understand that the predetermined distance may be different depending upon the specific parameters of the method, particularly (but not exclusively) the frame size and any frame scaling which may or may not be present. Where the predetermined distance is measured in pixels, the predetermined distance may be anywhere between 10 and 1500 pixels. The predetermined distance is between 240 and 1300 pixels. In a specific embodiment, the predetermined distance is 865 pixels. In embodiments where video is recorded and / or streamed, the predetermined number of frames for which the first and second pupil centres must be within the predetermined distance of one another may be different depending upon the specific parameters of the method. The predetermined number of frames may be one or more frames. In a preferred embodiment, the predetermined number of frames is one frame. The definition of the final pupil centre as the midpoint of the closest two first and second potential pupil centres may comprise converting the position of the final pupil centre into co-ordinates for the camera movement apparatus, thereby enabling the camera movement apparatus to move to the final pupil centre. The first pupil centre determination algorithm may comprise applying a Gaussian blur. It will be understood by the skilled person that this serves to reduce the noise of the frame, thereby aiding the identification of the darkest and lightest portions. The first pupil centre determination algorithm may comprise converting the captured frame to greyscale. The first pupil centre determination algorithm may comprise applying histogram equalisation to the captured frame. The first pupil centre determination algorithm may be an iterative contouring algorithm. The contouring algorithm may iteratively find any contours of the darkest regions and compute their circularity until one or more conditions are met in respect of the contours. The contouring algorithm may iteratively repeat until the largest area defined by a contour is above a predetermined value. The predetermined value for the largest area defined by a contour may be defined in relation to average pupil size. The predetermined value for the largest area defined by a contour may be anywhere between 0.01 and 1 (when defined as a fractional area of the average pupil size). Preferably, the predetermined value for the largest area defined by a contour is between 0.01 and 0.05. In a most preferable embodiment, the predetermined value for the largest area of a contour is -0.02. The contouring algorithm may have a second, higher predetermined value in respect of the area defined by a contour. The second, higher predetermined value in respect of the area defined by a contour may be anywhere between 0.05 and 1 (when defined as a fractional area of the average pupil size). Preferably, the predetermined value for the largest area of a contour is between 0.05 and 0.5. In a most preferable embodiment, the predetermined value for the largest area of a contour is 0.2. The contouring algorithm may iteratively repeat until the circularity of the largest area is above a predetermined value. The predetermined value for the circularity of the largest area may be anywhere between 0.05 and 1. Preferably, the predetermined value for the circularity of the largest area of a contour is between 0.1 and 0.5. In a most preferable embodiment, the predetermined value for the circularity of the largest area of a contour is 0.3. The contouring algorithm may iteratively repeat until the threshold parameter is above a predetermined value. The predetermined value for threshold parameter may be anywhere between 10 and 50 (when defined in greyscale units, as will be understood by the skilled person). The contouring algorithm may repeat iteratively until any combination of the largest area of a contour, the circularity of the largest area and the threshold parameter are above their respective predetermined values. Alternatively, the contouring algorithm may repeat iteratively until any one of largest area of a contour, the circularity of the largest area and the threshold parameter are above their respective predetermined values. In a particular embodiment, the contouring algorithm may iteratively repeat until the largest area defined by a contour is above the relevant predetermined value and the circularity of said largest area is above the relevant predetermined value. In such embodiments, if the required combination of predetermined values is not obtained, the threshold parameter is increased iteratively by a step size of 2 until the required combination of predetermined values is achieved. The second pupil centre determination algorithm may comprise converting each captured frame to greyscale. The second pupil centre determination algorithm may comprise thresholding each captured frame. The thresholding may be iterated with lower threshold values until the nonzero area is less than a predetermined value. The predetermined value may be defined in terms of pixels. The predetermined value may vary depending upon the size and scaling of the image. In such embodiments where the thresholding occurs, the thresholding may be performed prior to the clustering of the lightest portions. The lightest portions may be intended to be the reflections of one or more light sources in the patient’s pupil. In such cases, the predetermined value may depend upon the specific nature (brightness, distance form pupil, warmth of light etc.) of the or each light source, as will be understood by the skilled person. The second pupil centre determination algorithm may comprise using a known clustering algorithm. The known clustering algorithm may be DBSCAN (or any other density based algorithm), K-Means (or any other centroid based algorithm), or an alternative clustering method (such as hierarchical or distribution based). The determination of the largest cluster of lightest portions may be subject to a minimum size of cluster. The minimum size of cluster may be defined in terms of pixels. The minimum size of cluster may vary depending upon the size and scaling of the image. The minimum size of cluster may be determined by the area by pixel count of said cluster. The minimum size of cluster may be defined as any pixel count between 100 and 1500. Preferably, the minimum size of cluster may be defined as any pixel count between 500 and 1100. In a preferred embodiment, the minimum size of cluster is of radius 900. In embodiments where the lightest portions are intended to be the reflections of one or more light sources in the patient’s pupil, the minimum size of cluster may depend upon the specific nature (brightness, distance from pupil, warmth of light etc.) of the or each light source, as will be understood by the skilled person. The determination of the largest cluster of lightest portions may be subject to a maximum size of cluster. The maximum size of cluster may be defined in terms of pixels. The maximum size of cluster may vary depending upon the size and scaling of the image. The maximum size of cluster may be determined by the area by pixel count of said cluster. The maximum size of cluster may be defined as any pixel count between 100 and 10000. Preferably, the maximum size of cluster may be defined as any pixel count between 1000 and7500. In a preferred embodiment, the maximum size of cluster is of area 5850. In embodiments where the lightest portions are intended to be the reflections of one or more light sources in the patient’s pupil, the maximum size of cluster may depend upon the specific nature (brightness, distance form pupil, warmth of light etc.) of the or each light source, as will be understood by the skilled person. It will be understood that, by definition, the number of potential pupil centres Pd and Pl are equal to the respective number of darkest and lightest potions deemed suitable, i.e. Xd and Xl. As such, in the below passages, whilst Xd or Xl is used, the below passages apply equally to Pd or Pl. Xd may have a predetermined value. Alternatively, Xd may have a value determined in relation the conditions of the captured frame. It will be understood by the skilled person that image quality, size, scaling, ambient brightness, computing power and many other quantities could all affect the value of Xd, in embodiments where Xd is not predetermined. Regardless of whether Xd has a predetermined value or not, Xd may be between 1 and 10. In some embodiments, Xd is between 3 and 7. In a specific embodiment, Xd is predetermined with a value of 5. Xl may have a predetermined value. Alternatively, Xl may have a value determined in relation the conditions of the captured frame. It will be understood by the skilled person that image quality, size, scaling, ambient brightness, computing power and many other quantities could all affect the value of Xl, in embodiments where Xl is not predetermined. Regardless of whether Xl has a predetermined value or not, Xl may be between 1 and 10. In some embodiments, Xl is between 1 and 5. In a specific embodiment, Xl is predetermined with a value of 3. The termination condition may be that a predetermined number of frames have been captured without identifying the pupil centre. The predetermined number of frames may be in the range of 3 to 15. In a particular embodiment, the predetermined number of frames is 12. According to a second aspect of the present invention, there is provided a pupil centre determination algorithm comprising: isolating the darkest portions of the captured frame, using contour detection to determine the contours of the said darkest portions, determining the area and circularity of each of the contours of said darkest portions, identifying the Xd largest and / or most circular of said darkest portions, and defining the centre of each of the identified Xd darkest portions as first potential pupil centres Pd. The algorithm of the second aspect may include any optional features of the first aspect of the present invention, as desired or as required. According to a third aspect of the present invention, there is provided a pupil centre determination algorithm comprising: isolating the lightest portions of the captured frame, clustering the lightest portions of said frame, identifying the Xl largest clusters of said lightest portions, and defining the centre of each of the Xl largest clusters as second potential pupil centres Pl. The algorithm of the third aspect may include any optional features of the first aspect of the present invention, as desired or as required. Provision of the methods of the first, second and third aspects of the present invention allows for more accurate automated pupil centre determination than known in the art. This gives greater efficiency to the operator (whether in person or remote), as they do not have to manually find the pupil location, which saves the operator both time and effort. According to a fourth aspect of the present invention there is provided a digital slit lamp (DSL) configured to performing any of the first, second or third aspects of the present invention, the DSL comprising: a camera operable to capture one or more frames, a camera movement apparatus operable to move the camera; and a processing unit operable to perform the method and / or pupil centre determination algorithms of the first, second and third aspects of the present invention and control the camera movement apparatus accordingly. Preferably, the digital slit lamps (DSLs) referred to in the first and fourth aspects of the present invention are remote digital slit lamps (RDSLs). This enables the RDSL to be operated remotely, without an optician / ophthahnologist present. The DSL may comprise a chin rest for receiving the patient’s chin in use. The DSL may comprise a forehead rest for receiving the patient’s forehead in use. Together the chin and / or forehead rest (as applicable) enable the patient’s face (and hence eye / s) to remain stationary during examinations performed using the DSL. The camera may be positioned upon a movable stage. The stage may be movable in relation to the chin and / or forehead rest (in embodiments where these are present). The DSL may comprise a principal light source. The principal light source may comprise a halogen bulb. Alternatively, the principal light source may be one or more LEDs arranged in an LED module. The principal light source may be controllable by the processing unit so as to enable the DSL to perform a full range of eye examination techniques. The principal light source may have a temperature between 2000K and 3500K. Preferably, the principal light source has a temperature between 2500K and 3000K. Most preferably, the principal light source has a temperature of about 2700K. The principal light source may have a Colour Rendering Index (CRI) of at least 80. Preferably, the CRI of the principal light source is at least 90. The principal light source may be positioned adjacent a light conditioning apparatus. In such embodiments, the light conditioning apparatus may be operable to adjust the light beam emitted by the light source so as to enable the DSL perform a full range of eye examination techniques. In embodiments where the camera of the DSL is placed on a movable stage, the principal light source may be positioned on said movable stage. In such embodiments, the light conditioning apparatus may also be placed on said movable stage. The light conditioning apparatus may comprise slit height, slit width, colour and shape adjustment mechanisms, to allow corresponding adjustments to be made to the light beam. The DSL may comprise one or more additional light sources. The or each auxiliary light source may be placed adjacent to the camera. The additional light sources may be arranged to provide illumination onto the pupil of the patient and its surrounding area. In some embodiments, the or each additional light source may be arranged to produce a reflection upon the eye of the patient which is visible to the camera. This may aid in producing the lightest portions as required by the first and third aspects of the present invention, thereby increasing the accuracy of said methods. In embodiments where the camera is positioned on a movable stage, the drive means may be operable to move the movable stage. The drive means may be a stepper motor, brushed DC motor, brushless DC motor, servo motor, linear motor or the like. The drive means may be operable to move the camera and / or camera stage in multiple axes defined with reference to a co-ordinate system. Typically, the co-ordinate system comprises three mutually perpendicular axes, the axes having an origin defined as the furthest point to which the camera and / or camera stage can move to the right hand side of the patient, at the furthest point to which the camera and / or camera stage can move away from the patient, and at the lowest point to which the camera and / or camera stage can move. Spatial dimensions may be defined about this origin. In one such embodiment, the spatial dimensions define an X-axis lying substantially parallel to the plane of the patient’s eyes, a Y-axis substantially perpendicular to the plane of the patient’s eyes, and an upright Z-axis. The drive means may be operable to move the camera and / or camera stage within each of these axes independently. The DSL may comprise a control unit operable to control the function of the DSL. In particular, the control unit of the DSL may comprise a processing unit operable to process the frames captured by the camera (and, where applicable, the video recorded by the camera and / or access the live feed of the camera) so as to apply an unsharp mask using gaussian filtering to a frame, calculate this unsharp images variance, calculate the Laplacian or Sobel of a frame and calculate the variance of the found Laplacian / Sobel. The DSL may comprise a communication unit operable to transmit and receive information to / from an external control apparatus. The communication unit may be operably connected to the control unit of the DSL. The external control apparatus may comprise a user control interface. This allows a user to input control commands to the external control apparatus, and thereby control the DSL and perform an eye examination remotely. The external control apparatus may comprise a communication unit to transmit and receive information to / from the communication unit of the DSL. The transmitted information may comprise control signals corresponding to the control commands inputted to the user control interface. The control unit of the DSL may be operable in response to the control signals received from the external control apparatus. The control unit of the DSL may be operable to control drive means of the DSL. The control unit may be operable to initiate frame capture, video recording and / or video streaming using the camera. The control unit may be operable to initiate imaging, video recording and / or video streaming in response to the control signals received from the external control apparatus. The control unit may be operable to transmit any captured images and / or videos to the external control apparatus via the communication unit. The control unit may be operable to store any captured images and / or videos to a storage unit. The storage unit may comprise a local storage device. The storage unit may comprise an external storage unit. The storage unit may be cloud-based. The control unit may be operable to automate any and / or all of the functions of the DSL. This allows for the examination of the patient’s eye to be performed without an optician / ophthalmologist present. In embodiments where DSL is an RDSL, the RDSL may additionally comprise conventional controls, to allow the slit lamp to be operated in person by an operator. This allows maximal flexibility by allowing the remote digital slit lamp to be used remotely or in-person. The DSL of the fourth aspect of the present invention may be operable to perform any of the optional aspects of the first, second and third aspects of the present invention, as desired or as required. Detailed Description of the Invention In order that the invention may be more clearly understood one or more embodiments thereof will now be described, by way of example only, with reference to the accompanying drawings, of which: Figure 1 shows a flow chart depicting an embodiment a method of centring a camera of a digital slit lamp (DSL) onto an eye of a patient in accordance with a first aspect of the present invention. Figure 2 shows a flow chart depicting an embodiment of an algorithm of pupil centre determination in accordance with a second aspect of the present invention. Figure 3 shows a flow chart depicting an embodiment of an algorithm of pupil centre determination in accordance with a third aspect of the present invention. Figure 4 shows a perspective view of a digital slit lamp in accordance with a fourth aspect of the present invention. Figure 5 shows a control apparatus for the digital slit lamp shown in figure 4. Referring to figure 1, there is shown an exemplary method 1 of centring a camera on a pupil of an eye of a patient. The method 1 comprises an initial step 11 of moving the camera of the DSL to an initial position. At the initial position, a frame / image is captured (as part of the initial step 11). In an alternative embodiment, where the camera is moving, video is streamed from the camera to a processing unit. In this exemplary embodiment, the initial position is predetermined, and is the average position of the centre of a patients’ pupil. The skilled person will understand that the position of the centre of the patients’ pupil will vary patient to patient. In this embodiment, the relevant initial position is chosen by the operator who initiates the method using an appropriate control signal (not shown). Again, it will be understood by the skilled person that there are two average positions for the centre of a patients’ pupil, for the left and right eyes. The operator who initiates the method is able to choose which initial position is used (depending upon the eye being examined) by choosing the appropriate control signal. Once the camera has reached the initial position, a first pupil centre determination algorithm 12 is initiated and performed on the captured frame of step 11. In the alternative embodiments where video is streamed from the camera, and every seventh frame is captured and used for the first pupil centre determination algorithm 12. It will be understood by the skilled person that other frequencies could be used instead of every seventh frame. Figure 2 (discussed below) shows the first pupil centre determination algorithm 12 in more detail. Once the first pupil centre determination algorithm 12 has begun, a second pupil centre determination algorithm 13 is used simultaneously with the first pupil centre determination algorithm 12, upon the same captured frame from step 11. Correspondingly, for the alternative embodiments, every seventh frame of video streamed from the camera is used. Figure 3 (discussed below) shows the second pupil centre determination algorithm 13 in more detail. The first and second pupil centre determination algorithm 12, 13 will, if possible, return multiple first and second potential pupil centres Pd,Pl respectively, these being the potential pupil centres as determined by the respective pupil centre determination algorithms 12,13. Once the first and second potential pupil centres have been returned by the pupil centre determination algorithms 12,13, the positions of the first and second potential pupil centres Pd,Pl is compared 14 with each other, to determine the distance between each pair of first and second potential pupil centres Pd,Pl- If the distance between the closest pair of first and second potential pupil centres Pd,Pl is below a predetermined threshold value (in this exemplary embodiment the threshold value is 865 pixels) within the captured frame, then the midpoint of said closest first and second potential pupil centres Pd,Pl is defined as the final pupil centre 15. For the alternative embodiment, if the distance between the closest first and second pupil centres needs to be below a predetermined threshold value for a single frame. In this embodiment, the definition of the final pupil centre 15 as the midpoint of the closest first and second potential pupil centres Pd,Pl includes converting the position of the final pupil centre into co-ordinates for the camera movement apparatus, to enable the camera to be returned to the final pupil centre upon an appropriate control signal. In the event that no final potential pupil centre Pd,Pl is determined by the algorithms 12,13 in respect of a captured frame, the camera is moved to a next predetermined position, wherein the method is performed again, starting back with step 11. This process continues until a final pupil centre is found and the camera is moved to this position, as per step 15. In the event that no final pupil centre is found after 12 frames have been captured, the method terminates without defining a final pupil centre. Turning to figure 2, the steps of the first pupil centre determination algorithm 12 are shown. Again, these steps are for the specific exemplary embodiment which is a part of the method shown in figure 1 and discussed above, though it will be understood that the first pupil centre determination algorithm 12 is not required to be a part of the method 1 and can be performed as an algorithm in its own right outside of the method 1. The first pupil centre determination algorithm 12 begins with converting the captured frame (from step 11) to grayscale 20. Once the captured frame is grayscale, a Gaussian blur is applied 21 then histogram equalization is performed on each greyscale frame 22. After this, the image is thresholded using a conventional thresholding method 23. After thresholding, the contours within the image are identified 24, using a conventional contour detection method. Once the contours have been identified 24, the areas of the contours are determined 25. The five largest contours are identified (in this specific exemplary embodiment, Xd is five, but the skilled person will understand that other values of Xd may be used depending upon the circumstances), and a circle is then fitted to each of the five largest contours 26. Consequently the circularity of the five largest contours is calculated 27. At this stage, the areas of the five largest contours (as identified in step 24) are compared with a predetermined threshold value, as are the circularities of the five largest contours (as determined at step 26), and a threshold parameter is compared with a predetermined threshold value. In this specific embodiment, the predetermined values for these quantities are 36000, 0.3, and 100 respectively. As the skilled person will understand, these values are purely exemplary, and may change dependent upon various parameters, such as image size and scaling, ambient light conditions etc. If the area, circularity and threshold parameter values (as calculated) are below the relevant predetermined threshold values, the algorithm returns to step 23, and the image is again thresholded, with an incrementally increased threshold value (the threshold value being increased iteratively increments of two). Steps 23 through 27 are then iteratively repeated in this manner until the area and circularity conditions are met. If the area and circularity threshold values are not met and the threshold value exceeds the predetermined threshold value, then no potential pupil centre will be returned by the algorithm. Once this condition is met, the centres of any contours which satisfy these conditions are designated as potential pupil centres Pd at step 28. If there are no identified potential pupil centres Pd (i.e. Xl=0), then a failure message is displayed, and no values are returned for use in the larger method 29. In the event that one or more potential pupil centres Pd, these are returned for use in the larger method in the final step 30. Once the potential pupil centres Pd have been determined by the first pupil centre determination algorithm 12, the algorithm 12 terminates. Where the algorithm 12 is part of a larger method 1, the method continues as discussed above. Turning to figure 3, the steps of the second pupil centre determination algorithm 13 are shown. Again, these steps are for the specific exemplary embodiment which is a part of the method shown in figure 1 and discussed above, though it will be understood that the second pupil centre determination algorithm 13 is not required to be a part of the method 1 and can be performed as an algorithm in its own right outside of the method 1. The second pupil centre determination algorithm 13 begins with converting the captured frame to grayscale 31. For the alternative ‘streaming’ embodiments, every seventh frame is converted to grayscale 31. Once the frame is in grayscale, thresholding is performed on the greyscale frame 32 using a conventional thresholding method. The nonzero area of the thresholded image is then determined 33 and compared to a predetermined threshold parameter. In this specific embodiment, the threshold value is 900, and if the non-zero area is less than 900, then the threshold value is lowered, and the image is thresholded again 34. As the skilled person will understand, this threshold value is purely exemplary and applies only to this specific embodiment. The threshold value may change dependent upon various parameters, such as image size and scaling, ambient light conditions etc. This process iteratively repeats until the non-zero area is above the predetermined threshold parameter. Once this condition is met, the image is clustered 35, using a conventional clustering method (in this embodiment K-Means, though the skilled person will appreciate there are many suitable alternatives, as set out above). This thresholding and clustering process serves to identify the lightest areas of each frame, and to cluster these together. Once the clusters have been identified 35, the size of the clusters is determined (by determining the number of pixels within the cluster), with the three largest clusters being selected 36 (in this specific exemplary embodiment, Xl is three, but the skilled person will understand that other values of Xl may be used depending upon the circumstances). The pixel count of these three largest clusters are then compared against a predetermined threshold value (i.e. a minimum size threshold) 37. Any clusters not meeting the predetermined threshold are removed from further consideration as potential pupil centres Pl. In this specific embodiment, the threshold value is that the cluster has pixel count greater than 900 pixels. The minimum size of cluster may vary depending upon the size and scaling of the image, as well as the specific nature (brightness, distance from pupil, warmth of light etc.) of the or each light source providing the lightest portions, as will be understood by the skilled person. Also at this stage 37, the area of the three largest clusters is determined, and where the area of any of the clusters is below a predetermined threshold value (i.e. a maximum size threshold), the cluster is deemed to be too large, and removed from further consideration as a potential pupil centre Pl. The maximum size of cluster may vary depending upon the size and scaling of the image, as well as the specific nature (brightness, distance from pupil, warmth of light etc.) of the or each light source providing the lightest portions, as will be understood by the skilled person. If this process results in no potential pupil centres remaining (i.e. Xl=0), then the algorithm 13 terminates without returning any potential pupil centres Pl 38. If the area of any of the three largest clusters are between the minimum and maximum size threshold, the centres of the three largest clusters are each returned (in step 39) as the potential pupil centres Pl for the second pupil centre determination algorithm 13. Once the potential pupil centres Pl have been determined by the second pupil centre determination algorithm 13, the algorithm 13 terminates. Where the algorithm 13 is part of a larger method 1, the method continues as discussed above. Turning to figure 4, there is provided a digital slit lamp (DSL). In this embodiment, the DSL is a capable of being operated remotely, and so is a remote digital slit lamp (RDSL) 101. The RDSL 101 has a chin rest 102 and forehead rest 103, such that a patient (not shown) placing their chin and forehead onto the respective chin and forehead rests 102, 103 has their eye / s within the range of operating motion of an eye examination apparatus 104. The RDSL 101 also has traditional control and feedback unit 105, allowing the RDSL 101 to be used by an operator (not shown) in person, as opposed to being strictly remote controlled. The RDSL 101 has a conventional optics arrangement, in that the RDSL 101 has components which each provide the same function as a conventional (i.e., nonremote, analogue) slit lamp. The optics arrangement comprises a light source, a condensing lens system to focus the parallel beam of light emitted by the light source, slit width and height adjustment mechanisms to alter the properties of the light beam produced by the light source, and one or more filters to adjust the properties of the light. Turning to figure 5, there is shown a control apparatus 111 for the RDSL 101. The control apparatus 111 comprises a central processing unit 112, which is operably connected to camera stage 113 and camera 114. The central processing unit 112 is operable to control the motion of the camera stage 113 and the operation of the camera 114, either in response to control signals input by a user, in line with automated control signals in line with pre-programmed functions, or in response to the certain conditions being recognised by the central processing unit 112 itself. In this manner, the control apparatus 111 is able to adjust the properties of the light beam produced by the RDSL 101, so as to perform a variety of eye examination techniques as required. The control apparatus 111 is operably connected to the camera 114, which is operable to capture, record and stream both images and video of the patient’s eye which being examined by the RDSL 101. The central processing unit 112 is operably connected to a communication unit 115. The central processing unit 112 is operable to store the image / s and / or video / s recorded by the camera 114 to a suitable storage unit 116, and to stream the image and / or video to a display unit 123a. In addition, the central processing unit 112 is operable, via the communication unit 115, to transmit the image / s and / or video / s recorded by the camera 114 to an external storage medium 117 (for example cloud-based storage). The control apparatus 111 also comprises conventional controls 118, to allow the RDSL 101 to be operated in person, if required. The conventional controls 118 transmit control signals to the central processing unit 112 in response to user inputs, and the central processing unit 112 controls the RDSL 101 accordingly. The communication unit 115 is operable to transmit and receive data from a corresponding communication unit 125 of an external control apparatus 121. The external control apparatus 121 comprises its own central processing unit 122, and a user interface 123. The user interface 123 is operable to display information regarding the state of the RDSL 101. In some embodiments, the user interface 123 is also operable to receive user control inputs. In such embodiments, the central processing unit 122 of the external control apparatus 121 is operable, via the communication units 125, 115, to transmit the user control inputs to the control apparatus 111 of the RDSL 101, which is then controlled according to the user control inputs. 5 In other embodiments, the user interface 123 may be in the form of a dedicated display 123a and dedicated user input 123b. The one or more embodiments are described above by way of example only. Many variations are possible without departing from the scope of protection afforded by the appended claims.
Claims
1. A method of centring a camera of a digital slit lamp (DSL) onto an eye of a patient, the method comprising:capturing a frame using the camera,performing a first pupil centre determination algorithm on the captured frame, the first determination algorithm comprising:isolating the darkest portions of the captured frame,using contour detection to determine the contours of the said darkest portions.determining the area and circularity of each of the contours of said darkest portions,identifying the Xd largest and / or most circular of said darkest portions, anddefining the centre of each of the identified Xd darkest portions as first potential pupil centres Pd,performing a second pupil centre determination algorithm on the captured frame, the second determination algorithm comprising:isolating the lightest portions of the captured frame,clustering the lightest portions of said frame,determining the largest cluster of said lightest portions,identifying the Xl largest clusters of said lightest portions, anddefining the centre of each of the Xl largest clusters as second potential pupil centres Pl,wherein the first and second pupil centre determination algorithms are simultaneously performed in respect of the captured frame,a final pupil centre is defined as the midpoint of the closest pair of first and second potential pupil centres Pd, Pl if said first and second potential pupil centres are within a predetermined distance of one another and the camera ismoved to a position where the centre of the frame is aligned with said final pupil centre,wherein if no final pupil centre has been determined in respect of a captured frame and a termination condition is not satisfied, the camera is moved, a new frame is captured, and the first and second pupil centre determination algorithms are subsequently performed on the new captured frame, or wherein if no final pupil centre has been determined in respect of a captured frame and a termination condition is satisfied, the method will terminate without finding a final pupil centre.
2. A method according to claim 1 comprising moving the camera between a selection of predetermined positions.
3. A method according to claim 2 wherein the camera is operable to capture a frame at the or each predetermined position.
4. A method as claimed in either claim 2 or 3 wherein the camera is moved to a next predetermined position if no pupil centre is found at a predetermined position.
5. A method according to any preceding claim wherein the definition of the final pupil centre as the midpoint of the closest first and second potential pupil centres Pd, Pl comprises converting the position of the final pupil centre into coordinates for the camera movement apparatus.
6. An algorithm according to any preceding claim wherein the first pupil centre determination algorithm comprises converting the captured frame to greyscale.
7. An algorithm according to any preceding claim wherein the first pupil centre determination algorithm comprises the algorithm is an iterative contouring algorithm.
8. An algorithm according to claim 7 wherein the contouring algorithm iteratively finds any contours of the darkest regions and computes their circularity until one or more conditions are met in respect of the contours.
9. An algorithm according to claim 8 wherein the contouring algorithm iteratively repeats until the largest area defined by a contour is above a predetermined value.
10. An algorithm according to either claim 8 or claim 9 wherein the contouring algorithm iteratively repeats until the circularity of the largest area defined by a contour is above a predetermined value.
11. An algorithm according to claim 10 when dependent upon claim 9 wherein the contouring algorithm iteratively repeats until the largest area defined by a contour is above the relevant predetermined value and the circularity of the largest area is above the relevant predetermined value.
12. An algorithm according to any preceding claim wherein the second pupil centre determination algorithm comprises converting each captured frame to greyscale.
13. An algorithm according to any preceding claim wherein the second pupil centre determination algorithm comprises thresholding each captured frame.
14. An algorithm according to claim 13 wherein the thresholding is performed prior to the clustering of the lightest portions.
15. An algorithm according to any preceding claim wherein the second pupil centre determination algorithm comprises using a known clustering algorithm.
16. A pupil centre determination algorithm comprising:isolating the darkest portions of the captured frame.using contour detection to determine the contours of the said darkest portions,determining the area and circularity of each of the contours of said darkest portions,identifying the Xd largest and / or most circular of said darkest portions, anddefining the centre of each of the identified Xd darkest portions as first potential pupil centres Pd.
17. A pupil centre determination algorithm comprising:isolating the lightest portions of the captured frame,clustering the lightest portions of said frame,identifying the Xl largest clusters of said lightest portions, anddefining the centre of each of the Xl largest clusters as second potential pupil centres Pl.
18. A digital slit lamp (DSL) configured to performing any of the methods of claims 1-17, the DSL comprising:a camera operable to capture one or more frames,a camera movement apparatus operable to move the camera; anda processing unit operable to perform the methods of claims 1-17 and control the camera movement apparatus accordingly.
19. A DSL according to claim 18 wherein the camera is positioned upon a movable stage.
20. A DSL according to either claim 18 or 19 comprising a principal light source controllable by the processing unit so as to enable the DSL to perform a full range of eye examination techniques.
21. A DSL according to claim 20 when dependent on claim 19 wherein the principal light source is positioned on the movable stage.
22. A DSL according to any of claims 18 to 21 comprising one or more auxiliary light sources placed adjacent to the camera.
23. A DSL according to claim 22 wherein the or each auxiliary light source is arranged to provide illumination onto the pupil of the patient and its surrounding area, preferably wherein the or each auxiliary light source is arranged to produce a reflection upon the eye of the patient which is visible to the camera.
24. A DSL according to any of claims 18 to 23 comprise a communication unit operable to transmit and receive information to / from an external control apparatus.
25. A DSL according to any of claims 18 to 24 wherein the DSL is a remote digital slit lamp (RDSL).
26. A DSL according to claim 25 wherein, in addition to being an RDSL, the DSL comprises conventional controls, to allow the slit lamp to be operated in person by an operator.
Citation Information
Patent Citations
Ophthalmologic apparatus
EP2786700B1
Pupil detection device and pupil detection method
EP2976990B1
An automated slit lamp with computer parts and a method of eye screening using the same
GB2600288B