The present invention relates to an apparatus for generating a synthetic 2D image with an enhanced depth of field of an object, to a method for generating a synthetic 2D image with an enhanced depth of field of an object, as well as to a computer program element and a computer readable medium.
Imaging systems are limited by their depth of field, with an imaging system being arranged to have a focal point with a depth of focus centred around a feature to be imaged. However, some features that also are desired to be imaged can be closer to the imaging system than the focal plane and outside of the depth of focus and be out of focus. The same applies for features that are further away that the feature at tight focus.
It would be advantages to have an improved technique for generating an image of an object, where the image has an enhanced depth of field.
The object of the present invention is solved with the subject matter of the independent claims, wherein further embodiments are incorporated in the dependent claims. It should be noted that the following described aspects of the invention apply also for the apparatus for generating a synthetic 2D image with an enhanced depth of field of an object, the method for generating a synthetic 2D image with an enhanced depth of field of an object, and the computer program element and the computer readable medium.
According to a first aspect, there is provided an apparatus for generating a synthetic 2D image with an enhanced depth of field of an object, the apparatus comprising:
an image acquisition unit; and
a processing unit.
The image acquisition unit is configured to acquire first image data at a first lateral position of the object and second image data at a second lateral position of the object. The image acquisition unit is also configured to acquire third image data at the first lateral position and fourth image data at the second lateral position, wherein the third image data is acquired at a down range distance that is different than that for the first image data and the fourth image data is acquired at a down range distance that is different than that for the second image data. The processing unit is configured to generate first working image data for the first lateral position, the generation comprising processing the first image data and the third image data by a focus stacking algorithm, and the processing unit is configured to generate second working image data for the second lateral position, the generation comprising processing the second image data and the fourth image data by the focus stacking algorithm to generate second working image data for the second lateral position. The processing unit is configured to combine the first working image data and the second working image data, during acquisition of image data, to generate the synthetic 2D image with an enhanced depth of field of the object.
Down range distance means a distance that is down range, or in other words that is at a distance from the apparatus or a specific part of the apparatus. Thus, objects, or parts of an object, that are at different down range distances are at different distances from the apparatus, i.e. one object or part of an object is further away from another object or another part of the object.
A discussion on focus stacking can be found on the following web page: https://en.wikipedia.org/wiki/Focus_stacking.
In this manner, a 2D image with enhanced depth of field can be acquired “on the fly”. To put this another way, the 2D image with enhanced depth of field can be acquired in streaming mode. A whole series of complete image files need not be captured and stored, and post-processed after all have been acquired, but rather the enhanced image is generated as image data is acquired.
In other words taking the down range distance to extend in a z direction, a 2D image that extends in the x and y directions can have features in focus at different x, y positions where those features are in focus over a range of down range distances z that is greater than the depth of focus of the image acquisition unit at a particular x, y position. And, this 2D image with enhanced depth of field is generated on the fly. In this particular coordinate system, z is used to denote a down range distance, with x and y then relating to coordinates perpendicular to that. This does not mean that the apparatus is limited to imaging vertically; rather “z” here can apply to a vertical, horizontal or other axis. In other words “z” is being used to denote the down range direction in order to help explain the configuration and operation of examples of the apparatus.
In this manner, imagery can be acquired on the fly without having to save intermediate images in generating an image with enhanced field of view. Furthermore, the image with enhanced field of view can be obtained as the projection of the detector of the apparatus sweeps through the object, for example either laterally or in a direction parallel to a down range axis, or even in a direction between lateral and parallel, such as obliquely. In other words, an image with enhanced depth of field can be obtained in a single pass, and without the requirement for a large image buffer.
In an example, the image acquisition unit comprises a detector configured to acquire image data of an oblique section of the object.
In this manner, by acquiring image data of an oblique section, a lateral scan (in an example the lateral scan direction is in a horizontal direction) also acquires data in the down range distance direction (e.g. in the z direction, which can also be in a vertical direction). The lateral scan can be provided when the second section is displaced horizontally or laterally from the first section in a direction perpendicular to an optical axis of the image acquisition unit. For example an imaging lens is moved in a lateral direction to laterally displace the section and/or the object is moved in a lateral direction relative to the imaging and acquisition part of the image acquisition unit to laterally displace the section. In other words, the image acquisition unit scans across the object, with a sensor that is acquiring data at different down range distances and at different lateral positions at the same time. In an example, the apparatus can be in a laboratory environment for example acquiring imagery of a fly with an enhanced depth of field and the fly is on a translation stage that moves the fly laterally with respect to the image acquisition unit. In an example, the apparatus is mounted on a system that is itself moving. For example, the apparatus is mounted on a Unmanned Aerial Vehicle (UAV) that is imaging an urban landscape, where movement of the UAV enables images at different lateral positions to be acquired. Due to the sensor acquiring an oblique section, the sensor can now acquire data at the same lateral position as for the previous acquisition but now at a different down range distance. In an example, the apparatus can form part of an industrial vision inspection system, for example for semiconductor electronics. In another example, the apparatus forms part of a panoramic camera that is rotated on a tripod, and swings through an angle (for example 360 degrees). The panoramic camera, then generates a 360 degree view of the environment with an enhanced depth of field, because the sensor acquires an oblique section with data acquired at the same lateral position at different down ranges, enabling the image to be generated on the fly that contains the best image data at each lateral position. In this manner, the image data at the same lateral position but at different down range distances can be compared to determine which image data contains the feature being in the best focus (the feature is at some down range distance in the object—here the object can be the 360 degree view of the urban landscape and a feature can be a fresco on the front of a church that is within this 360 view, for example). Then the image data with best focus at that lateral position can be used to populate a developing image with enhanced depth of field. In an example, as the sensor is scanned laterally different regions of the sensor can be activated such that a region of the sensor acquires the first image data and a different region of the sensor acquires the third image data. Therefore, as discussed “laterally” does not imply a mathematical straight line or axis, but can be a curve (as in the 360 degree panoramic sweep) or indeed can be a straight line.
In an example, the detector is a 2D detector comprising at least two active regions. In an example each active region is configured as a time delay integration (TDI) sensor. By providing a TDI detector, the signal to noise ratio can be increased.
In an example, the image acquisition unit is configured to acquire image data of a first section of the object to acquire the first image data and the second image data, and wherein the image acquisition unit is configured to acquire image data of a second section of the object to acquire the third image data and the fourth image data.
In other words, the image acquisition unit can scan through the object in a down range direction, or scan laterally through the object. In this manner, a 2D image with enhanced depth of field can be acquired “on the fly” by acquiring image data at different down range distances of the object with lateral parts of the object being imaged by the same part of a detector, or by different parts of the detector.
In an example, the image acquisition unit is configured to acquire the first image data at the first lateral position of the object and at a first down range distance and to simultaneously acquire the second image at the second lateral position of the object and at a second down range distance, wherein the first down range distance is different to the second down range distance; and wherein the image acquisition unit is configured to acquire the third image data at the first lateral position and at a third down range distance and to simultaneously acquire the fourth image data at the second lateral position and at a fourth down range distance, wherein the third down range distance is different to the fourth down range distance.
In other words the image acquisition unit is simultaneously acquiring data at different lateral positions and at different down range distances, then data at the same lateral position but at different down range distances can be compared to determine the best image data of a feature at that lateral position (i.e. that which is best in focus) that is to be used as a working image for the generation of the 2D image with enhanced depth of field. In this manner, in a single scan of the detector relative to the object in a lateral direction, image data is also acquired in the down range distance direction, and this can be used efficiently to determine an 2D image with enhanced depth of field without having to save all the image data and post process. In other words, on the fly generation of the 2D image with enhanced depth of field can progress efficiently.
In an example, the image acquisition unit has a depth of focus at the first lateral position and at the second lateral position neither of which is greater than a distance in down range distance between the down range distance at which the first image data is acquired and the down range distance at which the second image data is acquired.
In this manner, image data at different down range distances can be efficiently acquired optimally spanning a down range distance of the object that is greater than the intrinsic depth of focus of the image acquisition unit, but where image data at particular lateral positions can be processed in order to provide image data at those lateral positions that is in focus, but which is at a range of down range distances greater than depth of focus of the image acquisition unit. In this manner, different features at different down range distances can all be in focus across the 2D image having enhanced depth of field, and this enhanced image can be acquired on the fly without having to save all the image data acquired to determine the best image data.
In an example, the object is at a first position relative to an optical axis of the image acquisition unit for acquisition of the first image data and second image data and the object is at a second position relative to the optical axis for acquisition of the third image data and fourth image data.
In an example, the image data comprises a plurality of colours, and wherein the processing unit is configured to process image data by the focus stacking algorithm on the basis of image data that comprises one or more of the plurality of colours.
In a second aspect, there is provided a method for generating a synthetic 2D image with an enhanced depth of field of a object comprising:
In an example, step a) comprises acquiring the first image data at the first lateral position of the object and at a first down range distance and simultaneously acquiring the second image at the second lateral position of the object and at a second down range distance, wherein the first down range distance is different to the second down range distance; and wherein step b) comprises acquiring the third image data at the first lateral position and at a third down range distance and simultaneously acquiring the fourth image data at the second lateral position and at a fourth down range distance, wherein the third down range distance is different to the fourth down range distance.
In an example, the method comprises:
wherein, step e) comprises selecting either the first image data or the third image data as the first working image, the selecting comprising a function of the first energy data and third energy data; and
wherein frequency information in image data is representative of energy data.
In this manner, the enhanced image can be efficiently generated such that at a particular lateral position it has a feature that is in best focus at that position. In other words, across the image irrespective of down range distance, features that are in best focus are selected, as a function of energy data for image data, and this can be done on the fly in a streaming mode.
In an example, the method comprises:
In this manner, only the already generated 2D image with enhanced depth of field need be saved (the working image) that lies behind the region already swept (or scanned) by the detector and also a working energy data file associated with the pixels of the 2D enhanced image that can be updated needs to be saved. Therefore, the storage of data is minimised, and the 2D image with enhanced depth of field can be further updated based on a comparison of the energy data now acquired with the stored energy data to update the enhanced image.
In an example, the method further comprises:
In other words, the working image data for a lateral position can be updated on the basis of new image data that is acquired at that lateral position, to provide the best image at that lateral position without having to save all the previous image data, and this can be achieved as the data is acquired. Once, the projection of the detector (section) has completely swept past a particular lateral position, then the image data will be formed from the best image data acquired at that lateral position and this will have been determined on the fly without each individual image data having to be saved, only the working image data needing to be saved for that lateral position.
According to another aspect, there is provided a computer program element controlling apparatus as previously described which, in the computer program element is executed by processing unit, is adapted to perform the method steps as previously described.
According to another aspect, there is provided a computer readable medium having stored computer element as previously described.
Advantageously, the benefits provided by any of the above aspects and examples equally apply to all of the other aspects and examples and vice versa.
The above aspects and examples will become apparent from and be elucidated with reference to the embodiments described hereinafter.
Exemplary embodiments will be described in the following with reference to the following drawings:
In an example, the image acquisition unit is a camera. In an example, the apparatus is a camera. In other words, a camera can be a self-contained unit that is generating images with an enhanced field of view. Or, a camera can acquire imagery that is passed to an external processing unit that is then generating the images with an enhanced field of view. Here, the direction “down range” is parallel to an optical axis of the image acquisition unit. In other words, the down range direction is in the direction that the image acquisition unit is imaging. To put this another way, if an object is moved directly away from the image acquisition unit by a distance H, such that its centre does not move laterally within the field of view of the image acquisition unit, then the object has moved down range by a distance H. The lateral direction is then perpendicular to the down range direction.
It is to be noted that “down range distance” does not imply a particular distance scale. For example, the apparatus can be used to generate a synthetic image with enhanced depth of field of an ant or fly, where down range distances, and/or differences in down range distances, can be of the order of fractions of millimetres, millimetres, or centimetres. Also, the apparatus can be used to generate a synthetic image with enhanced depth of field of a flower or an image of a living room, where down range distances, and/or differences in down range distances, can be of the order of micrometres, millimetres, centimetres, and metres. Also, the apparatus can be used to generate a synthetic image with enhanced field of view of an urban landscape or pastoral landscape. For example, the apparatus can be mounted on an aeroplane or UAV, that points downwards and generates a synthetic image with enhanced depth of field of a city, where the rooftops of sky scrapers are in focus as well as the objects at ground level. In such an example, the down range distance, and/or differences in down range distances, can be of the order of centimetres, metres, and tens to hundreds of metres. In an example, the apparatus can be mounted on a submersible rov, where imagery of the sea bed for example is being imaged. In another example, the apparatus can be mounted on a satellite that is for example orbiting an extraterrestrial moon, and imaging the surface as it flies by. In such an example, the down range distance, and/or differences in down range distances, can be of the order of centimetres, metres, hundreds of metres to kilometres. In an example, the down range distance is in a direction that is substantially parallel to an optical axis of the image acquisition unit.
In an example, the image acquisition unit has a depth of focus at the first lateral position that is not greater than a distance in range between the down range distance at which the first image data is acquired and the down range distance at which the third image data is acquired.
In an example, a movement from the first lateral position to the second lateral position is substantially parallel to a scan direction of the apparatus. Here scan direction can mean movement of the apparatus relative to the object, due to movement of the apparatus and/or movement of the object and/or movement of parts of the apparatus. In other words, the projection of the detector can be swept laterally for example due to a lateral movement of the object, which could for example be an ant or fly on a translation stage, with the translation stage being moveable in the x, y, and also in z directions. Or, this could be due to movement of the apparatus, for example the apparatus can be on a UAV with the apparatus imaging in a direction perpendicular to the flight direction (for example the down range direction can be vertically downwards) and the projection of the detector can be swept due to the forward motion of the UAV. Or this could be to movement of a lens or lenses within the image acquisition unit along with appropriate movement of the detector if necessary such the projection of the detector is swept laterally through an object as the lenses/detector are moved.
In an example, the image acquisition unit comprises a detector 40 configured to acquire image data of a section of the object that is substantially perpendicular to the down range direction, i.e. perpendicular to an optical axis of the image acquisition unit.
According to an example, the image acquisition unit comprises a detector 40 configured to acquire image data of an oblique section of the object.
In an example, the regions of the sensor are activated using information derived from an autofocus sensor, for example as described in WO2011/161594A1 with respect to a microscope system, but with applicability to the present apparatus. In other words, a feature can be tracked in down range distance by enabling appropriate regions of the sensor to be activated in order to acquire that feature at an appropriately good degree of focus to form part of an image with enhanced depth of field as that feature changes in down range distance within the object.
In an example, the second section is displaced both in a down range direction (e.g. vertically or z direction) and in a lateral direction (e.g. horizontally or x, or y direction) from the first section. In an example, an imaging lens is moved in a in a down range direction (e.g. vertical direction) and moved in a lateral direction to displace the section. In an example, the object is moved in a in a down range direction (e.g. vertical direction) and moved in a lateral direction relative to the imaging and acquisition part of the image acquisition unit to displace the section. In an example, an imaging lens is moved in a in a down range direction (e.g. vertical direction) and the object is moved in a lateral direction relative to the imaging and acquisition part of the image acquisition unit to displace the section. In an example, an imaging lens is moved in a lateral direction and the object is moved in a in a down range direction (e.g. vertical direction) relative to the imaging and acquisition part of the image acquisition unit to displace the section. In an example, before acquiring the image with enhanced depth of focus, the object is imaged to estimate the position of a feature or features as a function of down range distance at different lateral (x, y) positions across the object. Then, when the object is scanned to generate the image with enhanced depth of focus the imaging lens can be moved in a down range direction (e.g. vertically) at different lateral positions and/or the object can be moved in a down range direction (e.g. in a vertical direction) such that the same regions of the sensor can be activated to follow a feature as it changes down range distance within a object in order to acquire that feature at an appropriately good degree of focus to form part of an image with enhanced depth of field as that feature changes in down range distance within the object.
In an example the detector is tilted to provide the oblique section. In an example, the detector is tilted with respect to an optical axis of the microscope scanner. In other words, in a normal “non-tilted” microscope configuration, radiation from the object that is imaged onto a detector such that the radiation interacts with the detector in a direction substantially normal to the detector surface. However, with the detector tilted to provide an oblique section, the radiation interacts with the detector in a direction that is not normal to the detector surface.
In an example, the oblique section is obtained optically, for example through the use of a prism.
In an example, the first image data and the third image data are acquired by different parts of the detector, and wherein the second image data and the fourth image data are acquired by different parts of the detector.
According to an example, the detector 40 is a 2D detector comprising at least two active regions.
In an example, each of the active regions is configured as a time delay integration (TDI) sensor.
In an example, the detector is a 2D CCD detector, for example a detector as typically used in digital cameras. In other words, the apparatus can make use of a standard detector but used in a different manner, which can involve it being configured to acquire image data an oblique section of the object, to obtain an image with an enhanced depth of field on the fly.
In an example, the detector has at least four active regions. In other words, as the projection of the detector at the object is moved laterally it could be moved in a down range direction (e.g. vertically) too in which case two active regions could acquire the first, second, third and fourth image data. However, as the projection of the detector is moved laterally it could remain at the same down range position (e.g. vertical position) in which case four active regions could acquire the first, second, third and fourth image data.
By providing a TDI detector, the signal to noise ratio can be increased.
In an example, the detector is configured to provide at least two line images, and wherein the first image data is formed from a subset of a first one of the line images and the second image data is formed from a subset of a second one of the line images.
In an example, an active region is configured to acquire a line of image data at substantially the same down range distance within the object.
In other words, the 2D detector acquires a cross section of the object, acquiring imagery over a range of x, y coordinates. At a number of x coordinates the detector has a number of line sensors that extend in the y direction. If the detector is acquiring an oblique cross section, then each of these line sensors also acquires data at different z coordinates (down range distances), where each line image can acquire image data at the same down range distance for example if the section is only tilted about one axis. If imagery along the length of the line sensor was utilised, a smeared image would result, therefore a section of the line image is utilised. However, in an example the image data along the line sensor is summed, which is subsequently filtered with a band filter—for details see U.S. Pat. No. 4,141,032A.
In an example, all sections along the line section are utilised. In this manner, at every x, y position the image data that is in best focus at a particular z position (down range distance) can be selected to populate the streamed 2D enhanced image with enhanced depth of focus that is being generated.
In an example, the detector comprises three or more active regions, each configured to acquire image data at a different down range distance in the object, wherein the down range distance at which one active region images a part of the object is different to the down range distance at which an adjacent active region images a part of the object, where this difference in down range distance is at least equal to a depth of focus of the image acquisition unit. In other words, as the detector is scanned laterally each of the active areas sweeps out a “layer” within which features will be in focus as this layer has a range of down range distance or thickness equal to the depth of focus of the image acquisition unit and the active region acquires data of this layer. For example, 8 layers could be swept out across the object, the 8 layers then extending in down range distance by a distance at least equal to 8 times the depth of focus of the detector. In other words, as the detector begins to scan laterally, for the simple case where the detector does not also scan in a down range direction (e.g. vertically), then at a particular lateral (e.g. x) position initially two images acquired by active areas 1 and 2 (with the section of the detector having moved laterally between image acquisitions) at different but adjacent down range distances are compared, with the best image from 1 or 2 forming the working image. To recall, the down range distances being imaged by active areas 1 and 2 are separated by a distance at least equal to the intrinsic depth of focus of the image acquisition unit and therefore cannot in one image at the same lateral position be in focus at the same time. The section of the detector moves laterally, and now the image acquired by active area 3 at position x and at an adjacent but different down range distance to that for image 2 is compared to the working image and the working image either remains as it is, or becomes image 3 if image 3 is in better focus that the working image (thus the working image can now be any one of images 1, 2, or 3). The section of the detector again moves laterally, and the image acquired by active area 4 at position x, but again at a different adjacent down range distance is compared to the working image. Thus after the image acquired by the eighth active region is compared to the working image, and the working image either becomes the eighth image data or stays as the working image, then at position x, whichever of images 1-8 that was in best focus forms the working image, which is now in focus. In the above, the active areas could be separated by more than the depth of focus of the image acquisition unit and/or there could be many more than 8 active regions. In this manner, a feature can be imaged in one scan of the detector where the down range distance of that feature in the object varies by more than the intrinsic depth of focus of the image acquisition unit (i.e., at one moment in time at one lateral position), and where a 2D image with enhanced depth of focus is provided without having to save each of the “layer” images, rather only saving a working image and comparing this to image data now being acquired, such that the enhanced image is acquired on the fly. In an example, the apparatus comprises an autofocus system whereby the section (the projection of the detector at the object) moves in a down range (z) direction (e.g. vertically) as well as laterally (e.g. horizontally), in order for example to follow a object that is itself varying in the z direction—for example the apparatus is in a plane or UAV flying over a city and generating imagery where features at the road level and at the top of skyscrapers are both in focus, but where the UAV flies at a constant altitude above sea level but where the city is very hilly.
In an example, the image acquisition unit is configured such that the oblique section is formed such that the section is tilted in the lateral direction, for example in the scan direction. In other words, each line sensor of the detector when it forms one section is at a different x position and at a different down range distance z, but extends over substantially the same range of y coordinates. To put this another way, each line sensor is substantially perpendicular to the lateral direction of the scan and in this manner a greatest volume can be swept out in each scan of the detector relative to the object.
According to an example, the image acquisition unit is configured to acquire image data of a first section of the object to acquire the first image data and the second image data. The image acquisition unit is also configured to acquire image data of a second section of the object to acquire the third image data and the fourth image data.
In an example, the second section is displaced in a down range direction (e.g. vertically) from the first section in a direction parallel to an optical axis of the image acquisition unit. In an example, an imaging lens is moved in a down range direction (e.g.
vertical direction) to displace the section in a down range direction (e.g. vertically). In an example, the object is moved in a down range direction (e.g. in a vertical direction) relative to the imaging and acquisition part of the image acquisition unit to displace the section in a down range direction (e.g. vertically). For example, the apparatus could be part of a camera system mounted on the front of a car, and imaging in a forward direction. The camera system would have an intrinsic depth of field that is much less than the depth of field in an enhanced imaged that is being presented for example on a Head Up Display for the driver in an updated fashion. Furthermore, such an enhanced image could be provided to a processing unit in the car, that for example is using image processing to enable warnings to be provided to the driver.
In an example, the second section is displaced horizontally or laterally from the first section in a direction perpendicular to an optical axis of the image acquisition unit. In an example, an imaging lens is moved in a lateral direction to laterally displace the section. In an example, the object is moved in a lateral direction relative to the imaging and acquisition part of the image acquisition unit to laterally displace the section.
According to an example, the image acquisition unit is configured to acquire the first image data at the first lateral position of the object and at a first down range distance and to simultaneously acquire the second image at the second lateral position of the object and at a second down range distance. The first down range distance is different to the second down range distance. The image acquisition unit is also configured to acquire the third image data at the first lateral position and at a third down range distance and to simultaneously acquire the fourth image data at the second lateral position and at a fourth down range distance. The third down range distance is different to the fourth down range distance.
According to an example, the image acquisition unit has a depth of focus at the first lateral position and at the second lateral position neither of which is greater than a distance in down range distance between the down range distance at which the first image data is acquired and the down range distance at which the second image data is acquired.
According to an example, the object is at a first position relative to an optical axis of the image acquisition unit for acquisition of the first image data and second image data and the object is at a second position relative to the optical axis for acquisition of the third image data and fourth image data.
In an example, the object is configured to be moved in a lateral direction with respect to (in an example relative to) the optical axis, wherein the object is at a first position for acquisition of the first and second image data and the object is at a second position for acquisition of the third and fourth image data.
According to an example, the image data comprises a plurality of colours, and wherein the processing unit is configured to process image data by the focus stacking algorithm on the basis of image data that comprises one or more of the plurality of colours.
In an example, the plurality of colours can be Red, Green, and Blue. In an example, the processing unit is configured to process image data that corresponds to a specific colour—for example an object being imaged may have a characteristic colour and processing the image with respect to a specific colour or colours can provide imaging advantages as would be appreciated by the skilled person, for example improving contrast. In this manner, a specific feature can be acquired with enhanced depth of field. In another example, different colour channels can be merged, for example using a RGB2Y operation. In this manner, signal to noise can be increased. Also, by applying a colour separation step, different, and most optimised, 2D smoothing kernels can be utilised.
In an example, the first working image data is either the first image data or the third image data, and wherein the second working image data is either the second image data or the fourth image data.
In other words, the best focal position of a specific feature is acquired and this is used to populate the streamed enhanced image that is being generated.
In an example, the processing unit is configured to calculate a first energy data for the first image data and calculate a third energy data for the third image data and generating the first working image comprises selecting either the first image data or the third image data as a function of the first energy data and third energy data, and wherein the processing unit is configured to calculate a second energy data for the second image data and calculate a fourth energy data for the fourth image data and generating the second working image comprises selecting either the second image data or the fourth image data as a function of the second energy data and fourth energy data.
In an example, a high pass filter is used to calculate the energy data. In an example, the high pass filter is a Laplacian filter. In this way, at each lateral position features that are in best focus at a particular down range distance can be selected and used in the 2D image with enhanced depth of field.
In an example, after filtering a smoothing operation is applied. In this manner noise can be reduced.
In an example, rather than applying a Laplacian filter the acquired data are translated to the wavelet domain, where the high frequency sub band can be used as a representation of the energy. This can be combined with the iSyntax compression (see for example U.S. Pat. No. 6,711,297B1 or U.S. Pat. No. 6,553,141).
In an example, rather than selecting either the first image data or the third image data, the first image data and third image data are combined using a particular weighting based on the distribution of energy of the first image data and the third image data.
In an example, the processing unit is configured to generate a first working energy data as the first energy data if the first image data is selected as the first working image or generate the first working energy data as the third energy data if the third image data is selected as the first working image, and wherein the processing unit is configured to generate a second working energy data as the second energy data if the second image data is selected as the second working image or generate the second working energy data as the fourth energy data if the fourth image data is selected as the second working image is the fourth image data.
In an example, the image acquisition unit is configured to acquire fifth image data at the first lateral position and sixth image data at the second lateral position, wherein the fifth image data is acquired at a down range distance that is different than that for the first and third image data and the sixth image data is acquired at a down range distance that is different than that for the second and fourth image data; and wherein the processing unit is configured to generate new first working image data for the first lateral position, the generation comprising processing the fifth image data and the first working image data by the focus stacking algorithm, wherein the new first working image data becomes the first working image data; and the processing unit is configured to generate new second working image data for the second lateral position, the generation comprising processing the sixth image data and the second working image data by the focus stacking algorithm, wherein the new second working image data becomes the second working image data.
In an example, the processing unit is configured to calculate a fifth energy data for the fifth image data and calculate a sixth energy data for the sixth image data; and wherein the processing unit is configured to generate new first working energy data as the fifth energy data if the first working image is selected as the fifth working image or generate new first working energy data as the existing first working energy data if the first working image is selected as the existing first working image; and wherein the processing unit is configured to generate new second working energy data as the sixth energy data if the second working image is selected as the sixth working image or generate new second working energy data as the existing second working energy data if the second working image is selected as the existing second working image.
In an example, a measure of the sum of the energy at a particular lateral position (i.e., at an x coordinate) is determined. In this manner, a depth range within the object can be determined as this is related to the energy in each image (e.g, related to the energy in each layer).
In an acquiring step 110, also referred to as step a), an image acquisition unit 20 is used to acquire first image data at a first lateral position of the object and is used to acquire second image data at a second lateral position of the object.
In an acquiring step 120, also referred to as step b), the image acquisition unit is used to acquire third image data at the first lateral position and is used to acquire fourth image data at the second lateral position, wherein the third image data is acquired at a down range distance that is different than that for the first image data and the fourth image data is acquired at a down range distance that is different than that for the second image data.
In a generating step 130, also referred to as e), first working image data is generated for the first lateral position, the generation comprising processing the first image data and the third image data by a focus stacking algorithm.
In a generating step 140, also referred to as f), second working image data is generated for the second lateral position, the generation comprising processing the second image data and the fourth image data by the focus stacking algorithm.
In a combining step 150, also referred to as step l), the first working image data and the second working image data are combined, during acquisition of image data, to generate the synthetic 2D image with an enhanced depth of field of the object.
In an example, the image acquisition unit is configured to acquire image data of a first section of the object to acquire the first image data and the second image data, and wherein the image acquisition unit is configured to acquire image data of a second section of the object to acquire the third image data and the fourth image data.
In an example, the image acquisition unit comprises a detector configured to acquire image data of an oblique section of the object.
In an example, the detector is a 2D detector comprising at least two active regions. In an example, each is configured as a time delay integration (TDI) sensor.
According to an example, step a) comprises acquiring the first image data at the first lateral position of the object and at a first down range distance and simultaneously acquiring the second image at the second lateral position of the object and at a second down range distance, wherein the first down range distance is different to the second down range distance; and wherein step b) comprises acquiring the third image data at the first lateral position and at a third down range distance and simultaneously acquiring the fourth image data at the second lateral position and at a fourth down range distance, wherein the third down range distance is different to the fourth down range distance.
In an example, the object is at a first position relative to an optical axis of the image acquisition unit for acquisition of the first image data and second image data and the object is at a second position relative to the optical axis for acquisition of the third image data and fourth image data.
In an example, the object is configured to be moved in a lateral direction with respect to the optical axis, wherein the object is at a first position for acquisition of the first and second image data and the object is at a second position for acquisition of the third and fourth image data.
In an example, the image data comprises a plurality of colours, and wherein the processing unit is configured to process image data by the focus stacking algorithm on the basis of image data that comprises one or more of the plurality of colours.
In an example, the first working image data is either the first image data or the third image data, and wherein the second working image data is either the second image data or the fourth image data.
According to an example, the method comprises:
In a calculating step 160, also referred to as step c), a first energy data for the first image data is calculated and a third energy data for the third image data is calculated.
In a calculating step 170, also referred to as step d), a second energy data for the second image data is calculated and a fourth energy data for the fourth image data is calculated; and
wherein, step e) comprises selecting either the first image data or the third image data as the first working image, the selecting comprising a function of the first energy data and third energy data; and wherein step f) comprises selecting either the second image data or the fourth image data as the second working image, the selecting comprising a function of the second energy data and fourth energy data. To recall, this selection can be at a local (pixel or few pixel) level rather than for the complete line of pixels, in other words at a level relating to parts of the line of pixels.
According to an example, the method comprises:
In a generating step, also referred to as step g), a first working energy data is generated 180 as the first energy data if the first image data is selected as the first working image or the first working energy data is generated 190 as the third energy data if the third image data is selected as the first working image; and
In a generating step, also referred to as step h), a second working energy data is generated 200 as the second energy data if the second image data is selected as the second working image or the second working energy data is generated 210 as the fourth energy data if the fourth image data is selected as the second working image is the fourth image data.
To recall, the detector can be acquiring line image data, such that a first image is a subset of that line image data etc, with selection able to proceed at a local (pixel) level, such that images can be combined to create a new working image having features in focus coming each of the input images.
According to an example, the method comprises:
In an acquiring step, also referred to as step i), fifth image data is acquired 220 at the first lateral position and sixth image data is acquired 230 at the second lateral position, wherein the fifth image data is acquired at a down range distance that is different than that for the first and third image data and the sixth image data is acquired at a down range distance that is different than that for the second and fourth image data.
In a generating step 240, also referred to as step j), new first working image data is generated for the first lateral position, the generation comprising processing the fifth image data and the first working image data by the focus stacking algorithm, wherein the new first working image data becomes the first working image data.
In a generating step 250, also referred to as step k), new second working image data is generated for the second lateral position, the generation comprising processing the sixth image data and the second working image data by the focus stacking algorithm, wherein the new second working image data becomes the second working image data.
The apparatus and method for generating a synthetic 2D image with enhanced depth of field of an object will now be described in more detail with reference to
The apparatus and method for generating a synthetic 2D image with enhanced depth of field of an object, addresses the above issues by providing a streaming focus stacking technique that can be applied to convert image data into an artificial (synthetic) 2D image with enhanced depth of field as the data is being acquired. This is done “on the fly” without intermediate image files having to be saved, obviating the need for very large image buffers. In an example, image data is acquired from multiple down range positions simultaneously. Here, down range is considered for explanatory purposes to extend in a z or depth direction, but could extend in any direction (horizontal or vertical or there between). The apparatus and method for generating a synthetic 2D image with enhanced depth of field of an object is specifically discussed with reference to
Where M is the magnification and n is the refractive index as described above.
In this manner, the system can generate an image on the fly that can have multiple features of an object in focus, while those features are at different down range distances
Focus stacking was briefly introduced with reference to
Therefore, in an example a tilted sensor is combined with focus stacking, in streaming mode. Then, it is no longer needed to store the intermediate results completely (i.e. image data of layer ≤(n−1) and energy of layer ≤(n−1)), but only a limited history of the image and energy data is needed, determined by the footprint of the used image filters (i.e. high-pass filter and smoothing filter). Each time a new (slanted) image is acquired by the slanted sensor, the energy per row (i.e. per z-position) of this image is determined; the slanted image, as discussed previously, is in a plane in Y (rows of the image) and X′/Z (columns of the image). These energy values are compared with the previous acquisitions. The comparison is performed for matching (x′,y) positions, in other words at a local level (enough pixels for which the above energy analysis can be applied) and not for the whole line image as one image. If more focus energy is found, the image data is updated. Once all z-positions of a (x′,y) position have been evaluated, the (combined−“working”) image data can be transferred. This removes the need to store tens of GBs of intermediate results, while the final result (i.e. the enhanced depth of focus layer) is (still) available directly after scanning the last part of the object.
Alternatives In the above process, for every pixel the optimal image layer is determined by the amount of energy (i.e. a high-pass filter). A possible implementation is that the different colour channels are merged (i.e. using a RGB2Y operation), before determining the high frequency information. As an alternative, information (i.e. from an external source or determined by image analysis) can be used to focus more on a specific colour. This can even be combined with an extra colour separation step or colour deconvolution step. Then, the optimal layer can locally be determined by the amount of energy using one (or multiple) specific colour (e.g. focussing on a particular colour in the image). Furthermore, adding a colour separation step can result in the use of different 2D smoothing kernels. For example, features of an object can have varying sizes with those which contain much smaller details benefits from smaller smoothing kernels (σ<2).
In the above process a Laplacian high-frequency filter is used. As an alternative, the acquired data can be translated to the wavelet domain, where the high frequency sub band can be used as a representation of the energy. This can be combined with the iSyntax compression (see for example U.S. Pat. No. 6,711,297B1 and U.S. Pat. No. 6,553,141).
In the above process, the conversion to a single image layer having enhanced depth of field can be applied before sending the image to the server. It is also possible that the conversion to a single layer is performed on the server, such that output of the sensor is directly transferred to the server.
Instead of selecting the optimal layer for every pixel, it is also possible that the pixel values of multiple layers are combined using a particular weighting, based on the distribution of the energy of the pixels.
Instead of selecting the optimal layer for every pixel, it is also possible to sum all pixels of the tilted sensor of the same z-direction. The result is a blurred sum images which can subsequently be filtered with a simple band filter. For information relating to the summing of digital pictures see U.S. Pat. No. 4,141,032A.
This method can also be used to measure the thickness of the object, as this is related to the energy of each layer.
In another exemplary embodiment, a computer program or computer program element is provided that is characterized by being configured to execute the method steps of the method according to one of the preceding embodiments, on an appropriate system.
The computer program element might therefore be stored on a computer unit, which might also be part of an embodiment. This computing unit may be configured to perform or induce performing of the steps of the method described above. Moreover, it may be configured to operate the components of the above described apparatus. The computing unit can be configured to operate automatically and/or to execute the orders of a user. A computer program may be loaded into a working memory of a data processor. The data processor may thus be equipped to carry out the method according to one of the preceding embodiments.
This exemplary embodiment of the invention covers both, a computer program that right from the beginning uses the invention and computer program that by means of an update turns an existing program into a program that uses the invention.
Further on, the computer program element might be able to provide all necessary steps to fulfill the procedure of an exemplary embodiment of the method as described above.
According to a further exemplary embodiment of the present invention, a computer readable medium, such as a CD-ROM, is presented wherein the computer readable medium has a computer program element stored on it which computer program element is described by the preceding section.
A computer program may be stored and/or distributed on a suitable medium, such as an optical storage medium or a solid state medium supplied together with or as part of other hardware, but may also be distributed in other forms, such as via the internet or other wired or wireless telecommunication systems.
However, the computer program may also be presented over a network like the World Wide Web and can be downloaded into the working memory of a data processor from such a network. According to a further exemplary embodiment of the present invention, a medium for making a computer program element available for downloading is provided, which computer program element is arranged to perform a method according to one of the previously described embodiments of the invention.
It has to be noted that embodiments of the invention are described with reference to different subject matters. In particular, some embodiments are described with reference to method type claims whereas other embodiments are described with reference to the device type claims. However, a person skilled in the art will gather from the above and the following description that, unless otherwise notified, in addition to any combination of features belonging to one type of subject matter also any combination between features relating to different subject matters is considered to be disclosed with this application. However, all features can be combined providing synergetic effects that are more than the simple summation of the features.
While the invention has been illustrated and described in detail in the drawings and foregoing description, such illustration and description are to be considered illustrative or exemplary and not restrictive. The invention is not limited to the disclosed embodiments. Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing a claimed invention, from a study of the drawings, the disclosure, and the dependent claims.
In the claims, the word “comprising” does not exclude other elements or steps, and the indefinite article “a” or “an” does not exclude a plurality. A single processor or other unit may fulfill the functions of several items re-cited in the claims. The mere fact that certain measures are re-cited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. Any reference signs in the claims should not be construed as limiting the scope.
Number | Date | Country | Kind |
---|---|---|---|
16156767.2 | Feb 2016 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2017/053998 | 2/22/2017 | WO | 00 |