Image focusing method and related device

By performing edge detection and clarity analysis on the object wave image of the target object in the holographic image, the target focal length is determined, and the problem of difficulty in autofocusing on transparent object holographic images in the prior art is solved, and the efficiency of autofocus is improved.

CN116471386BActive Publication Date: 2025-03-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210027078.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2025-03-28
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

The prior art is difficult to achieve automatic focus on holographic images of objects with transparent properties, which increases the difficulty of focusing.

Method used

By acquiring the object wave image of the target object in the holographic image, performing edge detection processing, and obtaining edge intensity information, based on this, determining the clarity change, and then determining the target focal length to achieve automatic focus.

Benefits of technology

The efficiency of holographic image autofocus recognition is improved, and automatic focus on objects with transparent properties can be effectively realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471386B_ABST
    Figure CN116471386B_ABST
Patent Text Reader

Abstract

Disclosed are a method for image focusing and related devices, which can be applied to various scenarios such as cloud technology, artificial intelligence, intelligent transportation, and assisted driving. The embodiments of the present application can automatically focus on images of objects with transparent properties, and can improve the efficiency of automatic focus recognition of holographic images. The aforementioned image focusing method may include: acquiring a first image, the first image being an object wave image of a target object in a holographic image; performing edge detection processing on the first image to obtain a second image, the second image including edge strength information of each pixel in the first image; determining a first value based on the edge strength information, the first value indicating a change in clarity of each pixel in the second image; and determining a target focal length of the second image according to the first value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image focusing technology, and specifically to an image focusing method and related devices. Background Art

[0002] Holographic projection technology, also known as virtual imaging technology, is a technology that records and reproduces the real three-dimensional (3D) image of an object. Specifically, it uses the principles of interference and diffraction to make the object's light beam and another reference beam produce an interference pattern, so that the phase information and amplitude information can be recorded simultaneously with a photosensitive film to obtain a holographic image. The amplitude information and phase information of the holographic image can be reconstructed by irradiating the recorded pattern of the reference beam.

[0003] For the auto-focus processing of holographic images, the relevant scheme adopts the sparse measurement method to achieve it. The described sparse measurement focusing method aims to use smaller coefficients to describe more energy of the light signal of the object, and further compress and source separate the light signal of the object. However, the sparse measurement method to achieve the focus of the holographic image is not suitable for the focus of the holographic image of the object with transparent properties, which increases the difficulty of focusing. Summary of the invention

[0004] The embodiment of the present application provides an image focusing method and a related device. The method can realize automatic focusing of an image of an object with a transparent property, thereby improving the efficiency of automatic focusing recognition of holographic images.

[0005] In the first aspect, the embodiment of the present application provides a method for image focusing. The method may include: acquiring a first image, the first image being an object wave image of a target object in a holographic image; performing edge detection processing on the first image to obtain a second image, the second image including edge intensity information of each pixel in the first image; determining a first value based on the edge intensity information, the first value indicating a change in clarity of each pixel in the second image; and determining a target focal length of the second image according to the first value.

[0006] The second aspect of the embodiment of the present application provides an image focusing device. The image focusing device may include an acquisition unit and a processing unit. The acquisition unit is used to acquire a first image, which is an object wave image of a target object in a holographic image. The processing unit is used to perform edge detection processing on the first image to obtain a second image, wherein the second image includes edge intensity information of each pixel in the first image; the processing unit is used to determine a first value based on the edge intensity information, wherein the first value indicates a change in clarity of each pixel in the second image; the processing unit is used to determine a target focal length of the second image according to the first value.

[0007] In a possible design, in an implementation of the second aspect of the embodiment of the present application, the first image includes first pixel intensity information and second pixel intensity information, the first pixel intensity information is the pixel intensity corresponding to each pixel in the first area when the target pixel is in the first area of ​​the first image, and the second pixel intensity information is the pixel intensity corresponding to each pixel in the second area when the target pixel is in the second area of ​​the first image. The processing unit is used to: process the first pixel intensity information by a first preset edge algorithm to obtain the first edge intensity information of the target pixel; process the second pixel intensity information by a second preset edge algorithm to obtain the second edge intensity information of the target pixel; process the first edge intensity information and the second edge intensity information to obtain the second image.

