Assisted auto-focusing method and associated optical imaging system
By utilizing external position information and image evaluation to dynamically adjust the focusing lens, and optimizing the z-scan area and scanning frequency, the accuracy and speed issues of existing autofocus methods when the working distance changes are solved, achieving fast and accurate focal plane finding and improved image sharpness.
Patent Information
- Application Number
- CN202380031399.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-19
- Filing Date
- 2023-02-16
- Publication Date
- 2024-11-15
AI Technical Summary
Existing autofocus methods struggle to quickly and accurately find the optimal focal plane when the working distance changes, leading to decreased image clarity or excessively long scanning times. Furthermore, existing auxiliary methods such as laser autofocus and artificial intelligence solutions suffer from high hardware requirements or interference radiation issues.
By querying external location information, the estimated working distance is calculated, the orientation of the z-scan area is optimized, and the focusing lens is dynamically adjusted to quickly find the optimal focal plane by combining image evaluation and sensor data, reducing unnecessary scanning areas and adapting the scanning frequency and depth of field to improve accuracy.
It enables the rapid and accurate finding of the optimal focal plane when the working distance changes, improving image clarity, reducing scanning time and hardware requirements, avoiding interference radiation, and enhancing the flexibility and efficiency of autofocus.
Smart Images

Figure CN118974625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an autofocus method, that is to say a method for automatically finding the best focal plane at the moment. In this method, the position of the focal plane of the optical imaging system is moved along the optical z-axis within a scanning area by adjusting the focusing lens of the optical imaging system. This movement of the focal plane is also referred to as z-scanning. For example, the adjustment of the focusing lens can be achieved by moving the focusing lens and / or by continuous adjustment of the focusing lens (as long as the focusing lens is designed to be continuously adjustable). In addition, the imaging system can be used to visualize the object after the implementation of the autofocus method. Here, the visualization can be performed with optimized image quality based on the found best focal plane, because the autofocusing can achieve precise focusing on the object.
[0002] The invention also relates to an associated optical imaging system, with which such an autofocus method can be implemented. The imaging system can be used, in particular, for visualizing an object during a medical operation. The imaging system comprises a focusing lens, which can be adjusted (i.e., for example, movable and / or continuously adjustable) by means of a focusing actuator in order to adapt the position of a focal plane of the imaging system along an optical z-axis in a z-scan, an image sensor for recording image data, and finally a controller for actuating the focusing actuator. Background Art
[0003] In general, the technology of automatically setting a camera or other optical device to an object to be observed in sharp focus is called autofocus (AF). A distinction is made here between active autofocus, which also works without ambient light, and passive autofocus, in which only the light emitted or reflected by the object is used for focusing. It is also known that in passive autofocus systems, for example by phase comparison or by contrast measurement, in particular edge contrast measurement, the individual focal planes are evaluated with regard to the respective image quality and the position of the best focal plane is thus found. The best focal plane corresponds here to the plane that is closest to the plane in which the object is located and therefore provides the best image sharpness for the object to be visualized.
[0004] Autofocus methods as described at the outset are known and used in a variety of ways, in particular in medical visualization systems, such as endoscopes, exoscopes or microscopes. In particular in medical microscopy applications, the working distance (working distance = WD) of the optical imaging system used can fluctuate within a very large range, since a high degree of flexibility is typically required in the positioning of the imaging system in the operating surgeon's working area. However, in particular when using image-based autofocus, large changes in the working distance can be an obstacle to efficient (i.e., in particular, fast) implementation of the autofocus.
[0005] If the working range is large and the working distance changes within the working range, image-based autofocus systems (for example based on contrast-based image sharpness evaluation) often require an excessively long time to find the best focal plane, i.e. the best possible focal position for imaging the object, when passing through the entire working range, because any change in the working distance typically requires a new pass in order to find the best focal plane.
[0006] For image-based determination of the best focal plane, a stack of images is typically analyzed or the best focal plane is searched incrementally. However, in such solutions, the frame rate of the image sensor limits the number of images available per second. This also limits the speed at which the entire working range can be moved. Due to the excessively high scanning speed of the z scan, there is the risk that the best focal plane can no longer be found. As a result, the search for the best focal plane often takes too long.
[0007] There are also solutions that initially carry out a z scan only once and then track the focal plane, i.e., when a change in the working distance is detected, a certain distance is moved along the z axis ("refocus" / "adjust focus"). In this case, although a new focal plane can be quickly adjusted, an error between the position of the current focal plane and the actual best focal plane can occur over time during multiple tracking, so that the object is gradually imaged less sharply. Therefore, in this case, rapidity is achieved, but image quality is sacrificed.
[0008] In order to avoid these problems, additional laser autofocusing is often used in the prior art, or phase detection methods are selected to determine the focus position and focus direction and thereby accelerate the search for the best focal plane. Artificial intelligence methods for determining the focus position are also the subject of current research and development. However, all of these methods also have disadvantages, such as increased space requirements for additional hardware, high requirements for computing power or the generation of interfering radiation by AF auxiliary light, to name just a few. Summary of the invention
[0009] Starting from this, the object of the present invention is to improve previously known autofocus methods. In particular, an auxiliary passive autofocus should be provided, which can respond quickly and precisely, preferably continuously, to changes in the working distance and always provide a sharp image of the object to be visualized.
[0010] To achieve this object, the invention provides the features of claim 1. In particular, the invention provides for achieving this object in an autofocus method of the type mentioned at the outset that external position information is queried (preferably automatically by the imaging system itself), an estimate for the instantaneous working distance between the imaging system and the object is calculated from the external position information, and an orientation of a scanning region (in which a z scan is performed) on the optical z axis (e.g. a z coordinate z of the center of the scanning region) is adapted based on the estimate. c and / or starting coordinates z1 of the scanning region). A z-scan adapted in this way in terms of its orientation can then now be carried out in order to identify or find the best focal plane within the scanning region (determined on the basis of the estimated values).
[0011] The invention therefore proposes assisted autofocus, which offers improved accuracy and rapidity compared to previously known autofocus methods. The assistance is based on position information that is queried by an external system. Based on this position information or an estimate derived from the position information for the instantaneous distance (=working distance) between the imaging system and the object to be visualized, the autofocus scanning area, i.e. the area in which the method searches for the best focal plane, is positioned in space and, if necessary, further adapted as a function of the estimated values (e.g. in terms of length, spatial scanning frequency or zoom level used during the z-scan). The autofocus method is thereby intelligently adapted to the respective instantaneous operating situation and can thus quickly and reliably find the instantaneous working distance or the instantaneous best focal plane.
[0012] In principle, it is possible to use the projection equation to convert the corresponding working distance (and therefore the desired object distance s) o ) is assigned to a defined adjustment of the focusing lens, i.e., for example, a defined position of the focusing lens on the z-axis in the case of a movable focusing lens. Thus, for example, the focusing lens can be adjusted at the beginning of a z scan so that the instantaneous focal plane is at the lower limit of the new scanning area. For example, for a scanning area of X mm, the lower limit can be set at the z position z1=estimated value (working distance)-X / 2. For this purpose, image evaluation is also not required at all.
[0013] In particular, the actual z-scan can be performed incrementally, so that the z-scan is stopped when the best focal plane is found (for example based on an abort criterion), which further accelerates the method.
[0014] It is particularly advantageous here to use an optical imaging system according to the invention, in particular an optical imaging system as described here or according to one of the claims for the optical imaging system, in the method according to the invention. It should also be mentioned here that the focusing lens can of course also be formed by a complex lens group; the lens group can also have a plurality of adjustable focusing lenses. For example, a first axially movable focusing lens can be used for a coarse shift of the focal plane and an additional continuously adjustable liquid lens can be used for a fine shift of the focal plane.
[0015] In this case, the z-axis can be predetermined by the optical imaging system, in particular by its viewing direction.
[0016] The advantage of this method is that by implementing a z-scan, the position of the best focus plane can be determined more accurately than based on an estimate alone, and thereby also the working distance actually existing at the moment between the imaging system and the object can be determined more accurately. Because the calculated estimate for the working distance typically has a residual error (= difference between the estimated value and the working distance actually existing at the moment). This residual error can be reduced or even completely eliminated by implementing a z-scan that is adapted in its position. Because the autofocus then searches for the actual best focus plane in the region of the estimated working distance and can thus determine the actual working distance (which is associated with the z position of the best focus plane), the working distance can therefore deviate from the estimated value.
[0017] Another advantage of the method that becomes more apparent is that the finding of the best focal plane can be accelerated. The reason for this is that, due to the optimized orientation of the scanning region, the scanning region can be shortened in terms of its length from the outset compared to previously known methods. However, less time is then required to carry out the necessary optical scanning of the focal plane in the scanning region, which accelerates the finding of the best focal plane.
[0018] Furthermore, it has been shown that the avoidance of unnecessary support points outside the region of interest, i.e., unnecessary optically scanned focal planes, results in that more support points can be provided within the region of interest, i.e., within the scanning region of the z-scan, within a reasonable time for autofocusing. This means that the scanning region can be smaller than with previously known methods, but optically scanned at a higher spatial scanning frequency. This can increase the spatial z-resolution when determining the position of the best focal plane on the z-axis.
[0019] According to the invention, this object can also be achieved by further advantageous embodiments, which are specified in the dependent claims and explained below:
[0020] First of all, it should be emphasized that the implementation of the z-scan in the following scanning area is distinguished from the simple tracking of the focus, for example by adjusting the focusing lens based on the estimated value, and the orientation of the scanning area (on the z-axis) is adapted based on the calculated estimated value. Because the estimated value has not yet determined which final adjustment of the focusing lens and which orientation of the final focal plane (as the optimal focal plane) is ultimately determined / determined by the method (=result of autofocusing). The estimated value only provides the method with a first reference point, in which the optimal focal plane should be found meaningfully by implementing the z-scan. In other words, the method can therefore be characterized in that the orientation of the identified optimal focal plane is determined independently of the estimated value. Therefore, after the implementation of the method, the focusing lens is adjusted independently of the estimated value so that it determines the identified optimal focal plane.
[0021] In most cases, i.e. when the estimated values are erroneous, the optimal focal plane determined by means of the z scan can be located at an object distance s relative to the imaging system. o In the unlikely event that the estimate for the working distance is error-free, the ideal optimal focal plane is exactly at the object distance corresponding to the working distance relative to the imaging system.
[0022] The approach according to the invention can therefore improve the accuracy in determining the optimal focal plane, in particular compared to simple tracking of the instantaneous focal plane by a one-time adjustment of the focusing lens based on estimated values without a new z-scan.
[0023] According to a further development, the object distance s defined by the determined optimal focal plane can be stored. o (i.e. in particular the object distance described above) and the estimated value. This deviation can then be taken into account in the subsequent z scan. The deviation can, for example, form a deviation which is always taken into account when selecting the current orientation of the scanning area of the z scan. For example, in a subsequent z scan (for example, the z scan is carried out when the working distance has changed again and this is detected based on the query of external position information), the spatial orientation of the subsequent z scan can be adapted based on the stored deviation / deviation. Here, for example, when the object distance s generated by the currently determined best focal plane is o In the event of a current deviation from the current estimated value, which deviation significantly (for example, by an amount above a threshold value) differs from the stored deviation, it is also possible to readapt the deviation over time.
[0024] Such a determination of deviations has the advantage, in particular, that if, for example, the distance estimate between the operating area and the imaging system, i.e. the above-mentioned estimated value of the working distance, is systematically inaccurate, for example because the operating area has cavities that are not visible to the image-based navigation system used for determining the estimated value, such a situation can be solved more accurately in the sense that, despite the systematic errors, unnecessary scanning regions during the z-scan can be avoided. This can also accelerate the finding of the optimal focal plane.
[0025] An imaging system (or more precisely its controller) implementing the method can therefore store how much the position of the last determined best focal plane (=optimized focus position) deviates from the working distance estimated based on external position information (e.g. determined based on external measuring devices) in order to take this into account in a future start of a z scan (=autofocus routine). This can further accelerate the finding of the best focal plane, since irrelevant search regions that have to be traversed solely due to errors in the estimated values can be avoided from the outset.
[0026] In order to avoid unnecessary z scans from the beginning and thus further save time, it can be provided that firstly an estimated value of the correction is calculated based on the stored deviation and the focusing lens is adjusted so that the position of the instantaneous focal plane corresponds to the estimated value of the correction. This means that the previously identified deviation is first eliminated / compensated. In this case, the focal plane can be first preferably evaluated by means of an image-based evaluation, especially an evaluation of the image contrast, and the position of the focal plane corresponds to the estimated value of the correction. For example, the z scan can then be implemented only when the instantaneous focal plane is evaluated / has been evaluated as not clear enough. That is, if the focal plane has shown a satisfactory image quality, it can be assumed that the focal plane is the new optimal focal plane, so that there is no need to implement the z scan again. A threshold value can also be used here as a criterion for image quality. For example, the focal plane found by means of the stored deviation can be accepted as the optimal focal plane for a long time until the detected edge contrast or another measurement value is lower than a threshold value specified in advance.
[0027] External position information, based on which an estimated value for the working distance is determined, can be obtained in various ways. For example, the external position information can be based on current measurement data of at least one orientation sensor and / or at least one acceleration sensor. This approach can be used, for example, when an optical imaging system that implements autofocus is fastened to a manually movable support arm or support frame, wherein the working distance can then be manually adapted by the surgeon. This is because the current spatial position and / or orientation of the support arm and the imaging system supported thereby can be determined by means of sensors and can be used as external position information.
[0028] Alternatively or additionally, the position information can also be queried by a robot system, with which the imaging system is moved in space. The imaging system can be used to change the actual working distance, for example, in accordance with the needs of the user, by means of this movement of the robot system. The position information can in particular specify the instantaneous spatial position and / or orientation of a component of the robot system that carries the imaging system. This component can be, for example, a robot arm.
[0029] It is also possible to acquire or query the position information from an external, in particular image-based, navigation system. Such navigation systems are known from robot-assisted surgery and are already used there to position a microscope in space for the surgeon and thus be able to monitor the operation visually, in particular also remotely.
[0030] In such an embodiment, it is preferred that the navigation system is an image-based / camera-based navigation system. For example, a camera external to the navigation system can be moved in space together with the imaging system, in particular by means of a / the previously described robotic system. This approach has the advantage over a navigation system based on a stationary camera that an estimate for the working distance can be determined with greater accuracy by means of a moving camera of the navigation system.
[0031] In particular, such an external navigation system can be implemented with the aid of a 3D camera. In this case, the known optical tracking scheme can also be used (in particular, when using optical markers, the position of which can be tracked with a camera) in order to provide position information, on which the working distance is estimated.
[0032] The invention can therefore be implemented in such a way that a position query from an external system (i.e. for example a navigation camera, an orientation and / or acceleration sensor and / or a robot position) is used for positioning and / or limiting the scanning area covered in the z scan (= search area for finding the optimal focal plane), and more precisely in particular in order to achieve assisted image-based autofocusing in this way.
[0033] According to a preferred embodiment, the position information can be selected / selected in such a way that the spatial position and / or orientation of the imaging system, in particular the spatial position and / or orientation of the optical components of the imaging system, can be determined from the position information relative to the object. This has the advantage that the estimated value can now be calculated particularly accurately from the determined position and / or orientation. This is because, for example, deviating viewing angles, for example between the imaging system and the navigation camera, can be taken into account in calculating the estimated value. For example, the viewing angle of the imaging system can deviate from the viewing angle of an optical auxiliary system (for example an additional camera) respectively according to the instantaneous position and / or orientation in space, which is used to determine the estimated value, and these deviations can be taken into account in calculating the estimated value. This can reduce the residual error of the estimated value, which again allows: the scanning area required for reliably finding the best focal plane can be reduced. As a result, the automatic focusing can be accelerated in this way.
[0034] In order to be able to find the best focal plane as quickly as possible, it is particularly efficient to automatically adapt at least one other parameter of the z scan based on the estimated value for the instantaneous working distance. Such parameters can especially automatically adapt the length of the z scan and / or the number of focal planes optically scanned by the z scan in the scanning area and / or the spatial scanning frequency of the z scan (e.g., a spatial scanning frequency of 10 focal planes / 4mm) and / or the optical zoom level used during the z scan of the imaging system. The zoom level is understood here as what kind of zoom focal length is adjusted instantaneously. And the zoom factor is typically understood as the ratio between the longest and shortest zoom focal lengths adjustable by means of a zoom objective. Therefore, there is a small zoom level at a short zoom focal length (wide angle), so that a relatively large image is locally imaged and only a small magnification is achieved at this time. And at a large zoom focal length (telephoto), a high zoom level is achieved, so that only a small image is locally imaged at this time and a high magnification is achieved. In other words, the change of the zoom always causes a change in the optical magnification.
[0035] Therefore, by the proposed adaptation of the at least one other parameter of the z-scan, not only the orientation of the z-scan in space is adapted, but the z-scan can be customized for the instantaneous shooting situation. According to the adjustment of the optical zoom and the current working distance, for example, the depth of field can be changed. The depth of field is generally understood as the extension of the area before and after the focal plane (sometimes also called the sharpness plane), in which the point is still imaged sufficiently clearly. The focal plane is such a plane in the object space, the points of which are imaged as sharp points by the imaging system on the image plane in the image space (this typically corresponds to the plane of the image sensor). Points outside the focal plane are imaged as circles or ellipses on the image plane / image sensor, that is, with a certain blur. In other words, the depth of field therefore determines the area of the possible focal plane, in which the image is still perceived as sharp or can be reproduced / recorded by the image sensor with sufficient image quality.
[0036] In previously known autofocus methods, such as contrast-based autofocus methods, the local resolution of scanning each focal plane is typically always selected to be smaller than the minimum depth of field of the optical system used for imaging. Here, the depth of field depends on the working distance and the adjusted optical zoom as already mentioned. Such a small step when scanning the focal plane provides the following advantages, that is, the corresponding orientation of such a focal plane can be determined with sufficient accuracy, and the focal plane provides an optimized image quality for a certain object, and the object is at a given working distance relative to the front lens. This focal plane is called the optimal focal plane here. But on the other hand, the scanning of the possible focal planes with the smallest possible step leads to the fact that the autofocus method is inefficient or slow in time because overscanning often occurs. If the spatial resolution when scanning different focal planes is reduced in order to speed up the method in this way, there is a danger that the optimal focal plane can no longer be found with sufficient accuracy, especially at a momentary small depth of field.
[0037] Therefore, the adaptation proposed by the invention can actively adapt the depth of field (by changing the zoom level) and / or compensate for instantaneous changes in the depth of field by carrying out a corresponding adaptation of the z scan (adapting the scanning frequency and / or length and / or number of scanned focal planes). For example, when the working distance decreases, it makes sense to reduce the length of the z scan and / or reduce the number of scanned focal planes and / or increase the scanning frequency, because the depth of field typically also decreases in this case. In addition, it may make sense to change the optical zoom / optical zoom level for the acceleration of the z scan according to the estimated working distance. Because the depth of field can also be adapted by changing the zoom level.
[0038] Since the length of the z scan can vary, but it is often sufficient to carry out the z scan within the maximum available scan time, it can be provided in particular that the spatial scan frequency is increased as soon as the length of the scan region is shortened. This can be designed in particular so that the total time required for carrying out the z scan remains constant (this total time is in principle defined by the maximum possible scan frequency of the image sensor used and the maximum adjustment speed of the focusing lens). This allows the predetermined maximum total time available for the z scan (for both relatively long z scans and for relatively high-resolution z scans) to be optimally utilized.
[0039] In order to avoid interfering interference radiation, the method according to the invention can be implemented as a passive autofocus method, that is, without the use of additional AF lighting. This offers further advantages. For example, active laser autofocus requires additional space for the components required to provide the AF light. This space requirement can therefore be saved, which is advantageous when the method is implemented by an imaging system according to the invention that is moved in space by a robot arm.
[0040] In order to achieve a design that is as compact and simple as possible for the optical imaging system, it is also advantageous if the method determines the position of the optimal focal plane by means of an image evaluation of the focal planes optically scanned by means of a z-scan. For this purpose, it is sufficient to evaluate the image data that the image sensor of the imaging system actually provides. However, in order to reliably find the optimal focal plane, it is preferred that the image evaluation includes an evaluation of the image contrast. For this purpose, in particular, corresponding edge maps of the individual optically scanned focal planes (or the image data associated with each other) can be created and / or a corresponding Fourier transformation can be applied to the image data of the focal planes.
[0041] Therefore, according to the present invention, the method provided can be implemented in particular as an image-based and / or as a contrast-based autofocus method. This has a decisive advantage over the use of phase-based autofocus or the use of artificial intelligence (KI) to evaluate the focal plane: Autofocusing by phase detection requires an additional detector or a separate sensor on the image sensor for detecting the phase, which obtains the image with the aid of a beam splitter and thereby reduces the optical efficiency. In addition, the performance at small contrast values is typically deteriorated in this approach. In addition to the high resource requirements regarding hardware (computing performance), KI approaches for focus determination also require as extensive data records as possible for training the network that constitutes the KI.
[0042] In order to always be able to react dynamically to the adaptation of the actual working distance, it is also advantageous to re-adapt the orientation of the scanning region and to re-carry out the z-scan adapted in this way as soon as a change in the position information and / or the calculated estimated value is detected based on a new query of the external position information. For rapid adaptation, it is advantageous to perform a continuous query of the external position information.
[0043] A further speed gain for the autofocus method can be achieved if the position information includes target coordinates. Because in this case, the focusing lens can already be adjusted while the imaging system is positioned at the new position, in particular the target coordinates. The target coordinates do not necessarily have to coincide with the new spatial orientation of the imaging system. Because the target coordinates can, for example, indicate the position in space to which the robotic arm carrying the imaging system should be moved. If the robotic arm has reached this position, such a position of the imaging system can deviate from the new target position of the robotic arm by a constant deviation. In such a construction scheme, it is advantageous to only carry out the z scan when the imaging system has reached the new position / target coordinates and has stabilized in terms of its spatial orientation. Because this can avoid motion artifacts when recording the focal plane.
[0044] In order to achieve the object mentioned at the outset, the invention furthermore proposes the features of the independent device claim in an optical imaging system. In particular, the invention proposes, in order to achieve the object in an optical imaging system of the type mentioned at the outset, that the controller is configured to select the orientation of a scanning region of the z-scan on the optical z-axis as a function of an estimated value for the instantaneous working distance and then to carry out a z-scan in the scanning region thus adapted in terms of its orientation in order to identify an optimal focal plane in the scanning region.
[0045] As already explained above, the controller here moves the respective instantaneous focal plane along the z-axis by correspondingly controlling the focus actuator in order to trigger the required adjustment of the focusing lens in this way. The optical scanning of the focal plane can be carried out by corresponding reading of the image sensor of the imaging system. Since the image data reflect what imaging quality of the object to be visualized can be achieved with the instantaneous focal plane. The controller can then decide, based on the image evaluation, which of the scanned focal planes should be used as the best focal plane for recording other image data (e.g. a video image data stream).
[0046] For example, the controller itself can calculate an estimated value for the working distance. For this purpose, the controller can actively query external position information required for the calculation (or automatically obtain the external position information via transmission at regular times, which is technically equivalent). It is also possible that an external system, such as an external navigation system, calculates an estimated value based on the position information and transmits the estimated value to the controller. In this case, the controller does not have to calculate the estimated value itself, but adapts the scanning area based on the estimated value.
[0047] It can therefore be provided that the controller is connected or connectable to an external system, in particular a navigation system and / or a robotic system (for example, as described above in each case). In this case, the controller can be configured to query the estimated value from the external system. Additionally or alternatively, the controller can also query or receive external position information from the system and calculate the estimated value itself from this position information.
[0048] As already explained, the imaging system can also include zoom optics which can be adjusted by means of a zoom actuator, wherein the controller is then configured to control the zoom actuator as a function of the estimated value in order to thus adapt the zoom level used during the z scan.
[0049] Of course, it is particularly advantageous if the controller is configured in such a way that it implements the automatic focusing method according to the invention, as described above and / or according to the claims for such a method, wherein the controller can correspondingly control the focus actuator and / or the zoom actuator.
[0050] The present invention will now be further described with the aid of examples, but the present invention is not limited to these examples. Further configurations of the present invention can be obtained from the subsequent description of preferred embodiments in conjunction with the general description, the claims and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In the following description of different preferred embodiments of the invention, elements which correspond in their function are provided with identical reference numerals even if their design or shape differs.
[0052] In the figure:
[0053] Figure 1 The various components of the imaging system according to the present invention are shown;
[0054] Figure 2 Show Figure 1 Schematic sketch of a typical application of an imaging system according to the invention for visualizing an object, wherein a z-scan is performed in order to find the best focal plane;
[0055] Figure 3 A strongly simplified illustration showing the variation of the image contrast along the optical z-axis;
[0056] Figure 4 An illustration showing two z-scans performed in different situations in order to respectively find the position of the best focal plane; and
[0057] Figure 5 Another illustration showing an autofocus method according to the invention comprising a coarse scan and two subsequent fine scans;
[0058] Figure 6 A diagram showing a possible application of the method according to the invention in a medical visualization system according to the invention;
[0059] Figure 7 shows the various steps when going through the automatic focusing method according to the present invention, the automatic focusing method including a coarse scan and a fine scan;
[0060] Figure 8 showing a z-scan performed for a first estimate of the working distance;
[0061] Fig. 9 The z scan shows the strong relationship between the working distance and Figure 8 performing the z-scan at a second estimated value of a deviation from a first estimated value of a z; and
[0062] Fig.10 Two z-scans performed temporally successively are shown, which are performed for respectively different estimated values of the working distance, wherein the second z-scan takes into account deviations which were ascertained in the z-scan preceding it. DETAILED DESCRIPTION
[0063] Figure 1 An optical imaging system 1 according to the invention is shown, which is provided for visualizing an object 3 during a medical operation. For this purpose, the optical imaging system 1 has a zoom optical system 4, which can be adjusted by means of a zoom actuator 5 in order to adapt the optical zoom level. Furthermore, the imaging system 1 has a focusing lens 6, which can be adjusted by means of a focusing actuator 7 in order to shift the instantaneous position of a focal plane 12 along an optical z-axis 8, as in Figure 1 and 2 The controller 10 is configured to control the focus actuator 7 and the zoom actuator 5 .
[0064] exist Figure 2 The vertical dashed lines in FIG. 1 indicate the z positions (eg z1 to z8) at which the focal plane 12 is positioned during the z scan 17. Figure 1The corresponding vertical dashed lines in give the position of the plane which—as a result of the adjustment of the focusing lens 6 —is instantly sharply imaged on the image sensor 9 and is thus optically scanned.
[0065] As in Figure 1 As can be seen in the figure, the zoom optical system 4 has two zoom lenses 24, each of which is designed as an achromatic lens, wherein the front zoom lens can be moved along the optical axis 8 by means of a zoom actuator 5 in order to zoom the object 3 more or less. The optical components 4 and 6 are combined with the front lens 23 in a compact objective 26. The front lens 23 is designed as a dilating lens and thus enables a relatively large working distance 11 between the front lens 23 and the object 3. These components 4, 6 and 23 form the video camera 2 together with the illustrated image sensor 9.
[0066] As in Figure 2 As shown in , by adjusting the focusing lens 6 (the focusing lens can be constructed as a lens that can be moved along the z-axis 8 and / or as a continuously adjustable lens), the instantaneous focal plane 12 can, for example, be moved stepwise along the positive scanning direction 29 (i.e., along the positive z-direction) along the optical z-axis 8 in steps 15 of Δz1.
[0067] If in Figure 1 If the focusing lens 6 shown in FIG. 1 is designed as a movable lens and the focusing lens is moved along the z-axis 8 at a continuous movement speed, the instantaneous focal plane 12 is also correspondingly moved continuously along the z-axis 8, wherein the movement can depend nonlinearly on the instantaneous z position of the focusing lens 6. By reading the image sensor 9 at regular time intervals, a whole group of different (instantaneous) focal planes 12 can be optically scanned respectively during the continuous movement of the instantaneous focal plane 12, such as by Figure 2 . Thus, by selecting the adjustment speed of the focusing lens 6 and / or the readout frequency of the image sensor 9, not only the respective length 16 of the scanning region 14 traversed in the respective z scan 17 can be adapted, but also the effective step 15, i.e. the distance between two adjacent focal planes 12 which are scanned by the image sensor 9 within the scope of such a z scan 17. Furthermore, by correspondingly controlling the focus actuator 7, the orientation of the z scan 17, in particular the z coordinate z of the center 20 of the scanning region 14, can also be adapted. c .
[0068] You can also pass through Figure 11 , in such a way that the position of the focal plane 12 is continuously moved within the scanning region 14 during the reading of the image sensor 9. For example, the focusing lens 6 can be moved at a constant moving speed for this purpose. If the focusing lens 6 is designed as a continuously adjustable liquid lens, the position of the focal plane 12 can be continuously moved along the z-axis 8 by continuously adjusting the focusing lens 6. In such a case, the average scanning speed for moving the position of the focal plane 12 along the z-axis 8 can be adapted as a function of the instantaneously adjusted optical zoom level and / or the estimated value for the (instantaneous) working distance 11. In this way, the controller 10 can reduce the scanning speed when the zoom level increases and the accompanying gradual image magnification and / or the estimated value for the working distance 11 decreases. Since, as long as the image sensor 9 is read out at a constant (e.g. maximum frame) rate during the continuously performed z scans 17, the z resolution increases when the scanning speed decreases, because the z distances between the individual focal planes 12 that are scanned when the image sensor 9 is read out are reduced. In other words, the spatial scanning frequency and thus the z-resolution in determining optimal focal plane 13 can be increased by reducing the scanning speed for a given maximum frame rate of image sensor 9 .
[0069] Figure 3 A greatly simplified possible profile of the image sharpness as a function of the z-coordinate is shown (vertical axis). As can be seen, in real applications, in addition to the global maximum 22 of the image sharpness, other local maxima 21 may also be present. Figure 1 The best focal plane 13 illustrated in FIG. 1 corresponds here to Figure 3 That is, when the focusing lens 6 is adjusted so that the instantaneous focal plane 12 (as in Figure 1 3 and the front lens 23 at the instantaneous working distance 11, the object 3 is imaged on the image sensor 9 with optimized image sharpness. In other words, the best focal plane 13 corresponds to the focal plane 12 scanned by the imaging system 1, which is closest to the plane in which the object 3 is located. Figure 4 It is shown that the best focus plane 13 determined here using the autofocus method according to the invention can still deviate slightly from the actual best focus plane 13 *, since the latter cannot be determined with an arbitrarily high z resolution.
[0070] Figure 6The specific application of the imaging system 1 according to the invention in medical surgery is shown. The imaging system 1, which is designed as a microscope, is moved through space by a robot arm 35 of a robot system 34 in order to adapt the working distance 11 to an object 3 (here a patient 38) according to the surgeon's wishes. The surgeon can observe the object 3 as a digital real-time image on a monitor 39 with a corresponding magnification. A further camera 37 is attached to the robot arm 35, which is part of an external image-based navigation system 36, and whose spatial position is also monitored by a position and acceleration sensor 40.
[0071] As in Figure 6 The viewing angles of the camera 37 and the microscope / imaging system 1 are distinguished by means of the two optical axes 8 and 8' in FIG. However, position information can be provided by the navigation system 36, from which the controller 10 calculates a reliable estimate 41 WD* for the working distance 11 existing at the moment between the imaging system 1 and the object 3. The position information provided by the navigation system 36 allows inferences about the position (xyz position) and the orientation (orientation of the z-axis 8) of the imaging system 1, which already allows a relatively accurate estimate of the working distance 11. Also in Figure 2 This is illustrated in FIG: However, the estimated value 41 (WD*) can still deviate from the actually existing working distance 11 (WD) by a theoretical error e1. The task of the autofocus is therefore not just to adjust the focusing lens 6 so that the instantaneous focal plane agrees with the erroneous estimated value, but rather to minimize this error e1.
[0072] As explained below, the controller 10 of the imaging system 1 is provided for solving this task by implementing the automatic focusing method according to the invention. For this purpose, the controller 10 controls the focus actuator 7 in such a way that the position of the scanning region 14 of the z scan 17 on the optical z-axis 8 is selected according to an estimated value 41 for the instantaneous working distance 11, which exists between the imaging system 1 and the object 3 to be visualized. The controller 10 can calculate the estimated value 41 itself based on external position information, which it queries from the navigation system 36, or the navigation system 36 undertakes this calculation and provides the controller 10 with new estimated values 41 of the working distance 11, for example at regular intervals.
[0073] If already in Figure 2 As illustrated in Figure 8 and 9 As can be seen in FIG. 1 , the controller 10 can for example determine the scanning region 14 in such a way that the coordinate z of the z scan 17 or the center 20 of the scanning region 14 is cThis corresponds to the estimated value 41 for the working distance 11. In this case, the autofocus therefore determines the position of the best focus plane 13 in the scanning area 14 symmetrically around the estimated value 41 (in Figure 8 and 9 However, unlike in the simple tracking of the focus position according to the estimated value, the orientation of the best focus plane is determined independently of the estimated value 41, such as Fig. 9 and Figure 8 A comparison of the results shows that in both cases the center 20 of the z scan 17 is selected in accordance with the estimated value 41, wherein a new query of the position information is then performed. Fig. 9 The position information is generated when the estimated value 41 changes. However, it can be seen from the contrast curve recorded by the image sensor 9 in the z scan 17 that Figure 8 In this case, the estimated value 41 underestimates the actual working distance of 11 and the best focus position, while the working distance 11 is Fig. 9 In the case of , the estimated value 41 calculated by the calculation is overestimated. This can be the result of an error e1, for example, which increases with increasing working distance 11. In this case, the magnitude of the error e1 is also proportional to the number (for this purpose, refer to Figure 2 ) changes. Such changes are largely compensated for by the method according to the invention, in which the determination of the position of the best focal plane 13 is carried out based on an image-based evaluation of focal planes 12, which are optically scanned gradually along the scanning direction 29 within the z scan 17. This evaluation and the decision on the focal plane 12 which is ultimately identified as the best focal plane 13 are therefore not dependent on the estimated value 41; the latter only determines the position of the z scan 17.
[0074] As a result, the optimal focal plane 13 finally determined in this way can be Figure 2 As shown in the figure, relative to the imaging system 1, it is at an object distance s o 30, the object distance deviates from the estimated value 41 for the instantaneous working distance 11. The object distance s adjusted by adjusting the focusing lens 6 o 30 can be said to always still have a residual error e2 with respect to the actual working distance 11. However, due to the high-resolution optical scanning achieved by means of the z scan 17, this error e2 is in each case lower than the original error e1. This means that the accuracy in determining the best focal plane 13 is improved compared to the simple tracking of the focus position based on the estimated value 11. It should be mentioned here that the adjustment of the focusing lens predetermines the position of the focal plane 12 at the instant according to the projection equation. Here, the image distance s i 33, that is, the distance between the last main plane 31 of the imaging system 1 and the image plane 32 of the image sensor 9 remains constant (refer to Figure 1 ). The planes 13 and 32 form optically conjugate planes.
[0075] As explained next, other parameters of the z-scan may also be adapted by the controller 10:
[0076] Here we need to consider that Figure 6 In the typical application case shown in FIG. 1 , not only the zoom level (in each case according to the user's wishes) but also the working distance 11 can be changed from case to case, thereby also resulting in a change in the depth of field (depth of field=DOF), such as in FIG. Figure 4 and 5 . In order to accelerate the finding of the optimal focal plane 13 in such a case, the controller 10 can independently select not only the length 16 of the scanning area 14, but also the number of these focal planes 12, within which a certain number of focal planes 12 are scanned. In addition, the controller 10 can also adapt the optical zoom level of the imaging system 1 according to the situation, which is used during the described z scan 17, that is, when the imaging system 1 scans different focal planes 12. Finally, the controller 10 can also adapt the spatial scanning frequency (scanned focal planes / mm). For this purpose, the controller 10 checks which zoom level is currently set and also takes into account the current estimated value 41 for the working distance 11 between the imaging system 1 and the object 3.
[0077] For example Figure 4 It is shown that when the object 3 is at a relatively short working distance z1, the depth of field (depth of field = DOF) is small, while when the working distance is enlarged, for example to a value z2, the depth of field is enlarged. Correspondingly, when the estimated value for the working distance 11 decreases, the controller reduces the length 16 of the scanning area 14 and thereby also reduces the number of focal planes 12 scanned within the scanning area 14. Here, for example, the step 15 between the individual scanned focal planes 12 can be maintained. However, as in Figure 4 As illustrated in FIG. 1 , an improvement in the z-resolution when finding the best focal plane 13 is achieved in particular if, when the estimated value for the working distance 11 is reduced (alternatively or in addition to an adaptation of the length 16 of the scanning region 14), the step size 15 is reduced, thereby increasing the spatial scanning frequency. This can be used in particular when moving stepwise through the scanning region 14, by gradually increasing the step size 15 (e.g. Figure 4 The Δz1) shift illustrated on the left in the figure corresponds to the position of the focal plane 12.
[0078] Furthermore, in order to accelerate the finding of the best focal plane 13, it is expedient to take into account the currently set optical zoom level of the imaging system 1. If the zoom level is increased, for example, that is, a large zoom focal length (telephoto) is used, so that only a small image section of the object 3 is imaged on the image sensor 9 and a correspondingly high magnification of the object 3 is obtained, it is sensible to reduce the length 16 of the scanning region 14 or to reduce the number of focal planes 12 scanned within the scanning region 14. Since at high optical zoom levels, similar to a relatively short working distance 11, the depth resolution decreases, the best focal plane 13 must be found in a smaller z region along the optical z axis 8.
[0079] As in Figure 5 and 7 As illustrated in FIG. 1 , at least two z scans 27, 28 can also be performed successively in the scanning area 14 to find the optimal focal plane 13. The two z scans 27, 28 can be compared with respect to their respective lengths 18 and also with respect to the respectively used step size 15 or, for example, also with respect to the used scanning speed and, in particular, also with respect to their respective positions in the scanning area 14 (for example, the average z position z c ) aspects. Figure 7 In the example of FIG. 1 , a first coarse z-scan 27 (with relatively large distances between the individual optically scanned planes 12) extends over the entire length 16 of the scan region 14. The fine scan 28 which is carried out subsequently in time has a smaller step size 15 Δz2<Δz1 and a shorter length 18 than the first coarse scan 27. In addition, the coarse scan 27 is carried out at a lower zoom level and thus at a smaller image magnification than the fine scan 28.
[0080] More precisely, in Figure 7 In the example of FIG. 1 , for carrying out a coarse scan 27, the smallest zoom level adjustable by means of the zoom optical system 4 is first set by the controller 10, and the coarse scan 27 is carried out over the entire scan area 14. Then, only then is the zoom level previously selected by the user reset to carry out a subsequent fine scan 28 in order to receive a video image data stream. Due to the smaller step size Δz2 of the fine scan 28, the local z-resolution that can be achieved with this scan 28 is higher than the z-resolution of the coarse scan 27 previously carried out. At the same time, the finding of the best focus plane 13 is accelerated in terms of time by this two-stage approach, because the fine scan 28 is now carried out not over the entire scan area 24, but in a smaller z-region previously identified by means of the coarse scan 27, in which the best focus plane 13 is located.
[0081] exist Figure 7The individual method steps are shown in FIG. 1 by means of block arrows, wherein it can be seen that the individual focal planes 12 at the z coordinates z1 to z8 are first approached stepwise and recorded by means of the image sensor 9 (= rough scan 27 , black block arrows) and then at the z coordinate z a The first focal plane 12 of the fine scan 28 is approached at . From there, the fine scan 28 is then carried out step by step until the z coordinate z h The focal plane 12 is located at the focal plane 12. Therefore, a fine scan 28 is performed in a scanning direction 29 opposite to the coarse scan 27.
[0082] In order to determine the estimated value for the working distance 11, the control unit 10 can use not only the navigation system 36 or the position information of the 3D camera. Figure 6 Based on the position data of the robot system 34 shown in , the controller 10 can estimate the current working distance 11 (WD) and correspondingly adapt the z-scan 17 to be performed in order to find the best focus position.
[0083] A first possible implementation can therefore provide for an image-based navigation system 36, for example a 3D camera 37, which provides an estimate for the current working distance to a controller of the imaging system (wherein the controller implements an autofocus unit). If a change in the current working distance is detected by the navigation system 36, direction information for the autofocus can also be extracted, so that the controller can select a suitable scanning direction 29 for the z-scan 17. The determination of the optimal focal plane 13 (and thereby a more accurate estimate of the actual working distance 11) can then only be performed in a stationary state of the system, that is, when the working distance 11 is just no longer changing or the imaging system 1 is stationary in space.
[0084] Another possible implementation provides that the actual coordinates of the robot system 34 (e.g. Figure 6 ), the current working distance 11 is evaluated by geometric conversion. When the working distance 11 is changed by the robot system 34, the final desired working distance 11 can even be evaluated in advance with the help of target coordinates, which still need to be approached by the system 34.
[0085] A third possible implementation provides that changes in the working distance 11 between the object 3 to be visualized and the imaging system 1 are detected by means of an orientation / acceleration sensor (inertial measurement system), which is particularly useful when the operating surgeon manually adjusts the orientation of the imaging system 1 in space or the working distance 11. These different approaches can of course also be used in combination in order to always provide an accurate estimate 41 for the working distance 11.
[0086] Alternatively or in addition thereto, however, imaging system 1 can also have additional sensors, for example contactless distance sensors or, for example, an additional camera 37 . This is because such devices can also be used to determine a respective current estimated value for working distance 11 .
[0087] Fig.10 Finally, two z scans 17 are shown, which are carried out in succession in time for different estimated values 41 of the working distance 11, wherein the second z scan 17 (right) takes into account the deviations which were determined for the preceding z scan 17 (left). As shown in the left image, first of all, similar to Figure 8 and 9 Based on the first estimated value 41, the first z scan 17 is positioned such that the position z of its center c coincides with the estimated value 41. However, as can be seen, there is an object distance s defined by the determined optimal focal plane 13 o 30 and the estimated value 41. This deviation is stored as a deviation. In the subsequent z scan 17 (at Fig.10 (center right) - in response to the detected change in the working distance 11 for the new estimated value 11, the z scan is carried out, and the spatial position of the z scan 17 is adapted based on the stored deviation. For this purpose, the estimated value 41 is first corrected by the deviation and then the position z of the center of the z scan 17 is reset. c The estimated value 41 is then corrected. As can be seen, it is also possible to reduce the scanning length 16 because the scanning region 14 can already be oriented more precisely to the actual position of the object 3 by taking into account the deviation (which corresponds approximately to the error e2 between the estimated value 41 and the actual working distance 11). However, at the same time, the number of eight scanned planes (at positions z1 to z8) is maintained, so that the spatial scanning frequency is increased. As a result, the position of the best focus plane 13 can be determined more quickly and more accurately by these adaptations.
[0088] In summary, in order to improve the accuracy and speed of an autofocus method, by means of which an instantaneous best focal plane 13 can be automatically found, which enables the best possible image quality for an object 3 at a certain working distance 11 from an optical imaging system 1, it is proposed to change the spatial position (z position) as a function of an estimated value 41 for the working distance 11 and to change at least one further parameter of a z scan 17 carried out for finding the best focal plane 13. For this purpose, the estimated value 41 can be determined based on position information which is queried by an external system, for example an image-based navigation system 36 or a robotic system 34 used for the method of the imaging system 1. By means of an auxiliary adaptation of the autofocus, the time until the best focal plane 13 is found can be shortened. Reference numerals list
[0089] 1Optical imaging system
[0090] 2 Video Camera
[0091] 3 Objects
[0092] 4 zoom optics (movable or continuously adjustable)
[0093] 5 zoom actuator
[0094] 6 Focusing lenses (removable or continuously adjustable)
[0095] 7 Focus Actuator
[0096] 8 optical z-axis
[0097] 9 Image Sensor
[0098] 10 Controller
[0099] 11 Working distance (working distance – between 1 and 3)
[0100] 12 (instantaneous) focal planes (predetermined by 1 or 6)
[0101] 13 Best focal plane (to image 3 optimally and sharply onto 9)
[0102] 14 (about 12 along 8) scanning area
[0103] 15 steps (the distance between 12 after gradually adapting the position of 12)
[0104] 16 (14) Length
[0105] 17 in 14 z-scan
[0106] The length of 1817
[0107] 19 Structural components
[0108] 20 (14 of) centers
[0109] 21 Local maximum
[0110] 22 Global maximum
[0111] 23 front lens
[0112] 24 zoom lens
[0113] 25 (bidirectional) control wire
[0114] 26 objective lens
[0115] 27 Rough Scan
[0116] 28 Fine Scan
[0117] 29 (17) (instantaneous) scanning direction
[0118] 30 object distance s o
[0119] 31 principal planes (especially the last principal plane of 26)
[0120] 32 image planes (defined by 9 sensor surfaces)
[0121] 33 Image distance s i
[0122] 34 Robotic systems (designed to move 1 or to adapt 11)
[0123] 35Robotic Arm
[0124] 36 Navigation System
[0125] 37 (external) cameras
[0126] 38 patients
[0127] 39 Monitor
[0128] 40 Position sensor and / or acceleration sensor
[0129] 41 Estimated value (for 11)
Claims
1. an automatic focusing method for automatically finding the instantaneous best focal plane (13), - in, To this end, the position of a focal plane (12) of the optical imaging system (1) is shifted along an optical z-axis (8) within a scanning region (14) during a z-scan (17) by adjusting a focusing lens (6) of the optical imaging system (1), and -in, then using the imaging system (1) to visualize the object (3), It is characterized in that -Query external location information, - calculating an estimate (41) for the instantaneous working distance (11) between the imaging system (1) and the object (3) from the external position information, - adapting the position of the scanning area (14) on the optical z-axis (8), in particular the z-coordinate z of the center (20) of the scanning area (14), based on the estimated value (41); c ,and A z-scan (17) adapted in terms of its orientation is then carried out in order to identify the best focal plane (13) within the scanning region (14).
2. The automatic focusing method according to claim 1, in, determining the position of the identified best focal plane (13) independently of the estimated value (41), In particular, after carrying out the method, the focusing lens (6) is adjusted independently of the estimated value (41) so that the focusing lens (6) determines the best focal plane (13) identified in the z-scan (17).
3. The automatic focusing method according to claim 1, in, The best focal plane (13) determined by means of the z-scan (17) is at an object distance s relative to the imaging system (1). o (30), the object distance for the instantaneous working distance (11) deviates from the estimated value (41), In particular, the accuracy in determining the optimal focal plane (13) is thereby improved, in particular compared to the simple tracking of the instantaneous focal plane (12) without a new z-scan (17).
4. The automatic focusing method according to claim 1, in, The object distance s defined by the determined optimal focal plane (13) is stored in a / the object distance s defined by the determined optimal focal plane (13) o (30) and the estimated value (41), and taking the deviation into account in the subsequent z scan (17), In particular by adapting the spatial position of the subsequent z-scan (17) based on the stored deviation.
5. The automatic focusing method according to claim 4, in, Firstly, a corrected estimate (41) is calculated based on the stored deviation, and the focusing lens (6) is adjusted so that the orientation of the instantaneous focal plane (12) corresponds to the corrected estimate (41), and - firstly evaluating, preferably by means of an image-based evaluation, the focal plane (12), the position of which corresponds to the corrected estimated value (41), Preferably, a z scan ( 17 ) is then only carried out if the instantaneous focal plane ( 12 ) is assessed to be insufficiently sharp.
6. The automatic focusing method according to claim 1, in, The external location information - based on current measurement data of at least one orientation and / or acceleration sensor (40), and / or - being interrogated by a robotic system (34), by means of which the imaging system (1) is moved in space, wherein in particular the position information describes the instantaneous spatial position and / or orientation of a component of the robotic system (34), in particular a robot arm (35), which carries the imaging system (1), and / or - a query by an external, in particular image-based, navigation system (36), In this case, the external camera (37) of the navigation system (36) is preferably moved together with the imaging system (1) in space, in particular by means of a / the robot system (34).
7. The automatic focusing method according to claim 1, in, The position information is selected such that the spatial position and / or orientation of the imaging system (1), in particular the spatial position and / or orientation of an optical assembly (19) of the imaging system (1), relative to the object (3) can be determined from the position information.
8. The automatic focusing method according to claim 1, in, automatically adapting at least one further parameter of the z-scan (17) based on an estimate (41) for the instantaneous working distance (11), in particular - the length of the z-scan (17), and / or - the number of focal planes (12) optically scanned by means of the z-scan (17) within the scanning area (14), and / or - the spatial scanning frequency of the z-scan (17), and / or - the optical zoom level of the imaging system (1) used during the z-scan (17).
9. The automatic focusing method according to claim 1, in, When the length of the scanning area (14) of the z-scan (17) is shortened, the spatial scanning frequency of the z-scan (17) is increased, In particular, in order to keep the total time required for carrying out the z scan ( 17 ) constant.
10. The automatic focusing method according to claim 1, in, By adapting the at least one parameter - actively adapting the depth of field, in particular by changing the zoom level of the imaging system (1), and / or - compensating for temporal changes in the depth of field, in particular by adapting the spatial scanning frequency and / or the length (16) of the z-scan (17).
11. The automatic focusing method according to claim 1, in, determining the position of the optimal focal plane (13) by means of an image evaluation of the focal plane (12) optically scanned by means of the z-scan (17), - preferably, said image evaluation comprises an evaluation of image contrast, In particular, for this purpose a corresponding edge map of the focal plane (12) of the respective optical scan is created and / or a corresponding Fourier transformation is applied to the image data of the focal plane (12).
12. The automatic focusing method according to claim 1, in, As soon as a change in the position information and / or the calculated estimated value is ascertained based on a new query of the external position information, the position of the scanning region (14) is re-adapted and the z-scan (17) adapted in this way is re-performed, - Preferably, the query of the external location information is performed continuously.
13. The automatic focusing method according to claim 1, in, The position information includes target coordinates, and during the positioning of the imaging system (1) at the target coordinates, the focusing lens (6) has been adjusted, Preferably, the z scan (17) is performed when the imaging system (1) has reached the target coordinates and has stabilized in its spatial orientation.
14. An optical imaging system (1), in particular in the form of an exoscope or a microscope or an endoscope, for visualizing an object (3) during medical surgery, the optical imaging system include: a focusing lens (6) which can be adjusted by means of a focusing actuator (7) in order to adapt the position of a focal plane (12) of the imaging system (1) along an optical z-axis (8) during a z-scan (17), - an image sensor (9) for recording image data, and - A controller (10) for controlling a focus actuator (7), characterized in that The controller (10) is configured to select the orientation of a scanning area (14) of a z-scan (17) on the optical z-axis (8) based on an estimate (41) for the instantaneous working distance (11), and subsequently to perform the z-scan (17) within the scanning area (14) thus adapted in terms of its orientation in order to identify an optimal focal plane (13) within the scanning area (14).
15. The optical imaging system (1) according to the preceding claim, in, The controller (10) is connected or connectable to an external system, in particular a navigation system (36) and / or a robotic system (34), and is configured to receive information from the external system. - querying said estimated value (41) and / or - Query or obtain external position information and calculate the estimated value (41) from the position information.
16. The optical imaging system (1) according to claim 14 or 15, in, The imaging system (1) has a zoom optical system (4) which can be adjusted by means of a zoom actuator (5), and the controller (10) is configured to control the zoom actuator (5) as a function of the estimated value (41) in order to adapt the zoom level used during the z scan (17).
17. The optical imaging system (1) according to claim 14, in, The controller (10) is provided for controlling the focus actuator (7) and / or the zoom actuator (5) in such a way that an automatic focusing method according to one of claims 1 to 13 is implemented.
