Navigation calibration method and device for pathological section scanner and electronic equipment
By using the technology of macro cameras and calibration films in pathological slide scanners, the problems of slow and unstable traditional navigation calibration are solved, and fast and stable navigation calibration is achieved, which is suitable for a variety of imaging modes.
Patent Information
- Application Number
- CN202410716482.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-01
AI Technical Summary
The navigation calibration method of traditional pathology slide scanners is slow and unstable. Especially in non-bright field scanners, it is easy to fail to match due to lack of feature points, leading to navigation calibration failure.
Using a microscopic imaging system with a macro camera and a calibration film, the mapping relationship between the stage and the macro image is determined by identifying the characteristic areas on the calibration film to achieve fast and stable navigation calibration. A first graphic area and a second graphic area are arranged at intervals on the calibration sheet. Several macroscopic images are taken by a macroscopic camera, the pixel spatial resolution is calculated and the macroscopic image is clipped, and the affine transformation relationship between the stage and the macroscopic image is determined.
It achieves fast and stable navigation calibration, improves the speed and accuracy of navigation calibration, and is suitable for brightfield and non-brightfield scanners, including fluorescence, polarization, darkfield scanners, etc.
Smart Images

Figure CN118731015A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of scanners, and in particular to a navigation calibration method, device and electronic equipment for a pathology slice scanner. Background Art
[0002] Pathological diagnosis runs through the early screening, diagnosis, treatment and prognosis evaluation of clinical diseases. It is the "gold standard" for determining diseases. Especially in tumor diagnosis, pathological diagnosis results are crucial. Traditional pathological diagnosis is done by doctors observing cells or tissues on pathological sections with the help of microscopes and making diagnostic decisions based on existing experience. This diagnostic mode not only requires high experience in reading films by doctors, but also makes it difficult to pass on and interpret the information itself, and is time-consuming and laborious. At the beginning of this century, information technology penetrated into routine pathological examination practices, resulting in the initial remote microscope and virtual slide (VS) technology, which facilitated the communication of pathological images. After years of development, slide digitization has been realized, and the era of digital pathology has begun. Digital slides are not only used in telepathology diagnosis, but also gradually change the working mode of pathological diagnosis.
[0003] The first step of digital pathology is to scan the physical glass slide with a pathology slide scanner to collect digital images of each area of the slide, and then use algorithms to process and seamlessly stitch these images to obtain the corresponding whole slide image (WSI), also known as digital slide (DS). At present, there are many slide scanner manufacturers at home and abroad, including: Zeiss of Germany, Leica of Germany, 3DHISTECH of Hungary, Philips of the Netherlands, Hamamatsu of Japan, and Motic, Jiangfeng, Shengqiang, etc. of China.
[0004] Modern scanners browse and scan slices in a "what you see is what you get" way. The so-called "what you see" refers to the scanner obtaining a macroscopic image of the slice to be scanned (also called a preview image) in some way, and then the user clicks on the view or circles the area on this image; "what you get" means that after the user clicks or circles, the scanner stage moves to the corresponding position for browsing or area scanning, so that the image of the view selected by the user or the scanned area under the microscope is the area circled by the user. The key to achieving the above "what you see is what you get" operation is "navigation calibration", which is an important module of the scanner system, which aims to guide the scanner on how to obtain the macroscopic image of the slice and establish the transformation relationship between the stage and the macroscopic image of the slice:
[0005]
[0006] Among them, (x M ,y M ) and (x S ,y S ) respectively represent the position point on the macroscopic image (which may be referred to as the image point or image position, the same below) and the position point on the stage (that is, the XY axis coordinates of the stage when the content corresponding to the image point is presented under the microscope, which may be referred to as the object point or object position, the same below), formula (1) is the transformation from the macroscopic image to the stage (image space to object space), and formula (2) is the transformation from the stage to the macroscopic image (object space to image space), both of which are affine transformations.
[0007] Traditional navigation calibration is implemented by scanning, and its basic steps are:
[0008] 1) Move a whole tissue section to a certain position on the stage to take a macroscopic image, as shown in Figure 1(c);
[0009] 2) Place the whole tissue slice under a microscope and use a low-magnification objective lens (such as 2X or 4X) to scan the entire range to obtain a digital slice, as shown in Figure 1(a);
[0010] 3) reducing the digital slice to obtain a digital slice with lower resolution, as shown in FIG1(b);
[0011] 4) Perform image matching between the low-resolution digital slices and the macroscopic image, find the same-name point pairs, and fit the transformations (1) and (2).
[0012] The above-mentioned scanning-based navigation calibration method is slow because it needs to scan the entire range; secondly, if the contrast of the slices used for calibration is not high, it may cause the matching failure in the above-mentioned step 4), thereby causing the failure of the entire navigation calibration, that is, the navigation calibration is not stable enough. In addition, in non-bright field scanners, the traditional scanning-based navigation method is more likely to cause matching failure due to the lack of feature points in the low-magnification panoramic image obtained by scanning, thereby causing the failure of the entire navigation calibration. Summary of the invention
[0013] The main purpose of the present invention is to overcome the above-mentioned defects in the prior art and to provide a navigation calibration method, device and electronic equipment for a pathology slice scanner, which does not require full-range scanning and is fast and stable.
[0014] The present invention adopts the following technical solution:
[0015] A navigation calibration method for a pathology slice scanner is implemented based on a microscopic imaging system with a macro camera, a calibration sheet is pre-set, and at least a first graphic area and a second graphic area are arranged at intervals on the calibration sheet. The specific calibration method includes the following:
[0016] Moving the stage and taking a plurality of macroscopic images with a macroscopic camera, and determining the shooting position of the calibration sheet by identifying the coordinates of the first graphic area and the coordinates of the second graphic area on the plurality of macroscopic images;
[0017] Calculating the pixel spatial resolution of the macro image according to the coordinates of the first graphic area and the coordinates of the second graphic area for determining the shooting position;
[0018] Calculating the coordinates of a rectangular area on the captured macro image when the calibration sheet is in a shooting position according to the pixel spatial resolution of the macro image and the coordinates of the identified first graphic area to obtain a macro image of the calibration sheet by clipping;
[0019] The image space position of a certain point on the macro map and the object space position of the corresponding point on the calibration sheet are substituted into the affine transformation equation to determine the mapping relationship between the stage and the macro map to achieve navigation calibration.
[0020] The stage is moved and a plurality of macro images are captured by the macro camera, and the shooting position of the calibration sheet is determined by the plurality of macro images; specifically, the steps include:
[0021] The calibration sheet is not placed in the macroscopic imaging area of the stage, the stage is moved along the Y-axis direction and a number of first macroscopic images are taken, and the Y-axis coordinate Ys of the shooting position of the calibration sheet is determined by judging whether the complete macroscopic imaging area appears in the first macroscopic image, and the rectangular coordinate R of the macroscopic imaging area is obtained. n ;
[0022] The calibration sheet is placed in the macroscopic imaging area of the stage, the stage is moved along the X-axis direction and a plurality of second macroscopic images are taken, and it is determined whether the first graphic area appears in the second macroscopic image, and the first graphic area is identified according to the rectangular coordinates R where the macroscopic imaging area is located. n The coordinate Xs of the shooting position of the calibration piece in the X-axis direction is determined based on the positional relationship.
[0023] When no calibration sheet is placed in the macroscopic image imaging area of the stage, the stage is moved along the Y-axis direction at a set fixed step length starting from a certain initial position of the Y-axis, and the first macroscopic image is photographed by the macro camera each time the stage is moved, until the complete macroscopic imaging area appears in the photographed first macroscopic image, and the Y-axis position of the macroscopic imaging area at this time is used as the Y-axis coordinate Ys of the photographing position of the calibration sheet; the rectangular coordinate R of the macroscopic imaging area is identified and obtained. n ={(x n ,y n );w,h}, where (x n ,y n ) is the center position of the rectangle, w and h are the width and height of the rectangle respectively, in pixels.
[0024] The calibration sheet is placed in the macroscopic imaging area of the stage, and the stage is moved along the X-axis direction at a set fixed step length starting from an initial position of a certain X-axis. The second macroscopic image is captured by the macro camera each time a position is moved, until the center area of the first graphic area appears in the captured second macroscopic image, and the center coordinates E(x E ,y E ), and determine whether the absolute value of the coordinate difference between the center coordinate and the center of the rectangle where the macro imaging area is located in the Y-axis direction does not exceed a set threshold; if not, the X-axis position at this time is used as the X-axis coordinate Xs of the shooting position of the calibration piece.
[0025] The calibration sheet is also provided with a second graphic area having the same shape as the first graphic area and being spaced apart, the object position of the second graphic area and the object position of the first graphic area having the same coordinate on the Y axis, and the distance between the two is L; and the method further includes identifying, from the second macroscopic image for determining the coordinate Xs, a graphic having the same shape as the first graphic area and the closest central coordinate on the Y axis as the second graphic area, and obtaining the central coordinate of the second graphic area as F(x F ,y F ); Calculate the pixel spatial resolution S of the macro image according to the center coordinates of the first graphic area and the center coordinates of the second graphic area and the distance L n :
[0026]
[0027] Preset the distance information between the center of the first graphic area in the calibration sheet and the four sides of the calibration sheet; according to the pixel spatial resolution S n, the center coordinates of the first graphic area identified and the distance information are used to calculate the rectangular area coordinates R in the macro image taken when the calibration piece is in the shooting position c =[x s ,x e ,y s ,y e ]:
[0028] x s =X E -(W S -d E ) / S n
[0029] x e =X E +(W S -d E ) / S n
[0030] y s =Y E -H S / (2S n )
[0031] y e =Y E +H S / (2S n )
[0032] where x s 、x e Respectively represent the starting and ending abscissas of the rectangular area in the captured macro image, y s ,y e Respectively represent the starting and ending ordinates of the rectangle in the captured macro image, W S and H S are the width and height of the calibration patch, d E is the distance between the center coordinates of the first graphic area and one side of the calibration piece.
[0033] A first center graph and a second center graph having the same shape and different sizes are respectively arranged in advance at the center of the first graphic area and the second graphic area; the center point of the second center graph is used as the image position of a certain position point on the macrograph, and the center point of the second center graph of the second graphic area on the calibration sheet is used as the object position of the corresponding position point on the calibration sheet, and the object position determination method is as follows:
[0034] Moving the stage so that the calibration sheet is located under the optical axis of the objective lens of the microscopic imaging system;
[0035] The stage is moved along the Y-axis direction with a preset step length, and each time it moves to a position, a scanning camera is used to take a picture, and the scanned image is recognized, until the second center figure is recognized and its size meets the set requirements, and the X-axis and Y-axis positions at this time are used as the object position of the center point of the second graphic area on the calibration piece and optimized to obtain the final object position.
[0036] Optimizing the object position of the second graphic area specifically includes:
[0037] According to the spatial resolution S of the field of view image of the current scanning camera m The object position of the second graphic area is optimized by using the center coordinates (x0, y0) of the second center image identified on the scanned image and the determined object position of the second graphic area to obtain the optimized object position (x0, y0) of the second graphic area. F ', Y F '):
[0038]
[0039] Among them, (X F1 , Y F1 ) is the object space position of the second graphic area before optimization, and W and H are the width and height of the macrograph, respectively.
[0040] The object space position of the second graphic area and the image space position corresponding to the second graphic area in the macroscopic image are substituted into the affine transformation equation to obtain the translation vector and the scale vector, and the final mapping relationship between the stage and the macroscopic image is obtained.
[0041] The object space position (X F ', Y F ') and the central coordinates (x F ,y F ) into the affine transformation equation to obtain the translation vector (r1, r2) T and the scale vector (t1, t2) T :
[0042] r1=X F '-S n × F
[0043] r2=Y F '-S n ×y F
[0044] t1=x F -XF ' / S n
[0045] t2=y F -Y F ' / S n
[0046] Among them, S n is the pixel spatial resolution of the macroscopic image.
[0047] The final mapping relationship between the stage and the macroscopic image is as follows:
[0048]
[0049] Among them, (x M ,y M ) and (x S ,y S ) represent the position point on the macroscopic image and the position point on the stage, respectively, (r1, r2) T is the translation vector, (t1, t2) T is the scale vector.
[0050] An electronic device, characterized in that it includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the navigation calibration method of the pathology slice scanner is implemented.
[0051] A navigation calibration device for a pathology slice scanner, comprising:
[0052] The calibration sheet is provided with at least a first graphic area and a second graphic area which are spaced apart from each other;
[0053] a shooting position determination module, which determines the shooting position of the calibration sheet by identifying the first graphic area coordinates and the second graphic area coordinates on a plurality of the macro images shot by the macro camera;
[0054] a resolution calculation module, which calculates the pixel spatial resolution of the macro image according to the determined coordinates of the first graphic area and the second graphic area of the shooting position;
[0055] The macro image clipping module is configured to cut the image according to the pixel spatial resolution S of the macro image. n and calculating the coordinates of a rectangular area on the captured macro image when the calibration sheet is in the shooting position using the coordinates of the first graphic area identified to obtain a macro image of the calibration sheet by clipping;
[0056] The mapping relationship determination module brings the image space position of a certain position point on the macroscopic image and the object space position of the corresponding position point on the calibration sheet into an affine transformation relationship, thereby determining the mapping relationship between the stage and the macroscopic image.
[0057] It can be seen from the above description of the present invention that, compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. In the present invention, a microscope imaging and calibration sheet with a macro camera are used to find the best shooting position of the calibration sheet on the stage, and a macro image corresponding to the actual calibration sheet is cut out from the captured macro image, and then a mapping between the macro image and the stage is established, thereby achieving fast and stable navigation calibration.
[0059] 2. The special calibration sheet used in the present invention has a fixed and easily identifiable feature area, which facilitates the rapid establishment of a mapping between the macro image and the stage, thereby improving the speed and accuracy of navigation calibration.
[0060] 3. In addition to being applied to bright field scanners, the solution of the present invention is also applicable to scanners in any other imaging mode, such as fluorescence scanning, polarization scanning, dark field scanners, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1(a) is a digital slice obtained by scanning under a low-power objective lens;
[0062] Figure 1(b) is a reduced digital slice;
[0063] Figure 1(c) is a macroscopic image of the slice;
[0064] Figure 2 It is a structural diagram of a microscopic imaging system with a macro camera;
[0065] Figure 3 It is a schematic diagram of the macroscopic imaging area on the stage;
[0066] Figure 4 This is the main view of the calibration piece;
[0067] Figure 5 A diagram illustrating different graphic areas on a calibration sheet;
[0068] Figure 6 The macro image imaging area (green rectangle) is automatically traversed along the Y axis;
[0069] Figure 7 The solid circle (red cross) of the first graphic area E obtained by automatic traversal along the X axis;
[0070] Figure 8 is the image position of the second graphic area F (green rectangle);
[0071] Fig. 9 is the cropping rectangle of the macro image of the calibration patch;
[0072] Fig.10 This is a macro image of the cropped slice;
[0073] Fig.11 For the final macro picture;
[0074] Fig.12 The scanning camera image is taken at the object position of the second graphic area F acquired along the Y axis.
[0075] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. DETAILED DESCRIPTION
[0076] The present invention is further described below through specific implementation modes.
[0077] In the present invention, the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. In the description, the directions or positional relationships indicated by "upper", "lower", "left", "right", "front", and "back" are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention, and are not intended to indicate or imply that the device referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the scope of protection of the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0078] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0079] In the present invention, the microscopic imaging system with a macro camera, see Figure 2, its microscopic imaging system 10 mainly includes necessary components such as a light source, an objective lens 11, a tube diameter, an electric Z axis, a scanning phase mechanism 12, and the like, and a macro camera 20 is fixed to the microscopic imaging system 10. The stage can move along the X-axis direction and the Y-axis direction, and a macroscopic image imaging area 13 of the slice composed of a backlight module and a scanning area 14 are provided on the stage. The backlight module is a backlight light source or a frosted diffuse reflection plate, etc.). The slice is introduced onto the stage from one side of the stage by moving along the X-axis. When the macro camera takes a macroscopic image of the slice, the optical axis of the macro camera 20 falls on the midline of the macroscopic imaging area 13 along the Y axis, and the user can use the macro camera 20 to image different sub-areas of the macroscopic image imaging area 13 by moving the Y axis.
[0080] See also Figure 3 , is a schematic diagram of the macro imaging area on the stage, where the white area is the macro imaging area a determined by the backlight module, the dotted line is the slice b placed thereon, which is divided into the label area b1 and the sample area b2, and the arrow indicates the movement direction along the Y-axis.
[0081] The main ideas of the navigation calibration method of the present invention include:
[0082] 1. How to obtain a “suitable” macroscopic image of a slice?
[0083] The so-called "appropriate" means that the macro image completely corresponds to the actual physical slice, that is, each edge of the macro image corresponds to each edge of the actual slice. Since (a) the field of view of the macro camera is not equal to the size of the macro imaging area (generally the former is larger than the latter) and (b) before navigation calibration, all positions are unknown, the problem can be decomposed into: (1) Find the best slice shooting position on the stage (3) How to crop the macro image corresponding to the actual slice in the captured image;
[0084] 2. How to establish the mapping between the macro image of the slice and the stage?
[0085] Considering that the macro camera lens has no distortion (otherwise the macro image can be distorted first), the affine transformation between the object space and the image space can be degenerated into a combination of a scale transformation and a translation transformation, that is, a in equations (1) and (2) is 12 =a 21 =0,b 12 =b 21 =0.
[0086] In order to quickly establish the mapping between the macroscopic image and the stage, it is necessary to quickly find the same-name point pairs between the macroscopic image and the stage. The present invention provides a calibration sheet, and based on the calibration sheet, provides a fast and stable navigation calibration method for a slice scanner.
[0087] The calibration sheet of the present invention is designed with a certain number of different graphic areas with fixed positions and easy to identify. Since the sizes and relative positions of these graphic areas are known, once the position of a certain graphic area is found, the approximate positions of other graphic areas can be found through relative positions (taking into account the pixel spatial resolution accuracy of the macroscopic image and the accuracy of the stage). The graphic areas include circular areas, rectangular areas or other polygonal areas, and the size, number and position can be set according to actual conditions.
[0088] For example, Figure 4 As shown, the calibration sheet is provided with a series of circular areas and characteristic rectangular areas which have been precisely processed and have known positions and sizes. Since the relative positions of these graphic areas are fixed, the positions of other areas can be quickly found starting from the position of any graphic area. Figure 4 In the figure, six graphic areas are listed, namely, the first graphic area E, the second graphic area F, the third graphic area A, the fourth graphic area H, the fifth graphic area I, and the sixth graphic area G. The first graphic area E is a circle as a whole, and the central area thereof is provided with a first center diagram, which is a solid circle; the second graphic area F is a circle as a whole, and the central area thereof is provided with a second center diagram, which is a solid circle; the sixth graphic area G is a circle as a whole, and the central area thereof is provided with a third center diagram, which is a solid circle; the diameters of the solid circles of the first center diagram, the second center diagram, and the third center diagram are different. The third graphic area A is a circle as a whole, and the central area thereof is a hollow circle; the fourth graphic area H and the fifth graphic area I are square as a whole, and the square is also divided into small squares arranged in an array, and the small squares of the fourth graphic area H and the fifth graphic area I are different in size. The calibration sheet of the present invention is a multi-purpose calibration sheet. With respect to navigation calibration, the rectangular area is a redundant area and can be used for other purposes.
[0089] in, Figure 5 , the first graphic area E, the fourth graphic area H, the second graphic area F, the fifth graphic area I and the sixth graphic area G are arranged at intervals along the Y-axis direction. There are four third graphic areas A, two of which are located on both sides of the fifth graphic area I and arranged at intervals along the X-axis direction, and the other two are located on both sides of the fourth graphic area H and arranged at intervals along the X-axis direction. The shapes, quantities, positions and arrangement of the first graphic area E, the second graphic area F, the third graphic area A, the fourth graphic area H and the fifth graphic area I are not limited thereto and can also be adjusted according to needs.
[0090] The present invention proposes a navigation calibration method for a pathology slice scanner, which is implemented based on a microscopic imaging system with a macro camera and a calibration sheet. The specific calibration method includes the following:
[0091] 1) Move the stage and use a macro camera to take a number of macro images, and determine the shooting position of the calibration piece by identifying the coordinates of the first graphic area and the second graphic area on the macro images. This step includes determining the X-axis direction coordinates and the Y-axis direction coordinates of the shooting position of the calibration piece, which specifically includes the following:
[0092] 1.1) Determine the Y coordinate of the shooting position of the calibration piece:
[0093] No calibration sheet is placed in the macroscopic imaging area of the stage. The stage is moved along the Y-axis direction and a number of first macroscopic images are taken. The Y-axis coordinate Ys of the shooting position of the calibration sheet is determined by judging whether a complete macroscopic imaging area appears in the first macroscopic image, and the rectangular coordinate R of the macroscopic imaging area is obtained. n .
[0094] Specifically, starting from a certain initial position of the Y axis (for example, Y0=0), the stage is moved along the Y axis direction with a set fixed step length (for example, 2000 microns), and a first macroscopic image is captured by the macro camera every time a position is moved, and the captured image is recognized until a complete macroscopic imaging area appears in the captured first macroscopic image, and the Y axis position of the macroscopic imaging area corresponding to the stage when the first macroscopic image is captured is used as the Y axis coordinate Ys of the shooting position of the calibration piece; the rectangular coordinate R of the macroscopic imaging area is obtained by recognition. n ={(x n ,y n );w,h}, where (x n ,y n ) is the center position of the rectangle, w and h are the width and height of the rectangle, respectively, in pixels. Figure 6 The macroscopic imaging area (green rectangle) is automatically acquired along the Y axis.
[0095] 1.2) Determine the X coordinate of the calibration film's shooting position:
[0096] Place a calibration sheet in the macroscopic imaging area of the stage, move the stage along the X-axis direction and take a number of second macroscopic images, determine whether the first graphic area appears in the second macroscopic image, and determine the first graphic area according to the rectangular coordinates R of the macroscopic imaging area. n The coordinate Xs of the shooting position of the calibration piece in the X-axis direction is determined based on the positional relationship.
[0097] Specifically, a calibration sheet is placed in the macro imaging area of the stage, and starting from an initial position X0 of a certain X axis (for example, X0=0), the stage is moved along the X axis direction with a set fixed step length (for example, 2000 microns). Each time the stage moves a position, a second macro image is captured by the macro camera, and the captured second macro image is identified until the center area of the first graphic area, that is, the first center image, appears in the captured second macro image, and the center coordinates E(x E ,y E ), assuming that the first center figure is a solid circle, its coordinates are (x E ,y E ,r E ), (x E ,y E ) and r E Denote the center position and radius of the solid circle, respectively, in pixels. Determine whether the absolute value of the coordinate difference between the center coordinate and the center of the rectangle where the macro imaging area is located in the Y-axis direction does not exceed the set threshold T y , that is, |y E -y n | <T y If it does not exceed, the X-axis position at this time is used as the X-axis coordinate Xs of the shooting position of the calibration film. Figure 7 In the figure, the solid circle (red cross) of the first graphic area automatically traversed along the X-axis and the center of the macroscopic imaging area (green rectangle).
[0098] 1.3) Determine the image position of the second graphic area:
[0099] From the second macroscopic image with the determined coordinates Xs, the second graphic area is identified as the graphic with the same shape as the first graphic area and the closest center coordinate on the Y axis. The center coordinate of the second graphic area is F(x F ,y F ).
[0100] Specifically, since the center coordinates of the first graphic area, i.e., the image-side position, have been obtained through step 1.2), and according to the known information of the calibration film (for example, the second graphic area F and the first graphic area E have the same coordinates in the Y-axis direction, and the distance is L), a circle closest to the first graphic area E and whose center Y coordinate is closest to the center Y coordinate of the first graphic area E can be identified in the same second macroscopic image used to calculate the first graphic area E in step 1.2) as the center F (x F ,y F ,r F ), where r F is the radius. Figure 8 shown.
[0101] 2) Calculating the pixel spatial resolution of the macro image based on the coordinates of the first graphic area and the coordinates of the second graphic area that determine the shooting position.
[0102] Specifically, according to the center coordinate E(x E ,y E ) and the center coordinates F(x) of the second graphic area F ,y F ) and the distance L to calculate the pixel spatial resolution S of the macroscopic image n , (unit: micrometer / pixel):
[0103]
[0104] 3) According to the pixel spatial resolution S of the macro image n The coordinates of the first graphic area identified are used to calculate the coordinates of the rectangular area on the captured macro image when the calibration piece is in the shooting position, and the macro image of the calibration piece is obtained by clipping.
[0105] The distance information between the center of the first graphic area in the calibration sheet and the four sides of the calibration sheet is known. The coordinates R of the rectangular area in the macroscopic image taken when the calibration sheet is in the shooting position are calculated based on the pixel spatial resolution, the center coordinates of the identified first graphic area, and the distance information. c =[x s ,x e ,y s ,y e ]:
[0106] x s =X E -(W S -d E ) / S n
[0107] x e =X E +(W S -d E ) / S n
[0108] y s =Y E -H S / (2S n )
[0109] y e =Y E +H S / (2S n )
[0110] where x s 、x eRespectively represent the starting and ending abscissas of the rectangular area in the captured macro image, y s ,y e Respectively represent the starting and ending ordinates of the rectangle in the captured macro image; W S and H S are the width and height of the calibration piece (known values, such as 75 mm and 25 mm here), d E is the distance between the center coordinate of the first graphic area and one side (e.g., the left border) of the calibration sheet (a known value, such as 41 mm here). The rectangular area is obtained as Fig. 9 As shown in the red dashed box.
[0111] The macro image is cut out according to the rectangular area, such as Fig.10 As shown. At this time, the position of the second graphic area F in the figure becomes:
[0112] x F ←x F -x s
[0113] y F ←y F -y s .
[0114] In order to facilitate user observation, the obtained macroscopic image can be rotated 90° clockwise to obtain the final macroscopic image, such as Fig.11 As shown. At this time, the position of the center of the second graphic area F in the figure becomes:
[0115]
[0116] Where W and H are the width and height of the cropped macro image (before rotation).
[0117] 4) The image space position of a certain point on the macro map and the object space position of the corresponding point on the calibration film are substituted into the affine transformation equation to determine the mapping relationship between the stage and the macro map to achieve navigation calibration.
[0118] In the present invention, when there is no distortion in the macro camera lens and there is only a 90° multiple rotation between the macro camera imaging sensor and the stage (otherwise the macro image can be corrected first), the affine transformation between the object space and the image space can be degenerated into a scale change and a translation transformation, that is, a in the following equations (1) and (2): 12 =a 21 =0,b 12 =b 21 =0:
[0119]
[0120] In addition, the pixel units of cameras are generally square, so there is a 11 =a 22 =1 / S n ,b 11 =b 22 =S n So far, there is only one translation vector (r1r2) in equations (1) and (2) respectively. T and (t1t2) T are still unknown, they can be solved by a pair of points of the same name in the object and image space.
[0121] Since there are multiple graphic areas on the calibration sheet, the center points of different graphic areas can be selected as object-side position points, and the position points of corresponding graphic areas on the macro image can be brought into the affine transformation relationship as image-side position points for calculation. The position points of other graphic areas can be selected according to the current objective lens magnification, as long as the corresponding center image size in the graphic feature area is smaller than the field of view size of the scanning camera.
[0122] For example, since the first and second center graphs of the same shape and different sizes are arranged at the centers of the first and second graphic regions, and the coordinates of the image space position of the second graphic region F have been obtained in the previous steps, the center point of the second center graph is used as the image space position of a certain position point on the macrograph, and the center point of the second center graph of the second graphic region on the calibration sheet is used as the object space position of the corresponding position point on the calibration sheet, and by finding the coordinates of the object space position of the second graphic region F on the calibration sheet, (1) and (2) can be solved.
[0123] The object diameter of the second center figure of the second graphic region F is d F (=0.3 mm, see Figure 4 ), then the diameter of the circle corresponding to it in the field of view image of the scanning camera is D F =d F / S m , where S m is the spatial resolution of the field of view image of the current scanning camera (unit: micron / pixel), which can be measured in advance or use empirical values (such as S under 40X objective lens). m =0.25, S under 20X objective lens m =0.5, etc.). In addition, the distance between the optical axis of the objective lens and the center of the macroscopic imaging area along the X direction is denoted as Δx, which is a structural parameter of the scanner system and is a known quantity.
[0124] Based on this, the method for determining the object position of the second center image of the second graphic area is as follows:
[0125] 4.1) Move the stage so that the calibration sheet is located under the optical axis of the objective lens of the microscopic imaging system. Specifically, the X axis can be moved by a distance of Δx so that the calibration sheet is placed under the optical axis of the objective lens.
[0126] 4.2) Starting from a certain initial position (such as the origin), the stage is moved along the Y-axis direction with a preset step length (such as 1000 microns). Each time it moves to a position, a scanning camera is used to take a picture, and the scanned image is recognized until the second center image is recognized and its size meets the set requirements, for example, the diameter meets |D F -D|<ε (the second center graph), where ε is the set size difference threshold, which can be taken as 10. The X-axis and Y-axis positions at this time are taken as the object position of the center point of the second graphic area on the calibration sheet.
[0127] 4.3) Optimizing the object space position of the second center image of the second graphic area. Fig.12 , automatically traverses along the Y axis to obtain the scanning camera image taken at the object position of the second centroid of the second graphic area F. The green circle is the currently detected position, and the red circle is the optimal position, that is, the center of the image. Specifically including:
[0128] According to the spatial resolution S of the current scanning camera's field of view image m The object position of the second graphic area is optimized by using the center coordinates (x0, y0) of the second center image identified on the scanned image and the determined object position of the second graphic area to obtain the optimized object position (x0, y0) of the second graphic area. F ', Y F '):
[0129]
[0130]
[0131] Among them, (X F1 , Y F1 ) is the object space position of the second graphic area before optimization, and W and H are the width and height of the macrograph, respectively.
[0132] 4.4) Substitute the object space position of the second graphic area and the image space position corresponding to the second graphic area in the macroscopic image into the affine transformation relationship to obtain the translation vector and the scale vector, and obtain the final mapping relationship between the stage and the macroscopic image.
[0133] The object space position (X F ', Y F ') and the center coordinates (x F ,y F) into the affine transformation equation to obtain the translation vector (r1, r2) T and the scale vector (t1, t2) T :
[0134] r1=X F '-S n × F
[0135] r2=Y F '-S n ×y F
[0136] t1=x F -X F ' / S n
[0137] t2=y F -Y F ' / S n
[0138] Among them, S n is the pixel spatial resolution of the macro image.
[0139] Thus, the entire navigation calibration is completed, and the final mapping relationship between the stage and the macro map is as follows:
[0140]
[0141] Among them, (x M ,y M ) and (x S ,y S ) represent the position point on the macroscopic image and the position point on the stage, (r1, r2) T is the translation vector, (t1, t2) T is the scale vector.
[0142] The present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a navigation calibration method for a pathology slice scanner is implemented.
[0143] The present invention proposes a navigation calibration device for a pathology slice scanner, which uses the above-mentioned navigation calibration method for a pathology slice scanner to perform navigation calibration. The device includes the following:
[0144] The calibration sheet is provided with at least a first graphic area and a second graphic area distributed at intervals, and may also include other third graphic areas, fourth graphic areas, etc. The shape, position and number of each graphic area can be set according to requirements.
[0145] The shooting position determination module determines the shooting position of the calibration sheet by identifying the first graphic area coordinates and the second graphic area coordinates on a plurality of macro images shot by the macro camera. This module is mainly used to implement step 1).
[0146] The resolution calculation module calculates the pixel spatial resolution of the macro image according to the coordinates of the first graphic area and the second graphic area of the determined shooting position. This module is mainly used to implement step 2).
[0147] The macro image cropping module is based on the pixel spatial resolution S of the macro image. n The coordinates of the first graphic area identified are used to calculate the coordinates of the rectangular area on the macro image taken when the calibration piece is in the shooting position, and the macro image of the calibration piece is obtained by clipping; this module is mainly used to implement step 3)
[0148] The mapping relationship determination module brings the image space position of a certain position point on the macroscopic image and the object space position of the corresponding position point on the calibration sheet into the affine transformation relationship, thereby determining the mapping relationship between the stage and the macroscopic image. This module is mainly used to implement step 4).
[0149] The solution of the present invention can greatly improve the efficiency and stability of navigation calibration of digital slide scanners, especially for non-first calibration. The initial value required for calibration of the solution of the present invention can use the last calibration result.
[0150] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.
Claims
1. A navigation calibration method for a pathology slide scanner, based on a microscopic imaging system with a macro camera, characterized in that: A calibration sheet is pre-set, and at least a first graphic area and a second graphic area are arranged at intervals on the calibration sheet. The specific calibration method includes the following: Moving the stage and taking a plurality of macroscopic images with a macroscopic camera, and determining the shooting position of the calibration sheet by identifying the coordinates of the first graphic area and the coordinates of the second graphic area on the plurality of macroscopic images; Calculating the pixel spatial resolution of the macro image according to the coordinates of the first graphic area and the coordinates of the second graphic area for determining the shooting position; Calculating the coordinates of a rectangular area on the captured macro image when the calibration sheet is in a shooting position according to the pixel spatial resolution of the macro image and the coordinates of the identified first graphic area to obtain a macro image of the calibration sheet by clipping; The image space position of a certain point on the macro map and the object space position of the corresponding point on the calibration sheet are substituted into the affine transformation equation to determine the mapping relationship between the stage and the macro map to achieve navigation calibration.
2. A navigation calibration method for a pathology slice scanner as claimed in claim 1, characterized in that: The stage is moved and a plurality of macro images are captured by the macro camera, and the shooting position of the calibration sheet is determined by the plurality of macro images; specifically, the steps include: The calibration sheet is not placed in the macroscopic imaging area of the stage, the stage is moved along the Y-axis direction and a number of first macroscopic images are taken, and the Y-axis coordinate Ys of the shooting position of the calibration sheet is determined by judging whether the complete macroscopic imaging area appears in the first macroscopic image, and the rectangular coordinate R of the macroscopic imaging area is obtained. n ; The calibration sheet is placed in the macroscopic imaging area of the stage, the stage is moved along the X-axis direction and a plurality of second macroscopic images are taken, and it is determined whether the first graphic area appears in the second macroscopic image, and the first graphic area is identified according to the rectangular coordinates R where the macroscopic imaging area is located. n The coordinate Xs of the shooting position of the calibration piece in the X-axis direction is determined based on the positional relationship.
3. A navigation calibration method for a pathological slice scanner as claimed in claim 2, characterized in that: When no calibration sheet is placed in the macroscopic image imaging area of the stage, starting from a certain initial position of the Y axis, the stage is moved along the Y axis direction with a set fixed step length, and the first macroscopic image is photographed with the macro camera each time the stage is moved, until the complete macroscopic imaging area appears in the photographed first macroscopic image, and the Y axis position of the macroscopic imaging area at this time is used as the Y axis coordinate Ys of the photographing position of the calibration sheet; Identify the rectangular coordinates R of the macro imaging area n ={(x n ,y n );w,h}, where (x n ,y n ) is the center position of the rectangle, w and h are the width and height of the rectangle respectively, in pixels.
4. The navigation calibration method of a pathology slice scanner as claimed in claim 2, characterized in that: The calibration sheet is placed in the macroscopic imaging area of the stage, and the stage is moved along the X-axis direction at a set fixed step length starting from an initial position of a certain X-axis. The second macroscopic image is captured by the macro camera each time a position is moved, until the center area of the first graphic area appears in the captured second macroscopic image, and the center coordinates E(x E ,y E ), and determine whether the absolute value of the coordinate difference between the center coordinate and the center of the rectangle where the macro imaging area is located in the Y-axis direction does not exceed a set threshold; if not, the X-axis position at this time is used as the X-axis coordinate Xs of the shooting position of the calibration piece.
5. The navigation calibration method of a pathology slice scanner as claimed in claim 4, characterized in that: The calibration sheet is also provided with a second graphic area having the same shape as the first graphic area and being spaced apart, the object position of the second graphic area and the object position of the first graphic area having the same coordinate on the Y axis, and the distance between the two is L; and the method further includes identifying, from the second macroscopic image for determining the coordinate Xs, a graphic having the same shape as the first graphic area and the closest central coordinate on the Y axis as the second graphic area, and obtaining the central coordinate of the second graphic area as F(x F ,y F ); Calculate the pixel spatial resolution S of the macro image according to the center coordinates of the first graphic area and the center coordinates of the second graphic area and the distance L n :
6. The navigation calibration method of a pathology slice scanner as claimed in claim 1, characterized in that: Preset the distance information between the center of the first graphic area in the calibration sheet and the four sides of the calibration sheet; according to the pixel spatial resolution S n , the center coordinates of the first graphic area identified and the distance information are used to calculate the rectangular area coordinates R in the macro image taken when the calibration piece is in the shooting position c =[x s ,x e ,y s ,y e ]: x s =X E -(W S -d E ) / S n x e =X E +(W S -d E ) / S n and s =And E -H S / (2S n ) and e =And E +H S / (2S n ) where x s 、x e Respectively represent the starting and ending abscissas of the rectangular area in the captured macro image, y s ,y e Respectively represent the starting and ending ordinates of the rectangle in the captured macro image, W S and H S are the width and height of the calibration patch, d E is the distance between the center coordinates of the first graphic area and one side of the calibration piece.
7. The navigation calibration method of a pathology slice scanner as claimed in claim 1, characterized in that: A first center graph and a second center graph having the same shape and different sizes are respectively arranged in advance at the center of the first graphic area and the second graphic area; the center point of the second center graph is used as the image position of a certain position point on the macrograph, and the center point of the second center graph of the second graphic area on the calibration sheet is used as the object position of the corresponding position point on the calibration sheet, and the object position determination method is as follows: Moving the stage so that the calibration sheet is located under the optical axis of the objective lens of the microscopic imaging system; The stage is moved along the Y-axis direction with a preset step length, and each time it moves to a position, a scanning camera is used to take a picture, and the scanned image is recognized, until the second center figure is recognized and its size meets the set requirements, and the X-axis and Y-axis positions at this time are used as the object position of the center point of the second graphic area on the calibration piece and optimized to obtain the final object position.
8. The navigation calibration method of a pathology slice scanner as claimed in claim 7, characterized in that: Optimizing the object position of the second graphic area specifically includes: According to the spatial resolution S of the field of view image of the current scanning camera m The object position of the second graphic area is optimized by using the center coordinates (x0, y0) of the second center image identified on the scanned image and the determined object position of the second graphic area to obtain the optimized object position (x0, y0) of the second graphic area. F ′,Y F ′): Among them, (X F1 , Y F1 ) is the object space position of the second graphic area before optimization, and W and H are the width and height of the macrograph, respectively.
9. The navigation calibration method of a pathology slice scanner as claimed in claim 1, characterized in that: The object space position of the second graphic area and the image space position corresponding to the second graphic area in the macroscopic image are substituted into the affine transformation equation to obtain the translation vector and the scale vector, and the final mapping relationship between the stage and the macroscopic image is obtained.
10. The navigation calibration method of a pathology slice scanner as claimed in claim 9, characterized in that: The object space position (X F ′,Y F ') and the central coordinates (x F ,y F ) into the affine transformation equation to obtain the translation vector (r1, r2) T and the scale vector (t1, t2) T : r1=X F ′-S n ×x F r2=Y F ′-S n ×y F t1=x F -X F ′ / S n t2=y F -AND F ′ / S n Among them, S n is the pixel spatial resolution of the macroscopic image.
11. The navigation calibration method of a pathology slice scanner as claimed in claim 1, characterized in that: The final mapping relationship between the stage and the macroscopic image is as follows: Among them, (x M ,y M ) and (x S ,y S ) represent the position point on the macroscopic image and the position point on the stage, respectively, (r1, r2) T is the translation vector, (t1, t2) T is the scale vector.
12. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the navigation calibration method for the pathological slice scanner as claimed in any one of claims 1 to 11 is implemented.
13. A navigation calibration device for a pathology slice scanner, characterized in that: include: The calibration sheet is provided with at least a first graphic area and a second graphic area which are spaced apart from each other; a shooting position determination module, which determines the shooting position of the calibration sheet by identifying the first graphic area coordinates and the second graphic area coordinates on a plurality of the macro images shot by the macro camera; a resolution calculation module, which calculates the pixel spatial resolution of the macro image according to the determined coordinates of the first graphic area and the second graphic area of the shooting position; A macroscopic image clipping module, which calculates the coordinates of a rectangular area on the macroscopic image captured when the calibration piece is in the shooting position according to the pixel spatial resolution Sn of the macroscopic image and the coordinates of the identified first graphic area, so as to clip and obtain a macroscopic image of the calibration piece; The mapping relationship determination module brings the image space position of a certain position point on the macroscopic image and the object space position of the corresponding position point on the calibration sheet into an affine transformation relationship, thereby determining the mapping relationship between the stage and the macroscopic image.