[0008] In a possible design, in an implementation method of the second aspect of an embodiment of the present application, the processing unit is used to: determine an edge intensity value of a first pixel point from edge intensity information, and determine edge intensity values ​​of at least three second pixel points, wherein each of the at least three second pixel points is adjacent to the first pixel point; and process the edge intensity value of the first pixel point and the edge intensity value of each second pixel point by a preset clarity algorithm to obtain a first value.

[0009] In one possible design, in an implementation method of the second aspect of an embodiment of the present application, the processing unit is also used to: before performing image edge detection processing on the first image to obtain the second image, denoising the first image by at least two preset denoising algorithms to obtain the denoised first image; and performing edge detection processing on the denoised first image to obtain the second image.

[0010] The third aspect of the embodiment of the present application provides a computer device, including: a memory, a transceiver, a processor and a bus system. The bus system is used to connect the memory and the processor so that the memory and the processor can communicate. The memory is used to store programs. The processor is used to execute the programs in the memory, including the following steps:

[0011] Acquire a first image, where the first image is an object wave image of the target object in the holographic image;

[0012] Performing edge detection processing on the first image to obtain a second image, where the second image includes edge intensity information of each pixel in the first image;

[0013] Determine a first value based on the edge strength information, where the first value indicates a change in clarity of each pixel in the second image;

[0014] A target focal length of the second image is determined based on the first value.

[0015] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes any of the methods described above.

[0016] A fifth aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when executed on a computer or a processor, enables the computer or the processor to execute any of the methods described above.

[0017] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0018] In an embodiment of the present application, after obtaining the object wave image (i.e., the first image) of the target object from the holographic image, the edge detection processing is performed on the first image to obtain the second image. And the second image includes the edge strength information of each pixel. Then, the first value is determined according to the edge strength information to indicate the change in clarity of each pixel in the second image through the first value, and then the target focal length of the second image is determined according to the first value, so as to complete the automatic focusing of the holographic image. Through the edge detection of the image, the target focal length of the image can be effectively determined. It can not only effectively improve the efficiency of automatic focus recognition of holographic images, but also realize automatic focusing of objects with transparent properties. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic structural diagram of an image focusing device provided in an embodiment of the present application is shown;

[0021] Figure 2 A schematic diagram of an embodiment of the image focusing method provided in the embodiments of the present application is shown;

[0022] Figure 3A A schematic diagram showing the holographic image imaging principle provided by an embodiment of the present application;

[0023] Figure 3B A schematic diagram showing a holographic image reconstruction process provided by an embodiment of the present application is shown;

[0024] Figure 4 A schematic diagram of edge detection provided by an embodiment of the present application is shown;

[0025] Figure 5A A schematic diagram showing an auto-focus result of an embodiment of the present application is shown;

[0026] Figure 5B A schematic diagram of an image obtained after focusing at a target focal length is shown;

[0027] Figure 5C Another schematic diagram of auto-focusing results provided by an embodiment of the present application is shown;

[0028] Fig. 6A A schematic diagram of imaging formed when the focal length is the focal length of the target object itself is shown;

[0029] Figure 6B A schematic diagram showing the focusing principle is shown;

[0030] Figure 7 A schematic diagram of an embodiment of an image focusing device provided in an embodiment of the present application is shown;

[0031] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] The embodiment of the present application provides an image focusing method and a related device. The method can realize automatic focusing on the image of a transparent object and improve the efficiency of automatic focusing recognition of holographic images.

[0033] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0035] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning (DL).

[0036] Among them, computer vision technology (computer vision, CV) is a science that studies how to make machines "see". To go further, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further do graphic processing to make computer processing into images that are more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, trying to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition. Computer vision technology enables machines to imitate human activities such as seeing, hearing and thinking, solves many complex pattern recognition problems, and makes great progress in artificial intelligence related technologies.

