Focusing method and device of all-digital slice scanning system and storage medium

By optimizing focus point sorting and image acquisition through continuous acquisition mode and local maximum method, the problems of low efficiency and noise interference in the existing technology are solved, and a high-efficiency and accurate focusing process is achieved.

CN118945467APending Publication Date: 2024-11-12苏州秉理科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410769524.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The focusing methods of existing digital slide scanning systems are inefficient and easily affected by impurities on the slide surface, leading to focusing failure.

Method used

The system employs a continuous acquisition mode, reorders the focus points by calculating the shortest moving distance, moves the scanning component along the X/Y axis, sets multiple image acquisition trigger positions, calculates the sharpness score, and obtains the local maximum value as the focal length, thus eliminating interference from slide and surface impurities.

Benefits of technology

It improves focusing efficiency and accuracy, ensuring the clearest image is captured every time, and avoids the influence of impurities on the slide surface.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses a focusing method and device of an all-digital slice scanning system and a storage medium, and relates to the field of digital slice image focusing, and the key point of the technical scheme is that the method comprises the following steps: S1, calculating the shortest moving distance of all focusing points; s2, setting a Z-axis image acquisition mode as a continuous acquisition mode; s3, moving a scanning part of the all-digital slice scanning system to a first focusing point along the X axis and the Y axis; s4, setting a plurality of image acquisition triggering positions; s5, an image acquisition device acquires images at each image acquisition triggering position; s6, calculating the definition score of each collected image; s7, calculating a local maximum value of the definition score; s8, acquiring a Z-axis maximum value from the local maximum values as a focal length of a first focusing point; s9, repeating the steps S3-S8 to obtain the focal lengths of all the remaining focusing points; and S10, completing focusing. The method has the advantages of high focusing efficiency and high focusing precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital slice image focusing, and more specifically, to a focusing method, a device and a storage medium of a full digital slice scanning system. Background Art

[0002] Fully digital slides are slices that are digitized from traditional glass slides using a digital slide scanner. After digitization, full-field digital pathology slides can be formed.

[0003] The working steps of the digital slide scanning system are as follows: 1. Identify tissue regions on macroscopic images; 2. Select appropriate pre-focus points (X1, Y1) to (Xn, Yn) on the tissue area; 3. Focus each focus point under microscopic conditions and calculate the focal length (X1, Y1, Z1), (Xn, Yn, Zn); 4. According to the focus and the corresponding focal length (X1, Y1, Z1) to (Xn, Yn, Zn), fit the focal plane of the entire tissue area (X00, Y00, Z00), (Xmn, Ymn, Zmn); The above n is a natural number; 5. According to the focal plane fitted above, the corresponding X / Y / Z axis is moved to the specified position through the motion control system to collect images with the camera; 6. The collected images are stitched and stored to achieve the purpose of scanning.

[0004] The accuracy of the focusing algorithm in step 3 above will directly determine the quality of the scanned image. In order to adapt to slices of slides of different thicknesses (the standard slide thickness is 0.9mm to 1.2mm), it is generally necessary to set a relatively large focusing range (range 0.3mm). The depth of field of microscopic image acquisition is generally around 0.5um. Therefore, in order to obtain the most correct focal length, it is necessary to collect an image every 0.5um within the range of 0.3mm (a total of 601 images), and then find the Z-axis distance where the image with the clearest tissue is located from these 601 images as the focal length of that point.

[0005] The focusing method of the existing digital slide scanning system is as follows: 1. The Z axis moves to the initial position; 2. Move along the Z axis with a large interval, usually 10u, trigger image acquisition each time it moves, and calculate the image clarity, which is recorded as: V0, V1, ..., V30; 3. Select the Z-direction distance Zn corresponding to the clearest image, take Zn as the center, collect an image every 2um in the range of Zn-10u to Zn+10u, and calculate the image clarity, Vn0, Vn1, ...., Vn11; 4. Select the Z distance Znn corresponding to the clearest image, take Znn as the center, collect an image every 0.5u in the range of Znn-2u to Znn+2u, and calculate the image clarity Vnn0, Vnn1, ...., Vnn9.

[0006] 5. Select the Z distance Znnn where the clearest image is located, which is the final focal length of that point.

[0007] 6. Move to the next focus point and repeat steps 3 to 5 to select the focal length of all focus points.

