An algal microorganism multi-layer scanning correlation image fusion method
By processing the HSV color space and combining the correlation between adjacent time points, the sharpness and correlation problems in the existing technology of algal microorganism image fusion are solved, and high-quality image fusion effect is achieved.
Patent Information
- Application Number
- CN202311014429.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-08-14
AI Technical Summary
Existing technologies fail to effectively consider the correlation between images of the same depth of field at different times when fusing images of algae and microorganisms in water, resulting in significant deviations in the fused images. Furthermore, non-algae microorganisms and impurities in the water affect the clarity.
A correlation-based image fusion method is adopted. Multiple depth images are converted to the HSV color space, the H channel is extracted, and block median filtering and normalization are performed. The weights of the depth images are calculated, and the correlation matrix is constructed by combining the correlation of adjacent time points. Finally, they are fused into a clear image.
It effectively filters out interference from non-algae objects, reduces noise impact, improves image clarity, reduces camera shake and hardware shooting interference, enhances algae and microbial characteristic information, and simplifies identification difficulty.
Smart Images

Figure CN117197007B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image fusion processing, and in particular to a correlation image fusion method for multi-layer scanning of algae microorganisms. BACKGROUND
[0002] To obtain images of algae microorganisms in water, a high-power microscope is needed, but the depth of field of the camera provided with the microscope is very small, and only part of the region of the algae microorganisms can be photographed in one image, so the object under the same field of view needs to be scanned in multiple layers to obtain images of different depths of field, and then the images of different depths of field are fused to obtain a clear image. However, due to the presence of non-algal microorganisms and impurities in water, the clarity of the image is affected, and users do not want these objects to appear in the image, because they will bring visual interference to the identification of normal algae. The current image fusion methods mainly include: 1. calculating the importance of images of different depths of field, sorting the images according to the sum of the gradients of the images of different depths of field, and selecting the first few images after sorting to add and fuse; 2. calculating the importance of each pixel position of the image, and the greater the difference between the pixel value and the background value, the more important the pixel, and the pixel value with a large difference is taken as the pixel value of the fused image. However, in practice, the images of the same depth of field at the same position usually have similar weights in the images taken at different times, and the above methods do not consider the correlation between the images of the same depth of field at different times, resulting in a large deviation in the fused image.
[0003] Therefore, it is necessary to provide a correlation-based image fusion algorithm that combines the correlation between images of the same depth of field at different times and the correlation between images of different depths of field to improve the fusion of images of different depths of field. SUMMARY
[0004] Therefore, the present application provides a correlation image fusion method for multi-layer scanning of algae microorganisms, which fully considers the correlation between images of different depths of field.
[0005] The technical solution of the present application is based on the following two ideas:
[0006] 1. For multiple images of different depths of field taken at the same time, the correlation between different depths of field at the same time needs to be considered during fusion.
[0007] 2. For adjacent times, the same depth of field, the correlation between the images taken at adjacent times needs to be considered during fusion.
[0008] The technical solution of the present application is implemented as follows:
[0009] The present application provides a correlation image fusion method for multi-layer scanning of algae microorganisms, comprising the following steps:
[0010] S1: Obtain the mask image of each depth of field image from multiple depth of field images;
[0011] S2: Divide the mask image of the obtained depth of field image into blocks to obtain a processed mask image under the current depth of field;
[0012] S3: Calculate the weight of each depth of field image at time t;
[0013] S4: Calculate the correlation between adjacent moments;
[0014] S5: Fusion of correlations between images at different times and depths of field;
[0015] S6: Merge multiple images with different depths of field into one image.
[0016] Based on the above technical solution, preferably, the step S1 of obtaining a mask image of each depth of field picture from a plurality of different depth of field pictures is to transform the depth of field picture from the RGB color space to the HSV color space and extract the image component of the H channel, and the formula for the space transformation is as follows: is the nth picture in the RGB color space at time t, 0<n≤N, N is the number of pictures taken at time t; for Corresponding to the picture in HSV color space; extract The process of the H channel is in is the H channel of the nth picture in the HSV color space at time t, is the S channel of the nth picture in the HSV color space at time t, It is the V channel of the nth image in the HSV color space at time t.
[0017] Preferably, the mask image of the depth of field picture obtained in step S2 is divided into blocks, and the pixel values of the block areas are subjected to median filtering and normalization processing, which is to convert the H channel of the nth picture in the HSV color space at time t into The corresponding image is divided into several rectangular areas of equal length and width. The pixel values in each rectangular area are sorted and the median value is taken. The pixel values are normalized to obtain the processed mask image under the current depth of field. Let the processing process be m×m is the pixel size of the rectangular area.
[0018] More preferably, the value of m is 2 k , k is not less than 2.
[0019] Further preferably, the weight of each depth image at time t is calculated in step S3 to determine the H channel of the mask image of the depth image. the number of targets in the corresponding image and target details, the number of targets in the corresponding image is to set a pixel value threshold, find the part meeting the pixel value threshold, and find the connected domain to determine the number of targets; let the mask image after the median filtering and normalization processing target details in the mask image is expressed as the weight of the nth depth image at time t is expressed as
[0020] Further preferably, the set pixel value threshold interval is 50-80.
[0021] Further preferably, the correlation of the adjacent time in step S4 is calculated according to the weight of the nth depth image at time t define the correlation vector at time t is the correlation vector at time t-1 is then the correlation g of time t and t-1 t is
[0022] More preferably, the correlation of the pictures of different times and different depths in step S5 is fused to construct a new correlation matrix let wherein is the processed mask image under the current depth at time t-1.
[0023] Further preferably, the multiple pictures of different depths are fused into one picture in step S6, and the fused picture is X t , there are
[0024] The algal microbial multi-layer scanning correlation image fusion method provided by the application has the following beneficial effects relative to the prior art:
[0025] (1) According to the characteristics of algal imaging, the mask image is extracted in the HSV color space, which can effectively filter the influence of non-algal objects.
[0026] (2) The mask image is processed by median filtering to prevent local weight from suddenly changing and further eliminate the interference of noise;
[0027] (3) The pictures of different depths and adjacent times are connected through the correlation vector, which improves the shaking problem caused by simply using the depth picture, and also avoids the interference of picture overexposure caused by the camera hardware platform;
[0028] (4) Through weight calculation, the blurred depth of field images can be effectively filtered out, and the weight of the blurred depth of field images can be reduced, thereby improving the clarity of the fused image.
[0029] (5) The fused single picture makes the characteristic information of each object in the picture richer, reducing the difficulty for relevant staff to analyze and identify algae microorganisms. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 This is a flowchart of the steps of a correlation image fusion method for multi-layer scanning of algae and microorganisms according to the present invention;
[0032] Figure 2 Schematic diagram of extracting HSV color space and H channel in step S1 of a correlation image fusion method for multi-layer scanning of algae and microorganisms of the present invention;
[0033] Figure 3 This is a schematic diagram of step S2 of a correlation image fusion method for multi-layer scanning of algae and microorganisms of the present invention, in which the pixel values of the block area are subjected to median filtering and normalization processing;
[0034] Figure 4 Schematic diagram of searching for parts and connected domains that meet pixel value thresholds in step S3 of a correlation image fusion method for multi-layer scanning of algae and microorganisms according to the present invention;
[0035] Figure 5 The figure is a flow chart of a correlation image fusion method for multi-layer scanning of algae and microorganisms according to the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0037] like Figure 1 As shown, the present invention provides a correlation image fusion method for multi-layer scanning of algae microorganisms, comprising the following steps:
[0038] S1: obtaining mask images of each depth image from a plurality of different depth images;
[0039] The mask image is a means for extracting the region or process of interest in the depth image. Specifically, the depth image is converted from the RGB color space to the HSV color space, and the image component of the H channel is extracted. The formula for the spatial conversion is as follows: Let the nth image in the RGB color space at time t be denoted as, where 0 < n ≤ N, and N is the number of images taken at time t. The corresponding image in the HSV color space is extracted. The H channel of the image is extracted by the process wherein is the H channel of the nth image in the HSV color space at time t, is the S channel of the nth image in the HSV color space at time t, is the V channel of the nth image in the HSV color space at time t. The conversion process is shown in Figure 2 . Figure 2 The left image is the original depth image in the RGB color space, Figure 2 the middle image is the depth image converted to the HSV color space, Figure 2 and the right image is the H channel of the depth image, which can avoid the influence of non-algal objects.
[0040] The RGB color space uses a linear combination of three color components to represent color, but the RGB color space is a color space with poor uniformity and is not suitable for image processing. For this reason, the HSV color space is more commonly used in image processing. It is closer to human perception of color than the RGB color space, and intuitively provides the hue, saturation, and lightness of color, facilitating color contrast. The H channel represents the hue, the S channel represents the saturation, and the V channel represents the lightness.
[0041] S2: dividing the obtained mask image of the depth image into blocks, performing median filtering and normalization processing on the pixel values of the divided blocks to obtain a processed mask image under the current depth;
[0042] wherein the median filtering and normalization processing on the pixel values of the divided blocks is to perform median filtering and normalization processing on the H channel of the nth image in the HSV color space at time t The corresponding image is divided into a plurality of rectangular regions with equal length and width. The pixel values in each rectangular region are sorted and the middle value is taken, and the pixel values are normalized to obtain a processed mask image under the current depth Let the processing process be m x m is the pixel size of the rectangular region.
[0043] like Figure 3 As shown, the pixel values are sorted and the median value is taken, that is, in the process of median filtering, the value of m in this scheme is 2 k , k is not less than 2. As a preferred embodiment, k in the figure is set to 5, that is, m = 32. Median filtering can eliminate noise interference in the background of the depth of field image, ensure that adjacent areas have similar weights, prevent weight mutations, and reduce noise interference.
[0044] S3: Calculate the weight of each depth of field image at time t;
[0045] The specific content is: Determine the H channel of the mask image of the depth of field picture The number of targets in the corresponding image, and then confirm the target details, The number of targets in the corresponding image is determined by setting a pixel value threshold, finding the part that meets the pixel value threshold, and finding the connected domain. This process can be referred to Figure 4 , meaning there are two connected domains that meet the pixel value threshold range. In this solution, the pixel value threshold range can be set to 50-80, with a preferred lower limit of 60. This means the number of connected domains within the pixel value range of 60-80 is selected as the target number. A connected domain refers to an image region consisting of adjacent pixels with the same pixel value. Because the depth of field image is pre-normalized, finding connected domains becomes much simpler.
[0046] Furthermore, by further setting weights after median filtering, the interference of impurities on the image can be effectively filtered out; let the mask image after median filtering and normalization be Target details in Expressed as Then the weight of the nth depth of field image at time t is Expressed as
[0047] S4: Calculate the correlation between adjacent moments;
[0048] The specific content is based on the weight of the nth depth of field image at time t in the previous step Define the correlation vector at time t for The correlation vector at time t-1 corresponds to Then the correlation g between time t and time t-1 is t for The double vertical bars in the denominator represent the vector modulo operation.
[0049] S5: Fusion of correlations between images at different times and depths of field;
[0050] Step S5 is specifically constructing a new correlation matrix Let Wherein is the processed mask image under the current depth of field at the last time, i.e. at time t-1.
[0051] S6: fuse the pictures of multiple different depths of field into one picture;
[0052] The specific content is to make the fused picture X t , there is That is, the new fused picture is constructed and obtained from the weight of the depth of field image The newly constructed correlation matrix and the original picture in the RGB color space.
[0053] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A correlation image fusion method for multi-layer scanning of algal microorganisms, characterized by, The method comprises the following steps: S1: obtaining mask images of each depth image from multiple different depth images; S2: dividing the obtained mask images of the depth images into blocks, performing median filtering and normalization processing on pixel values of the divided blocks to obtain processed mask images under the current depth; S3: calculating the weight of each depth image at time t; The content of step S3 is: determining the H channel of the mask image of the depth of field picture The number of targets in the corresponding image and the details of the targets, The number of targets in the corresponding image is to set a pixel value threshold, find the part that meets the pixel value threshold, find the connected domain, and determine the number of targets; Let the pixel value of the block region pass through the mask image after the median filtering and normalization processing Target details in Indicated as The nth depth image of RGB color space at time t, 0 < 0 ≤ N, N is the number of pictures taken at time t, then the weight of the nth depth image at time t Indicated as S4: calculating the correlation between adjacent time points; The correlation of the adjacent time is calculated in step S4 according to the weight of the n-th depth image at time t The correlation vector at time t is defined The correlation vector at time t is defined The correlation vector at time t-1 is The correlation g of time t and time t-1 is t The correlation g of time t and time t-1 is S5: fuse the correlation of images at different times and different depths to construct a new correlation matrix S6: weight of the nth depth image at time t depth image of RGB color space at time t and new correlation matrix fuse multiple pictures of different depths into one picture.
2. The correlation image fusion method of multi-layer scanning of algal microorganisms according to claim 1, characterized in that, The mask image of each depth image obtained from the plurality of different depth images in step S1 is obtained by converting the depth image from an RGB color space to an HSV color space and extracting an image component of an H channel. The formula of the space conversion is as follows: For the picture in the HSV color space, the process of extracting the H channel of is wherein is the H channel of the nth picture in the HSV color space at time t, is the S channel of the nth picture in the HSV color space at time t, is the V channel of the nth picture in the HSV color space at time t.
3. The correlation image fusion method of multi-layer scanning of algal microorganisms according to claim 2, characterized in that, The mask image of the obtained depth of field picture is divided into blocks, and the pixel values of the divided blocks are subjected to median filtering and normalization processing, which is to take the median value of the H channel of the nth picture in the HSV color space at time t The corresponding image is divided into several rectangular regions with equal length and width, the pixel values in each rectangular region are sorted and the median value is taken, and the pixel values are normalized to obtain the processed mask image under the current depth of field Let the processing process be m x m is the pixel size of the rectangular region.
4. The correlation image fusion method of multi-layer scanning of algal microorganisms according to claim 3, characterized in that, Step S5 fuses the correlation of the pictures at different times and different depths to construct a new correlation matrix is the wherein is the processed mask image at the current depth at time t-1.
5. The correlation image fusion method of multi-layer scanning of algal microorganisms according to claim 4, characterized in that, The step S6 of fusing the pictures of different depths of field into one picture is to make the fused picture X t , there are
Citation Information
Patent Citations
Image analysis method and image analysis device
CN103189737A
Optical microscopic image multi-depth-of-field focus synthesis method and system and image processing method
CN114881907A