[0037] Usually, when computer vision technology is used to achieve different functions, such as imaging and reconstruction of holographic images, it is usually necessary to focus the collected holographic images to obtain a clearer image. However, the existing focusing process is implemented by sparse measurement, which is only applicable to images with clear edges of objects, and is not applicable to the focusing of holographic images of transparent objects, which makes it impossible to focus on images with blurred edges of objects, and has certain limitations in its applicability.

[0038] In order to solve the above-mentioned technical problems, the embodiment of the present application provides a method for image focusing. The method can be applied to the medical industry and / or medical equipment and other scenarios, and the embodiment of the present application does not make specific limitations. In addition, the method can be applied to Figure 1 The image focusing device shown. Figure 1 As shown, after acquiring the holographic image, the image focusing device can detect the object wave image of the target object in the holographic image (i.e., the first image mentioned later). In this way, after further edge detection processing is performed on the first image, the image focusing device uses a preset clarity algorithm to perform a second-order recursive analysis of the clarity of the second image obtained after the edge processing, and determines the target focal length of the second image based on this clarity, thereby achieving automatic focusing of the image. This is not only suitable for focusing on images with clear edges, but can also be used to achieve focusing on images of objects with blurred edges.

[0039] It should be noted that the objects with blurred edges described may include but are not limited to transparent cells, transparent lenses, etc., and this embodiment of the application does not limit this. Figure 1 The image focusing device shown includes but is not limited to a microscope and other devices, and is not specifically limited in the embodiments of this application. In addition, the user terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0040] To facilitate a better understanding of the solution proposed in the embodiment of the present application, the specific process in this embodiment is introduced below. Figure 2 FIG. 1 is a schematic diagram showing an embodiment of the method for focusing an image provided in an embodiment of the present application. Figure 2 As shown, the image focusing method may include:

[0041] 201. Acquire a first image, where the first image is an object wave image of a target object in a holographic image.

[0042] In this example, after the holographic image is acquired, the first image can be acquired from the holographic image. That is, during the reconstruction of the holographic image, the object wave image, the conjugate image and the zero-order image overlap each other at the same position. The zero-order image contains most of the energy of the holographic image during the reconstruction process, and the object wave image cannot be displayed clearly due to its relatively low brightness. Therefore, it is necessary to eliminate the unnecessary conjugate image, or to isolate the conjugate image and the object wave image. Exemplarily, Figure 3A A schematic diagram showing the principle of holographic imaging, Figure 3B A schematic diagram showing the principle of holographic image reproduction is shown in FIG. Figure 3AAs shown in the figure, during the imaging process of the holographic image, the laser beam is split into two by a beam splitter, and the projected light is reflected by the reflector and then irradiated on the target object after beam expansion. The light after beam expansion is called the object beam corresponding to the target object. The other reflected light is reflected by the reflector and then directly irradiated on the photosensitive material after beam expansion, which is called the reference beam. The object beam and the reference beam coherently form interference fringes at the imaging base plate, thereby completing the imaging process of the holographic image. In addition, as Figure 3B As shown, during the reconstruction of the holographic image, a virtual image of the target object can be seen at the location where the target object was originally placed through the holographic image. When observing the virtual image of the target object through the holographic image, it is like observing a real target object, with a strong three-dimensional sense. In an embodiment of the present application, during the reconstruction of the holographic image, a reference beam is introduced to isolate the object wave image corresponding to the object beam, and specifically, the object wave image separated from other images can be processed by off-axis holographic image processing.

[0043] It should be noted that the off-axis holographic image processing method is a prior art and will not be described in detail in this application.

[0044] 202. Perform edge detection processing on the first image to obtain a second image, where the second image includes edge intensity information of each pixel in the first image.

[0045] In this example, after the first image is acquired, edge detection processing may be performed on the first image to obtain the second image.

