CN111105346A - Full-scanning microscopic image splicing method based on peak value search and gray template registration - Google Patents

Full-scanning microscopic image splicing method based on peak value search and gray template registration Download PDF

Info

Publication number
CN111105346A
CN111105346A CN201911086401.2A CN201911086401A CN111105346A CN 111105346 A CN111105346 A CN 111105346A CN 201911086401 A CN201911086401 A CN 201911086401A CN 111105346 A CN111105346 A CN 111105346A
Authority
CN
China
Prior art keywords
image
entering
gray
search
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911086401.2A
Other languages
Chinese (zh)
Inventor
朱宏明
张东东
秦国锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tongji University
Original Assignee
Tongji University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tongji University filed Critical Tongji University
Priority to CN201911086401.2A priority Critical patent/CN111105346A/en
Publication of CN111105346A publication Critical patent/CN111105346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/14Transformations for image registration, e.g. adjusting or mapping for alignment of images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a full-scanning microscopic image splicing method based on peak value search and gray template registration, and belongs to the field of image processing. The invention provides an image processing method which comprises the steps of extracting a region mainly acted by an evaluation function through a discontinuous focusing region selection method based on a gray level histogram, calculating the definition through an improved Tenegrad gradient evaluation function, gradually obtaining the optimal focusing position by using an improved hill climbing algorithm, preprocessing a dyed urinary sediment microscopic image through graying and filtering operations to obtain a smooth gray level image with a small calculated amount, registering adjacent images through an improved template registration algorithm based on the gray level value, and fusing the overlapped region of the two images through an improved variable weight-based fusion method. The invention not only solves the problem of automatic focusing of the sample, enables the microscopic image to be rapidly and accurately obtained, but also solves the problem of splicing the microscopic image and reduces the image splicing time.

Description