[0008] There are two problems with the above method: 1. For the first point, since the focus range is large, each image is acquired by moving to the target position in the Z direction, so the performance is low and it usually takes about 20 seconds. Second, for the first focus point, in order to increase the speed, the method of first capturing images in large steps, selecting a clear image, and then capturing images in small steps is adopted. In the process of capturing images in large steps, this method is prone to the situation that the clearest image is not the actual image, but impurities, glue or other non-target image areas on the surface of the glass slide, which leads to the failure of the entire focusing process.

[0009] Therefore, it is necessary to propose a new solution to solve the above problems. Summary of the invention

[0010] In view of the deficiencies in the prior art, the object of the present invention is to provide a focusing method, device and storage medium for a fully digital slide scanning system, which have the advantages of high focusing efficiency and focusing accuracy.

[0011] The above technical objectives of the present invention are achieved through the following technical solutions: A focusing method for a full digital slide scanning system comprises the following steps: S1, calculating the shortest moving distance of all focus points, and reordering the focus points according to the shortest moving distance; S2, set the Z-axis image acquisition mode to continuous acquisition mode; S3, moving the scanning component of the full digital slide scanning system along the X-axis and the Y-axis to the first focusing point, and setting the initial focusing position and the ending focusing position of the Z-axis in the first focusing point; S4, setting multiple image acquisition trigger positions; S5, moving the Z axis in the first focus point, and during the movement of the Z axis, the image acquisition device acquires images at each of the image acquisition trigger positions; S6, calculating the clarity score of each collected image; S7, calculating the local maximum value of the clarity score; S8, obtaining the Z-axis maximum value in the local maximum value as the focal length of the first focus point; S9, repeating steps S3 to S8 to obtain the focal lengths of all remaining focus points after sorting in step S1; S10, focusing is completed.

[0012] In one embodiment, in step S1, the shortest moving distances of all focus points are calculated by using the Dijkstra algorithm, and the focus points are reordered according to the shortest moving distances.

[0013] In one embodiment, in step S6, the clarity score of each captured image is calculated using a Laplacian gradient descent algorithm.

[0014] In one embodiment, the distance between any two adjacent image acquisition trigger positions is 0.5 um.

[0015] The present invention also discloses a computer device, including a processor, a memory, a communication interface and a communication bus. The processor, the memory and the communication interface communicate with each other through the communication bus. The memory is used to store a focusing method program of the full digital slide scanning system. The focusing method program of the full digital slide scanning system enables the processor to execute any operation corresponding to the focusing method of the full digital slide scanning system.

[0016] The present invention also discloses a computer-readable storage medium, characterized in that: the computer-readable storage medium includes a focusing method program for a fully digital slide scanning system, and when the focusing method program for a fully digital slide scanning system is executed by a processor, any focusing method for the fully digital slide scanning system is implemented.

[0017] In summary, the present invention has the following beneficial effects: The moving distance between focus points is the shortest, making the overall movement more efficient; During the focusing process, the continuous acquisition mode is used to collect images, which effectively improves the image acquisition efficiency compared with the traditional stop mode; The minimum range is used to capture images throughout the entire focus range to ensure that the clearest image can be captured every time, and the accuracy of each focus is ensured through image clarity calculation; The local maximum method is used to obtain the focal length of the focus point, which effectively eliminates the interference of the glass slide and impurities on the glass slide surface. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] The embodiment of the present application provides a focusing method of a full digital slide scanning system, comprising the following steps: S1, calculating the shortest moving distance of all focus points, and reordering the focus points according to the shortest moving distance; S2, set the Z-axis image acquisition mode to continuous acquisition mode; S3, moving the scanning component of the full digital slide scanning system along the X-axis and the Y-axis to the first focusing point, and setting the initial focusing position and the ending focusing position of the Z-axis in the first focusing point; A plane XY axis coordinate system is established for one of the planes corresponding to the lens of the full digital slice scanning system, and the Z axis is perpendicular to the XY axis coordinate system.

[0020] S4, setting multiple image acquisition trigger positions; S5, moving the Z axis in the first focus point, during which the image acquisition device acquires images at each of the image acquisition trigger positions set in step S4; S6, calculating the clarity score of each collected image; S7, calculating the local maximum value of the clarity score; S8, obtaining the Z-axis maximum value in the local maximum value as the focal length of the first focus point; S9, repeating steps S3 to S8 to obtain the focal lengths of all remaining focus points after sorting in step S1; S10, focusing is completed.