[0046] It should be noted that the first image mentioned above includes first pixel intensity information and second pixel intensity information. Among them, the first pixel intensity information is the pixel intensity corresponding to each pixel in the first area when the target pixel is in the first area of ​​the first image. Similarly, the second pixel intensity information is the pixel intensity corresponding to each pixel in the second area when the target pixel is in the second area of ​​the first image. It should be understood that the first area can be understood as a pixel area formed when the target pixel is centered on the target pixel and the target pixel moves on the x-axis. The second area can be understood as a pixel area formed when the target pixel is centered on the target pixel and the target pixel moves on the y-axis. The x-axis and the y-axis are perpendicular to each other. Alternatively, the first area can also be a pixel area formed when the target pixel is centered on the target pixel and the target pixel moves on the y-axis; the second area is a pixel area formed when the target pixel is centered on the target pixel and the target pixel moves on the x-axis. The specific description is not limited in the embodiments of the present application.

[0047] In this way, the image processing device performs edge detection processing on the first image to obtain the second image, which can be implemented in the following manner. That is, the first pixel intensity information is processed by a first preset edge algorithm to obtain the first edge intensity information of the target pixel; the second pixel intensity information is processed by a second preset edge algorithm to obtain the second edge intensity information of the target pixel. Then, the first edge intensity information and the second edge intensity information are processed to obtain the second image. The second image includes the edge intensity information of each pixel in the first image.

[0048] For example, Figure 4 FIG. 1 is a schematic diagram of an edge detection method provided by an embodiment of the present application. Figure 4 As shown, G can represent the first image, including 7×7 pixels, specifically:

[0049]

[0050] And, from Figure 4 It can be seen that the first preset edge algorithm can be expressed as Gx, that is:

[0051]

[0052] The first area may be a pixel area when moving along the x-axis in the G. For example, when focusing on the target pixel point 4, the first area may be This will By performing a weighted sum calculation on each pixel value in Gx and the pixel value at the same position in Gx, the first edge strength information corresponding to the target pixel 4 can be obtained, that is: 4×2+3×0+2×(-2)+5×1+4×0+1×(-1)+8×2+3×0+2×(-1)=20. Further, when moving on the x-axis, the first area becomes And the The weighted sum of each pixel value in Gx and the pixel value at the same position in Gx is calculated to obtain the first edge strength information -3 corresponding to the target pixel 1. This is repeated until the target pixel 5 is finally focused and the first edge strength information -8 is calculated. Finally, the first edge strength information corresponding to each pixel in the first image is calculated to be G'x, that is:

[0053]

[0054] The calculation process of the first edge strength information can be understood by referring to the flow shown in FIG. 4 .

[0055] Likewise, from Figure 4 It can be seen that the second preset edge algorithm can be expressed as Gy, that is:

[0056]

[0057] The second area may be a pixel area when moving along the y-axis in G. For example, when focusing on the target pixel point 4, the second area may be This will By performing a weighted sum calculation on each pixel value in Gy and the pixel value at the same position in Gy, the second edge strength information corresponding to the target pixel 4 can be obtained, that is, 4×1+3×2+2×1+5×0+4×0+1×0+8×(-1)+3×(-2)+2×(-1)=-4. Further, when moving on the y-axis, the second area becomes And the The weighted sum of each pixel value in Gy and the pixel value at the same position in Gy is calculated to obtain the second edge strength information 0 corresponding to the target pixel 3. This is repeated until the target pixel 5 is finally focused and the second edge strength information -4 is calculated. Finally, the second edge strength information corresponding to each pixel in the first image is calculated to be G'y, that is:

[0058]

[0059] After obtaining G'x and G'y, the square root between G'x and G'y can be calculated to obtain the pixel value of each pixel in the edge image, thereby obtaining the second image. Specifically, G'x and G'y can be substituted into That is, we can get G'. That is:

[0060]

[0061] from Figure 4 It can be seen that the second image includes 5×5 pixels.

