CN118112777B - Multi-section cross focusing processing method based on pathological slide and application thereof - Google Patents
Multi-section cross focusing processing method based on pathological slide and application thereof Download PDFInfo
- Publication number
- CN118112777B CN118112777B CN202410538741.9A CN202410538741A CN118112777B CN 118112777 B CN118112777 B CN 118112777B CN 202410538741 A CN202410538741 A CN 202410538741A CN 118112777 B CN118112777 B CN 118112777B
- Authority
- CN
- China
- Prior art keywords
- focusing
- objective lens
- segment
- section
- slide
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 230000001575 pathological effect Effects 0.000 title claims abstract description 17
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 13
- 238000001914 filtration Methods 0.000 claims abstract description 10
- 230000007170 pathology Effects 0.000 claims description 22
- 238000010586 diagram Methods 0.000 claims description 17
- 238000012545 processing Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 10
- 239000006059 cover glass Substances 0.000 claims description 5
- 238000003860 storage Methods 0.000 claims description 5
- 239000011521 glass Substances 0.000 abstract description 13
- 230000008859 change Effects 0.000 abstract description 3
- 230000005540 biological transmission Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 238000003825 pressing Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000010827 pathological analysis Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/36—Microscopes arranged for photographic purposes or projection purposes or digital imaging or video purposes including associated control and data processing arrangements
- G02B21/361—Optical details, e.g. image relay to the camera or image sensor
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/24—Base structure
- G02B21/241—Devices for focusing
- G02B21/244—Devices for focusing using image analysis techniques
-
- G—PHYSICS
- G02—OPTICS
- G02B—OPTICAL ELEMENTS, SYSTEMS OR APPARATUS
- G02B21/00—Microscopes
- G02B21/36—Microscopes arranged for photographic purposes or projection purposes or digital imaging or video purposes including associated control and data processing arrangements
- G02B21/365—Control or image processing arrangements for digital or video microscopes
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- General Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Microscoopes, Condenser (AREA)
Abstract
The application provides a pathological slide-based multistage cross focusing processing method and application thereof. Aiming at the problem of failure of the traditional focusing mode caused by different thicknesses of the glass slides, the application designs a self-adaptive focusing strategy, and calculates the focusing positions of all sections from bottom to top by setting parameters such as the limit positions, the focusing section numbers, the single-section focusing ranges, the crossing ranges and the like. And two definition peaks of the surface of the glass slide and the sample area are monitored and accurately identified in real time by using a picture definition algorithm and Gaussian filtering, so that focusing accuracy is ensured, and damage caused by the fact that an objective lens touches the glass slide is avoided. The method can effectively solve the focusing problem of various slides, improves the success rate of digital pathological scanning, does not need to change a hardware structure, and has good universality and stability.
Description
Technical Field
The application relates to the field of pathological diagnosis and research, in particular to a multi-section cross focusing processing method based on pathological slide and application thereof.
Background
In the field of existing pathology diagnostics and research, microscopic image analysis has become an integral part, especially in digital pathology, high quality pathology slide scanning is of paramount importance. However, the existing pathological slide making process standards on the market are various, the thickness specification difference of the slide glass and the cover glass is obvious, and the current situation brings challenges to high-precision microscopic imaging.
Conventional microscope focus mechanisms typically rely on a fixed depth of focus or a preset range of focus, which is particularly limited when faced with pathology slides of different thickness. When the thickness of the slide exceeds a preset focusing range, the conventional focusing method is easy to fail to accurately focus, so that a slide scanning image is blurred, and the observation and diagnosis accuracy of pathologists are seriously affected. Furthermore, during the automatic scanning process, the mechanical pressure caused by improper focusing is too large, so that the objective lens may contact with the surface of the glass slide, which may not only lead to deformation of the objective lens and damage the performance of the device, but also may cause physical damage to the glass slide and affect the integrity of the sample.
In view of the above, the present invention aims to provide a multi-stage cross focusing processing method based on pathological slide, and an innovative solution is provided for the above technical problems. The method can adapt to the characteristics of the glass slides with different thicknesses by intelligently implementing multi-section and cross focusing strategies, accurately adjust the focusing height, and effectively solve the problems of focusing failure, fixed focusing position, limited range, equipment and glass slide damage possibly caused by improper focusing operation and the like in the traditional focusing mode. The invention is expected to greatly improve the automation degree and the image quality of slide scanning, ensure the safety of slide samples, and have important practical significance and technical value for promoting the development of digital pathology.
Disclosure of Invention
The embodiment of the application provides a multi-section cross focusing processing method based on pathological slide and application thereof, aiming at the problems of focusing failure, fixed focusing position, limited range, equipment and slide damage possibly caused by improper focusing operation and the like in the traditional focusing mode in the prior art.
The core technology of the invention mainly uses a multi-section crossed focusing mode, and according to the self-adaptive focusing height of the glass slide with different thicknesses, the problems of fixing the misfocus and focusing range and pressing the misfocus and the focusing range onto the surface of the glass slide are solved.
In a first aspect, the present application provides a multi-segment cross-focus processing method based on pathology slides, the method comprising the steps of:
s00, after focusing is started, calculating and deducing a starting position and an ending position of each section of focusing from bottom to top according to preset parameters;
the preset parameters comprise the limit position of the movable objective lens shaft, the number of focusing sections, the focusing range of single-section focusing and the crossing range of two sections of focusing ranges;
s10, judging whether the current focusing segment number is smaller than the maximum focusing segment number;
S20, if so, moving the objective lens shaft to the initial position of the current focusing segment to start drawing until the objective lens shaft is moved to the end position of the current focusing segment, and finishing drawing of the current focusing segment to obtain a focusing sequence diagram;
S30, calculating a definition value of the focusing sequence diagram, and calculating whether a peak value exists in the current focusing section or whether the number of the peak values is smaller than two;
s40, if no peak value exists or the number of the peak values is smaller than two, caching the current peak value, moving the objective lens shaft to the initial position of the next focusing segment, and re-executing the step S10; if two peaks exist, focusing is stopped, and the second peak is taken as the position of the sample.
Further, in step S00, the limit position is a position where the objective lens axis is close to the surface of the cover glass, and the limit position is smaller than the focal position of the slide, so as to prevent the objective lens from crushing the slide.
Further, in the S00 step, the focusing range takes the focal length of the objective lens as the focusing range.
Further, in the S00 step, the crossover range is 1/5 of the single-segment focusing range.
Further, in the S00 step, the thickness of the slide is taken as the minimum value of the total focusing range.
Further, in the step S30, the specific step of calculating the sharpness value of the focusing sequence chart is as follows:
Making variances between each picture pixel point and adjacent pixel points in the focusing sequence diagram;
all variances are summed to obtain a sharpness value.
Further, S30, it is calculated whether the peak exists in the current focusing segment or whether the number of peaks is less than two by gaussian filtering algorithm and variance calculation.
In a second aspect, the present application provides a pathological slide-based multi-stage cross-focusing processing device, comprising:
the focusing module is used for driving the objective lens shaft to focus;
the processing module calculates and deduces the starting position and the ending position of each section of focusing from bottom to top according to preset parameters; judging whether the current focusing segment number is smaller than the maximum focusing segment number or not; if yes, moving the objective lens shaft to the initial position of the current focusing section to start drawing until the objective lens shaft is moved to the end position of the current focusing section, and finishing drawing of the current focusing section to obtain a focusing sequence diagram;
the preset parameters comprise the limit position of the movable objective lens shaft, the number of focusing sections, the focusing range of single-section focusing and the crossing range of two sections of focusing ranges;
The definition calculating module is used for calculating the definition value of the focusing sequence diagram and calculating whether the peak value exists in the current focusing section or whether the number of the peak values is smaller than two; if no peak value exists or the number of the peak values is smaller than two, caching the current peak value, moving the objective lens shaft to the initial position of the next focusing segment, and re-executing the step of the processing module;
And the output module stops focusing if two peaks exist, and outputs the second peak serving as the position of the sample.
In a third aspect, the application provides an electronic device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the pathology slide based multi-stage cross-focus processing method described above.
In a fourth aspect, the present application provides a readable storage medium having stored therein a computer program comprising program code for controlling a process to perform a process comprising a multi-segment cross-focus processing method based on pathology slides according to the above.
The main contributions and innovation points of the application are as follows: 1. compared with the prior art, the multi-section cross focusing processing method based on the pathological slide, provided by the application, successfully solves the problems of difficult focusing, easy damage to the slide and the like caused by different slide specifications through precise parameter calculation and intelligent algorithm optimization, and greatly improves the quality and safety of pathological slide scanning;
2. compared with the prior art, the multi-section cross focusing treatment solves the problem of low digitizing success rate of pathological slides with different specifications under the condition that the standards of the cover glass and the glass slide are different, effectively protects the pathological slide, can well meet the requirements of different slide models of customers under the condition that the hardware structure is not changed, and improves the application range and the stability of products.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow of a pathology slide based multi-segment cross-focus processing method according to an embodiment of the present application;
Fig. 2 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with aspects of one or more embodiments of the present description as detailed in the accompanying claims.
It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than described in this specification. Furthermore, individual steps described in this specification, in other embodiments, may be described as being split into multiple steps; while various steps described in this specification may be combined into a single step in other embodiments.
Example 1
The application aims to provide a multi-section cross focusing processing method based on pathological slide, and in particular relates to a method for processing pathological slide, which comprises the following steps of:
After focusing is started, calculating and deducing the starting position and the ending position of focusing of each section from bottom to top according to parameters such as the limit position, the number of focusing sections, the cross range and the like.
Wherein, each parameter is explained as follows:
Limit position: the thickness of the pathology slide is thinner, the objective lens shaft is moved to a position close to the surface of the cover glass to be a limit position, and the limit position is set for preventing the objective lens from crushing the slide, and meanwhile, the limit position is required to be smaller than the focal position of the slide.
Number of focusing segments: number of focusing segments for segmented focusing.
Single-segment focus range: each focal range needs to be less than or equal to the focal length of the objective lens, preventing pressing to the slide, for example, the focal length of the objective lens of 40 times is 0.2mm, and then the single-stage focal range can be set to 0.2mm.
Crossover range: the crossover range refers to the crossover segment of the two-segment focus range. The crossover range is to prevent peaks from occurring at the interface, resulting in calculation errors. The limit is in the strict sense that the slide thickness cannot be exceeded, preventing two sharp peaks from occurring simultaneously in the crossover range. Typically set to 1/5 of the single-segment focus range.
The thickness of the glass slide on the market is in the range of 1-2mm, and the total focusing range is more than or equal to 1mm. Assuming that the number of focusing segments is n, the total focusing range=n is a single-segment focusing range- (n-1) is a cross range;
The range is more than 1mm, n > =6 can be converted, and the limit position is assumed to be 1mm, so that:
the focusing range of the first section focusing is 0.2mm, namely 1.8-2 mm, and the crossing range of the first section focusing and the second section focusing is set to be 0.04mm, namely 1.8-1.84 mm.
The focusing range of the second section focusing is also 0.2mm, namely 1.64-1.84 mm, and the crossing range of the second section focusing and the third section focusing is set to be 0.04mm, namely 1.48-1.68 mm.
Similarly, the focusing range of the sixth section focusing is also 0.2mm, namely 1-1.2 mm.
And step two, after judging that the current number of segments is smaller than the maximum number of segments, moving the objective lens shaft to a focusing start position, setting to start drawing and moving the shaft to the focusing end position of the segment. After drawing is completed, calculating a definition value of a focusing sequence diagram through a picture definition algorithm, and calculating whether a peak exists in the section through a Gaussian filtering algorithm and a variance calculation. The true representation in the figure is yes and the false representation is no.
Since pathology slides typically have two sharpness peaks, one on the coverslip surface and one on the sample area. If there are no peaks or less than two peaks, the current peak is buffered and moved to the objective lens axis to the next focus start position (start position = last focus end position-crossover range), preventing peaks from appearing at the interface, resulting in calculation errors.
Among these, the picture sharpness algorithm is a simple method based on pixel variability, which evaluates the sharpness of an image by calculating the sum of the variances of each pixel in the image and its neighboring pixels. The following is a simplified step of the algorithm:
① Input: and acquiring an image of the definition to be detected.
② Variance calculation:
for each pixel point in the image, a pixel within a certain neighborhood (e.g., a 3x3, 5x5, or other sized neighborhood) is selected.
An average of all pixel gray values (or color channel values) within the neighborhood is calculated.
The square of the difference between each pixel and the neighborhood average is calculated.
This difference squared is added to the total variance.
③ Traversing the image: the process of step 2 is repeated, traversing each pixel point in the image.
④ Summation and normalization:
and summing the variances of all the pixel points to obtain a total variance value.
Alternatively, to accommodate images of different sizes and brightnesses, the variance values may be made comparable by some form of normalization process.
⑤ Definition evaluation: and judging the definition of the image according to the finally obtained variance value. A larger variance value is generally considered to mean that the edge information in the image is rich, so that the image is clearer; conversely, if the image is entirely smooth and the pixels do not change much, the variance is smaller and the image is considered to be more blurred.
Preferably, the conventional picture sharpness algorithm may not be sufficient to cope with all types of image and noise environments. The following is an optimization scheme for the algorithm:
① Pretreatment:
② Noise removal: firstly, noise reduction processing is carried out on the acquired image, and Gaussian filtering, median filtering or other self-adaptive filtering methods can be adopted to reduce interference of noise on definition discrimination.
③ Edge enhancement: the edge information of the image is detected using an operator such as the laplace operator, canny edge detection, or Roberts, sobel.
④ Feature extraction:
Local gradient histograms (LoG: LAPLACIAN OF GAUSSIAN) or other morphological features are used, which are more capable of capturing detail changes and edge intensities of the image.
In connection with frequency domain analysis, high frequency information is obtained using a Fast Fourier Transform (FFT) or a high pass filter, as the high frequency components tend to be related to the detail sharpness of the image.
⑤ Sharpness metric:
The Structural Similarity Index (SSIM) or peak signal to noise ratio (PSNR) of the image is calculated, and both methods are widely used as criteria for image quality evaluation.
Using the energy concentration of the frequency domain, a sharpness scoring function is defined that considers the energy distribution of the image within a particular frequency bandwidth.
And designing a multi-feature fusion definition index, and comprehensively judging the image definition by combining edge strength, gradient information, frequency characteristics, contrast and the like.
⑥ Peak detection:
Distinct peaks are found on the sharpness scoring curve, rather than just relying on the global value of variance. This can be achieved by sliding windows or local maxima detection algorithms, ensuring that a clear area is found that truly represents the sample area and the cover slip surface.
⑦ Threshold value judgment:
instead of a fixed ratio, a dynamic threshold is set that can be adjusted based on characteristics of the image itself (e.g., overall brightness, contrast) and a known best sharpness reference to more accurately distinguish between real peak and noise-induced fluctuations.
Preferably, of course, the following optimization schemes are also possible:
① Gaussian filtering:
And firstly, carrying out Gaussian filtering processing on the acquired focusing sequence diagram. The Gaussian filter can carry out smoothing processing on the image, remove random noise in the image, and meanwhile preserve edge information of the image. By selecting an appropriate gaussian kernel size (depending on the sigma value), the main structural features of the image can be maintained while suppressing noise. The method comprises the following steps:
Defining a gaussian kernel function (selecting the appropriate σ value depending on the image resolution and the degree of smoothness desired);
-performing a two-dimensional gaussian filter operation on each of the focus sequence images;
② Calculating the variance:
For each Gaussian filtered image, the pixel variance of its respective local region is calculated as a measure of sharpness. The "local area" here may be a sliding window or an image block of the image. The method comprises the following steps:
-selecting one or more window sizes, the moving window covering the whole image;
-calculating an average gray scale (or average of color components) for pixel values within the window;
-calculating the square of the difference of each pixel within the window from the average gray scale;
summing all the squares of the differences and dividing by the total number of pixels in the window to obtain the variance in the window;
-maintaining a variance matrix within a sufficiently large spatial range, recording the variance value for each window;
③ Peak detection:
And analyzing the variance matrix to find out the area with larger variance value, namely the area with the potential definition peak value. Because regions of high sharpness tend to correspond to places in the image where there is rich detail and strong contrast, where the pixel values change more, resulting in a higher variance. The method comprises the following steps:
-setting a variance threshold above which variance values are considered possible peak candidates;
If the variance values of consecutive windows all exceed the threshold and form a distinct peak shape, then the area is marked that there may be a focus peak.
In this way it is possible to find out whether there are peaks and the number of peaks.
Step three, when the number of accumulated peaks reaches 2, jumping out of a focusing cycle to prevent the follow-up focusing from being pressed to a slide; i.e. the sample is at the second peak. The whole multi-section cross focusing process is completed.
In summary, pathology slides typically have two focal planes, one on the coverslip surface and one on the sample area. Through algorithm calculation, the larger the definition value is, the clearer the image is, the principle is that the pixel difference of the clear image is larger than that of the blurred image, the blur is started from the blur, the definition value changes from the small-large-small, the trend is generated, the variance calculation result near the peak value is judged to be larger than a set threshold value (the variance result near the peak value is small, the peak value can be filtered by taking 1/10 of the peak value generally), and the peak value is calculated when the two conditions are met. After the peak position is calculated, the peak position is stored, the peak value accumulation is added by 1, and when two peaks are obtained through focusing, a multi-section focusing process is skipped, so that the number of subsequent sections is prevented from pressing the slide. The problem of the pathology slide of different specifications has solved the digitization success rate low under the different circumstances of coverslip and slide glass standard and has protected pathology slide effectively, can satisfy customer's different slide model demands well under the condition of not changing hardware structure, has improved product and has closed range of application and stability.
Example two
Based on the same conception, the application also provides a multi-section cross focusing processing device based on the pathological slide, which comprises the following steps:
the focusing module is used for driving the objective lens shaft to focus;
the processing module calculates and deduces the starting position and the ending position of each section of focusing from bottom to top according to preset parameters; judging whether the current focusing segment number is smaller than the maximum focusing segment number or not; if yes, moving the objective lens shaft to the initial position of the current focusing section to start drawing until the objective lens shaft is moved to the end position of the current focusing section, and finishing drawing of the current focusing section to obtain a focusing sequence diagram;
the preset parameters comprise the limit position of the movable objective lens shaft, the number of focusing sections, the focusing range of single-section focusing and the crossing range of two sections of focusing ranges;
The definition calculating module is used for calculating the definition value of the focusing sequence diagram and calculating whether the peak value exists in the current focusing section or whether the number of the peak values is smaller than two; if no peak value exists or the number of the peak values is smaller than two, caching the current peak value, moving the objective lens shaft to the initial position of the next focusing segment, and re-executing the step of the processing module;
And the output module stops focusing if two peaks exist, and outputs the second peak serving as the position of the sample.
Example III
This embodiment also provides an electronic device, referring to fig. 2, comprising a memory 404 and a processor 402, the memory 404 having stored therein a computer program, the processor 402 being arranged to run the computer program to perform the steps of any of the method embodiments described above.
In particular, the processor 402 may include a Central Processing Unit (CPU), or an application specific integrated circuit (ApplicationSpecificIntegratedCircuit, abbreviated as ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application.
The memory 404 may include, among other things, mass storage 404 for data or instructions. By way of example, and not limitation, memory 404 may comprise a hard disk drive (HARDDISKDRIVE, abbreviated HDD), a floppy disk drive, a solid state drive (SolidStateDrive, abbreviated SSD), flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Memory 404 may include removable or non-removable (or fixed) media, where appropriate. Memory 404 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 404 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 404 includes Read-only memory (ROM) and Random Access Memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (ProgrammableRead-only memory, abbreviated PROM), an erasable PROM (ErasableProgrammableRead-only memory, abbreviated EPROM), an electrically erasable PROM (ElectricallyErasableProgrammableRead-only memory, abbreviated EEPROM), an electrically rewritable ROM (ElectricallyAlterableRead-only memory, abbreviated EAROM) or a FLASH memory (FLASH), or a combination of two or more of these. The RAM may be a static random access memory (StaticRandom-access memory, abbreviated SRAM) or a dynamic random access memory (DynamicRandomAccessMemory, abbreviated DRAM) where the DRAM may be a fast page mode dynamic random access memory 404 (FastPageModeDynamicRandomAccessMemory, abbreviated FPMDRAM), an extended data output dynamic random access memory (ExtendedDateOutDynamicRandomAccessMemory, abbreviated EDODRAM), a synchronous dynamic random access memory (SynchronousDynamicRandom-access memory, abbreviated SDRAM), or the like, where appropriate.
Memory 404 may be used to store or cache various data files that need to be processed and/or used for communication, as well as possible computer program instructions for execution by processor 402.
The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any of the pathology slide-based multi-segment cross-focus processing methods of the above embodiments.
Optionally, the electronic apparatus may further include a transmission device 406 and an input/output device 408, where the transmission device 406 is connected to the processor 402 and the input/output device 408 is connected to the processor 402.
The transmission device 406 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through the base station to communicate with the internet. In one example, the transmission device 406 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
The input-output device 408 is used to input or output information.
Example IV
The present embodiment also provides a readable storage medium having stored therein a computer program including program code for controlling a process to execute the process including the pathology slide-based multi-segment cross-focus processing method according to the first embodiment.
It should be noted that, specific examples in this embodiment may refer to examples described in the foregoing embodiments and alternative implementations, and this embodiment is not repeated herein.
In general, the various embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Embodiments of the invention may be implemented by computer software executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and/or macros can be stored in any apparatus-readable data storage medium and they include program instructions for performing particular tasks. The computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. The one or more computer-executable components may be at least one software code or a portion thereof. In addition, in this regard, it should be noted that any blocks of the logic flows as illustrated may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or memory blocks implemented within the processor, magnetic media such as hard or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs, etc. The physical medium is a non-transitory medium.
It should be understood by those skilled in the art that the technical features of the above embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The foregoing examples illustrate only a few embodiments of the application, which are described in greater detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit of the application, which are within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.
Claims (8)
1. The multi-section cross focusing processing method based on the pathological slide is characterized by comprising the following steps of:
s00, after focusing is started, calculating and deducing a starting position and an ending position of each section of focusing from bottom to top according to preset parameters;
the preset parameters comprise the limit position of the movable objective lens shaft, the number of focusing sections, the focusing range of single-section focusing and the crossing range of two sections of focusing ranges;
s10, judging whether the current focusing segment number is smaller than the maximum focusing segment number;
S20, if so, moving the objective lens shaft to the initial position of the current focusing segment to start drawing until the objective lens shaft is moved to the end position of the current focusing segment, and finishing drawing of the current focusing segment to obtain a focusing sequence diagram;
S30, calculating a definition value of the focusing sequence diagram, summing all variances by taking variances between each picture pixel point and adjacent pixel points in the focusing sequence diagram to obtain the definition value, and calculating whether a peak value exists in the current focusing section or whether the number of the peak values is smaller than two or not by a Gaussian filtering algorithm and variance calculation;
s40, if no peak value exists or the number of the peak values is smaller than two, caching the current peak value, moving the objective lens shaft to the initial position of the next focusing segment, and re-executing the step S10; if two peaks exist, focusing is stopped, and the second peak is taken as the position of the sample.
2. The pathology slide based multi-stage cross-focus processing method according to claim 1, wherein in the S00 step, the limit position is a position of the objective lens axis to be close to the surface of the cover glass, and the limit position is smaller than the slide focal position to prevent the objective lens from crushing the slide.
3. The pathology slide based multi-stage cross-focus processing method according to claim 1, wherein in the S00 step, the focal length of the focus range objective lens is used as the focus range.
4. The pathology slide based multi-segment cross-focus processing method according to claim 1, wherein in the S00 step, the cross range is 1/5 of the single-segment focus range.
5. The method of claim 1, wherein in the step S00, the thickness of the slide is used as a minimum value of the total focusing range.
6. A pathology slide-based multi-segment cross focusing processing device, comprising:
the focusing module is used for driving the objective lens shaft to focus;
the processing module calculates and deduces the starting position and the ending position of each section of focusing from bottom to top according to preset parameters; judging whether the current focusing segment number is smaller than the maximum focusing segment number or not; if yes, moving the objective lens shaft to the initial position of the current focusing section to start drawing until the objective lens shaft is moved to the end position of the current focusing section, and finishing drawing of the current focusing section to obtain a focusing sequence diagram;
the preset parameters comprise the limit position of the movable objective lens shaft, the number of focusing sections, the focusing range of single-section focusing and the crossing range of two sections of focusing ranges;
The definition calculating module calculates a definition value of a focusing sequence diagram, sums all variances by taking variances between each picture pixel point and adjacent pixel points in the focusing sequence diagram to obtain the definition value, and calculates whether a peak value exists in a current focusing section or whether the number of the peak values is smaller than two or not by a Gaussian filtering algorithm and variance calculation; if no peak value exists or the number of the peak values is smaller than two, caching the current peak value, moving the objective lens shaft to the initial position of the next focusing segment, and re-executing the step of the processing module;
And the output module stops focusing if two peaks exist, and outputs the second peak serving as the position of the sample.
7. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the pathology slide based multi-segment cross-focus processing method according to any one of claims 1 to 5.
8. A readable storage medium, characterized in that the readable storage medium has stored therein a computer program comprising program code for controlling a process to perform a process comprising the pathology slide based multi-segment cross focus processing method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410538741.9A CN118112777B (en) | 2024-04-30 | 2024-04-30 | Multi-section cross focusing processing method based on pathological slide and application thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410538741.9A CN118112777B (en) | 2024-04-30 | 2024-04-30 | Multi-section cross focusing processing method based on pathological slide and application thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118112777A CN118112777A (en) | 2024-05-31 |
CN118112777B true CN118112777B (en) | 2024-07-09 |
Family
ID=91219718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410538741.9A Active CN118112777B (en) | 2024-04-30 | 2024-04-30 | Multi-section cross focusing processing method based on pathological slide and application thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118112777B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108387517A (en) * | 2018-02-26 | 2018-08-10 | 深圳市生强科技有限公司 | It is sliced scan method and system |
CN111149037A (en) * | 2017-09-29 | 2020-05-12 | 徕卡生物系统成像股份有限公司 | Real-time automatic focusing algorithm |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IL148664A0 (en) * | 2002-03-13 | 2002-09-12 | Yeda Res & Dev | Auto-focusing method and device |
US11086118B2 (en) * | 2019-04-29 | 2021-08-10 | Molecular Devices, Llc | Self-calibrating and directional focusing systems and methods for infinity corrected microscopes |
EP3961287A3 (en) * | 2020-09-01 | 2022-06-29 | BMG Labtech GmbH | Autofocus system for an optical measuring or microscopy apparatus, method for focus adjustment in an optical measuring or microscopy apparatus and optical measuring or microscopy apparatus |
-
2024
- 2024-04-30 CN CN202410538741.9A patent/CN118112777B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111149037A (en) * | 2017-09-29 | 2020-05-12 | 徕卡生物系统成像股份有限公司 | Real-time automatic focusing algorithm |
CN108387517A (en) * | 2018-02-26 | 2018-08-10 | 深圳市生强科技有限公司 | It is sliced scan method and system |
Also Published As
Publication number | Publication date |
---|---|
CN118112777A (en) | 2024-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6703314B2 (en) | Focus detection | |
CN110288566B (en) | Target defect extraction method | |
CN107609555B (en) | License plate detection method, vehicle type identification method applying license plate detection method and related device | |
CN111027546A (en) | Character segmentation method and device and computer readable storage medium | |
JP2024050880A (en) | Character segmentation method, apparatus, and computer-readable storage medium | |
CN102005051B (en) | Edge detection method and related device | |
CN115619793A (en) | Power adapter appearance quality detection method based on computer vision | |
CN113298761B (en) | Image filtering method, device, terminal and computer readable storage medium | |
CN111046862A (en) | Character segmentation method and device and computer readable storage medium | |
CN107644425A (en) | Target image choosing method, device, computer equipment and storage medium | |
EP3510526B1 (en) | Particle boundary identification | |
CN107170002B (en) | Automatic image focusing method and device | |
CN118112777B (en) | Multi-section cross focusing processing method based on pathological slide and application thereof | |
CN110084818B (en) | Dynamic down-sampling image segmentation method | |
CN115272362A (en) | Method and device for segmenting effective area of digital pathology full-field image | |
CN109087347B (en) | Image processing method and device | |
KR101615479B1 (en) | Method and apparatus for processing super resolution image using adaptive pre/post-filtering | |
CN114913112A (en) | Method, device and equipment for detecting double edges of wafer | |
US11189027B2 (en) | Method and system for determining area to be scanned in peripheral blood smear for analysis | |
CN112329572B (en) | Rapid static living body detection method and device based on frame and flash point | |
CN114025089A (en) | Video image acquisition jitter processing method and system | |
JP2023529083A (en) | How to Analyze Scan Effectiveness | |
CN109100441B (en) | Method for removing pulse interference of liquid chromatography curve | |
CN112926676A (en) | False target identification method and device and computer equipment | |
KR101528604B1 (en) | Method and Apparatus for Processing Image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |