Microscope stage displacement error calibration method based on hough transform image analysis
By using the Hough transform image analysis method to calibrate the microscope stage, the problem of unstable imaging in computational optical microscopes was solved, and precise stage calibration and efficient imaging were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2023-03-30
- Publication Date
- 2026-05-05
AI Technical Summary
Errors in the hardware manufacturing and optical adjustment processes of computational optical microscopes lead to unstable imaging and degraded image quality, making it difficult to achieve high-precision image processing.
A method based on Hough transform image analysis is adopted. By performing inverse binary thresholding on the scale image on the microscope stage, the horizontal and vertical scale lines are detected using Hough transform, the center coordinate error of the stage is calculated and the return error is compensated, so as to achieve accurate calibration of the stage.
Without the need for mechanical operation or human judgment, the calibration process is simple, fast, and accurate, improving the intuitiveness and accuracy of imaging results and enhancing the calibration efficiency and stability of optical microscopy systems.
Smart Images

Figure CN116989667B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to optical microscopy imaging and system calibration technology, specifically a method for calibrating microscope stage displacement error based on Hough transform image analysis. Background Technology
[0002] The novel concept of "computational optics" has endowed optical microscopes with powerful performance, providing specialized observation tools for diverse biological applications and ushering in a new era of intelligence, automation, and digitalization. Computational optics microscopy relies on forward modulation techniques such as illumination control and aperture adjustment, combined with rigorous physical modeling of the optical system, to extract microscopic sample information invisible to the naked eye. Strict registration, precise calibration, and high-precision image processing algorithms are fundamental to its subsequent imaging capabilities. However, limitations in hardware manufacturing, optical adjustment methods, and testing tools often result in errors between the actual system and its physical model, making it difficult for computational optics microscopy to achieve stable imaging and acquire high-quality observation images. Summary of the Invention
[0003] To address the aforementioned technical deficiencies in the prior art, this invention proposes a microscope stage displacement error calibration method based on Hough transform image analysis.
[0004] The technical solution to achieve the purpose of this invention is as follows: a microscope stage displacement error calibration method based on Hough transform image analysis, the specific process of which is as follows:
[0005] Step 1: Move the stage to the center of the uncorrected optical axis of the system, place the microscope scale in the stage, and acquire 10 scale images in the horizontal and vertical directions with the center of the uncorrected optical axis as the center.
[0006] Step 2: Convert all recorded color ruler images to grayscale images, perform inverse binary thresholding on the grayscale images, and separate the ruler scale lines from the ruler background using binarization.
[0007] Step 3: Use Hough transform to process the binary image, filter out horizontal and vertical tick marks by setting different thresholds, and obtain the coordinates of the start and end points of all straight lines.
[0008] Step 4: Select the image at the uncorrected center position and calculate the difference between the coordinates of the stage center marked by the horizontal and vertical center scale lines and the coordinates of the optical axis center marked by the image center point.
[0009] Step 5: Detect the relative movement length of adjacent images with the same feature scale line after Hough transform and calculate the actual movement value of the stage. Subtract the nominal movement distance of the stage from the actual movement distance to obtain the return error of the stage.
[0010] Step 6: On the uncorrected stage center coordinates, compensate for the error value obtained in Step 4 to obtain the corrected stage center coordinates, and set them as the corrected stage center position.
[0011] Step 7: On the stage step, the compensated return error value is set as the new step distance, so that the actual displacement length of each movement is consistent with the nominal value.
[0012] Preferably, in step one, the microscope stage is moved at 10 equally spaced positions in the horizontal and vertical directions, and an image corresponding to each position is acquired. The center position of the stage and the actual horizontal and vertical movement positions of the stage can be calculated by the distribution characteristics of the scale lines in each image.
[0013] Preferably, the specific steps in step three, which involve processing the binary image using the Hough transform, filtering out horizontal and vertical tick marks by setting different thresholds, and obtaining the coordinates of the start and end points of all straight lines, are as follows:
[0014] Transform all points in the image in the spatial coordinate system to the parametric coordinate system. In the parametric coordinate system, the horizontal scale bottom line satisfies θ = 90°, and the vertical scale main scale line and auxiliary scale line satisfies θ = 0. Based on the specific conditions of the angle and the voting results of the parametric space, deduce all straight lines in the spatial coordinate system that meet the conditions, and calculate their initial and final coordinates.
[0015] By setting a line width threshold T width Thresholding is applied to all lines, and lines with a spacing less than T are selected. width The lines are considered to be the same straight line, and the coordinates of the middle line are taken as the start and end coordinates of this line. Lines with a spacing greater than T are considered to be the same straight line. width The straight lines are identified as different straight lines, and the start and end coordinates of all horizontal baselines and vertical scale lines are obtained.
[0016] Preferably, the specific steps for calculating the difference between the coordinates of the stage center of the scale mark and the coordinates of the optical axis center of the image center point mark in step four are as follows:
[0017] For the horizontal scale line of the ruler, set a length threshold, and only take the horizontal straight line whose length is greater than this length threshold. This straight line is the horizontal bottom line of the ruler. Further, obtain the coordinate y1 of this horizontal bottom line in the vertical direction.
[0018] For vertical scale lines arranged in a regular pattern of long and short lengths, a length threshold T is set between the long and short scale lines. length To filter out long scale lines, select lines with a length greater than T. lengthThe straight line is used as the main vertical scale line, and the center long scale line is identified by the number marked on the scale to obtain the coordinate x1 in the horizontal direction;
[0019] Use (x1, y1) as the coordinates of the stage center marked on the scale;
[0020] Subtracting these coordinates from the optical axis center coordinates (x0, y0) of the image center point yields the coordinate errors Δx and Δy. Based on the scaling relationship between the image plane and the object plane of this optical system, the lateral error ΔX and longitudinal error ΔY of the actual object plane stage center coordinates and the system optical axis center are calculated.
[0021] Preferably, the length threshold for the horizontal scale line of the ruler is set to 0.8*L, where L is the horizontal length of the ruler.
[0022] Preferably, the specific steps of step five, which involves detecting the relative displacement length between adjacent images of the same feature scale line after the Hough transform and calculating the actual displacement value of the stage, are as follows:
[0023] Calculate the average distance of the horizontal scale line across nine vertically adjacent images;
[0024] The average distance is converted to the surface of the object to obtain the actual distance Dis that the stage moves longitudinally. y ;
[0025] Calculate the average distance of nine horizontally adjacent images for the same vertical scale line;
[0026] Converting the average distance to the surface of the object, we obtain the actual distance Dis that the stage moves laterally. x .
[0027] Compared with the prior art, the present invention has the following significant advantages: (1) The present invention only requires image analysis and detection of the acquired scale image to obtain the stage center error and backlash error. The whole process does not require mechanical operation or human judgment. The correction process is simple, fast and accurate, and has better intuitiveness and accuracy for imaging results. (2) The straight line detection method based on Hough transform adopted in the present invention has the advantage of being less affected by noise and curve discontinuity compared with other methods. (3) In the same long-term continuous observation process, if the mechanical structure of the optical system does not undergo any human or external force changes, the stage position and backlash error returned after calibration can be reused, which greatly improves the efficiency of stage calibration of optical microscopy system.
[0028] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0029] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0030] Figure 1 Flowchart of the algorithm for the microscope stage displacement error calibration method based on Hough transform.
[0031] Figure 2 Micrometer scale diagram.
[0032] Figure 3 A diagram illustrating the process of processing scale markings using the Hough transform. Detailed Implementation
[0033] It is readily understood that, based on the technical solution of this invention, various embodiments of the invention can be conceived by those skilled in the art without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention. Rather, these embodiments are provided to enable those skilled in the art to gain a more thorough understanding of the invention. Preferred embodiments of the invention are described below in conjunction with the accompanying drawings, which form part of this application and, together with the embodiments of the invention, serve to illustrate the innovative concept of the invention.
[0034] This invention relates to a method for identifying and calibrating microscopic scale lines based on the Hough transform. This method requires an optical microscope system with a horizontally movable stage. In this system, the slide or scale can be placed in the central groove of the stage, and observation of different areas of the scale is achieved by moving the stage. This invention is universally applicable to microscopic scales of different specifications. For ease of explanation, the micrometer scale used in this test is as follows: Figure 2 As shown, its specification is 1 DIV = 0.01 mm, which means that the interval of one scale in the microscopic field of view is 0.01 mm (10 micrometers).
[0035] This invention corrects the displacement error of the stage by simply analyzing the acquired scale image to determine the stage center error and return error. The entire process requires no mechanical operation or human judgment, and the correction process is simple, fast, and accurate.
[0036] Combination Figure 1 A calibration method for microscope stage displacement error based on Hough transform image analysis, comprising the following steps:
[0037] Step 1: Acquiring scale images at different positions in the horizontal and vertical directions: Move the stage to the uncalibrated center position, place a standard microscope scale in the stage, and using this position as the center, use the computer to control the electronic microscope stage to move 10 equally spaced positions in the horizontal direction (the horizontal displacement distance is Dis). x0 Record the image corresponding to each position. Perform the same operation in the vertical direction (vertical displacement distance is Dis). y0 Similarly, 10 images were recorded.
[0038] A standard microscope scale was used to obtain characteristic images of the calibration system's center and displacement errors. The scale consists of a single horizontal graduation line and two types of regularly arranged vertical graduation lines. The horizontal graduation line is located at the center of the entire scale sample. Shorter vertical graduation lines represent smaller graduations, and longer lines represent larger graduations, with the central long graduation line at the center of the scale sample. When the sample is placed on the stage, the intersection of the horizontal graduation line and the central vertical graduation line indicates the current center position of the stage. Therefore, the scale's graduation line distribution characteristics can indicate the center position of the stage as well as its horizontal and vertical movement.
[0039] Step 2, Binarization of the recorded color images: Convert all recorded color ruler images into grayscale images, and then perform inverse binary thresholding on the grayscale images, setting all ruler scale lines to 1 and setting non-scale line information pixels such as dirt spots in the ruler background and image to 0, thereby separating the ruler scale lines from the ruler background in binarization.
[0040] Step 3, Hough Transform to filter horizontal and vertical scale lines: The binary image obtained in the previous step is processed using the Hough Transform. By setting different thresholds, horizontal and vertical scale lines are filtered out, and the coordinates of the start and end points of all lines are obtained. The horizontal scale line is also called the bottom line of the scale. The longer vertical scale line is called the main scale line, and the shorter vertical scale line is called the auxiliary scale line.
[0041] The process of processing the ruler's bottom line and scale lines through Hough transform is as follows: Figure 3 As shown. Here is a detailed explanation of the principle and process of the Hough transform: In the xy coordinate space of the image, the Hough transform passes through the point (x... i ,y i The straight line can be represented as:
[0042] y i =ax i +b (1)
[0043] Where parameter a is the slope and b is the intercept.
[0044] Through point (x) i y i There are infinitely many straight lines (x, b), corresponding to different values of a and b. If x... i y i Treating them as constants and the original parameters a and b as variables, equation (1) can be expressed as:
[0045] b = -ax i +y i (2)
[0046] This transforms the coordinates to the parametric plane α-b. This transformation is equivalent to the transformation of the coordinates for (x...) in Cartesian coordinates. i y i The Hough transform of the point (x, y). The straight line is the point (x, y) in the image coordinate space. i y i The unique equation in the parameter space. Considering another point (x) in the image coordinate space... j y j It also has a corresponding straight line in the parameter space, represented as:
[0047] b = -ax j +y j (3)
[0048] This straight line and point (x) i y i The lines in the parameter space intersect at a point (a0, b0). In the image coordinate space, the line passing through the point (x...) i y i ) and point (x) j y j Each point on the line ) corresponds to a line in the parameter space ab, and these lines all intersect at the point (a0, b0). a0 and b0 are the points (x, y) in the image coordinate space xy. i y i ) and point (x) j y j The parameters of the line determined by the Hough transform are given by the parameter space. Conversely, all lines that intersect at the same point in the parameter space have corresponding collinear points in the image coordinate space. Based on this property, given some edge points in the image coordinate space, the equation of the line connecting these points can be determined by the Hough transform.
[0049] In specific calculations, the parameter space can be considered discrete. A two-dimensional accumulation array A(a, b) is established. The first dimension represents the possible range of the slope of the line in the image coordinate space, and the second dimension represents the possible range of the intercept of the line in the image coordinate space. Initially, A(a, b) is initialized to 0. Then, for each foreground point (x, y) in the image coordinate space... i y i Substitute the discrete value of each 'a' in the parameter space into equation (2) to calculate the corresponding value of 'b'. For each pair of (a, b) calculated, increment the corresponding array element A(a, b) by 1, i.e., A(a, b) = A(a, b) + 1. After all calculations are completed, find the maximum peak value of A(a, b) in the parameter calculation voting results. The corresponding a0 and b0 are the parameters of the line equation with the most collinear points (a(a, b) collinear points) in the source image. Next, we can continue to find the second peak value, the third peak value, the fourth peak value, etc., which correspond to the lines with slightly fewer collinear points in the original image.
[0050] This discretization method using a two-dimensional accumulator greatly simplifies the calculation of the Hough transform. The degree of subdivision in the parameter space ab determines the accuracy of finding the collinearity of points on the line. The aforementioned two-dimensional accumulator array A is also called the Hough matrix. Similarly, a straight line can be represented in polar coordinates by the following parametric equation.
[0051] ρ=x cosθ+y sinθ (4)
[0052] Where ρ represents the perpendicular distance from the line to the origin, and θ represents the angle from the x-axis to the perpendicular line, ranging from -90° to +90°. Similar to rectangular coordinates, the Hough transform in polar coordinates also transforms points in the image coordinate space to the parameter space. In polar coordinates, collinear points in the image coordinate space, after being transformed to the parameter space, all intersect at the same point. The resulting ρ and θ are the polar coordinate parameters of the desired line. Unlike rectangular coordinates, in polar coordinates, two collinear points (x, y, θ) in the image coordinate space... i y i ) and (x j y j The mapping to the parameter space is two sine curves that intersect at the point (ρ0, θ0).
[0053] In practical calculations, similar to rectangular coordinates, a two-dimensional array accumulator A is also established in the parameter space, only the range of values differs. For an image of size D×D, the typical range of values for ρ is... The range of θ is (-90°, +90°). The calculation method is the same as that of the accumulator in the rectangular coordinate system. Finally, the (ρ, θ) corresponding to the maximum A is obtained, thus successfully identifying the straight line in the original figure. The above is the detailed process of the Hough transform.
[0054] After performing inverse binary thresholding on the original scale image, very clear scale information is obtained, where the values representing the bottom line and scale lines are all 1, and irrelevant information such as the background of the scale is all 0. The Hough transform is performed on the uncorrected center position image and all points on the remaining 19 images to transform these points into the parameter space. Then, specific scale lines can be selected from the parameter ρ-θ space.
[0055] For the horizontal ruler baselines, the condition θ = 90° must be met. Based on this condition, we can find the corresponding parameter coordinates in the ρ-θ parameter coordinate system. Then, by relying on the vote count, we can find all the ruler baselines and calculate their coordinates in the original image. However, the calculated results are pixel-level, meaning the same scale line will be identified as multiple straight lines. Therefore, we need to set a width threshold T. width Several straight lines identified from the same horizontal line are close together, with a distance less than the width threshold T. width We group them together, and the coordinates are taken from the coordinates of the center line of these lines. The lines identified by different horizontal lines are far apart, exceeding the width threshold T. width Without performing any processing on them, we obtain the start and end coordinates of all horizontal baselines. For the vertical main scale lines (long) and auxiliary scale lines (short), the condition θ = 0 must be met. Following the same processing method as for the horizontal scale baselines, we can obtain the start and end coordinates of all vertical main scale lines and vertical auxiliary scale lines.
[0056] This step filters the horizontal and vertical scale lines. Since the scale is basically placed horizontally in the imaging field of view, and the horizontal and vertical scale lines are very regular straight lines, every point on the image can be represented in the spatial coordinate system. Then, each point in the spatial coordinate system is transformed into the parametric coordinate system. By filtering the intersection points in the parametric coordinate system, the equations of all straight lines in the original image are determined. A width threshold is then set to prevent the same straight line from being identified as multiple straight lines, thus obtaining the start and end coordinates of each horizontal and vertical scale line in the original image.
[0057] Step 4, Stage Center Coordinate Error Detection: Select the image at the uncorrected center position and calculate the difference between the stage center coordinates marked by the horizontal scale lines (scale bottom line) and the vertical center scale lines (scale main scale lines) and the optical axis center coordinates marked by the image center point. For the scale bottom line, which almost spans the entire field of view, set a length threshold close to the horizontal length of the image to filter it out and obtain its coordinates in the vertical direction; for the vertical scale lines arranged in a regular pattern, set a length threshold between the main scale line (long) and the auxiliary scale line (short) to filter out the main scale line, and identify the center long scale line by its marked number to obtain its coordinates in the horizontal direction. Subtract the optical axis center coordinates (half the image size) from the detected current stage center coordinates to obtain the image plane stage center coordinate error. Then, based on the scaling relationship from the image plane to the object plane, further calculate the object plane stage center coordinate error. This step calculates the difference between the coordinates of the stage center marked by the horizontal and vertical center scale lines and the coordinates of the optical axis center marked by the image center point. Then, by applying the scaling relationship between the image plane and the object plane, the error of the actual stage center point is obtained.
[0058] After obtaining the coordinates of the start and end points of all straight lines, we perform stage center coordinate error detection, that is, we first process all straight lines in the image at the uncorrected center position. For all m horizontal scale baselines found in the previous step, the coordinates of their start points A1(x) are known. 1A y 1A ), A2(x 2A y 2A ...A m (x mA y mA ), and the coordinates of its end B1(x) 1B ,y 1B B2(x) 2B y 2B ...B m (x mB y mB At this point, we need to determine which line is the bottom line of the ruler. For this problem, we use a length threshold method to determine the bottom line, because the most distinctive feature of the bottom line is that it is long enough to span the entire image. For ease of subsequent calculations and conditional judgments, we assume the image length is L pixels and the width is W pixels. For the horizontal tick mark numbered k, its length is the difference between its start and end coordinates on the x-axis. We set the length threshold to 0.8 * L, and only need to judge the condition |x kA -x kB By checking if |≥0.8*L holds true, we can find the bottom line of the scale and obtain the vertical coordinate y1 of the bottom line.
[0059] For vertical main and auxiliary scale lines, we use the same principle to process them. Since both main and auxiliary scale lines are vertical lines but differ in length, we set a length threshold T that falls between the lengths of the main and auxiliary scale lines. lenqth Using this threshold, we can remove all auxiliary tick marks, leaving only the main tick marks. However, there will still be multiple main tick marks in the same field of view. Here, we use visual judgment to find the most central main tick mark. Since our scale has 11 main tick marks (from 0 to 10), we only need to visually find the main tick mark below the number "5" to determine it as the central main tick mark and obtain its horizontal coordinate x1. After processing the horizontal and vertical scale lines of the image at the uncorrected center position, we obtain the center coordinates (x1, y1) of the current stage, while the center coordinates (x0, y0) of the optical axis are half the image size, i.e., x0 = L / 2, y0 = W / 2. From this, we can obtain the center coordinate error of the image plane stage. The horizontal error is: Δx = |x0 - x1|, and the vertical error is: Δy = |y0 - y1|. Based on the scaling relationship between the image plane and the object plane of this optical system, we can further calculate the horizontal error ΔX and the vertical error ΔY of the center coordinates of the object plane stage.
[0060] This step detects the coordinates of the horizontal scale lines and the central vertical scale line by setting appropriate thresholds. For the horizontal scale lines that almost span the entire field of view, a threshold close to the horizontal size of the image is set to filter them out, and their coordinates in the vertical direction are further obtained. For the vertical scale lines that are arranged in a regular pattern of long and short scale lines, a length threshold between the long and short scale lines is set to filter out the long scale lines, and the central long scale line is identified by its marked numbers to obtain its coordinates in the horizontal direction.
[0061] Step 5, Stage Backlash Detection: After Hough transforming the acquired images, detect the relative movement length between adjacent images on the same feature scale line. Based on the scaling relationship from the image plane to the object plane, calculate the nine movement lengths from the ten images and average them. Subtract this calculated value from the theoretical movement distance of the stage to obtain the stage backlash error. Here, we first process the ten images captured by lateral displacement. Perform Hough transform on these images to find the initial coordinates (x1, y1) and (x2, y2) on the same line shared by two images. Calculate the lateral coordinate difference D. x1 =|x1-x2|, using the same method, we can obtain the horizontal coordinate difference D between 9 adjacent images. x2 D x3 ...D x9 Next, these coordinate differences are averaged to obtain the average difference D in the horizontal coordinates.xavg =D x1 +D x2 +…+D x9 / 9. Then, using the same method, process the 10 images taken with longitudinal displacement to obtain the average difference D of the longitudinal coordinates. yavg =D y1 +D y2 +…+D y9 / 9. Then, based on the previously calculated true pixel displacement value and the magnification of the optical system, the true distance of the stage displacement, Dis, can be deduced. x and Dis y Based on the theoretical and actual values of the stage's movement, we can calculate the lateral return error Diff generated by the stage during horizontal displacement. x =|Dis x0 -Dis x | and longitudinal backflight difference Diff y =|Dis y0 -Dis y |
[0062] This step calculates the actual movement distance of the stage by measuring the movement distance of the same feature in adjacent images along the same direction. By calculating the movement distance of the horizontal scale line in vertically adjacent images, the actual longitudinal movement distance of the stage can be obtained by converting it to the object plane. Similarly, by calculating the movement distance of the same vertical scale line in horizontally adjacent images, the actual lateral movement distance of the stage can be obtained by converting it to the object plane. Furthermore, a stable value is obtained by averaging multiple movement distances.
[0063] This step calculates the difference between the known nominal stage step distance and the detected actual displacement distance to obtain the stage backlash error in the lateral and longitudinal directions, respectively.
[0064] Step 6, stage center calibration: On the uncalibrated stage center coordinates, compensate for the error values ΔX and ΔY obtained in Step 4 to obtain the calibrated stage center coordinates, and set them as the calibrated stage center position.
[0065] Step 7, Stage movement return error calibration: The return error value Diff obtained by compensating for the stage movement step is calculated. x and Diff y This is then set as the new step distance, so that the actual displacement length of each movement is consistent with the nominal value.
[0066] Through the above calibration process, we successfully calibrated the center coordinates of the stage, ensuring that each displacement of the stage yields the true coordinate values.
[0067] At this point, the displacement error calibration of the optical system's microscopic stage is complete.
[0068] The Hough transform is an image processing technique for feature extraction that can detect shapes such as straight lines and circles in an image. Its basic idea is to transform the image's spatial coordinates to another parametric coordinate system, and then obtain a local maximum value of the cumulative result through a voting calculation, thus obtaining a set of shapes that conform to the shape as the processing result of the Hough transform. Its main advantages include less susceptibility to noise and curve discontinuities. The microscope stage displacement error calibration method based on Hough transform image analysis proposed in this invention utilizes the Hough transform to detect the scale line placed in the central slot of the stage. By determining whether the main scale line and the bottom scale line are located at the center of the image, the error between the stage center coordinates and the system optical axis center coordinates is calculated, thereby calibrating the stage to the center of the system optical axis. Furthermore, by calculating the actual displacement distance of the scale and comparing it with the theoretical displacement distance, the backlash difference of the stage displacement is obtained and calibrated, thus achieving hardware correction of the optical microscope. Compared with other calibration methods, this method only requires continuous image taking using the CCD in the optical system. The relative position of the stage and the optical axis center and the stage's return stroke difference can be deduced from the image information, which greatly improves the efficiency and accuracy of optical system calibration.
[0069] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
[0070] It should be understood that, in order to simplify the present invention and help those skilled in the art understand its various aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes described in a single embodiment or with reference to a single figure. However, the present invention should not be construed as including all features in the exemplary embodiments as essential technical features of the claims of this patent.
[0071] It should be understood that the modules, units, components, etc., included in the device of one embodiment of the present invention can be adaptively changed to be placed in a device different from that embodiment. Different modules, units, or components included in the device of the embodiment can be combined into a single module, unit, or component, or they can be divided into multiple sub-modules, sub-units, or sub-components.
Claims
1. A method for calibrating microscope stage displacement error based on Hough transform image analysis, characterized in that, The specific process is as follows: Step 1: Move the stage to the center of the uncorrected optical axis of the system, place the microscope scale in the stage, and acquire several scale images in the horizontal and vertical directions with the uncorrected optical axis center as the center. Specifically, by controlling the microscope stage to move 10 equally spaced positions in the horizontal and vertical directions, the corresponding image of each position is acquired. The center position of the stage and the actual movement position of the stage in the horizontal and vertical directions are calculated by the scale line distribution characteristics in each image. Step 2: Convert all recorded color ruler images to grayscale images, perform inverse binary thresholding on the grayscale images, and separate the ruler scale lines from the ruler background using binarization. Step 3: Process the binary image using the Hough transform. By setting different thresholds, filter the horizontal and vertical tick marks and obtain the coordinates of the start and end points of all lines. The specific steps are as follows: Transform all points in the image from the spatial coordinate system to the parametric coordinate system. In the parametric coordinate system, the horizontal scale lines all satisfy the following conditions: The main and auxiliary scale lines on the vertical scale both satisfy the following conditions. Based on the specific conditions of the angle and the voting results of the parameter space, all straight lines in the spatial coordinate system that meet the conditions are deduced, and their initial and final coordinates are calculated. By setting a line width threshold Thresholding is applied to all lines, and lines with a spacing smaller than 1 are considered straight. The lines are considered to be the same line, and the coordinates of the middle line are taken as the start and end coordinates of this line. Lines with a spacing greater than [a certain value] are considered to be the same line. The straight lines are identified as different straight lines, and the start and end coordinates of all horizontal baselines and vertical scale lines are obtained; Step 4: Select the image at the uncorrected center position, and calculate the difference between the coordinates of the stage center marked by the horizontal and vertical center scale lines and the coordinates of the optical axis center marked by the image center point. The specific steps are as follows: For the horizontal scale lines, a length threshold is set, and only horizontal lines with a length greater than this threshold are selected. This line is the horizontal baseline of the scale, and the coordinates of this horizontal baseline in the vertical direction are further obtained. ; For vertical scale lines arranged in a regular pattern of long and short lengths, a length threshold is set between the long and short scale lines. To filter out long scale lines, select lines with a length greater than [missing information]. The straight line is used as the main vertical scale line, and the center long scale line is identified by the numbers marked on the scale to obtain the coordinates in the horizontal direction. ; Will The coordinates of the stage center, used as a scale marker; Compare this coordinate with the optical axis center coordinate of the image center point. Subtracting the values yields the coordinate error. and Based on the scaling relationship between the image plane and the object plane of this optical system, the lateral errors of the actual object plane stage center coordinates and the system optical axis center are calculated. and longitudinal error ; Step 5: Detect the relative movement length of adjacent images with the same feature scale line after Hough transform and calculate the actual movement value of the stage. Subtract the nominal movement distance of the stage from the actual movement distance to obtain the return error of the stage. Step 6: On the uncorrected stage center coordinates, compensate for the error value obtained in Step 4 to obtain the corrected stage center coordinates, and set them as the corrected stage center position. Step 7: On the stage step, the compensated return error value is set as the new step distance, so that the actual displacement length of each movement is consistent with the nominal value.
2. The microscope stage displacement error calibration method based on Hough transform image analysis according to claim 1, characterized in that, For the horizontal scale lines of the ruler, the set length threshold is: , This is the horizontal length of the scale.
3. The microscope stage displacement error calibration method based on Hough transform image analysis according to claim 1, characterized in that, Step 5 involves detecting the relative displacement length between adjacent images of the same feature scale line after the Hough transform and calculating the actual displacement value of the stage. Calculate the average distance of the horizontal scale line across nine vertically adjacent images; Converting the average distance to the surface of the object, we obtain the actual distance the stage moved in the longitudinal direction. ; Calculate the average distance of nine horizontally adjacent images for the same vertical scale line; Converting the average distance to the surface of the object, we obtain the actual distance the platform moves in the lateral direction. .
Citation Information
Patent Citations
Calibration plate used for measurement calibration of digital microscope and use method thereof
CN104897051A
Method for determining conversion parameters of microscope objective table coordinate system and image acquisition coordinate system
CN114200661A