[0062] It should be noted that the above Figure 4 Only an example is shown in which a first image containing 7×7 pixels is processed by edge detection to obtain a second image containing 5×5 pixels. In actual applications, images of other sizes may also be processed by edge detection, which is not limited in the embodiments of the present application. Figure 4 It also only shows the first preset edge algorithm Gx as The second preset edge algorithm Gy is In practical applications, Gx can also be Gy can also be This is not limited in the examples of this application.

[0063] In other examples, before edge detection is performed on the first image to obtain the second image, the first image may be denoised using at least two preset denoising algorithms to obtain the denoised first image. Then, edge detection is performed on the denoised first image to obtain the second image. It should be noted that edge detection is performed on the denoised first image here, and the specific process can be understood by referring to the edge detection process in step 202 above, which will not be described in detail here.

[0064] It should be understood that the preset denoising algorithm described may include but is not limited to a non-local average filtering algorithm, a Savitzky-Golay filter filtering algorithm, etc., which are not specifically limited here. Denoising by the described non-local average filtering algorithm is mainly achieved by weighting the pixel values ​​of the target pixel in the image and the pixels around it. That is, the pixel setting of the target pixel is related to the weight setting of the pixels around the target pixel. It can be understood specifically by referring to the following formula, namely:

[0065]

[0066]

[0067] Among them, W(p,q) represents the weight of the influence of pixel p on pixel q, and B(p,r) represents the weight reference of the pixels in the area with radius r centered on pixel p. D(p) and L(p) represent the weight statistics of the pixel weights around pixel p and the weighted sum of the influence of the pixels within the radius r on pixel p, respectively.

[0068] The Savitzky-Golay filter algorithm described is widely used in data stream smoothing and denoising. It is a filtering method based on local polynomial least squares fitting in the time domain. The biggest feature of this filter algorithm is that it can ensure that the shape and width of the signal remain unchanged while filtering out noise.

[0069] Therefore, by performing denoising processing on the first image using at least two preset denoising algorithms, interference information contained in the first image can be effectively filtered out, thereby retaining useful information.

[0070] 203. Determine a first value based on the edge strength information, where the first value indicates a change in clarity of each pixel in the second image.

[0071] In this example, after obtaining the second image, the first value can be determined based on the edge strength information of each pixel in the second image. Exemplarily, in a specific example, the first value can be newly determined based on the edge strength, which can be implemented in the following manner. That is, firstly, the edge strength value of the first pixel and the edge strength values ​​of at least three second pixels are determined from the edge strength information. Then, the edge strength value of the first pixel and the edge strength value of each second pixel are processed by a preset clarity algorithm to obtain the first value.

[0072] It should be noted that each of the at least three second pixel points is adjacent to the first pixel point. The preset definition algorithm described can be understood as being used to cumulatively calculate the definition difference value between every two adjacent pixel points in the second image. For example, when the number of second pixel points adjacent to the first pixel point is 4, the preset definition algorithm can be:

[0073]

[0074] Wherein, g(x,y) represents the edge intensity value of the first pixel, g(x-1,y), g(x,y-1), g(x+1,y), g(x,y+1) are the pixel intensity values ​​of the four second pixels adjacent to the first pixel. Nx represents the number of pixels of the second image in the x-axis direction, and Ny represents the number of pixels of the image in the y-axis direction.

[0075] For example, the above Figure 4 Take the second image shown as an example, if the pixel intensity value corresponding to the first pixel is g(2,2)=4.1. The pixel intensity values ​​of the four second pixels adjacent to the first pixel are g(1,2)=5.0, g(2,1)=14.0, g(3,2)=4.1, and g(2,3)=4.0 respectively. Substituting g(2,2)=4.1, g(1,2)=5.0, g(2,1)=14.0, g(3,2)=4.1, and g(2,3)=4.0 into the above-mentioned preset clarity algorithm, the clarity difference values ​​between these five pixels can be obtained. Similarly, after calculating the clarity difference values ​​between all pixels in the same way, and then performing cumulative calculations, the first value can be obtained. The first value indicates the clarity change of each pixel in the second image.

[0076] It should be understood that the greater the trend of the difference change between adjacent pixels, the more it indicates that the second image is clearer.