Full-scanning microscopic image splicing method based on peak value search and gray template registration
Technical Field
The invention relates to an image splicing method, in particular to a full-scanning microscopic image splicing method based on peak value search and gray template registration, and belongs to the field of image processing.
Background
Diabetes has become a high-incidence disease endangering physical health in recent years, and a method based on staining urinary sediment cell count is a key technology for diagnosing kidney injury in early stage of diabetes. In view of the fact that the full field of view of the sample cannot be obtained, the traditional counting method only can manually pick one sample area and then carry out estimation through a cell counting plate method. Due to the uneven distribution of cells in the stained urinary sediment, the result of the estimation method is usually inaccurate, and misdiagnosis can be caused in severe cases, so that the acquisition of a complete microscopic image of the stained urinary sediment sample is very important.
Currently, there have been some achievements in the research of automatic microscopy imaging systems based on the end of auto-focusing and microscopic image stitching: such as the Pannoramic series digital slice scanner from DHISTECH corporation of hungarian 3; hamamatsu series digital section scanner of Hamamatsu corporation of Japan; KF-PRO series digital slice scanner of the national Jiangfeng company, etc. In comparison, the research in the relevant foreign fields is earlier, and the currently researched and developed equipment is higher in accuracy and higher in stability, but is relatively expensive; domestic equipment has technical defects, and some expansibility functions are not realized during design: for example, no automatic focusing is performed during moving, the image splicing success rate is not high, and the method cannot be applied to special splicing scenes and the like.
Disclosure of Invention
The present invention is made to solve the above problems, and an object of the present invention is to provide a full-scan microscopic image stitching method based on peak search and gray template registration.
The invention provides a full-scanning microscopic image splicing method based on peak value search and gray template registration, which is characterized by comprising the following steps of: s1, shooting to obtain an original image and automatically focusing the original image to obtain a focused image; s2, splicing the multiple focusing graphs to obtain a fusion graph; wherein, S1 includes the following steps: s1.1, shooting an image to obtain an original image, and entering S1.2; s1.2, graying the original image to generate a grayscale image and a grayscale histogram, and entering S1.3; s1.3, extracting an image from the gray-scale image according to a focusing region selection strategy to obtain a focusing image, and entering S1.4; s1.4, calculating the definition of a focusing image by using an evaluation function, and entering S1.5; s1.5, judging whether the definition of the focusing image is greater than a threshold value, if so, entering the step S1.6, otherwise, entering the step S1.7; s1.6, adjusting an image shooting device according to a peak value search algorithm, and entering S1.1; s1.7, saving the focusing diagram and entering S2; s2 includes the steps of: s2.1, preprocessing the focusing images to be spliced respectively to obtain preprocessed images, and entering S2.2; s2.2, matching the overlapping area of the preprocessing image to perform image registration to obtain an optimal matching point, and entering S2.3, wherein the image registration is performed by a template registration algorithm based on gray level; s2.3, aligning the preprocessed graph according to the optimal matching point, and entering S2.4; s2.4, fusing the preprocessing graphs to obtain a fused graph, and entering S2.5; and S2.5, saving the fusion map.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the focus area selection strategy is a discontinuous focus area selection strategy based on a gray histogram, and the algorithm flow of the discontinuous focus area selection strategy based on the gray histogram comprises the following steps: and finding out the gray level M corresponding to the wave crest in the gray level histogram, setting a threshold value K, scanning the gray level image, and extracting the region except the background gray level, wherein the background gray level range is (M-K, M + K).
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: wherein the evaluation function is a Tenegrad gradient evaluation function, and the Tenegrad gradient evaluation function is shown as the following formula:
Figure BDA0002265545100000031
in the formula, F is definition, G (x, y) represents gradient amplitude, M and N represent pixel points, and T represents the number of gradients exceeding a threshold value.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the peak value searching algorithm is a hill climbing algorithm gradually approaching to a peak value, and the hill climbing algorithm gradually approaching to the peak value comprises the following steps: step 1, initializing a moving step length L according to the initial definition of an image, wherein the direction is positive, and entering step 2; step 2, moving once according to the moving step length and the moving direction, collecting an image, calculating the secondary definition, and entering step 3; step 3, judging whether the secondary definition is greater than the initial definition, if so, entering step 2, otherwise, entering step 4; and 4, reducing the moving step length, judging whether the step length is larger than the equipment precision, changing the moving direction when the step length is judged to be larger than the equipment precision, and entering the step 2, otherwise, ending the algorithm.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the method for preprocessing the image to be spliced comprises the following steps of: step 1, graying an image to be spliced according to an empirical weight ratio to obtain a primary preprocessed image, and entering step 2; and 2, denoising the preliminary preprocessing image by using median filtering to obtain a preprocessing image.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the template registration algorithm based on the gray level comprises the following procedures: step 1, selecting any one of two pre-processing images to be registered to extract a matching template, and taking the selected pre-processing image as a template picture, taking the other pre-processing image to be registered as a search picture, and entering step 2; step 2, obtaining a search image comparison area according to an interlaced search strategy, and entering step 3; step 3, calculating the similarity between the template graph and the search graph, and entering step 4; step 4, judging whether the similarity is greater than a set threshold value, if so, entering step 5, otherwise, returning to step 2; step 5, storing the coordinate points and the similarity information of the comparison area, and entering step 6; step 6, judging whether the comparison area is searched completely, if so, entering step 7, otherwise, returning to step 2; and 7, determining the point with the highest similarity as the best matching point.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the method for extracting the template comprises the following steps: step 1, searching and calculating the variance of a gray level histogram in a template area, and entering step 2; step 2, judging whether the variance of the gray level histogram is larger than the current maximum variance of the gray level histogram, if so, entering step 3, otherwise, returning to step 1; step 3, storing the variance and coordinate information of the template area, and entering step 4; and 4, judging whether the comparison area is searched completely, if so, determining the area with the maximum variance of the current gray level histogram as a template area, and ending the process, otherwise, returning to the step 1.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: the point (i, j) in the search graph is taken as the top left vertex, the square image with the side length of n pixels is taken as the search subgraph, and the formula for calculating the similarity between the search subgraph and the template graph is as follows:
Figure BDA0002265545100000051
wherein R (i, j) is the similarity, Sij(x, y) represents the gray value of the search subgraph at the (x, y) point,
Figure BDA0002265545100000052
represents the average gray value of the search subgraph, T (x, y) represents the gray value of the template graph at the (x, y) point,
Figure BDA0002265545100000053
the mean gray value of the template map is represented.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: wherein the threshold in step 4 of the grayscale-based template registration algorithm is 0.6.
The full-scan microscopic image splicing method based on peak value search and gray template registration provided by the invention can also have the following characteristics: wherein, the preprocessing image fusion is carried out by adopting a weighted average fusion algorithm; the weighted average fusion algorithm has the following calculation formula:
Vdst=αiVa+(1-αi)Vb
Figure BDA0002265545100000054
in the formula, VdstPixel value, V, representing the fused imagea、VbRepresenting the pixel values of the two images before fusion, αiThe abscissa of the pixel point in the fusion zone coordinate system is represented, and w represents the width of the fusion zone.
Action and Effect of the invention
According to the full-scanning microscopic image splicing method based on peak value search and gray template registration, the invention provides a method for extracting the area mainly acted by the evaluation function through a discontinuous focusing area selection method based on a gray histogram, then the definition is calculated through an improved Tenegrad gradient evaluation function, and finally the optimal focusing position is gradually obtained by using an improved hill climbing algorithm.
According to the full-scanning microscopic image splicing method based on peak value search and gray template registration, the invention provides a method for preprocessing a dyed urinary sediment microscopic image through graying and filtering operations to obtain a smooth gray image with a small calculated amount, then uses an improved template registration algorithm based on gray values to register adjacent images, and finally uses an improved fusion method based on variable weights to fuse the overlapped areas of the two images, so that the splicing problem of the urinary sediment microscopic image is solved, and the image splicing time is reduced.
Drawings
Fig. 1 is a flowchart of S1 capturing an original image and automatically focusing the original image in an embodiment of the present invention;
FIG. 2 is a graph of sharpness evaluation for a hill-climbing search in an embodiment of the present invention;
FIG. 3 is a flowchart of S2 merging multiple focus maps into a merged map according to an embodiment of the present invention;
FIG. 4 is an original drawing of a urinary sediment microscopic image according to an embodiment of the present invention;
FIG. 5(a) is a gray scale view of the red component of the urinary sediment microscopic image in the example of the present invention;
FIG. 5(b) is a gray scale diagram of the green component of the urinary sediment microscopic image in the example of the present invention;
FIG. 5(c) is a blue component grayscale image of a urinary sediment microscopic image in an embodiment of the present invention;
FIGS. 6(a) - (b) are two different weighted mean gray scale images of urinary sediment microscopy images in an example of the invention;
FIG. 7 is a flow chart of a grayscale-based template registration algorithm in an embodiment of the invention;
FIG. 8 is a flow diagram of template extraction in an embodiment of the present invention;
FIG. 9 is a fused graph of unweighted fusion in an embodiment of the present invention; and
FIG. 10 is a fusion graph of weighted fusion in an embodiment of the invention.
Detailed Description
In order to make the technical means, the creation features, the achievement purposes and the effects of the invention easy to understand, the invention is specifically described below by combining the embodiment and the attached drawings.
< example >
The full-scanning microscopic image splicing method based on peak value search and gray template registration comprises the following steps:
s1, shooting to obtain an original image and automatically focusing the original image to obtain a focused image;
and S2, splicing the multiple focusing images to obtain a fusion image.
Fig. 1 is a flow chart of capturing an original image and autofocusing the original image in an embodiment of the present invention.
As shown in fig. 1, the step S1 of capturing the original image and automatically focusing the original image includes the following steps:
s1.1, shooting an image to obtain an original image, and entering S1.2;
s1.2, graying the original image to generate a grayscale image and a grayscale histogram, and entering S1.3;
s1.3, extracting an image from the gray-scale image according to a focusing region selection strategy to obtain a focusing image, and entering S1.4;
in this step, the focus region selection strategy is a discontinuous focus region selection strategy based on a gray histogram,
the algorithm flow of the discontinuous focusing region selection strategy based on the gray histogram is as follows:
s1.3.1, finding out the gray level M corresponding to the peak in the gray histogram, setting a threshold value K, and scanning the gray map to extract the region outside the background gray level, wherein the background gray level range is (M-K, M + K).
S1.4, calculating the definition of the focusing image by using an evaluation function, and entering S1.5;
in this step, the evaluation function may be selected from any one of a Tenegrad gradient evaluation function, a Laplace evaluation function, or a variance evaluation function, and in this embodiment, the Tenegrad gradient evaluation function is selected as the evaluation function.
Specifically, the Tenegrad gradient evaluation function used in the present embodiment is the following formula:
Figure BDA0002265545100000081
in the formula, F is definition, G (x, y) represents gradient amplitude, M and N represent pixel points, and T represents the number of gradients exceeding a threshold value.
S1.5, judging whether the definition of the focusing image is greater than a threshold value (equipment precision), if so, entering the step S1.6, otherwise, entering the step S1.7;
in this embodiment, the threshold is the autofocus accuracy of the microscope.
S1.6, adjusting the Z axis of the microscope according to a peak search algorithm, and entering S1.1;
in the embodiment, the peak search algorithm is a hill-climbing algorithm which gradually approaches the peak value,
the hill climbing algorithm for gradually approaching the peak value comprises the following steps:
s1.6.1, initializing a moving step length L according to the initial definition of the image, wherein the direction is positive, and entering S1.6.2;
s1.6.2, collecting images according to the movement of the camera once according to the movement step length and the direction, calculating the secondary definition, and entering S1.6.3;
s1.6.3, judging whether the secondary definition is larger than the primary definition, if so, entering the step 2, otherwise, entering S1.6.4;
s1.6.4, reducing the step length of the movement, judging whether the step length is larger than the precision of the equipment, if so, changing the direction of the movement and entering S1.6.2, otherwise, ending the algorithm.
In the present embodiment, the calculation formulas for calculating the initial sharpness and the secondary sharpness are the same as in S1.4.
Fig. 2 is a graph of sharpness evaluation of hill-climbing search in an embodiment of the present invention.
As shown in fig. 2, the curve is not rapidly increased since it is in a completely defocused state at first; then the image is gradually clear, and the curve is greatly increased; then, the definition is slightly reduced because the searched distance just crosses the peak point, and the searching step length is adjusted at the moment, so that the result of the subsequent gradual approaching of the peak value is obtained.
S1.7, saving the focusing diagram and entering S2.
Fig. 3 is a flowchart of S2 splicing a plurality of the focus maps into a fusion map in the embodiment of the present invention.
As shown in fig. 3, S2, the process of splicing the plurality of focus maps to obtain a fusion map is as follows:
s2.1, preprocessing the focusing images to be spliced respectively to obtain preprocessed images, and entering S2.2;
the method for preprocessing the image to be spliced comprises the following steps of:
s2.1.1, graying the image to be spliced according to the empirical weight ratio to obtain a primary preprocessed image, and entering S2.1.2;
fig. 4 is an original drawing of a urinary sediment microscopic image in an embodiment of the present invention. Fig. 5(a) is a grayscale image of the red component of the urinary sediment microscopic image in the example of the present invention. FIG. 5(b) is a gray scale diagram of the green component of the urinary sediment microscopic image in the example of the present invention. FIG. 5(c) is a blue component gray scale of a urinary sediment microscopic image in an embodiment of the present invention. FIGS. 6(a) - (b) are different weighted mean gray scale images of two urinary sediment microscopic images in the example of the present invention.
In FIGS. 4-6, the left side of all images is the stained urinary sediment microscope image acquired under the objective lens of 10 times, and the right side is the image acquired under the objective lens of 40 times.
As shown in FIG. 4, the staining reagent has lighter color and sparsely distributed cells, so that the contrast of cell outlines in the stained urinary sediment microscopic image is not too high, the image information is not large, and the graying result is to retain the information to the maximum extent.
As shown in fig. 5(a) - (c), fig. 5(a) is a gray scale image processed by red component (α ═ 1, β ═ 0, and γ ═ 0), which is blurred compared with the original image, but it is found by careful observation that most of the details of the original image are retained, which is not good gray scale transformation in terms of human vision, and may increase difficulty in subsequent image registration, fig. 5(b) is a gray scale image processed by green component (α ═ 0, β ═ 1, and γ ═ 0), and many of the details in the image are retained, and it is difficult to successfully perform image registration if the cell nuclei are not present in the region, which is not clear enough, but is more obvious in the 40-fold image, while in the subsequent registration process, only the boundary region may be selected as the region of interest, and if there is no nuclei in this region, there is effective information, it is difficult to perform image registration, fig. 5(c) is blue component (α ═ 0, β ═ 0, and γ ═ 1, which is favorable for the comparison of the cell nuclei with the surrounding region, and the comparison of the image is improved.
In this embodiment, empirical weight ratio graying is used, where α is 0.193-0.285, β is 0.203-0.287, γ is 0.512-0.520, and α + β + γ is 1.
As shown in fig. 6(a) - (b), the empirical weight ratio of α of 0.285, β of 0.203, γ of 0.512, the empirical weight ratio of α of 0.193, β of 0.287, and γ of 0.520 in fig. 6(a) results in not losing too much detail in the original image, and the processed result is more clear, i.e., more distinct in contrast, and the processed result is more comprehensive in detail depiction, which can be reflected by a cell group in the lower left corner of the left picture, and the processed result can clearly separate the cell nuclei, compared to the processing with the blue component.
S2.1.2, denoising the preliminary preprocessing image by using median filtering to obtain a preprocessing image.
S2.2, matching the overlapping area of the preprocessing image to carry out image registration to obtain the best matching point, entering S2.3,
image registration is performed by a grayscale-based template registration algorithm,
fig. 7 is a flow chart of a grayscale-based template registration algorithm in an embodiment of the invention.
As shown in fig. 7, the grayscale-based template registration algorithm includes the following processes:
s2.2.1, selecting any one of the two pre-processed images to be registered to extract a matching template, and calling the template as a template map, and taking the other pre-processed image to be registered as a search map, and entering S2.2.2;
FIG. 8 is a flow diagram of template extraction in an embodiment of the invention.
As shown in fig. 8, the method for extracting the template comprises the following steps:
s2.2.1.1, searching and calculating the variance of the gray histogram in the template area, and entering S2.2.1.2;
the size of the template is an important parameter in the template-based registration algorithm, and the larger the template is, the more information is contained, and the more accurate the registration is, in this embodiment, the template with the size of 80 pixels × 80 pixels is adopted. The search range is 300 pixels.
S2.2.1.2, judging whether the gray histogram variance is larger than the current maximum gray histogram variance, if so, entering S2.2.1.3, otherwise, returning to S2.2.1.1;
in the present embodiment, the calculation formula of the gray histogram variance is as follows:
Figure BDA0002265545100000121
wherein δ represents a standard deviation, i represents a gray scale value,
Figure BDA0002265545100000122
denotes the mean value, PiIndicating the frequency of occurrence of the corresponding gray scale.
S2.2.1.3, storing the variance and coordinate information of the template area, entering S2.2.1.4;
s2.2.1.4, judging whether the comparison area is searched, if yes, determining the area with the largest variance of the current gray level histogram as the template area, and ending the process, otherwise, returning to S2.2.1.1.
S2.2.2, obtaining a comparison area of the search map according to an interlaced search strategy, and entering S2.2.3;
s2.2.3, calculating the similarity between the template graph and the search graph, and entering S2.2.4;
and taking the midpoint (i, j) of the search graph as the top left vertex and the square image with the side length of n pixels as a search subgraph, and calculating the similarity between the search subgraph and the template graph according to the following formula:
Figure BDA0002265545100000131
wherein R (i, j) is the similarity, Sij(x, y) represents the gray value of the search subgraph at the (x, y) point,
Figure BDA0002265545100000132
representing average gray scale of search subgraphA value, T (x, y) represents the gray value of the template map at the (x, y) point,
Figure BDA0002265545100000133
representing the mean gray value of the template map.
In the present embodiment, the search subgraph is a square image with a side length of 80 pixels, that is, n is 80.
S2.2.4, judging whether the similarity is larger than a set threshold value, if so, entering S2.2.5, otherwise, returning to S2.2.2;
in the present embodiment, the threshold value is determined to be 0.6 based on an empirical value.
S2.2.5, saving the coordinate point and similarity information of the comparison area, entering S2.2.6;
s2.2.6, judging whether the comparison area is searched, if yes, entering S2.2.7, otherwise returning to S2.2.2;
s2.2.7, determining the point with the highest similarity as the best matching point.
S2.3, aligning the preprocessed graph according to the optimal matching point, and entering S2.4;
s2.4, fusing the preprocessing graphs to obtain a fused graph, and entering S2.5;
in this embodiment, the preprocessing graph fusion is performed by using a weighted average fusion algorithm;
the weighted average fusion algorithm has the following calculation formula:
Vdst=αiVa+(1-αi)Vb
Figure BDA0002265545100000134
in the formula, VdstPixel value, V, representing the fused imagea、VbRepresenting the pixel values of the two images before fusion, αiThe abscissa of the pixel point in the fusion zone coordinate system is represented, and w represents the width of the fusion zone.
FIG. 9 is a fusion graph of unweighted fusion in an embodiment of the invention. FIG. 10 is a fusion graph of weighted fusion in an embodiment of the invention.
As shown in fig. 9-10, when the fusion algorithm is not used, the image has a relatively obvious splicing trace, and after the gradual-change weighted fusion algorithm is used for processing, the information of the image basically has no change, and the splicing trace also disappears.
And S2.5, saving the fusion map.
Effects and effects of the embodiments
According to the full-scanning microscopic image splicing method based on peak value search and gray template registration, the area mainly acted by the evaluation function is extracted through a discontinuous focusing area selection method based on a gray histogram, the definition is calculated through an improved Tenegrad gradient evaluation function, and finally the optimal focusing position is gradually obtained through an improved hill climbing algorithm.
According to the full-scanning microscopic image splicing method based on peak value search and gray template registration, the method comprises the steps of preprocessing a dyed urinary sediment microscopic image through graying and filtering operations to obtain a smooth gray image with a small calculated amount, registering adjacent images through an improved gray value-based template registration algorithm, and finally fusing the overlapped areas of the two images through an improved variable weight-based fusion method.
The above embodiments are preferred examples of the present invention, and are not intended to limit the scope of the present invention.

Claims (10)

1. The full-scanning microscopic image splicing method based on peak value search and gray template registration is characterized by comprising the following steps of:
s1, shooting to obtain an original image and automatically focusing the original image to obtain a focused image;
s2, splicing the multiple focusing images to obtain a fusion image;
wherein, S1 includes the following steps:
s1.1, shooting an image to obtain the original image, and entering S1.2;
s1.2, graying the original image to generate a grayscale image and a grayscale histogram, and entering S1.3;
s1.3, extracting an image from the gray-scale image according to a focusing region selection strategy to obtain a focusing image, and entering S1.4;
s1.4, calculating the definition of the focusing image by using an evaluation function, and entering S1.5;
s1.5, judging whether the definition of the focusing image is greater than a threshold value, if so, entering a step S1.6, otherwise, entering a step S1.7;
s1.6, adjusting an image shooting device according to a peak value search algorithm, and entering S1.1;
s1.7, saving the focusing diagram, and entering S2;
s2 includes the steps of:
s2.1, preprocessing the focusing images to be spliced respectively to obtain preprocessed images, and entering S2.2;
s2.2, matching the overlapping area of the preprocessing image to carry out image registration to obtain the best matching point, entering S2.3,
the image registration is performed by a grayscale-based template registration algorithm;
s2.3, aligning the preprocessing graph according to the optimal matching point, and entering S2.4;
s2.4, fusing the preprocessing graphs to obtain a fused graph, and entering S2.5;
and S2.5, saving the fusion map.
2. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
wherein the focus region selection strategy is a non-sequential focus region selection strategy based on a gray histogram,
the algorithm flow of the discontinuous focusing region selection strategy based on the gray histogram comprises the following steps:
and finding out the gray level M corresponding to the peak in the gray level histogram, setting a threshold value K, scanning the gray level image, and extracting the region except the background gray level, wherein the background gray level range is (M-K, M + K).
3. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
wherein the evaluation function is a Tenegrad gradient evaluation function,
the Tenegrad gradient evaluation function is shown as follows:
Figure FDA0002265545090000021
in the formula, F is definition, G (x, y) represents gradient amplitude, M and N represent pixel points, and T represents the number of gradients exceeding a threshold value.
4. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
wherein the peak value searching algorithm is a hill climbing algorithm which gradually approaches the peak value,
the hill climbing algorithm for gradually approaching the peak value comprises the following steps:
step 1, initializing a moving step length L according to the initial definition of an image, wherein the direction is positive, and entering step 2;
step 2, moving once according to the moving step length and the moving direction, collecting an image, calculating the secondary definition, and entering step 3;
step 3, judging whether the secondary definition is greater than the initial definition, if so, entering step 2, otherwise, entering step 4;
and 4, reducing the moving step length, judging whether the step length is larger than the equipment precision, changing the moving direction when the step length is judged to be larger than the equipment precision, and entering the step 2, otherwise, ending the algorithm.
5. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
the method for preprocessing the image to be spliced comprises the following steps of:
step 1, graying the image to be spliced according to an empirical weight ratio to obtain a primary preprocessed image, and entering step 2;
and 2, denoising the preliminary preprocessing image by using median filtering to obtain a preprocessing image.
6. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
wherein, the template registration algorithm based on gray level comprises the following procedures:
step 1, selecting any one of two pre-processing images to be registered to extract a matching template, and taking the selected pre-processing image as a template picture, taking the other pre-processing image to be registered as a search picture, and entering step 2;
step 2, obtaining a comparison area of a search map according to an interlaced search strategy, and entering step 3;
step 3, calculating the similarity between the template graph and the search graph, and entering step 4;
step 4, judging whether the similarity is greater than a set threshold value, if so, entering step 5, otherwise, returning to step 2;
step 5, storing the coordinate points and the similarity information of the comparison area, and entering step 6;
step 6, judging whether the comparison area is searched completely, if so, entering step 7, otherwise, returning to step 2;
and 7, determining the point with the highest similarity as the best matching point.
7. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 6, characterized in that:
the method for extracting the template comprises the following steps:
step 1, searching and calculating the variance of a gray level histogram in a template area, and entering step 2;
step 2, judging whether the variance of the gray level histogram is larger than the current maximum variance of the gray level histogram, if so, entering step 3, otherwise, returning to step 1;
step 3, storing the variance and coordinate information of the template area, and entering step 4;
and 4, judging whether the comparison area is searched completely, if so, determining the area with the maximum variance of the current gray level histogram as a template area, and ending the process, otherwise, returning to the step 1.
8. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 6, characterized in that:
taking the midpoint (i, j) of the search graph as the top left vertex, taking the square image with the side length of n pixels as a search subgraph, and calculating the similarity between the search subgraph and the template graph according to the following formula:
Figure FDA0002265545090000051
wherein R (i, j) is the similarity, Sij(x, y) represents the gray value of the search subgraph at the (x, y) point,
Figure FDA0002265545090000052
representing the average gray value of the search subgraph, T (x, y) representing the gray value of the template graph at the (x, y) point,
Figure FDA0002265545090000053
representing the mean gray value of the template map.
9. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 6, characterized in that:
wherein the threshold is 0.6.
10. The full-scan microscopic image stitching method based on peak search and gray-scale template registration according to claim 1, characterized in that:
wherein, the preprocessing image fusion is carried out by adopting a weighted average fusion algorithm;
the weighted average fusion algorithm has the following calculation formula:
Vdst=αiVa+(1-αi)Vb
Figure FDA0002265545090000061
in the formula, VdstPixel value, V, representing the fused imagea、VbRepresenting the pixel values of the two images before fusion, αiThe abscissa of the pixel point in the fusion zone coordinate system is represented, and w represents the width of the fusion zone.
CN201911086401.2A 2019-11-08 2019-11-08 Full-scanning microscopic image splicing method based on peak value search and gray template registration Pending CN111105346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911086401.2A CN111105346A (en) 2019-11-08 2019-11-08 Full-scanning microscopic image splicing method based on peak value search and gray template registration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911086401.2A CN111105346A (en) 2019-11-08 2019-11-08 Full-scanning microscopic image splicing method based on peak value search and gray template registration

Publications (1)

Publication Number Publication Date
CN111105346A true CN111105346A (en) 2020-05-05

Family

ID=70420625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911086401.2A Pending CN111105346A (en) 2019-11-08 2019-11-08 Full-scanning microscopic image splicing method based on peak value search and gray template registration

Country Status (1)

Country Link
CN (1) CN111105346A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040136A (en) * 2020-09-23 2020-12-04 重庆邮电大学 Automatic focusing optimization method based on clear domain and scotopic vision
CN112241940A (en) * 2020-09-28 2021-01-19 北京科技大学 Method and device for fusing multiple multi-focus images
CN113344958A (en) * 2021-08-02 2021-09-03 长沙蓝芯智能科技有限责任公司 Microscopic imaging scanning method and scanning system
CN114119443A (en) * 2021-11-28 2022-03-01 特斯联科技集团有限公司 Image fusion system based on multispectral camera
CN115049714A (en) * 2022-05-17 2022-09-13 长沙览思智能科技有限公司 Method and system for registering in-situ hybridization fluorescence microscopic panoramic image and constructing microenvironment
CN116681633A (en) * 2023-06-06 2023-09-01 国网上海市电力公司 Multi-band imaging and fusion method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873142A (en) * 2017-03-15 2017-06-20 北方工业大学 High-quality image acquisition device and method of tubercle bacillus detector
CN107093166A (en) * 2017-04-01 2017-08-25 华东师范大学 The seamless joint method of low coincidence factor micro-image
CN110232673A (en) * 2019-05-30 2019-09-13 电子科技大学 A kind of quick steady image split-joint method based on medical micro-imaging

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873142A (en) * 2017-03-15 2017-06-20 北方工业大学 High-quality image acquisition device and method of tubercle bacillus detector
CN107093166A (en) * 2017-04-01 2017-08-25 华东师范大学 The seamless joint method of low coincidence factor micro-image
CN110232673A (en) * 2019-05-30 2019-09-13 电子科技大学 A kind of quick steady image split-joint method based on medical micro-imaging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LISHENG WANG,ETC: "Study on Microscopic Image Stitching Mehtod of Dyeing Urine Sediment", 《CSAE 2019》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040136A (en) * 2020-09-23 2020-12-04 重庆邮电大学 Automatic focusing optimization method based on clear domain and scotopic vision
CN112040136B (en) * 2020-09-23 2021-08-10 重庆邮电大学 Automatic focusing optimization method based on clear domain and scotopic vision
CN112241940A (en) * 2020-09-28 2021-01-19 北京科技大学 Method and device for fusing multiple multi-focus images
CN112241940B (en) * 2020-09-28 2023-12-19 北京科技大学 Fusion method and device for multiple multi-focus images
CN113344958A (en) * 2021-08-02 2021-09-03 长沙蓝芯智能科技有限责任公司 Microscopic imaging scanning method and scanning system
CN114119443A (en) * 2021-11-28 2022-03-01 特斯联科技集团有限公司 Image fusion system based on multispectral camera
CN114119443B (en) * 2021-11-28 2022-07-01 特斯联科技集团有限公司 Image fusion system based on multispectral camera
CN115049714A (en) * 2022-05-17 2022-09-13 长沙览思智能科技有限公司 Method and system for registering in-situ hybridization fluorescence microscopic panoramic image and constructing microenvironment
CN116681633A (en) * 2023-06-06 2023-09-01 国网上海市电力公司 Multi-band imaging and fusion method
CN116681633B (en) * 2023-06-06 2024-04-12 国网上海市电力公司 Multi-band imaging and fusion method

Similar Documents

Publication Publication Date Title
CN111105346A (en) Full-scanning microscopic image splicing method based on peak value search and gray template registration
EP2889619B1 (en) Image processing device, image processing method, computer-readable medium, and image processing system
CN107093166B (en) The seamless joint method of low coincidence factor micro-image
US20120236120A1 (en) Automatic stereological analysis of biological tissue including section thickness determination
US7772535B2 (en) Method of capturing a focused image via an objective of a microscopy device
CN111626933B (en) Accurate and rapid microscopic image stitching method and system
CN105652429B (en) A kind of microscopic cell glass slide scanning auto focusing method based on machine learning
CN109361849B (en) Automatic focusing method
CN111462075B (en) Rapid refocusing method and system for full-slice digital pathological image fuzzy region
CN110473189A (en) A kind of definition of text images judgment method and system
CN113344958B (en) Microscopic imaging scanning method and scanning system
CN113781455B (en) Cervical cell image anomaly detection method, device, equipment and medium
US6681035B1 (en) Method of unsupervised cell nuclei segmentation
CN110987886A (en) Full-automatic microscopic image fluorescence scanning system
CN112037185A (en) Chromosome split phase image screening method and device and terminal equipment
CN115047610B (en) Chromosome karyotype analysis device and method for automatically fitting microscopic focusing plane
CN111179170A (en) Rapid panoramic stitching method for microscopic blood cell images
CN113538545B (en) Monocular depth estimation method based on electro-hydraulic adjustable-focus lens and corresponding camera and storage medium
JP3860540B2 (en) Entropy filter and region extraction method using the filter
CN116489513A (en) Automatic focusing method and device, electronic equipment and storage medium
CN114384681A (en) Rapid and accurate automatic focusing method and system for microscope, computer equipment and medium
Shajkofci et al. DeepFocus: a few-shot microscope slide auto-focus using a sample invariant CNN-based sharpness function
CN110097062A (en) A kind of pointer recognition methods using pointer central point
Tian et al. Computer Controlled Microscope Autofocus and Image Real-Time Fusion Technology.
CN117452619B (en) Sparse target microscopic imaging automatic focusing method, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200505

WD01 Invention patent application deemed withdrawn after publication