[0021] Among them, the distance between each two adjacent image acquisition trigger positions is 0.5um, so that the image acquisition device performs an image acquisition at every 0.5um position. Compared with the traditional large-step image acquisition, the 0.5um of this application is also just the minimum depth of field value of the optical path system in the image acquisition device, so that a clearer image can be captured in the target slice sample.

[0022] Specifically, in step S1, the X-axis and the Y-axis are moved to the first focus point P0. In P0, the initial focus position of the Z-axis is set to Z0, and the end focus position of the Z-axis is set to Zn=Z0+0.3mm, where 0.3mm is the maximum value of the focus range; In step S4, multiple image acquisition trigger positions are set to be Z0, Z0+0.5um, Z0+1um, Z0+1.5um, ..., Zn-0.5um, and Zn, respectively, with an interval of 0.5um, so that all images from Z0 to Zn can be acquired; In step S5, the scanning component of the digital slice scanning system moves along the Z axis from the position of Z0-0.5um to the position of Zn+0.5um, wherein Zn+0.5um is above Zn, so as to ensure that the upper limit area of ​​the entire tissue image is captured. During the Z axis movement, the image acquisition device acquires images at the image acquisition trigger positions of Z0, Z0+0.5um, Z0+1um, Z0+1.5um, ..., Zn-0.5um, and Zn; In step S6, the clarity scores of the collected images are recorded as: S0, S1, ..., Sn; That is, the image clarity score collected at the Z0 position is S0, the image clarity score collected at the Z0+0.5um position is S1, and so on, the image clarity score collected at the Zn position is Sn.

[0023] In step S7, the local maximum of the clarity score is calculated with every 7 values ​​as a group, and the obtained local maximum values ​​are recorded as: V0, V1, ... Vk. Since the thickness of the tissue slice is generally 3um to 5um, the area corresponding to the 7 values ​​can just cover the tissue slice with the minimum thickness. Even when the slice thickness is 5um, when the diameter corresponding to the 7 values ​​is 3um, a focus can be found in the slice thickness of 5um. As long as the focus is on the tissue, the tissue image taken is clear. That is, when the slice thickness is 5um, there may be multiple local maximum points on the tissue, and we just need to choose the one with the highest Z axis.

[0024] Specifically, among the scores S0 to Sn, if the changing trend of the first group of 7 consecutive scores is from small to large and then from large to small, the maximum value of the 7 consecutive scores is obtained as the local maximum value, otherwise, it is not obtained. Then, starting from the second clarity score, the second group of 7 consecutive scores is obtained. If the changing trend is from small to large and then from large to small, the maximum value of the 7 consecutive scores is obtained as the local maximum value. This calculation is repeated until all the clarity scores are judged. After the last group includes the last clarity, no further judgment will be made after the group is judged.

[0025] For example, if the scores are 10, 11, 12, 13, 14, 15, 14, 13, 12, 14, 15, 16, 17, 18, 19, 25, 30, 35, 29, 28, among these scores, the following groups meet the above conditions of first small to large and then large to small: the first group is 10, 11, 12, 13, 14, 15, 14, the second group is 11, 12, 13, 14, 15, 14, 13 , the third group 12, 13, 14, 15, 14, 13, 12, the fourth group 17, 18, 19, 25, 30, 35, 29, the fifth group 18, 19, 25, 30, 35, 29, 28. Among the above five groups, the first three groups can get the same local maximum value 15, and the last two groups can also get the same local maximum value 35; therefore, we can select two local maxima in the above scores, which are 15 and 35 respectively; In step S8, still taking the above as an example, the local maximum values ​​of scores of 15 and 35 are screened, and the maximum value of the Z axis is selected. The maximum value of the Z axis is the target focal length in the first focus point.

[0026] In one embodiment, in step S1, the shortest moving distances of all focus points are calculated by using the Dijkstra algorithm, and the focus points are reordered according to the shortest moving distances.

[0027] In one embodiment, in step S6, the clarity score of each captured image is calculated using a Laplacian gradient descent algorithm.

[0028] It should be noted that the above-mentioned Dijkstra algorithm and Laplacian gradient descent algorithm both adopt existing technologies, and their specific calculation methods are not described in detail in this embodiment.

[0029] The present invention also discloses a computer device, including a processor, a memory, a communication interface and a communication bus. The processor, the memory and the communication interface communicate with each other through the communication bus. The memory is used to store a focusing method program of the full digital slide scanning system. The focusing method program of the full digital slide scanning system enables the processor to execute any operation corresponding to the focusing method of the full digital slide scanning system.