[0077] 204. Determine a target focal length of the second image according to the first value.

[0078] In this example, after the first value is obtained, the target focal length of the second image can be found from the clarity curve corresponding to the first value.

[0079] For example, for transparent objects, such as cells, the focal length corresponding to the smallest first value can be selected from the clarity curve as the target focal length. Focusing at the target focal length can obtain the clearest second image. Figure 5A FIG. 1 shows a schematic diagram of an auto-focus result of an embodiment of the present application. Figure 5A As shown in the figure, a coordinate system is constructed with focal length as the horizontal axis and clarity as the vertical axis. Taking the target object as a cell as an example, the focal length corresponding to the lowest value -0.089 can be selected as the target focal length. Figure 5A Focus on the target focal length shown to get a clearer image. Figure 5B Figure 2 shows a schematic diagram of an image obtained after focusing at the target focal length. Figure 5B It can be seen that by focusing the second image at -0.089, the outline of the cells can be clearly seen.

[0080] Similarly, Figure 5C This is another schematic diagram of the result of auto-focusing provided in the embodiment of the present application. Figure 5C As shown, when Gx is Gy is In the example of , after similar operations in steps 202-203, the focal length corresponding to the lowest value -0.089 can also be selected as the target focal length.

[0081] Need to explain, for Figure 5A and Figure 5C The focal length corresponding to the highest point in the image can be understood as the focal length of the lens object itself. For details, please refer to Fig. 6A The imaging schematic diagram shown is formed when the focal length of the auto focus is the focal length of the target object itself. Fig. 6A As shown, the white dot indicated by the arrow is the center of the solid lens. The image is almost completely black. This is mainly because the image is at the focal length f of the lens itself, so the light is focused on the lens F and the image is a white dot. For the specific focusing principle, please refer to Figure 6B To understand.

[0082] In an embodiment of the present application, after obtaining the object wave image (i.e., the first image) of the target object from the holographic image, the edge detection processing is performed on the first image to obtain the second image. And the second image includes the edge strength information of each pixel. Then, the first value is determined according to the edge strength information to indicate the change in clarity of each pixel in the second image through the first value, and then the target focal length of the second image is determined according to the first value, so as to complete the automatic focusing of the holographic image. Through the edge detection of the image, the target focal length of the image can be effectively determined. It can not only effectively improve the efficiency of automatic focus recognition of holographic images, but also realize automatic focusing of objects with transparent properties.

[0083] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method. It can be understood that in order to realize the above functions, the hardware structure and / or software module corresponding to the execution of each function are included. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0084] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0085] The image focusing device in the embodiment of the present application is described in detail below. Figure 7 FIG. 1 is a schematic diagram of an embodiment of an image focusing device provided in an embodiment of the present application. Figure 7 As shown, the image focusing device may include: an acquisition unit 701 and a processing unit 702 .

[0086] The acquisition unit 701 is used to acquire a first image, which is an object wave image of a target object in a holographic image. Figure 2 The content of step 201 in FIG. 1 can be understood through the above, and will not be repeated here.

[0087] The processing unit 702 is used to perform edge detection processing on the first image to obtain a second image, where the second image includes edge intensity information of each pixel in the first image. Figure 2 The contents of step 202 in FIG. 1 can be understood through the instructions, and will not be described in detail here.

[0088] The processing unit 702 is used to determine a first value based on the edge strength information, where the first value indicates the change in clarity of each pixel in the second image. Figure 2 The content of step 203 in FIG. 1 can be understood by reference to the contents of step 203 in FIG.

[0089] The processing unit 702 is used to determine the target focal length of the second image according to the first value. Figure 2 The contents of step 204 in FIG. 1 can be understood through the description of FIG.

