# Non-Contact Dermatoscope with Ultra-Bright Light Source and Liquid Lens-Based Autofocus Function
## Materials and Methods
### Camera with Liquid Lens-Based Autofocus  
We integrated a liquid lens-based autofocus as a novel solution for the variable focus problem in a freely movable non-contact dermatoscope. A liquid lens has the advantage of fast tunability of the focal length. The liquid lens consists of a reservoir filled with an opto-fluid delimited by a transparent membrane consisting of silicon or thin glass. The reservoir is enclosed by a Piezo ring, which can increase the pressure in the reservoir if an electrical voltage is applied to it. The pressure leads to different curvatures of the membrane, which results in different focal lengths of the lens. The schematic setup of the camera is shown in Figure 1. The radius of curvature of the lens is controlled by the distance sensor. The system is adjusted so the skin area of interest is always in the focus. This is ensured by actively measuring the distance between the target and the camera to follow the target even if the latter is not illuminated or does not show visible sharp edges. The camera (FL3-GE-28S4C-C, FLIR Integrated Imaging Solutions, Inc., Richmond, BC, Canada) has a resolution of \(1928\times 1448\) and a maximum image rate of 15 frames per second (FPS). It is equipped with an ICX687 CCD color sensor by Sony (Minato, Tokio, Japan) which has a sensor size of 1/1.8\({}^{\prime\prime}\) and a pixel size of 3.69 \(\upmu\)m. To record a dermatoscopic view of the skin, a zoom lens (NMV-75M1, Navitar, Rochester, NY, USA) with a focal length of 75 mm is mounted in front of the camera. In addition, the liquid lens (EL-16-40-TC, Optotune AG, Dietikon, Switzerland) is mounted in front of the zoom objective with a self-made adapter. It is an electrically tunable large aperture lens (with a clear aperture of 16 mm). The lens is controlled by the Optotune Lens Driver 4i via the \"Lens Driver Controller\" software. In order to realize an autofocus system, the tunable lens was combined with a distance sensor (DT35-B15851, Sick AG, Waldkirch, Germany). The lens driver can process an analog input signal from the distance sensor to set the correct focus length for a sharp image of the target. The distance sensor is based on an infrared laser distance sensor operating at 827 nm. It has an accuracy of 0.5 mm in the relevant range below 1 m, depending on the reflectivity of the target and the measurement speed, which is set. This setup realizes a fast autofocus as it does not contain moving parts. It is calibrated  
Figure 1: Schematic drawing (**left**) and photograph of the prototype of the non-contact dermatoscope. The imaging unit consists of the camera itself (**1**) a liquid lens (**2**) in front of the camera lenses and a rotatable polarizer (**3**). An infrared laser-based distance measurement device (**4**) besides the illumination unit is used to control the shape of the liquid lens and, thus, the focus length. The illumination unit is set up of an ultra-bright white LED source mounted on a radiator and a reflector. The light is polarized by a polarizer mounted in front the reflector. This setup is able to illuminate a target (**5**), measure the distance to this target and take images for different polarization settings. with the lens driver controller software. Here, a look-up table can be configured which relates every measured distance to a specific voltage for the liquid lens. The lens needs around 5 ms to respond and around 25 ms to settle to the new focal length. The exact settle time depends on the voltage difference applied to the lens. The distance sensor has a time delay of 6.5 ms between the measured event and the output signal in the \"fast\" mode. This results in a total delay from the event to the settling of the lens of approximately 31.5 ms and allows to adjust the focus approximately 30 times a second, which is twice the frame rate of the camera. As patients usually only move slowly and slightly during dermoscopy, the autofocus is able to focus on the target all the time.