[0030] Those skilled in the art will appreciate that, for ease of description, the example in which both the memory and the processor are provided with one is used for description. In an actual terminal or server, there may be multiple processors and memories. The memory may also be referred to as a storage medium or a storage device, etc.

[0031] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor may also be a general-purpose microprocessor, graphics processing unit (GPU), or one or more integrated circuits for executing related programs to implement the functions required to be executed in the embodiments of the present application.

[0032] The processor can also be an integrated circuit chip with signal processing capabilities. In the implementation process, the various steps of the present application can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The above-mentioned processor can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor to be executed. The software module can be located in a random access memory, a flash memory and a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines its hardware to complete the functions required to be performed by the unit included in the method, device and storage medium of the embodiment of the present application.

[0033] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.

[0034] By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM).

[0035] The memory may also be a read-only optical disc (Compact Disc Read-Only Memory, CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a bus. The memory may also be integrated with the processor, and the memory may store a program. When the program stored in the memory is executed by the processor, the processor is used to execute the various steps of the determination method in the above-mentioned embodiment of the present application.

[0036] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) is integrated into the processor. It should be noted that the memory described herein is intended to include but is not limited to these and any other suitable types of memory.

[0037] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0038] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0039] 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 program product of computer programming. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a processor, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a computer network, or other programmable device.

[0040] The present invention also discloses a computer-readable storage medium, which includes a focusing method program for a fully digital slide scanning system. When the focusing method program for a fully digital slide scanning system is executed by a processor, any focusing method for the fully digital slide scanning system is implemented.

[0041] It should be noted that the focusing method program of the all-digital slide scanning system can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the focusing method program of the all-digital slide scanning system can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means, or can be transmitted from one website, computer, server or data center to a mobile phone processor by wired means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0042] In summary, the present invention has the following beneficial effects: 1. The moving distance between focus points is the shortest, making the overall movement more efficient; 2. During the focusing process, the continuous acquisition mode is used to collect images, which effectively improves the image acquisition efficiency compared with the traditional stop mode; 3. The minimum range is used to capture images within the entire focus range to ensure that the clearest image can be captured every time, and the accuracy of each focus is ensured through image clarity calculation; 4. The local maximum method is used to obtain the focal length of the focus point, which effectively eliminates the interference of the glass slide and impurities on the glass slide surface.

[0043] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A focusing method for a fully digital slide scanning system, characterized in that: The steps include: S1, calculating the shortest moving distance of all focus points, and reordering the focus points according to the shortest moving distance; S2, set the Z-axis image acquisition mode to continuous acquisition mode; S3, moving the scanning component of the full digital slide scanning system along the X-axis and the Y-axis to the first focusing point, and setting the initial focusing position and the ending focusing position of the Z-axis in the first focusing point; S4, setting multiple image acquisition trigger positions; S5, moving the Z axis in the first focus point, and during the movement of the Z axis, the image acquisition device acquires images at each of the image acquisition trigger positions; S6, calculating the clarity score of each collected image; S7, calculating the local maximum value of the clarity score; S8, obtaining the Z-axis maximum value in the local maximum value as the focal length of the first focus point; S9, repeating steps S3 to S8 to obtain the focal lengths of all remaining focus points after sorting in step S1; S10, focusing is completed.

2. The focusing method of the all-digital slide scanning system according to claim 1, characterized in that: In step S1, the shortest moving distances of all focus points are calculated by using the Dijkstra algorithm, and the focus points are reordered according to the shortest moving distances.

3. The focusing method of the all-digital slide scanning system according to claim 1, characterized in that: In step S6, the clarity score of each collected image is calculated by using the Laplacian gradient descent algorithm.

4. The focusing method of the all-digital slide scanning system according to claim 1, characterized in that: The distance between any two adjacent image acquisition trigger positions is 0.5 um.

5. A computer device, characterized in that: It includes a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus, the memory is used to store a focusing method program of a full digital slide scanning system, and the focusing method program of the full digital slide scanning system enables the processor to perform operations corresponding to the focusing method of the full digital slide scanning system as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a focusing method program for a fully digital slide scanning system. When the focusing method program for a fully digital slide scanning system is executed by a processor, the focusing method for a fully digital slide scanning system as described in any one of claims 1 to 3 is implemented.