[0090] In some possible implementations, the first image includes first pixel intensity information and second pixel intensity information, the first pixel intensity information being the pixel intensity corresponding to each pixel in the first area when the target pixel is in the first area of ​​the first image, and the second pixel intensity information being the pixel intensity corresponding to each pixel in the second area when the target pixel is in the second area of ​​the first image. The processing unit 702 is used to: process the first pixel intensity information using a first preset edge algorithm to obtain the first edge intensity information of the target pixel; process the second pixel intensity information using a second preset edge algorithm to obtain the second edge intensity information of the target pixel; and process the first edge intensity information and the second edge intensity information to obtain a second image. For details, please refer to the aforementioned Figure 2 The contents of step 202 in FIG. 1 can be understood through the instructions, and will not be described in detail here.

[0091] In some possible implementations, the processing unit 702 is used to: determine the edge strength value of the first pixel point from the edge strength information, and determine the edge strength values ​​of at least three second pixels, wherein each of the at least three second pixels is adjacent to the first pixel point; and process the edge strength value of the first pixel point and the edge strength value of each second pixel point by a preset clarity algorithm to obtain a first value. For details, please refer to the aforementioned Figure 2 The content of step 203 in FIG. 1 can be understood by reference to the contents of step 203 in FIG.

[0092] In some other possible implementations, the processing unit 702 is also used to: before performing image edge detection processing on the first image to obtain the second image, denoise the first image using at least two preset denoising algorithms to obtain the denoised first image; and perform edge detection processing on the denoised first image to obtain the second image.

[0093] The image focusing device in the embodiment of the present application is described above from the perspective of modular functional entities, and the image focusing device in the embodiment of the present application is described below from the perspective of hardware processing. Figure 8 It is a structural diagram of a computer device provided in an embodiment of the present application. The computer device may include the image focusing device described above. The computer device may have relatively large differences due to different configurations or performances. The computer device may include at least one processor 801, a communication line 807, a memory 803 and at least one communication interface 804.

[0094] The processor 801 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0095] The communication link 807 may include a pathway to transmit information between the above-mentioned components.

[0096] The communication interface 804 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0097] The memory 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, and the memory may exist independently and be connected to the processor via a communication line 807. The memory may also be integrated with the processor.

[0098] The memory 803 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 801. The processor 801 is used to execute the computer-executable instructions stored in the memory 803, thereby realizing the image focusing method provided in the above embodiment of the present application.

[0099] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0100] In a specific implementation, as an embodiment, the computer device may include multiple processors, such as Figure 8 801 and processor 802 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0101] In a specific implementation, as an embodiment, the computer device may further include an output device 805 and an input device 806. The output device 805 communicates with the processor 801 and may display information in a variety of ways. The input device 806 communicates with the processor 801 and may receive user input in a variety of ways. For example, the input device 806 may be a mouse, a touch screen device, or a sensor device.

[0102] The computer device mentioned above can be a general device or a special device. In a specific implementation, the computer device can be a microscope or a computer with Figure 8 The embodiment of the present application does not limit the type of the computer device.

[0103] Need to explain, Figure 8 The processor 801 in the embodiment can call the computer-executable instructions stored in the memory 803 to make the image focusing device execute the following steps: Figure 2 The method in the corresponding method embodiment.

[0104] Specifically, Figure 7 The function / implementation process of the processing unit 702 in Figure 8 The processor 801 in the embodiment calls the computer execution instructions stored in the memory 803 to implement. Figure 7 The function / implementation process of the acquisition unit 701 in can be Figure 8 It is implemented by the communication interface 804 in.

[0105] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0107] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0111] The above embodiments may be implemented in whole or in part through software, hardware, firmware or any combination thereof. When implemented by software, they may be implemented in whole or in part in the form of a computer program product.

[0112] The computer program product includes one or more computer instructions. When loading and executing the computer execution instruction on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (for example, floppy disk, hard disk, tape), optical media (for example, DVD), or semiconductor media (such as SSD)) and the like.

