A method and device for tracking and collecting pathological sample images
By using preset parameters and thick focus and fine focus methods that automate camera movement in the image acquisition of pathological samples, the uncertainty and difference problems caused by manual operation are solved, the quality and efficiency of image acquisition are improved, and the accuracy of diagnosis is ensured .
Patent Information
- Application Number
- CN202411328015.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-09-24
AI Technical Summary
There are uncertainties and differences in manual operations during image acquisition of pathological samples, which makes it difficult to ensure image consistency and quality, affecting diagnostic accuracy.
The number of scanned images is determined by preset camera parameters, and a combination of coarse focus and thin focus is used to automate camera movement to reduce manual operation and ensure the accuracy and efficiency of image acquisition.
It reduces labor costs and error rates, improves the acquisition quality and work efficiency of pathological sample images, ensures clear and visibility of images, and enhances the reliability of diagnosis.
Smart Images

Figure CN118870184B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image acquisition, and in particular to a method and device for tracking and acquiring pathological sample images. Background Art
[0002] In today's medical field, pathology, as a core discipline, undertakes the important tasks of diagnosing, researching and treating many diseases. With the rapid development of medical technology, especially the breakthroughs in information technology and artificial intelligence, pathology has entered the digital era. Pathology mainly studies the morphological and molecular characteristics of tissues, cells and body fluids to diagnose diseases. However, the collection of pathological sample images has strict requirements. In the process of manual collection, a lot of experience accumulation and professional knowledge are often required. The consistency of the same pathological image often varies due to different collectors. In addition, since doctors analyze the diagnosis results based on pathological sample images, there must be no repeated areas or areas without cell samples during the collection process. It is necessary to ensure that the collected cell images are clear and visible.
[0003] In summary, how to reduce manual operations in the process of collecting pathological sample images, improve the collection quality of pathological sample images, and facilitate doctors to make better disease diagnosis is a problem that the existing technology urgently needs to solve. Summary of the invention
[0004] The embodiments of the present application provide a method and device for tracking and collecting pathological sample images, which determines the number of scanned images to be acquired through preset camera parameters, and reduces the time required for scanning images by first acquiring a coarse focus interval and then performing fine focus within the coarse focus interval, thereby not only reducing labor costs, but also improving work efficiency and reducing error rates.
[0005] In a first aspect, an embodiment of the present application provides a method for tracking and collecting pathological sample images, the method comprising:
[0006] Setting a motion camera capable of three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide;
[0007] Taking the focus start position as a starting point, driving the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and collecting a coarse focus image, determining a coarse focus position interval based on the coarse focus image, driving the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and collecting a fine focus image, and acquiring a fine focus point position of the first shooting point based on the fine focus image;
[0008] The motion camera is translated along the horizontal movement route of the camera from the fine focus point position of the previous shooting point, and the fine focus point position of the current shooting point is obtained at each shooting point of the horizontal movement route of the camera; wherein at each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and a fine focus image is collected, and the fine focus point position of the current shooting point is obtained based on the fine focus image;
[0009] The fine focus images collected by all the fine focus points on the horizontal movement route of the camera are obtained and fitted to obtain the pathological sample image.
[0010] In a second aspect, an embodiment of the present application provides a tracking and acquisition device for pathological sample images, comprising:
[0011] A setting module, used for setting a motion camera for three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide;
[0012] A coarse focus acquisition module, which takes the focus start position as a starting point and drives the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and acquires a coarse focus image, determines a coarse focus position interval based on the coarse focus image, drives the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and acquires a fine focus image, and obtains a fine focus point position of the first shooting point based on the fine focus image;
[0013] A fine focus acquisition module is configured to translate the motion camera along the horizontal movement route of the camera from the fine focus point of the previous shooting point, and obtain the fine focus point of the current shooting point at each shooting point of the horizontal movement route of the camera; wherein at each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and a fine focus image is acquired, and the fine focus point of the current shooting point is obtained based on the fine focus image;
[0014] The fitting module is used to obtain the fine focus images collected by all the fine focus points on the horizontal movement route of the camera and fit them to obtain the pathological sample image.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a method for tracking and acquiring pathological sample images.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes a method for tracking and acquiring pathological sample images.
[0017] The main contributions and innovations of the present invention are as follows:
[0018] The embodiment of the present application must detect the image during the camera movement in real time through the pre-trained glass slide sample recognition model to ensure that the motion camera can capture effective glass slide samples. This solution moves the motion camera to the focus starting position by presetting the scanning interval and the scanning image interval; this solution obtains the coarse focus position interval by only performing coarse focus at the focus starting position, and then performs fine focus within the coarse focus position interval to complete image acquisition, and only performs fine focus when shooting at other shooting points to improve the efficiency of obtaining sub-pathological images; after the setting, this solution can complete the acquisition of the entire pathological sample image without manual participation throughout the process, thereby reducing errors due to manual operation and increasing the accuracy of obtaining pathological sample images.
[0019] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a flow chart of a method for tracking and collecting pathological sample images according to an embodiment of the present application;
[0022] Figure 2 is a logic flow chart of a method for tracking and collecting pathological sample images according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of constructing a vertical limit interval according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of a horizontal movement route of a camera according to an embodiment of the present application;
[0025] Figure 5 is a structural block diagram of a pathological sample image tracking and acquisition device according to an embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent 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 this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0028] 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 steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0029] Embodiment 1
[0030] The embodiment of the present application provides a method for tracking and collecting pathological sample images, firstly moving a motion camera to a focus starting position, then acquiring a coarse focus image by moving from top to bottom to obtain a coarse focus interval, and then performing fine focus in the coarse focus interval to reduce the time required for acquiring the image, which not only reduces labor costs, but also improves work efficiency and reduces error rates. Specifically, reference is made to Figure 1 as well as Figure 2 , the method comprising:
[0031] Setting a motion camera capable of three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide;
[0032] Taking the focus start position as a starting point, driving the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and collecting a coarse focus image, determining a coarse focus position interval based on the coarse focus image, driving the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and collecting a fine focus image, and acquiring a fine focus point position of the first shooting point based on the fine focus image;
[0033] The motion camera is translated along the horizontal movement route of the camera from the fine focus point position of the previous shooting point, and the fine focus point position of the current shooting point is obtained at each shooting point of the horizontal movement route of the camera; wherein at each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and a fine focus image is collected, and the fine focus point position of the current shooting point is obtained based on the fine focus image;
[0034] The fine focus images collected by all the fine focus points on the horizontal movement route of the camera are obtained and fitted to obtain the pathological sample image.
[0035] In this solution, the motion parameters of the motion camera are set first, and the motion parameters include the starting speed, ending speed, maximum speed and ACC acceleration / deceleration of horizontal movement and vertical movement. The movement of the camera is automatically controlled by the motion parameters, and the position parameters of the motion camera are pre-set. The position parameters include the reference position, the starting reference position, the preview reference position, the scanning center reference position, and the Z-axis limit reference position. The position parameters are used to control the motion range and initial position of the motion camera.
[0036] Specifically, the three-axis motion of the motion camera is precisely controlled by a three-axis motion control card, and the three-axis motion control card and the motion camera establish a stable communication connection through a USB bus.
[0037] In this solution, the motion camera is first moved to the central scanning position of the effective sample slide, and the focus starting position is calculated based on the central scanning position, a preset scanning interval, and the number of scanned images.
[0038] Furthermore, before the motion camera is moved to the central scanning position of the valid sample slide, a pre-trained sample slide recognition model is used to obtain a template image, and the motion camera obtains the current sample slide image in real time. If the degree of matching between the current sample slide image and the template image is greater than a set threshold, the current sample slide is used as a valid sample slide.
[0039] Specifically, the preview position is calculated based on a preview reference position preset in the motion camera, and the motion camera is moved to the preview position. The motion camera acquires the current sample slide image in real time at the preview position.
[0040] Specifically, the sample slide recognition model is a neural network model that relies on the Caffe deep learning framework and caffemodel pre-training. Furthermore, this solution loads the sample slide recognition model through cv::dnn::readNetFromCaffe().
[0041] Specifically, the current sample slide image acquired by the motion camera in real time is in YUYV format. The current sample slide image is first converted into RGB24 format, and then converted into QImage::Format_RGB888 format to calculate the degree of matching with the template image. This solution uses cv::matchTemplate() to calculate the degree of matching between the template image and the current sample slide image. When the degree of matching between the template image and the current sample slide image is greater than the set threshold, cv::minMaxLoc() is used to find the minimum and maximum value positions to obtain the valid sample slide.
[0042] In some specific embodiments, if no valid sample slide is identified, it is considered that there is no sample slide or the sample slide template is deviated, and the process ends.
[0043] In the step of "moving the motion camera to the center scanning position of the valid sample slide", the center scanning position of the valid sample slide is calculated according to the scanning center reference position preset in the motion camera in advance, and the motion camera is moved to the center scanning position of the valid sample slide.
[0044] In the step of "calculating the focus starting position based on the central scanning position, the preset scanning interval and the number of scanned images", the scanning interval is the movement interval of the motion camera between two shots, the number of scanned images is the number of shots of the valid glass slide sample by the motion camera, and the focus starting position is any corner position of the valid glass slide sample. In some specific embodiments, the focus starting position is the upper left corner position of the valid sample slide.
[0045] When using a motion camera to shoot a valid sample slide, it is necessary to shoot multiple images and then integrate them to obtain a complete image. Therefore, based on the preset scanning interval and the number of scanned images, the motion camera can be accurately moved from the center scanning position to the focus starting position. For example, the acquisition of pathological images is generally divided into a conventional scanning model and a full scanning mode. The scanning image data of the conventional scanning mode is 5×5, and the number of scanned images is 25. Then the 13th image is the center scanning position, and then according to the scanning interval, the motion camera can be moved from the center scanning position of the 13th image to the 1st image, which is the upper left corner of the valid sample slide; the scanning image data of the full scanning mode is 7×7, and the scanning image data is 49. Then the 25th image is the center scanning position. Then according to the scanning interval, the motion camera can be moved from the center scanning position of the 25th image to the first image, which is the upper left corner of the valid sample slide.
[0046] Specifically, this solution can accurately find the starting position of the effective glass slide sample through the preset scanning interval and the number of scanned images.
[0047] In some specific embodiments, a vertical limit interval is constructed, and the motion camera can only move within the vertical limit interval.
[0048] Specifically, the schematic diagram of constructing the vertical limit interval is as follows: Figure 3 As shown, during the vertical movement of the motion camera, the lens of the motion camera may be too close to the glass slide or too close to the glass slide, resulting in too small a visible area of the acquired fine focus image. When these fine focus images are fitted together, some content will be missing. Therefore, this scheme limits the vertical movement of the motion camera by defining a vertical limit interval, which can not only ensure the visible area of the fine focus image, but also ensure that the lens of the motion camera will not touch the effective sample slide.
[0049] In the step of "determining a coarse focus position interval based on the coarse focus image", a shooting position of a coarse focus image with the highest definition and greater than a set definition is selected, and a coarse focus position interval is obtained based on the shooting position.
[0050] Specifically, when obtaining the coarse focus position interval, the camera light source is first turned on, and then vertical shooting is performed from top to bottom to obtain a coarse focus image.
[0051] Specifically, the clarity score of each coarse focus image information is calculated, and a peak graph is constructed based on the number of acquired coarse focus images and the clarity score of each coarse focus image, and the coarse focus image corresponding to the position with the highest peak is taken as the clearest coarse focus image.
[0052] Specifically, when selecting the highest peak position, the specified number of rising edge points and falling edge points must be met to prevent small peaks caused by abnormal fluctuations.
[0053] Furthermore, if there is no coarse focus image with a clarity greater than the set clarity, the preset coarse focus step size drives the motion camera to move from top to bottom relative to the effective sample slide at the focus starting position after the focus area is expanded and the coarse focus image is recaptured. The purpose is to ensure that the captured image is clear and usable, and to ensure that there is no blurred image that affects the doctor's judgment.
[0054] In some specific embodiments, the number of coarse focus failures is set. When the number of times the coarse focus image information is re-collected is greater than the number of coarse focus failures, the motion camera is turned off and the process is terminated. Specifically, when the number of times the coarse focus image information is re-collected is greater than the number of coarse focus failures, it indicates that the coarse focus failure may be caused by a problem with the sample collected on the slide or the motion camera itself, and the process should be terminated for inspection.
[0055] In the step of "obtaining a fine focus point position of the first shooting point based on the fine focus image", the shooting position of the fine focus image information with the highest clarity and greater than the set clarity is selected as the fine focus point position.
[0056] Furthermore, the image clarity obtained by fine focus should be greater than the image clarity obtained by coarse focus, so the fine focus step should be smaller than the coarse focus step, and the set clarity during fine focus is also greater than the set clarity during coarse focus.
[0057] The order of the camera's horizontal movement route is not particularly limited, and only needs to cover the effective sample wave plate. In some embodiments, the camera's horizontal movement route is determined by the focus start position, the preset scanning interval, and the number of scanned images. In a specific embodiment of this solution, the camera's horizontal movement route is as follows: Figure 4 As shown, the order of the horizontal movement route of the camera is from left to right and from top to bottom, that is, this solution performs the first fine focus at the focus starting position and then moves along the horizontal movement route of the camera. Every time it moves to a shooting point, it will re-focus according to the fine focus point position of the previous shooting point, thereby greatly reducing the focusing time in the whole process.
[0058] In this scheme, in the step of "obtaining the fine focus point position of the current shooting point based on the fine focus image", the peak value is calculated based on multiple fine focus images. If there is a peak value, the position of the fine focus image with the highest peak value is taken as the fine focus point position. If there is no peak value, the position of the shooting point is defined as the focus failure point.
[0059] It should be noted that in some embodiments of the present solution, the focus is first determined to be successful. If the focus is successful, the fine focus image is collected. If the focus is unsuccessful, the shooting point is directly determined to be a focus failure point. Correspondingly, in the step of "driving the motion camera to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and collecting the fine focus image, and obtaining the fine focus point position of the current shooting point based on the fine focus image", the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and collects the fine focus image. If the fine focus image cannot be collected, the position of the shooting point is defined as a focus failure point. If the fine focus image can be collected, the fine focus point position of the current shooting point is obtained based on the fine focus image.
[0060] In addition, when a focus failure point occurs during the fine focusing process, the present solution records the current focus failure point and continues the fine focusing of the next shooting point. In other words, once a focus failure point occurs, the motion camera is still moved along the horizontal movement route of the camera from the fine focusing point of the previous shooting point to the next shooting point.
[0061] Furthermore, the clarity score of each fine focus image is calculated, and a peak graph is constructed based on the number of acquired fine focus images and the clarity score of each fine focus image, and the fine focus image corresponding to the position with the highest peak is taken as the clearest fine focus image.
[0062] Specifically, when selecting the highest peak position, the specified number of rising edge points and falling edge points must be met to prevent small peaks caused by abnormal fluctuations.
[0063] Specifically, firstly, the median filter algorithm is used to smooth and remove noise from the fine focus image information using nonlinear filtering technology. Then, the peak value search algorithm is used to calculate the difference between adjacent elements, convert the difference into an increase or decrease sign, process the continuous zeros in the diff, and find the potential peak position. If no peak is found, the endpoint is added to the result. The data is copied to the result, the range judgment is applied, and the final result is stored. Finally, the maximum (highest) peak value is calculated based on the number of peaks.
[0064] Furthermore, if there is no fine focus image information with a clarity greater than the set value when the motion camera obtains fine focus image information each time it moves vertically to shoot, the fine focus fails and the process ends. Specifically, since the purpose of fine focus is to ensure that every detail in the field of view is clearly visible, if there is no fine focus image information with a clarity greater than the set value, it means that the sample on the slide is of poor quality and the process ends directly. In this solution, the variance is calculated based on the number and score of fine focus images collected at each fine focus point. If the variance is less than the preset variance, the variance is not satisfied and the process ends.
[0065] It should be noted that, because there is a range for focus, there is also a certain number of fine focus images that are successfully collected for focus, and there are high requirements for the collection time. The fewer fine focus images that are successfully collected for focus, the shorter the focus process range and the faster the focusing time. Therefore, when a focus failure point occurs, this solution will still directly perform fine focus on the next shooting point. The reason for the focus failure point may be that the position of the effective sample slide is not correct or the sample slide storage table is not flat, as well as the Z-axis accuracy problem of the three-axis motion control. If the focus failure points are greater than 3, subsequent fitting focus will be performed.
[0066] In this scheme, if the number of focus failure points is greater than 3, a fitting surface is obtained based on the fitting of all the focus success points, and a fitting position corresponding to each focus failure point is selected on the fitting surface. The motion camera is driven to move from top to bottom relative to the effective sample slide at the fitting position corresponding to the focus failure point with a preset fitting focus step size and a fitting focus image is collected. The fine focus point position of the current focus failure point is obtained based on the fitting focus image.
[0067] The technical means for fitting focus are basically the same as those for fine focus. Specifically, the clarity score of each fitting focus image is calculated, and a peak graph is constructed based on the number of fitted focus images obtained and the clarity score of each fitting focus image. The fitting focus image corresponding to the position with the highest peak is taken as the clearest fitting focus image, and the clearest fitting focus image is taken as the fine focus point position of the current focus failure point.
[0068] In some embodiments, the present scheme uses a two-dimensional spline interpolation method to fit all successful focus points and obtain a fitting surface, and takes the position of the failed focus point on the fitting surface as the fitting position. The advantage of this is that the position of the failed focus point can be corrected according to the successful focus position, thereby performing more efficient fitting focus.
[0069] Embodiment 2
[0070] Based on the same idea, refer to Figure 5 , the present application also proposes a tracking and acquisition device for pathological sample images, comprising:
[0071] A setting module, used for setting a motion camera for three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide;
[0072] A coarse focus acquisition module, which takes the focus start position as a starting point and drives the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and acquires a coarse focus image, determines a coarse focus position interval based on the coarse focus image, drives the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and acquires a fine focus image, and obtains a fine focus point position of the first shooting point based on the fine focus image;
[0073] A fine focus acquisition module is configured to translate the motion camera along the horizontal movement route of the camera from the fine focus point of the previous shooting point, and obtain the fine focus point of the current shooting point at each shooting point of the horizontal movement route of the camera; wherein at each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and a fine focus image is acquired, and the fine focus point of the current shooting point is obtained based on the fine focus image;
[0074] The fitting module is used to obtain the fine focus images collected by all the fine focus points on the horizontal movement route of the camera and fit them to obtain the pathological sample image.
[0075] Embodiment 3
[0076] This embodiment also provides an electronic device, referring to Figure 6, comprises a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0077] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0078] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. For example, but not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0079] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0080] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the pathological sample image tracking and acquisition methods in the above embodiments.
[0081] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0082] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above-mentioned network 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, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0083] The input / output device 408 is used to input or output information. In this embodiment, the input information may be camera parameters, coarse focus step length, etc., and the output information may be pathological sample images, etc.
[0084] Optionally, in this embodiment, the processor 402 may be configured to perform the following steps through a computer program:
[0085] Setting a motion camera capable of three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide;
[0086] Taking the focus start position as a starting point, driving the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and collecting a coarse focus image, determining a coarse focus position interval based on the coarse focus image, driving the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and collecting a fine focus image, and acquiring a fine focus point position of the first shooting point based on the fine focus image;
[0087] The motion camera is translated along the horizontal movement route of the camera from the fine focus point position of the previous shooting point, and the fine focus point position of the current shooting point is obtained at each shooting point of the horizontal movement route of the camera; wherein at each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and a fine focus image is collected, and the fine focus point position of the current shooting point is obtained based on the fine focus image;
[0088] The fine focus images collected by all the fine focus points on the horizontal movement route of the camera are obtained and fitted to obtain the pathological sample image.
[0089] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0090] In general, various embodiments may be implemented in hardware or dedicated 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 that may be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0091] Embodiments of the present invention may be implemented by computer software that is 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 may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, at this point, it should be noted that, for example, Figure 6 Any block of the logic flow in the program 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 storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.
[0092] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0093] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for tracking and collecting pathological sample images, characterized in that: The following steps are involved: Setting a motion camera capable of three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide; Taking the focus start position as a starting point, driving the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and collecting a coarse focus image, determining a coarse focus position interval based on the coarse focus image, driving the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and collecting a fine focus image, and acquiring a fine focus point position of the first shooting point based on the fine focus image; The motion camera is translated along the horizontal movement route of the camera from the fine focus point position of the previous shooting point, and the fine focus point position of the current shooting point is obtained at each shooting point along the horizontal movement route of the camera; At each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and collect a fine focus image, the fine focus point position of the current shooting point is obtained based on the fine focus image, coarse focus is performed only at the focus start position to obtain a coarse focus position interval, and fine focus is then performed within the coarse focus position interval to complete image collection, and only fine focus is performed when shooting at other shooting points; The fine focus images collected by all the fine focus points on the horizontal movement route of the camera are obtained and fitted to obtain the pathological sample image.
2. The method for tracking and collecting pathological sample images according to claim 1, characterized in that: The motion camera is moved to the central scanning position of the effective sample slide, and the focus starting position is calculated based on the central scanning position, the preset scanning interval and the number of scanned images.
3. The method for tracking and collecting pathological sample images according to claim 1, characterized in that: Before the motion camera is moved to the central scanning position of the valid sample slide, the motion camera acquires the sample slide image of the current sample slide in real time. If the degree of matching between the sample slide image of the current sample slide and the template image is greater than a set threshold, the current sample slide is defined as a valid sample slide, otherwise the method is terminated, wherein the template image is acquired through a pre-trained sample slide recognition model.
4. The method for tracking and collecting pathological sample images according to claim 1, characterized in that: In the step of "determining a coarse focus position interval based on a coarse focus image", a shooting position of a coarse focus image having the highest definition and greater than a set definition is selected, and a coarse focus position interval is obtained based on the shooting position.
5. The method for tracking and collecting pathological sample images according to claim 1, characterized in that: In the step of "obtaining a fine focus point position of a first shooting point based on a fine focus image", a shooting position corresponding to a fine focus image having the highest definition and greater than a set definition is selected as the fine focus point position.
6. The method for tracking and collecting pathological sample images according to claim 1, characterized in that: In the step of "obtaining the fine focus point position of the current shooting point based on the fine focus image", a peak value is calculated based on multiple fine focus images. If a peak value exists, the position of the fine focus image with the highest peak value is taken as the fine focus point position. If no peak value exists, the position of the shooting point is defined as a focus failure point.
7. The method for tracking and collecting pathological sample images according to claim 6, characterized in that: If the number of focus failure points is greater than 3, a fitting surface is obtained based on the fitting of all the focus success points. The fitting position corresponding to each focus failure point is selected on the fitting surface. The motion camera is driven to move from top to bottom relative to the effective sample slide at the fitting position corresponding to the focus failure point with a preset fitting focus step length and a fitting focus image is collected. The fine focus point position of the current focus failure point is obtained based on the fitting focus image.
8. A tracking and acquisition device for pathological sample images, comprising: A setting module, used for setting a motion camera for three-axis motion relative to the effective sample slide and moving the motion camera to a focus starting position of the effective sample slide; A coarse focus acquisition module, which takes the focus start position as a starting point and drives the motion camera to move from top to bottom relative to the effective sample glass slide at the focus start position with a preset coarse focus step length and acquires a coarse focus image, determines a coarse focus position interval based on the coarse focus image, drives the motion camera to move from top to bottom relative to the effective sample glass slide within the coarse focus position interval with a preset fine focus step length and acquires a fine focus image, and obtains a fine focus point position of the first shooting point based on the fine focus image; A fine focus acquisition module moves the motion camera along the horizontal movement route of the camera from the fine focus point position of the previous shooting point, and obtains the fine focus point position of the current shooting point at each shooting point along the horizontal movement route of the camera; At each shooting point, the motion camera is driven to move from top to bottom relative to the effective sample slide at the shooting point with a preset fine focus step length and collect a fine focus image, the fine focus point position of the current shooting point is obtained based on the fine focus image, coarse focus is performed only at the focus start position to obtain a coarse focus position interval, and fine focus is then performed within the coarse focus position interval to complete image collection, and only fine focus is performed when shooting at other shooting points; The fitting module is used to obtain the fine focus images collected by all the fine focus points on the horizontal movement route of the camera and fit them to obtain the pathological sample image.
9. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the method for tracking and acquiring pathological sample images according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes a method for tracking and acquiring a pathological sample image according to any one of claims 1 to 7.
Citation Information
Patent Citations
Microscope focusing method and apparatus, computer apparatus, and storage medium
CN109116541A
Microscope multi-view automatic focusing system and using method thereof
CN111458835A