| CPC G02B 21/34 (2013.01) [G02B 21/26 (2013.01); G02B 21/365 (2013.01); G06T 7/13 (2017.01); G06T 7/73 (2017.01); G06V 10/245 (2022.01); G06V 20/69 (2022.01); G06T 2207/10056 (2013.01)] | 6 Claims |

|
1. A method of detecting a misalignment condition between a microscope slide and a platform upon which the microscope slide is disposed, the method comprising:
(a) identifying, in an image that includes at least a portion of the microscope slide and at least a portion of the platform, a location of a reference line pattern that connects a horizontal edge and a vertical edge of the platform, wherein the reference line has a predetermined length and a parametric form; wherein the identifying of the location of the reference line pattern comprises:
generating a set of potential reference line patterns by varying one or more unknown coefficients within a predetermined range, wherein each potential reference line pattern has the length and the parametric form of the reference line pattern, wherein each potential reference line pattern is defined by a center pixel;
superimposing the center pixel of each potential reference line pattern on each pixel of a plurality of pixels comprising a top right quadrant of the image;
calculating a first cost function for each potential reference line pattern for each pixel in the top right quadrant of the digital image;
selecting the potential reference line pattern that yields a highest value of the first cost function thereby identifying the location of the reference line pattern;
(b) identifying, in the image, locations of the platform horizontal edge, the platform vertical edge, a slide horizontal edge, and a slide vertical edge, wherein the identifying of the locations of the platform horizontal edge, the platform vertical edge, the slide horizontal edge, and the slide vertical edge comprises:
generating a set of potential platform horizontal edge line segments, a set of potential platform vertical edge line segments, a set of potential slide horizontal edge line segments, and a set of potential slide vertical edge line segments, wherein the generated set of potential platform horizontal edge line segments, the generated set of potential platform vertical edge line segments, the generated set of potential slide horizontal edge line segments, and the generated set of potential slide vertical edge segments each have predetermined slope ranges;
independently computing a cost function for each of the generated sets of potential platform horizontal edge line segments, the generated set of potential platform vertical edge line segments, the generated set of potential slide horizontal edge line segments, and the generated set of potential slide vertical edge line segments; and
selecting the potential platform horizontal edge line segment, the potential platform vertical edge line segment, the potential slide horizontal edge line segment, and the potential slide vertical edge line segment that yields a highest value of the respective computed cost function as the location of the platform horizontal edge of the platform, the location of the platform vertical edge of the platform, and the location of the slide horizonal edge of the microscope slide;
(c) calculating a value of a first distance between the first-horizontal edge of the platform and the horizontal edge of the microscope slide in the image and calculating a value of a second distance between the vertical edge of the platform and the vertical edge of the slide in the image, wherein if the value of the first distance or the value of the second distance lies outside a pre-determined range of values, a misalignment condition between the microscope slide and the platform is detected; and
(d) in response to the detection of the misalignment condition between the microscope slide and the platform, automatically repositioning the microscope slide on the platform using a slide alignment device; and repeating steps (a)-(c) to detect if the misalignment condition is resolved.
|