[0113] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for focusing an image, characterized in that ,include: Acquire a first image, where the first image is an object wave image of a target object in a holographic image; the first image includes first pixel intensity information and second pixel intensity information; the first pixel intensity information is the pixel intensity corresponding to each pixel point on the first area when the target pixel point is in the first area of ​​the first image; the second pixel intensity information is the pixel intensity corresponding to each pixel point on the second area when the target pixel point is in the second area of ​​the first image; Performing edge detection processing on the first image to obtain a second image specifically includes: processing the first pixel intensity information by a first preset edge algorithm to obtain first edge intensity information of the target pixel; processing the second pixel intensity information by a second preset edge algorithm to obtain second edge intensity information of the target pixel; processing the first edge intensity information and the second edge intensity information to obtain the second image, wherein the second image includes edge intensity information of each pixel in the first image; Determine a first value based on the edge strength information, where the first value indicates a change in clarity of each pixel in the second image; A target focal length of the second image is determined according to the first value.

2. The method according to claim 1, characterized in that Determining a first value based on the edge strength information includes: Determine an edge intensity value of a first pixel point and edge intensity values ​​of at least three second pixel points from the edge intensity information, wherein each of the at least three second pixel points is adjacent to the first pixel point; The edge intensity value of the first pixel point and the edge intensity value of each of the second pixel points are processed by a preset clarity algorithm to obtain the first value.

3. The method according to any one of claims 1 to 2, characterized in that: Before performing edge detection processing on the first image to obtain the second image, the method further includes: Performing denoising on the first image using at least two preset denoising algorithms to obtain a denoised first image; Performing edge detection processing on the first image to obtain a second image includes: Perform edge detection processing on the first image after the denoising processing to obtain a second image.

4. The method according to any one of claims 1 to 2, characterized in that The target object includes a transparent cell or a transparent lens.

5. An image focusing device, characterized in that: include: An acquisition unit is used to acquire a first image, where the first image is an object wave image of a target object in a holographic image; the first image includes first pixel intensity information and second pixel intensity information, where the first pixel intensity information is the pixel intensity corresponding to each pixel point on a first area of ​​the first image when the target pixel point is in the first area of ​​the first image; The second pixel intensity information is the pixel intensity corresponding to each pixel point in the second area when the target pixel point is in the second area of ​​the first image; The processing unit is used to perform edge detection processing on the first image to obtain a second image, specifically comprising: processing the first pixel intensity information by a first preset edge algorithm to obtain first edge intensity information of the target pixel; processing the second pixel intensity information by a second preset edge algorithm to obtain second edge intensity information of the target pixel; processing the first edge intensity information and the second edge intensity information to obtain the second image; the second image includes edge intensity information of each pixel in the first image; The processing unit is configured to determine a first value based on the edge strength information, wherein the first value indicates a change in clarity of each pixel in the second image; The processing unit is used to determine a target focal length of the second image according to the first value.

6. The image focusing device according to claim 5, characterized in that: The processing unit is used for: Determine an edge intensity value of a first pixel point from the edge intensity information, and determine edge intensity values ​​of at least three second pixel points, wherein each of the at least three second pixel points is adjacent to the first pixel point; The edge intensity value of the first pixel point and the edge intensity value of each of the second pixel points are processed by a preset clarity algorithm to obtain the first value.

7. The device according to any one of claims 5-6, characterized in that The processing unit is further used for: Before performing edge detection processing on the first image to obtain the second image, performing denoising processing on the first image using at least two preset denoising algorithms to obtain a denoised first image; Perform edge detection processing on the first image after the denoising processing to obtain a second image.

8. The device according to any one of claims 5-6, characterized in that The target object includes a transparent cell or a transparent lens.

9. A computer device, characterized in that: The computer device comprises: an input / output (I / O) interface, a processor and a memory, The memory stores program instructions; The processor is used to execute program instructions stored in the memory to perform the method according to any one of claims 1 to 4.

10. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a computer device, the computer device is caused to perform the method according to any one of claims 1 to 4.

11. A computer program product comprising instructions, characterized in that When the method is executed on a computer or a processor, the computer or the processor is caused to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Automatic focusing method for electric adjustable liquid lens

    CN105527778A

  • Automatic focusing method based on liquid lens as well as system

    CN109451244A