IMAGE PROCESSING TO IMPROVE DEPTH OF FIELD, ESPECIALLY IN OBJECT MEASUREMENTS
Patent Information
- Application Number
- DE502020011413
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-01-30
- Publication Date
- 2025-07-31
- Estimated Expiration
- 2040-01-30
AI Technical Summary
Existing image processing methods for enhancing depth of field in digital images, particularly for object measurement, require significant computing power and time, especially in industrial applications, and previous approaches for processing single-shot focus scanning images do not adequately reduce these requirements.
A frequency-dependent correction function is applied uniformly to all pixels of a Fourier-transformed focus scan image to generate an image with increased depth of field, reducing the need for local corrections and computational effort.
This method efficiently generates images with enhanced depth of field without requiring high computing power or processing times, suitable for industrial object measurement and quality assurance in production lines.
Description
[0001] The invention relates to a method, a use, and an image capture system for improving the depth of field in image recordings. In particular, the invention relates to a computer-implemented solution for processing digital image files and, more specifically, for improving their depth of field. The invention is particularly directed to the field of object measurement, for which images with a greater depth of field can provide improved measurement results, for example, in optical coordinate measurement of objects and, in particular, industrially manufactured workpieces.
[0002] It is known that images captured by an image capture device (such as a camera, and in particular a digital camera) have a physically limited depth of field. This is due to fixed properties of lenses (in particular focal lengths) or exposure settings (in particular an aperture) of the image capture device during image capture. In general, depth of field can be understood as the area of object space that is sufficiently sharply imaged in a captured image (e.g., that images a desired minimum number of line pairs per millimeter with a desired minimum contrast).
[0003] For object measurements, there is often a need to achieve a high depth of field, for example in order to be able to image and measure larger areas of an object (particularly along an optical axis and / or orthogonal to the object surface) more precisely. Image processing options exist for this purpose, which create so-called EDOF (Enhanced Depth of Field) images. More precisely, in this case, several individual images are taken with different focus settings and combined to form a composite image, with the depth of field of the composite image being greater than that of any individual image. The depth of field can then also be greater than the theoretically possible or physically achievable depth of field for a single image using an image capture device.
[0004] Due to the need to capture a plurality of individual images and then evaluate and / or combine them to create the composite image, generating EDOF images requires a comparatively high amount of time and computing power. For example, capturing, saving, and evaluating a large number of individual images requires a certain amount of time and, in particular, a certain amount of computing power and processing time on the computer system used to generate the EDOF image. This is disadvantageous, for example, with regard to the necessary investment costs for suitable computer equipment or computer architecture. The required image acquisition and evaluation time can also be undesirable in industrial applications, particularly for object or workpiece measurement within production lines.
[0005] There is also an alternative approach to EDOF images for increasing depth of field by capturing images, referred to herein as focus scan images. Focus scan images are also referred to in the art as "single-shot focus scanning" (SSFS) images. In this case, a focus setting of the image capture device, particularly the focal length or the object-side working distance, is varied during image acquisition (i.e., during a continuous, uninterrupted exposure). Processing algorithms exist to then also generate images with an increased depth of field based on such a focus scan image.Even though these are sometimes also referred to as EDOF images in the state of the art due to the increased depth of field, the procedure for image acquisition differs from the classic EDOF approaches: Not a plurality of individual images are captured and evaluated, but a single image is captured to create a single image file, in which the focus setting is varied (i.e. the focal plane is varied over a scan area or scan depth during the ongoing exposure and image acquisition).
[0006] Background information on such image acquisition can be found in the following scientific article: "Imaging properties of extended depth of field microscopy through single-shot focus scanning", Lu et al., OPTICS EXPRESS 10731, April 20, 2015, doi: 10.1364 / OE.23.010714.
[0007] The above article also explains approaches to image processing, such as how an SSFS image, which is initially blurred due to the variation in the focus setting and is characterized by low contrast, can be calculated into a sharper image with increased depth of field (i.e. an EDOF image).
[0008] Even though capturing SSFS images can reduce the number of images to be acquired and evaluated compared to classic EDOF approaches, previous approaches for the subsequent evaluation or conversion of the initially blurry and low-contrast SSFS images do not always make it possible to reduce the required computing time and computing capacity to the desired extent. For example, the above article also assumes that an SSFS image is corrected locally, i.e., at the pixel level and / or individually depending on the specific image content. A location-dependent PSF (point spread function) is used for this purpose. This, in turn, requires numerous computational steps and a pixel-specific selection of suitable correction functions to generate a sharp image, which is computationally and time-intensive. Furthermore, this approach requires numerous image acquisitions with optics specifically designed for EDOF imaging, which is time-consuming and costly.
[0009] Further prior art concerning the general use of correction functions for Fourier-transformed image data can be found in the following disclosure: Guoan Zheng et al.: "Wide-field, high-resolution Fourier ptychographic microscopy" Nature Photonics, Vol. 7, No. 9, July 28, 2013 (2013-07-28), pages 739-745, XP055181687, ISSN: 1749-4884, DII: 10.1038 / nphoton.2013.187, pages 3 to 4.
[0010] There is therefore a need to improve image processing to increase the depth of field, particularly for object measurement, and furthermore to reduce the required computing time and computing capacity.
[0011] This object is achieved by the subject matter of the appended independent claims. Advantageous further developments are specified in the dependent claims. All of the introductory explanations and features may also be provided in or apply to the present invention, unless otherwise stated or apparent.
[0012] According to the invention, it was recognized that previous approaches for processing SSFS images to obtain sharp or contrast-enhanced images are in need of improvement due to the disadvantages described above. To this end, the invention essentially proposes limiting the extent of corrections performed during image processing and, more precisely, performing the correction as uniformly and globally as possible. In other words, the invention provides a correction option in the form of a frequency-dependent correction function, in particular for amplitude correction of a Fourier-transformed output image (focus scan image), whereby this correction function can be applied as globally as possible.
[0013] In other words, the same correction function can be applied to a plurality of pixels (e.g., at least 10% or at least 50% of the total pixels) or to all pixels of the source image (or their corresponding intensity values). It is therefore no longer necessary to investigate locally or at the pixel level which correction should be performed. Instead, the same correction function can always be used (i.e., for all locations), which saves computing time (e.g., because steps for identifying / executing suitable local correction functions can be omitted). It can also be ensured that the correction function itself requires limited computing capacity, which ensures a certain predictability of the required computing capacity and computing time for image processing.
[0014] Overall, this solves the technical problem of computer-implementing (digital) focus scan images that were initially captured in a blurred or low-contrast manner in such a way that images with increased depth of field (i.e., EDOF images captured using SSFS image acquisition) are generated as digital image files without requiring undesirably high computing power or processing times on a computer device used for image processing. As described below, image files are transformed and corrected in a specific way for this purpose. The properties of a computer device used are taken into account in such a way that steps that increase computing time or computing capacity (such as the initial requirement to identify suitable correction functions) are avoided as far as possible.More specifically, as a technical means to solve the above problem, a digital image processing procedure optimized to limit computing time is taught, in particular with appropriate transformation and correction of captured images or image files.
[0015] The solutions presented here are particularly suitable for object measurements, where the objects are preferably industrially manufactured workpieces. In particular, the solution presented here is directed towards the optical measurement of objects and, more particularly, towards the optical determination of coordinates, preferably spatial coordinates, of the object surface. Such object measurement preferably takes place within serial product production, in which individual products are to be checked, for example, for quality assurance purposes. This checking can advantageously also take place directly within a production line, for example when objects are removed from a production station and transported further along a production line while passing through an object measuring station.
[0016] In particular, a method for (digital) image processing, in particular for object measurements, is proposed, comprising: Recording an output image of an object with an image capture device (e.g. a digital camera), wherein the output image is a focus scan image (or SSFS image) in which a focus setting (e.g. the position of a focal plane and / or a focal length and / or a focus distance) of the image capture device is varied during image capture (i.e. during individual image capture of the output image) (e.g. by means of micromirror arrays, acousto-optical modulators or actuated lenses); (preferably computer-implemented) performing a Fourier transform of the output image; generating a corrected image (correction image) by means of a frequency-dependent correction function which is applied to the Fourier transform of the output image (i.e. applied to the Fourier-transformed output image).
[0017] Preferably, the same correction function is used for a plurality of different pixels of the output image, in particular independently of pixel values of these pixels.
[0018] In contrast to the above-mentioned prior art solutions, the application of a PSF that is only locally effective and / or focus-independent can be dispensed with. The alternatively provided Fourier transformation, on the other hand, acts globally on all pixels in the image space.
[0019] The focus adjustment speed when capturing the initial image is preferably greater than the frame rate to allow focus variation during the capture of a single image. Examples of suitable speeds are given in the figure description.
[0020] The method can generally be carried out in a computer-implemented manner, in particular with regard to the measures of performing a Fourier transformation and / or generating (e.g., calculating) a correction image. All other method measures described herein can also be carried out in a computer-implemented manner, unless otherwise stated or apparent. The acquisition of the output image can also be described as computer-implemented by controlling the image capture device and / or storing the output image captured thereby in a digital storage device.
[0021] All images captured and generated herein may be digital images (i.e., image files) that are available, for example, in a conventional manner in a suitable digital data format. For example, individual pixel values (i.e., intensity values at corresponding pixel positions) can be stored in or as corresponding image files. All measures described herein can be executed user-autonomously (i.e., automatically and / or without mandatory user input), for example, after an object measurement process has been initiated or triggered by a user.
[0022] The final correction image can be used for automatic or manual object measurement and, in particular, for quality control. Known image analysis algorithms, pattern recognition methods, and the like can be used for this purpose.
[0023] The focus setting can be varied according to known SSFS approaches described in the introduction. In particular, the focus setting can be varied with an open aperture and / or a prolonged exposure time. This can be referred to as scanning a certain focus area, i.e., shifting a focal plane within a corresponding scan area. Therefore, in the following, we will refer to focus scanning instead of varying the focus setting, and refer to corresponding scan areas.
[0024] In this way, a generally blurred and low-contrast SSFS image can initially be generated. This can then be converted or processed using the correction function according to the invention to create an image with a computationally or artificially increased depth of field. The resulting image, referred to herein as the correction image, can therefore also be referred to as an EDOF image, even if the initial acquisition of the source image (SSFS image) is not performed using classic EDOF approaches (e.g., not by capturing a plurality of independent images, each captured with different focus settings).
[0025] Using the Fourier transformation, the image content (in particular image or spatial frequencies) can be transformed into the amplitude and phase space, with only amplitudes preferably being considered for the further correction process. Fourier transformations are known per se from the prior art. The correction function can preferably be limited to a correction of the amplitude. Therefore, optionally no phase correction is carried out using the correction function, as this could distort image content. This limits the required computing effort, but at the same time leads to satisfactory results. For example, it was recognized according to the invention that when recording focus scan images, the amplitudes of individual image frequencies, and in particular high image frequencies, can be suppressed (i.e. attenuated) to a comparatively high extent.Using the correction function presented here, such amplitude suppressions can be reversed and, in particular, undesirably strongly attenuated amplitudes can be re-amplified. This allows for a sharp image, especially after inverse transformation.
[0026] Advantageously, the invention provides for the use of the same correction function, as described above, independently of a currently viewed pixel or region of the source image, or for its application to image content transformed globally by a Forurier transformation. In particular, the correction function can be global and used for all pixels or images of the source image.
[0027] One possibility for correcting the output image is to set up a pixel value matrix of the output image, to Fourier transform this and then to correct the correspondingly transformed expression (preferably only the amplitude and not the phase components) in a frequency-dependent manner using the correction function. The correction function can comprise an amplitude correction factor for each frequency (or at least for a plurality of frequencies), which can be multiplied by the corresponding amplitude component of the Fourier-transformed pixel value matrix. The correction factor can in particular amplify or, if necessary, also attenuate the corresponding amplitudes. The result of this correction (i.e. the frequency-dependent orfrequency-specific multiplication of the amplitude components) can then be converted back into a pixel value matrix by inverse transformation, whereby this pixel value matrix can correspond to the correction image described here.
[0028] The relationship described above can be expressed by the following equation, in which image corr denotes the pixel value matrix of the correction image, image SSFS denotes the pixel value matrix of the output image (focus scan image), K(f) denotes the frequency-dependent correction function containing amplitude correction factors for each considered frequency f, F denotes a Fourier transform and F -1< denotes an inverse Fourier transform: Bild korr = F − 1 F Bild SSFS * K f
[0029] According to a further development, the correction function can be used for a frequency-dependent amplitude correction of the output image or, in other words, is configured to perform a frequency-dependent amplitude correction of the output image. As mentioned, frequency-dependent amplitude correction factors can be stored within the correction function for this purpose.
[0030] Furthermore, one embodiment provides that if no correction function is available for a frequency of the output image, a usable correction function is calculated from at least one correction function for a different frequency. The frequency can in turn be a spatial or image frequency. The usable correction function can be the correction function that is ultimately used for the correction and / or results from the calculation based on the at least one further correction function for a different frequency. For example, the usable correction function can be interpolated from the at least one correction function (or preferably at least two correction functions), in particular linearly interpolated.
[0031] In an analogous manner, if no correction expression (e.g., correction factor and, more precisely, amplitude correction factor) is available within the correction function for a frequency of the output image, a usable correction expression is calculated from at least one correction expression for another frequency. For example, correction expressions and, in particular, amplitude correction factors of the correction function can then be interpolated to determine a suitable amplitude correction factor for the desired frequency.
[0032] Using the above variants, the requirements for the correction function are reduced and it is possible to react flexibly to incomplete correction functions, which enables low-effort yet reliable image processing.
[0033] According to the invention, a correction function is used that was determined based on a comparison of a reference image of an object and a focus scan image (SSFS image) of the same object. Particularly within the scope of the method, the step of determining the correction function based on this comparison (a reference image of an object and a focus scan image of the same object) can be provided as a separate measure.
[0034] The reference image can be characterized by a preferred depth of field and / or a preferred image contrast that is also comparable to the desired depth of field and / or the desired image contrast of the correction images to be determined. It can therefore be a type of target image or even an ideal image that is to be approximated with the correction image. Options for acquiring the reference image are explained below. In particular, the reference image can be generated using classic EDOF methods based on a plurality of individual image acquisitions, but with different focus settings. In this way, the depth of field can be artificially increased (i.e. computationally, without this being physically possible with the image acquisition device itself).
[0035] The comparison can be used to determine which desired properties (particularly image frequencies) are suppressed and / or distorted in the focus scan image compared to the reference image. The correction function can then be configured to at least partially correct these deviations from the reference image. This particularly applies to the amplitude correction described herein, i.e., preferably the adaptation and, in particular, amplification of frequencies suppressed or attenuated in the focus scan image (more precisely, the amplitudes of these image frequencies).
[0036] Determining such a correction function provides a simple way of correcting the focus scan image in a desired manner. In particular, the correction function can also be determined by users with low qualifications and can preferably also be determined in an application-specific, object-specific, and / or scan-area-specific manner, as explained below. Furthermore, this enables the generally preferred determination of a global correction function according to the invention, since it is considered at a higher level, so to speak, which type of frequencies are suppressed and in what way, and this can then be applied, independent of specific local conditions or individual pixel values, to preferably the entire focus scan image within the scope of the correction described herein.
[0037] According to the invention, the correction function is or was determined based on a comparison of the frequency-dependent amplitude ratio of the Fourier-transformed reference image and the Fourier-transformed focus scan image. For example, a quotient can be formed from the Fourier-transformed reference image and the Fourier-transformed focus scan image, which is explained by way of example using the following equations. Frequency dependence is achieved through the respective Fourier transformation, since this produces matrices whose entries represent frequencies in the image matrix. By forming such an amplitude ratio, the frequency-dependent attenuation or suppression of individual image frequencies in the focus scan image can be determined quickly and with little computational effort and can be at least partially reversed using the correction function.
[0038] In particular, the correction function (e.g., within the scope of the comparison described above) can be determined as follows, where K again denotes the correction function, f is the frequency (i.e., image frequency or spatial frequency), abs() is an absolute value function, Image_Calib is a pixel value matrix of the reference image of the object, and Image_Calib SFFS is a pixel value matrix of the focus scan image of the object (calibration structure): K f : abs F Bild _ Kalib / abs F Bild _ Kalib SFFS
[0039] In the context of the Fourier transforms, which are again denoted by F, only the amplitude components can be considered, not the phase components. This is due to the application of absolute magnitude functions. For the calculation of K(f), the Fourier transforms are also evaluated at the frequency f.
[0040] As already indicated in connection with equation (2), the common object captured by the reference image and the output image can be a calibration structure. In particular, a further development provides that a calibration structure is used as the object which, at least in some regions, has at least 50 or at least 100 and preferably at least 400 line pairs per millimeter and / or which can be imaged with correspondingly sharp resolution using optics since these have a sufficient limiting resolution. The limiting resolution (as period p) of the imaging optics is given by p = λ / (2*NA), with λ as the imaging wavelength and NA as the (object-side) numerical aperture of the imaging system. For example, the limiting resolution for imaging the calibration structure can be selected as follows: p = 0.5µm / (2*0.1) = 2.5µm, which corresponds to 400 line pairs per millimeter.
[0041] The calibration structure can be two-dimensional. It can be, for example, a printed optical target or an optical marker. In particular, the calibration structure can comprise a Siemens star or a comparable known optical target characterized by the highest possible frequency spectrum and / or the highest possible cutoff frequency and, for example, has or enables the above-mentioned reference value for line pairs per millimeter.
[0042] Preferably, the calibration structure is directionally isotropic, which is the case, for example, with a Siemens star. The calibration structure can also be implemented as or via a flat chrome mask. This can be captured, for example, using a single image.
[0043] The calibration structure advantageously allows for the acquisition of sharply imaged reference images for many image frequencies, thus allowing the frequency-dependent amplitude attenuations in the focus scan image to be sufficiently identified (since comparable features are present and mapped in the acquired reference image). This provides a meaningful and easily acquired reference image.
[0044] Alternatively or additionally, the reference image can be generated using an EDOF method, which particularly means that a plurality of images of the object (and / or the calibration structure) are captured with differing focus settings and combined or calculated to generate an EDOF image with increased depth of field. Since known EDOF algorithms can generate object images with a preferred depth of field, a meaningful reference state can also be mapped and used as a comparison or reference for the focus scan image.
[0045] Likewise, it may be provided to record a calibration structure (in particular according to any aspect already discussed above) multiple times from different viewing directions and to generate the reference image from this. For this purpose, the calibration structure can be rotated about the optical axis of the imaging system and / or generally in the object plane, whereby directional isotropy can also be generated in each case. By recording a calibration structure from multiple directions, the total spatial frequencies imaged (i.e., the corresponding spatial frequency spectrum) can be expanded, even if initially only a limited frequency spectrum is present within the calibration structure. In this way, the requirements for the calibration structure can be reduced, and a meaningful reference image can still be generated to determine the correction function.
[0046] As explained below, the correction function can be determined on an object-specific basis, e.g., in order to preferably carry out object measurements for a plurality of similar objects based thereon. Additionally and alternatively, the correction function can be determined on a scan-area-specific basis, e.g., in order to serve as a specifically adapted correction function for scan areas actually traversed when capturing the initial image (i.e., the actual variation spectrum of the focus setting). The correction function can therefore be determined or determined for a specific applied focus scan area. In both cases, the quality of the image correction can be increased (i.e., the depth of field of the correction image generated as part of the correction can be improved), since the correction function is specifically adapted to the specific conditions present when capturing the initial image. It can also be provided that the correction function is independent of the captured object and, for example,under similar recording conditions during the subsequent object measurement (e.g. in the same premises, in the same laboratory or generally under the same lighting conditions) or, more precisely, on the basis of images taken under corresponding analogous environmental conditions as a subsequent object measurement.
[0047] As mentioned, object-specific correction functions can also be provided. In this case, it can be provided in particular that, as part of the determination of the correction functions, the same or a similar object is captured using a reference image and an initial image, which is also to be measured later as part of a real object measurement. For example, a component can be removed from a production line, captured using a reference image and an initial image to determine the correction function, and then other similar objects from this production line can be optically measured using this object-specific (or object type-specific) correction function. In this way, the correction function is determined specifically for a concrete capture or measurement task, which increases the quality of the image processing and, in particular, the correction.
[0048] In general, specific correction functions can be generated by ensuring that the images used to determine the correction functions (in particular the SSFS image) are correspondingly specific, ie, they capture the same object type, have the same scan area, or are acquired under comparable (e.g., lighting) conditions.
[0049] More specifically, a further development provides that the correction function can be used for a specific variation of the focus setting (e.g., traversing a specific focus scan area) when capturing the output image. In other words, the correction function can be valid for a specific variation of the focus setting that occurs when capturing the output image and / or can be determined, stored, and / or generated specifically for this purpose. A scan-area-specific collection of correction functions can therefore also be determined and preferably stored, for example in a memory device of an image capture arrangement according to the invention explained below. Depending on subsequent actual object measurements carried out and, in particular, actual capture of the output image, the appropriate correction function for correcting this output image can then be selected.This can improve overall quality by using a correction function adapted to the specific acquisition conditions. In the context of the above comparison with a reference image, the SSFS image used there may have been acquired with the specific focus setting variation.
[0050] In this context, it can further be provided that if no usable (or even valid) correction function is available for correcting the output image (i.e., no usable or valid correction function for the specific variation of the focus setting), a usable (focus setting variation-specific) correction function is calculated based on at least one existing correction function. In particular, a usable correction function can be interpolated. In other words, a suitable correction function for an actually performed or existing variation of the focus setting can be calculated and, in particular, interpolated from an above-mentioned collection of preferably pre-stored scan area-specific correction functions.In this way, requirements for the completeness of the scan area-specific correction functions to be determined are limited and a high quality of the image correction can still be guaranteed.
[0051] The invention also relates to the use of a frequency-dependent correction function for a plurality of different pixels of a Fourier-transformed output image, which is a focus scan image in which a focus setting of the image capture device is varied during image acquisition.
[0052] In particular, it can be provided that the correction function can be used to carry out a frequency-dependent amplitude correction of the output image (or of its respective pixels or pixel values).
[0053] The use may include any further feature, any further method step, any further measure, and any further development to provide all of the advantages, effects, operating states, or method states described herein. In particular, the frequency-dependent correction function may be used and further developed in the sense of any method aspects described herein. In general, a method according to any of the above aspects can be carried out by appropriately using the correction function, or the use may also include any of the variants, uses, and further developments explained above in connection with the method features.
[0054] Furthermore, the invention relates to an image acquisition arrangement, in particular for object measurement, comprising: a (preferably digital) image capture device configured to record at least one output image while varying a focus setting of the image capture device during image acquisition (so that the output image is, in particular, a focus scan image of the type described herein); and a computer device configured to perform a Fourier transform of the output image and generate a corrected image by means of a frequency-dependent correction function applied to the Fourier transform of the output image. Preferably, the same correction function is used for a plurality of different pixels of the output image.
[0055] The computer device can be operated digitally and / or electronically. It can comprise at least one digital and / or electronic processor device. Furthermore, it can comprise a preferably digital memory device in which, for example, a plurality of scan area-specific, object-specific, or recording condition-specific (i.e., relating to environmental conditions during recording) correction functions are stored. The computer device can be configured to select a suitable correction function depending on the currently prevailing conditions (e.g., the current scan area, the object, or the recording conditions) and / or to determine it in the manner explained above using stored correction function(s) (e.g., by interpolation).
[0056] In general, the computer device can be integrated into the image capture device. However, it can also be a separate computer device (e.g., provided in a separate housing or spatially separated), e.g., a conventional PC. The computer device can receive image files (in particular, pixel value matrices) captured by the image capture device and, in particular, an image sensor. The computer device can then be configured to perform all of the image processing and / or manipulation steps described herein.
[0057] In particular, the computer device can perform a correction of the original image according to any of the aspects described herein. Intermediate results and also final results (i.e., the corrected and preferably Fourier-inversely transformed correction image) can be stored in the storage device.
[0058] In general, the image capture device may have all further features, functions, and properties to provide and / or implement all of the advantages, operating states, method steps, and effects described herein. In particular, all explanations and further developments of the above method features may also apply to the identical features of the image capture device or be provided for the same.
[0059] According to a further development, it is provided that a plurality of similar objects can be measured consecutively with the image capture arrangement and the correction function is valid and / or usable for this specific object type (i.e. was determined object-specifically (see above) and / or wherein the correction function is usable for the specific focus setting variation when recording the initial image. In the manner explained above, correction functions adapted to specific recording conditions or to a specific recording task can then be provided and used, thereby increasing the quality of the image processing and in particular the correction.
[0060] The invention is explained below with reference to the accompanying figures. For similar or similarly effective features, identical features may be used across the figures. Fig. 1 shows an image capture arrangement according to an embodiment of the invention, which carries out a method according to an embodiment of the invention; Fig. 2 shows a schematic flow diagram of a method according to the invention according to the embodiment of Fig. 1 .
[0061] In Fig. 1 an image capture arrangement 10 according to an embodiment of the invention is shown, wherein the image capture arrangement 10 also has the following with reference to Fig. 2 explained method according to an embodiment of the invention. For the sake of completeness, it should be mentioned that in this context, a correction function is also used according to the invention.
[0062] The image capture arrangement 10 comprises an image capture device 12 in the form of a digital camera. This comprises an image sensor 14, which, in a manner known per se, generates a digital pixel value matrix upon exposure. Also shown is an objective arrangement 16, which comprises a single objective lens 18 merely by way of example. Focus settings can be made using the objective arrangement 18 and, in particular, the position of a focal plane or its focus distance D can be varied as a focus setting. The illustration of the objective arrangement 16 is merely schematic and exemplary. Background information regarding the objectives and lenses that can be used for the SSFS image capture assumed herein can be found, for example, in the scientific article by Lu et al. mentioned in the introduction. Also indicated only schematically is an aperture 20, which is opened for image capture in order to expose the image sensor 14.
[0063] To capture focus scan images (SSFS images), the aperture 20 is opened and held open, while the focus distance D is varied, for example, by moving the lens 18. It is preferred that the rate of change of the focus distance D (i.e., the focusing speed) is sufficiently fast and, in particular, greater than an image acquisition rate, so that exposures with several different focus settings (or focus distances D) can be performed within one image exposure time.
[0064] During image acquisition, it is further preferred that the image situation remains unchanged, i.e., for example, that no relative movements occur to the object 22. It is particularly preferred that the image acquisition device 18 or the lens 16 be telecentric. Furthermore, it is preferred that the ambient conditions do not change during the acquisition of a focus scan image, which applies in particular to an exposure situation.
[0065] For example only, a focusing speed of 500mm / s compared to an image acquisition rate of 300 Hz can be assumed, which would enable a focus scan range of approximately 1.7mm during one exposure.
[0066] The range within which the focus distance D is changed is also called the focus scan range. It refers to the difference or distance between the largest and smallest focus settings, i.e., in this example, the largest and smallest focus distance D.
[0067] An image captured in this way is transmitted via a data line 24 indicated by dashed lines to a computer device 26. This comprises a schematically indicated processor device 28 and a likewise schematically indicated memory device 30. The processor device 28 is configured to execute algorithms that are stored, for example, on the memory device 30. By executing these algorithms (and / or generally program instructions that are contained, for example, in the algorithms), a correction of the output image captured by the image capture device 12 can be carried out according to any of the variants described herein. The ultimately generated correction image can then be stored in the memory device 30.
[0068] As described, the image capture device 12 captures a focus scan image of an object 22 to be measured and transmits this via data line 24 to the computer device 26. The subsequent corrective measures, which are carried out by the computer device 26, are described below with reference to Fig. 2 explained in more detail.
[0069] In Fig. 2 the course of a correction procedure, as with order 10 from Fig. 1 executable, explained in more detail.
[0070] In this context, the determination of a correction function is first discussed, which according to the invention can be provided as separately executed or included procedural measures, but is not necessary in every case, since previously determined or already available correction functions can also be used.
[0071] In a step S1, a focus scan image 32 is acquired from a calibration structure 34 (for example, a Siemens star) in the manner explained above, varying the focus distance D. Likewise, a significantly sharper reference image 36 representing a target position is acquired from the same calibration structure 34. In a step S2, a correction function K, which is frequency-dependent, is then determined in the manner described above using equation (2).
[0072] In this context, the above-mentioned specific correction functions K can be generated by at least one of the images 32, 34 being generated in a correspondingly specific manner (ie the specific object type being captured, being captured under the specific recording conditions or with the specific scanning area).
[0073] In a step S3, a focus scan image 32 is again acquired from the object 22 to be measured.
[0074] In a step S4, this focus scan image 32, which is an initial image for the actual image processing, is Fourier transformed and processed using the frequency-dependent correction function K(f) with subsequent Fourier inverse transformation to obtain a sharper and higher-contrast correction image 38. For this purpose, the above-explained equation (1) and the measures described in this context can be used.
[0075] Not separately in Fig. 2 It is shown that other possibilities for determining the correction function K(f) also exist, in particular the possibilities explained in the general description section for determining an object-specific, focus scan area-specific or recording condition-specific correction function K(f). If such correction functions K have been determined beforehand, they can be stored, for example, in the memory device 30 of the computer device 26. In a step S3 from Fig. 2In an upstream or downstream step, a suitable correction function K can then first be selected. If necessary, a correction function K can also be calculated and, for example, interpolated as described in the introductory section of the description. This also applies if no correspondingly specific correction functions have been determined, but no suitable correction function and / or no suitable correction expressions within a correction function (e.g., no suitable amplitude correction factors) are available for a specific frequency in the Fourier-transformed output image 32.
[0076] It should be mentioned that by means of the correction function K in the example shown and, as explained in more detail above, frequency-dependent amplitude corrections of the Fourier-transformed output image 32 take place, for which the correction function K contains corresponding amplitude correction factors for a plurality of image frequencies, which are then applied to the amplitude values of the corresponding image frequencies in the Fourier-transformed output image 32 (see equation (1) above).
Claims
1. Method for image processing, in particular for object measurement, comprising: - capturing a source image (32) of an object (22) using an image acquisition device, wherein the source image is a focus scanning image, in which a focus setting (D) of the image acquisition device is varied during image acquisition; - performing a Fourier transformation of the source image (32); - generating a corrected image (38) by means of a frequency-dependent correction function (K) applied to the Fourier transform of the source image (32), characterized in that the correction function (K) is determined on the basis of a comparison of a reference image (36) of an object and a focus scanning image (32) of the same object, wherein, in the process of the comparison, the frequency-dependent amplitude ratio of the Fourier-transformed reference image (36) and the Fourier-transformed focus scanning image (32) is determined.
2. Method according to Claim 1, wherein the object imaged for determining the correction function corresponds to the object (22) acquired by means of the source image (32) or is a calibration structure (34) or an object similar to the object (22) acquired by means of the source image (32).
3. Method according to Claim 1 or 2, wherein a frequency-dependent amplitude correction of the source image (32) can be performed by way of the correction function (K); and / or wherein the same correction function (K) is used for a plurality of different pixels of the source image (32), in particular independently of pixel values of these pixels.
4. Method according to any of the preceding claims, wherein, if there is no correction function (K) and / or no correction expression within the correction function for a frequency of the source image (32), a usable correction function (K) and / or a usable correction expression from at least one correction function (K) and / or at least one correction expression is calculated for a different frequency.
5. Method according to any of the preceding claims, wherein the reference image (36) is characterized by a higher image sharpness than the focus scanning image (32).
6. Method according to any of the preceding claims, wherein a calibration structure (34) which has in at least some areas at least 50 or at least 100 line pairs per millimetre is used as the object for determining the correction function (K).
7. Method according to any of the preceding claims, wherein the reference image (36) is determined by means of an EDOF method, Enhanced Depth of Focus method, or by capturing a calibration structure (34) from different viewing directions.
8. Method according to any of the preceding claims, wherein the correction function (K) can be used for a specific variation of the focus setting (D) when the source image (32) is captured.
9. Method according to Claim 8, wherein, if there is no usable correction function (K) for the correction of the source image (32), a usable correction function (K) is calculated on the basis of at least one present correction function (K).
10. Method according to any of the preceding claims, wherein the correction function (K) can be used for a specific type of object acquired by image acquisition.
11. Use of a frequency-dependent correction function (K) for a plurality of different pixels (P) of a Fourier-transformed source image (32), which is a focus scanning image, in which a focus setting of an image acquisition device (12) is varied during image acquisition, characterized in that the correction function (K) is determined on the basis of a comparison of a reference image (36) of an object and a focus scanning image of the same object, wherein, in the process of the comparison, the frequency-dependent amplitude ratio of the Fourier-transformed reference image (36) and the Fourier-transformed focus scanning image (32) is determined.
12. Use of a frequency-dependent correction function (K) according to Claim 11, wherein a frequency-dependent amplitude correction of the source image (32) can be performed by way of the correction function (K).
13. Image acquisition arrangement (10), in particular for object measurement, comprising: - an image acquisition device (12) designed to capture at least one source image (32) by varying a focus setting (D) of the image acquisition device (12) during image acquisition; and a computer device (26) designed to perform a Fourier transformation of the source image (32); wherein - the computer device (26) is also designed to produce a corrected image (38) by means of a frequency-dependent correction function (K) applied to the Fourier transform of the source image (32), characterized in that the computer device (26) is also designed to use the same correction function (K) for a plurality of different pixels (P) of the source image (32), and to determine the correction function (K) on the basis of a comparison of a reference image (36) of an object (22) and a focus scanning image of the same object, wherein, in the process of the comparison, the frequency-dependent amplitude ratio of the Fourier-transformed reference image (36) and the Fourier-transformed focus scanning image (32) is determined.
14. Image acquisition arrangement (10) according to Claim 13, wherein the correction function (K) can be used for an object type captured in images; and / or wherein the correction function (K) can be used for the specific focus setting variation when the source image (32) is captured.
15. Image acquisition arrangement (10) according to Claim 13 or 14, wherein the object imaged for determining the correction function corresponds to the object (22) acquired by means of the source image (32) or is a calibration structure (34) or an object similar to the object (22) acquired by means of the source image (32).