A dynamic block method for microscopic image processing

By employing a dynamic block-based approach and using differentiated cropping and mirror boundary filling techniques, the problems of edge artifacts and cumbersome operations in microscopic image processing are solved, achieving efficient video memory adaptation and image quality improvement.

CN122492728APending Publication Date: 2026-07-31NINGBO YONGXIN OPTICS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGBO YONGXIN OPTICS
Filing Date
2026-07-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing microscopic image processing techniques, the fixed-interval block method leads to image edge artifacts, unnatural block division, and cumbersome operation, making it difficult to meet the comprehensive requirements of video memory limitations, model input size, and imaging quality.

Method used

A dynamic block-segmentation method is adopted, which adapts to microscopic images of arbitrary resolution and aspect ratio by using differentiated cropping coordinate rules and mirror boundary filling. After processing block by block, layer fusion is performed to ensure the integrity and quality of image edges.

Benefits of technology

It effectively reduces graphics card memory requirements, is compatible with various deep learning tasks, improves image processing quality, avoids edge artifacts, and adapts to images of different resolutions without the need for manual adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492728A_ABST
    Figure CN122492728A_ABST
Patent Text Reader

Abstract

This invention relates to the field of microscopic image processing technology, and particularly to a dynamic segmentation method for microscopic image processing. The method includes: first, initializing a deep learning model and reading the original microscopic image; constructing a square base image and placing the original image at its upper left corner; then, iteratively calculating and correcting the segmentation parameters based on the model input size, preset boundaries, and a general fusion distance; next, cropping the segmented images according to their positions using differentiated coordinate rules; then, filling the segments with mirrored boundaries before feeding them into the model for processing; subsequently, converting parameters according to the model's front and back size ratios, performing layered fusion of the post-processed segments, cropping boundaries, and fusing overlapping areas to obtain a fused image; finally, adjusting brightness and cropping to the original size to output the final processed image. This invention effectively avoids edge artifacts and improves image processing quality and method versatility through differentiated cropping, mirrored boundary filling, and layered fusion mechanisms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microscopic image processing technology. In particular, it relates to a dynamic block-segmentation method for microscopic image processing. Background Technology

[0002] With the deep integration of microscopic observation technology and artificial intelligence technology, more and more microscopic image processing work relies on deep learning models. Microscopic images are generally characterized by high resolution and large pixel data volume. However, in actual deployment and operation, deep learning models are subject to the rigid limitations of graphics card memory capacity, making it impossible to directly perform overall computational processing on ultra-high resolution microscopic images. At the same time, mainstream deep learning models all have fixed standard input size requirements; the input image must strictly match the preset size, otherwise the model cannot perform inference operations normally.

[0003] To address the conflict between insufficient video memory and the processing of large-size images, existing technologies have developed image segmentation processing schemes. This involves cropping a large-resolution image into multiple smaller blocks, feeding each block sequentially into a deep learning model, and then fusing all the layers together to reconstruct the complete image. Currently, the most widely used method is fixed-interval segmentation. This method crops the original image equally according to a fixed step size. To meet the model's fixed input size requirements, when the original image's length and width are not divisible by the block size, the empty areas in the last row and column of the image need to be filled with black pixels to make up the size.

[0004] However, this traditional block-segmentation method has obvious drawbacks: First, after filling the image edge areas with black pixels, the deep learning model processing and subsequent stitching and fusion can easily produce obvious artifacts at the image edge positions, severely damaging the imaging quality of the microscopic image and affecting subsequent image analysis and observation. Second, the traditional fixed-interval block-segmentation strategy only provides a general block-segmentation idea, without differentiating the cropping rules for the first row / column, middle row / column, and last row / column, and it has not formed a complete and practical block coordinate calculation, boundary filling, and block fusion system. Pixel breaks and unnatural transitions are prone to occur at the layered fusion processing. Third, the existing block-segmentation scheme has weak versatility and cannot simultaneously meet the three major application requirements of memory limitations, fixed model input size, and no edge artifacts in imaging. To adapt to microscopic images of different resolutions, it is necessary to manually adjust the block parameters repeatedly, which is cumbersome. Summary of the Invention

[0005] To address the problem that existing image segmentation techniques cannot simultaneously meet the comprehensive requirements of limited video memory capacity, fixed model input size, and no edge artifacts in deep learning microscopic image processing scenarios, this invention provides solutions in the following aspects.

[0006] A dynamic block segmentation method for microscopic image processing includes: initializing a deep learning model and reading the original microscopic image to be processed; constructing a square base image based on the maximum side length of the original microscopic image, and copying the original microscopic image to the upper left corner region of the square base image; iteratively calculating the number of single-side blocks and the actual pixel size of a single block based on the standard input size of the deep learning model, a preset safety boundary, and a general fusion distance, and performing parity correction on the pixel size of the single block; and based on the positional differences of the first row / column, middle row / column, and last row / column of the blocks, using corresponding cropping coordinate rules to segment the image from the square base image. The base image is cropped into multiple block images; each block image is mirrored and its boundaries are filled to ensure that the size of each block image matches the input requirements of the deep learning model. The boundary-filled block images are then sequentially input into the deep learning model to obtain the corresponding post-processed block images; the size ratio of the mirrored boundary-filled block images and the post-processed block images is used to calculate the correlation parameters of each block, and the post-processed block images are subjected to layered fusion processing, the safe boundary region is cropped, and linear fusion is performed on the overlapping regions of the blocks to obtain a fused image; the brightness of the fused image is adaptively adjusted, and the final image is cropped according to the size of the original microscopic image.

[0007] Preferably, all pixels of the square base image are initially black. The square base image serves as a uniform computational canvas for carrying the original microscopic image with any aspect ratio. Except for the effective area corresponding to the original microscopic image, the remaining black areas in the square base image do not participate in effective imaging and feature calculation.

[0008] Preferably, the method for dynamically calculating the number of blocks is as follows: The number of single-sided blocks is initialized to 1, and the number of single-sided blocks is accumulated one by one until the product of the number of single-sided blocks and the theoretical size of a single block is greater than or equal to the side length of the square base image. Finally, the number of single-sided blocks and the total number of blocks are determined.

[0009] Preferably, the rule for parity correction of the single pixel size is as follows: if the calculated actual pixel size is odd, then the actual pixel size is reduced by 1; if it is even, then the actual pixel size remains unchanged.

[0010] Preferably, the cutting coordinate rules include: The first row / column uses the image origin as the starting coordinate for cropping; the middle row / column uses a general fusion distance to calculate the starting coordinate for cropping; the last row / column uses a reverse calculation method to determine the starting coordinate for cropping, so that the end of the block is aligned with the boundary of the square base image.

[0011] Preferably, the cropped image blocks are subjected to pixel normalization to adapt to the pixel value range requirements of the deep learning model.

[0012] Preferably, the mirror boundary filling method is as follows: using the edge pixels of the segmented image as a reference, the pixels are mirrored and extended to the surrounding area of ​​the segmented image to form a safety boundary of a preset size.

[0013] Preferably, the layered fusion process includes three types of region processing methods: The first type of region is the safe boundary region. The safe boundary region of the processed block image is directly removed. The safe boundary region does not participate in the layer fusion process and pixel assignment. The second type of region is the overlapping region of adjacent blocks. For the overlapping region of adjacent blocks, linear fusion is performed sequentially in the row direction, and then a second linear fusion is performed along the column direction. The third type of region is the non-overlapping effective block region, which is directly assigned to the corresponding coordinate position of the fused image.

[0014] Preferably, the step of converting the size ratio of the block image after mirror boundary filling and the post-processed block image to calculate the correlation parameters of each block includes: Calculate the size ratio of the block image after mirror boundary filling and the post-processed block image. Based on the overall size ratio, scale the safety boundary size, general fusion distance and single pixel size proportionally to obtain the actual parameters of the adaptation fusion process.

[0015] Preferably, the method is applicable to any one or more image processing tasks, including deep learning-based microscopic image enhancement, microscopic image denoising, and microscopic image super-resolution.

[0016] The present invention has the following effects: 1. This invention designs differentiated cropping coordinate rules for the first row / column, middle row / column, and last row / column. By calculating the cropping coordinates of the last row / column in reverse, all blocks can be directly cropped from the effective image area without filling the image ends with black pixels. At the same time, it uses a mirror boundary filling method to replace the traditional solid color filling, which fully preserves the image edge texture and greatly improves the quality of microscopic image processing.

[0017] 2. This invention adopts a block processing mode, which breaks down high-resolution microscopic images into small blocks that conform to the model input size and performs image-by-image processing, effectively reducing the amount of data in a single operation and perfectly adapting to hardware scenarios with insufficient graphics card memory. At the same time, the entire method strictly follows the fixed input size requirements of deep learning models, without requiring any modification to the model structure or input parameters, and has strong compatibility.

[0018] 3. This invention automatically calculates core data such as the number of blocks, block size, and boundary parameters, which can adapt to microscopic images of any resolution and aspect ratio without the need for repeated manual adjustment of block parameters. At the same time, the method is not bound to a specific deep learning model and can be widely applied to various deep learning tasks such as microscopic image enhancement, noise reduction, and super-resolution, demonstrating excellent versatility.

[0019] 4. This invention sets up overlapping regions in blocks and uses a bidirectional linear fusion strategy of row-first and column-later to process overlapping pixels. Combined with precise coordinate matching and assignment rules, the layered fusion processing position transitions naturally, the pixels of the whole image are continuous, there are no obvious splicing traces, the integrity of the microscopic image structure is guaranteed, and the needs of subsequent use such as microscopic observation and image analysis are met. Attached Figure Description

[0020] Figure 1 This is a flowchart of steps S1-S7 in a dynamic block-segmentation method for microscopic image processing according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the dynamic segmentation strategy in a dynamic segmentation method for microscopic image processing according to an embodiment of the present invention.

[0022] Figure 3 This is the original micrograph of actin with a resolution of 1024×1024 according to the present invention.

[0023] Figure 4 This is a microscopic image of actin with a resolution of 1024×1024 after being enhanced by a deep learning model in this invention.

[0024] Figure 5 This is the present invention. Figure 3 Enlarged view of the area within the dashed box.

[0025] Figure 6 This is the present invention. Figure 4 Enlarged view of the area within the dashed box.

[0026] Figure 7 This is the original microscopic image of the microfilaments and microtubes of this invention with a resolution of 1200×1200.

[0027] Figure 8 This is a microscopic image of microfilaments and microtubes with a resolution of 1200×1200 after processing by the dynamic segmentation method in this invention.

[0028] Figure 9 This is the present invention. Figure 7 Enlarged view of the area within the dashed box.

[0029] Figure 10 This is the present invention. Figure 8 Enlarged view of the area within the dashed box.

[0030] Figure 11 This invention describes the segmented image after filling the empty areas caused by insufficient size of the last row and last column of the microscopic image with black pixels when using the traditional fixed-spacing segmentation method to segment the microscopic image.

[0031] Figure 12 This is the present invention. Figure 11 The edge artifact effect is formed by processing and merging the block images after filling them with black pixels using a deep learning model.

[0032] Figure 13 This is the present invention. Figure 12 Enlarged view of the area within the dashed box. Detailed Implementation

[0033] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0034] Reference Figure 1 A dynamic block segmentation method for microscopic image processing includes steps S1-S7 as follows: S1: Initialize the deep learning model and read the raw microscopic images to be processed.

[0035] Based on the runtime configuration requirements of the deep learning model used, complete the pre-run preparation work, mainly including allocating GPU runtime space, loading the deep learning model weight file, and configuring the model runtime environment parameters, so that the deep learning model is in a ready state to receive image data and perform inference operations normally. This method can be adapted to various types of deep learning models, such as image enhancement, image denoising, and image super-resolution, and the type of model is not limited.

[0036] The aspect ratio and resolution of the original microscopic image to be processed are not limited, and it can be an original microscopic image of any shape such as square or rectangle.

[0037] S2: Construct a square base image using the maximum side length of the original microscopic image, and copy the original microscopic image to the upper left corner of the square base image.

[0038] First, detect and obtain the height and width pixel values ​​of the original image, compare the two values, and select the maximum value as the standard side length. Based on the standard side length, create a brand new square image, which is defined as the square base image. After the square base image is created, all pixels are initially assigned the value of black.

[0039] The original image is copied entirely into the square base image, starting from the top left corner pixel of the square base image. The original image is completely placed in the top left corner area of ​​the square base image. The square base image area outside the original image retains the initial black pixels. The black area of ​​the base image is only used to complete the square canvas and does not participate in block cropping, model inference and image fusion. There are no pixel operations throughout the process.

[0040] The purpose of constructing the square base image in this step is to uniformly carry the original microscopic images of any aspect ratio into the square base image, forming a unified pixel coordinate system. This provides a unified computing carrier for subsequent full-process block cropping, layer fusion processing, and final image cropping, ensuring that the entire algorithm can adapt to original microscopic images of different shapes.

[0041] Through layered fusion processing, the safe boundary areas of each block are directly cropped, and auxiliary pixels generated by mirror boundary filling are removed, restoring the true and effective content of the image. A two-way linear fusion process (row-first, column-later) is performed on overlapping areas of the blocks, ensuring smooth pixel transitions at the junctions of adjacent blocks and completely resolving pixel breaks and color abrupt changes inherent in traditional stitching methods. Coordinates are directly assigned to the non-overlapping core effective areas, preserving the details, textures, and feature information of the microscopic image to the greatest extent possible without altering the original pixel data. The entire fusion logic is compatible with the pre-segmentation and parameter conversion processes, adapting to various processing scenarios such as image enhancement, noise reduction, and super-resolution, demonstrating strong compatibility.

[0042] S3: Based on the standard input size of the deep learning model, the preset safety boundary and the general fusion distance, iteratively calculate the number of single-sided blocks of the image and the actual pixel size of a single block, and perform parity correction on the pixel size of the single block.

[0043] By combining the model's standard input size, general safety boundary size, and general fusion distance, the general block size under theoretical conditions is calculated. Specifically, the general block size satisfies the following relationship: ; In the formula, This represents the general block size, which is the actual pixel size of a single block in the cropped block image before the boundaries are filled. The standard input size for a deep learning model is 512×512, which is the size of the block image after the mirror boundary is padded. This indicates the preset universal safety boundary size, which is the size of the single-sided safety boundary that needs to be added to the four sides of the segmented image; This indicates the preset general fusion distance, which is the pixel width that adjacent blocks need to overlap.

[0044] The number of blocks per side of the square base image is initialized to 1. The number of blocks is continuously incremented. After each increment, it is determined whether the product of the current number of blocks per side and the general block size is greater than or equal to the standard side length of the square base image. When the product is greater than or equal to the side length of the square base image, the increment is stopped. The value at this time is the number of blocks per side of the image. Based on the number of blocks per side, the total number of blocks of the entire square base image is calculated. The actual pixel size of a single block is calculated using the standard side length and the number of blocks on a single side of the square base image. The parity of this size is then checked. If the calculated actual pixel size of a single block is odd, the pixel size value is reduced by 1 to correct it to an even number. If it is already even, the value remains unchanged. The final corrected actual pixel size of a single block is obtained. The purpose of parity correction is to ensure that the pixel block arrangement is regular, which facilitates subsequent coordinate calculation and fusion processing. Specifically, the actual pixel size of a single block satisfies the following relationship: ; In the formula, Indicates the actual pixel size of a single block; This represents the side length of the square base image; Indicates the number of blocks on one side; This indicates taking the sign downwards.

[0045] The model input size consists of three parts: the effective block area in the middle, the overlapping area required for subsequent fusion, and the safety boundaries on both sides of the block image. Subtracting the actual pixel size of a single block and the general fusion distance from the standard input size gives the total number of pixels that need to be supplemented by the safety boundaries on both sides. Dividing this by 2 gives the size of the safety boundary that needs to be supplemented on one side. This safety boundary size is the direct basis for the subsequent mirror boundary filling step, ensuring that the overall size of the cropped block can accurately match the model input specifications after boundary filling, while reserving a transition area for the fusion operation to avoid stitching marks.

[0046] S4: Based on the positional differences of the blocks in the first row / column, middle row / column, and last row / column, the corresponding cropping coordinate rules are used to crop multiple block images from the square base image.

[0047] Using a square base image as the cropping object, and combining parameters such as the number of single-sided blocks, the actual pixel size of a single block, the general fusion distance, and the size of a single-sided safety boundary calculated earlier, several independent block images are obtained by cropping row by row and column by column according to three different positions of the block: the first row / column, the middle row / column, and the last row / column. Figure 2A represents the first row, B represents the middle row, C represents the last row, a represents the first column, b represents the middle column, and c represents the last column. First row / column segmentation: corresponds to a cropping strategy starting from the image edge, reserving a fusion area only on one side; Middle row / column segmentation: corresponds to a bidirectional offset cropping strategy, reserving fusion areas on both sides; Last row / column segmentation: corresponds to a reverse alignment cropping strategy, with the end aligned with the image boundary, without black borders; Overlapping area of ​​all segments: provides the basis for subsequent layered fusion, ensuring smooth and natural stitching without breaks.

[0048] The specific cutting rules are as follows: Row direction clipping rules: First row segment: The top edge of the image is used as the starting position for cropping, and the ending position is selected at the end of the effective area of ​​a single block, extending outward by a general fusion distance. This cropping range not only fully includes the effective pixels of the single block, but also retains the downward pixel area as a transition zone for fusion with the next row segment.

[0049] Middle row segmentation: The cropping start position is selected at the reference position of the current row, offset upwards by a general fusion distance. The cropping end position is selected at the reference boundary position of the next row. This cropping range can simultaneously connect adjacent segments above and below, forming overlapping areas for fusion on both the top and bottom sides.

[0050] Last row segment: The end position of the cropping is directly aligned with the bottom edge of the image. Then, combined with the effective area range of a single segment and the general fusion distance, the starting position of the cropping is determined in reverse. This method ensures that the end of the segment is completely aligned with the image boundary, without creating blank areas, while retaining the overlapping pixels that merge with the previous row segment.

[0051] Column direction clipping rules: The first column segment: The cropping starts at the left edge of the image and ends at a point extending outwards from the end of the effective area of ​​the single block by a general fusion distance. This cropping range not only fully encompasses the effective pixels of the single block but also retains a pixel area to the right as a transition zone for fusion with the next column segment.

[0052] Middle column segmentation: The cropping start position is selected at the reference position of the current column, offset to the left of the image by a general fusion distance. The cropping end position is selected at the reference boundary position of the next column. This cropping range can simultaneously connect adjacent left and right segments, forming overlapping areas for fusion on both the left and right sides.

[0053] Last column segment: The cropping end position is directly aligned with the right edge of the image. Then, combined with the effective area range of a single segment and the general fusion distance, the cropping start position is determined in reverse. This method ensures that the end of the segment is completely aligned with the image boundary, without creating blank areas, while retaining the overlapping pixels that merge with the previous column segment to the left.

[0054] It should be noted that the last row / column uses the edge of the base image as the cropping endpoint and reverses to derive the cropping start coordinates to ensure that the blocks fit perfectly with the image edges and avoid blank areas.

[0055] After completing all block cropping according to the above three coordinate strategies, for each cropped block image, the pixel value range conversion is completed by combining the global normalization ratio obtained above.

[0056] First, effective pixel regions are extracted from the square base image based on the cropping start and end coordinates in the row and column directions. Then, the pixel coordinates in the square base image are converted to coordinates in the block image coordinate system: the relative coordinates within the cropping region are offset towards the center of the block image by a one-sided safety boundary size, reserving space for subsequent mirror boundary filling. Simultaneously, the extracted pixel values ​​are multiplied by a global normalization scaling factor to ensure their value range conforms to the input specifications of the deep learning model.

[0057] Specifically, the complete steps of coordinate mapping and normalization of the segmented image after cropping and before it is fed into the model are as follows: ; ; In the formula, This represents a cropped and normalized image. This represents the pixel row index in the block image coordinate system; This represents the pixel column index in the coordinate system of the segmented image; Represents the global normalization scaling factor, which is the pixel normalization scaling factor of the square base image; Represents the square base image to be cropped; Represents the pixel row index in the coordinate system of a square-based image; Represents the pixel column index in the coordinate system of a square-based image; This represents the starting pixel coordinates for cropping in the downward direction within the square base image coordinate system; This represents the coordinates of the end pixel of the cropping direction in the square base image coordinate system; Indicates the size of the safety boundary on one side of the segmented image; Represents the starting pixel coordinates for cropping in the following directions within the square base image coordinate system; This represents the coordinates of the final pixel in the following directions of the square base image coordinate system.

[0058] S5: Mirror the boundaries of each image block to make the size of each image block match the input requirements of the deep learning model. Input the boundary-filled images of each image block into the deep learning model in sequence to obtain the corresponding post-processed image blocks.

[0059] For each cropped image block, a mirrored boundary filling method is used to fill the boundaries: using the original pixels of the image block as the extension reference, the pixel content is mirrored and extended in four directions (up, down, left, and right) to complete the boundary filling according to the single-sided safe boundary size calculated earlier. This method fully preserves the image edge texture and detail features, avoids edge artifacts generated after deep learning model processing, and ensures the imaging quality of the microscopic image.

[0060] It should be noted that the unidirectional size of the preprocessed block image is equal to the sum of the actual pixel size of the block, the general fusion distance, and the size of the mirror safety boundary on both sides, and the final image is a square, which perfectly matches the input specifications of the deep learning model.

[0061] After the image blocks are filled with mirrored boundaries, their overall size perfectly matches the standard input size of the deep learning model. This filling method differs from traditional black pixel filling, as it can completely preserve the texture features of the image edges, effectively avoid edge artifacts after model processing, and unify the size of all image blocks to meet the model input requirements.

[0062] All the image blocks that have been filled with mirrored boundaries are sequentially input into the initialized deep learning model in the order of cropping to perform inference operations. After the model processes a single image block, it outputs the corresponding post-processed image block until all the image blocks have been processed by the model, resulting in a complete set of post-processed image blocks.

[0063] S6: Combine the size ratio of the block image after mirror boundary filling and the post-processed block image to calculate the correlation parameters of each block, perform layered fusion processing on the post-processed block image, remove the safe boundary area, and perform linear fusion on the overlapping area of ​​the blocks to obtain the fused image.

[0064] The dimensions of the image blocks before being fed into the model and after being filled with mirrored boundaries are statistically analyzed, and the dimensions of the post-processed image blocks are also analyzed. The overall size ratio between the two is calculated, and this ratio is used as a uniform scaling factor. When the model is a super-resolution model, this ratio is greater than 1, indicating that the image has been enlarged. When the model is a denoising / enhancing model, this ratio is equal to 1, indicating that the size remains unchanged. The target width of the fused image is obtained by multiplying the original image width by the size change ratio of the model. Since the original image is uniformly contained in a square base image, the final fused image is also square, with the height and width being equal.

[0065] Based on a unified scaling factor, various block parameters required for the fusion process are proportionally converted. The specific conversion objects include the size of the single-sided safety boundary, the general fusion distance, and the actual pixel size of a single block. After conversion, new parameters for the adapted post-processed block image are obtained.

[0066] Verify whether the size of the post-processed block image meets expectations. The verification rules are consistent with the size composition logic of the preprocessing stage. Specifically, the image is a square with equal height and width. The image width consists of the two safety boundaries, the general fusion distance, and the actual pixel size of a single block. This ensures that the image size of the post-processed block image matches the converted parameters, providing a reliable data foundation for subsequent layered fusion.

[0067] Create a new blank merged image. Combine the original image size with the size ratio obtained earlier to determine the overall size of the merged image. For all post-processed image blocks, perform layered fusion operations according to region type. These are categorized into three types: safe boundary regions, overlapping regions of adjacent blocks, and non-overlapping valid block regions. Different processing methods are used for different regions. Safety boundary region: The safety boundary region surrounding each post-processed block image is directly and completely cropped. This region does not participate in any pixel fusion or pixel assignment operations. Overlapping areas of adjacent blocks: For the overlapping areas formed between two adjacent post-processed block images, linear fusion is performed one by one in the overlapping area in a strict fixed order, first in the row direction and then in the column direction, to eliminate the traces of layered fusion processing and achieve a smooth transition between adjacent blocks. Non-overlapping valid block regions: For the core valid regions in the block image that do not overlap, according to the rule of one-to-one correspondence of pixel coordinates, all pixels in the non-overlapping valid regions are directly assigned to the corresponding coordinate positions in the blank fused image.

[0068] After completing the layered fusion of all post-processed image blocks, a complete fused image is obtained.

[0069] S7: Perform adaptive brightness adjustment on the fused image and crop the final image according to the original microscope image size.

[0070] By traversing the entire fused image, the minimum and maximum pixel values ​​of all pixels in the image are extracted. Based on the pixel value range, the overall brightness of the fused image is adaptively adjusted to optimize the brightness and darkness levels of the image, highlight the effective feature information inside the microscopic image, and improve the overall effect.

[0071] Using the brightness-adjusted fused image as the processing object, and taking the top left pixel of the image as the starting position, the cropping range is defined according to the height and width pixel values ​​of the original microscopic image. The cropping operation is then performed to obtain the target output image that is consistent with the field of view and scale of the original image. The target output image is then saved, completing the entire dynamic block processing of the microscopic image.

[0072] Reference Figure 3 The image shows the filamentous microstructure of actin. The dashed box in the image marks the target fiber region for local contrast observation, serving as the baseline original sample image before image enhancement processing.

[0073] Reference Figure 4 These are microscopic images of actin of the same size obtained after enhancement processing using a deep learning model, and... Figure 3 The image field of view and structure correspond perfectly, and the position of the dashed box is the same as... Figure 3 The dashed boxes are kept in the same position to visually compare the improved fiber details of the enhanced model.

[0074] Reference Figure 5 It clearly shows the original imaging state of actin fibers with blurred edges and low texture signal-to-noise ratio before deep learning enhancement processing.

[0075] Reference Figure 6 ,and Figure 5 By forming a comparison, it can be intuitively seen that after processing by the deep learning model with the method of this invention, the lines and contours of actin fibers are sharper, and the details of fine branch textures are effectively restored and enhanced.

[0076] Reference Figure 7 The image shows the original microscopic image of microfilaments and microtubes with a resolution of 1200×1200 according to the present invention. The image shows a densely interwoven network structure of microfilaments and microtubes. The dashed box selects a fiber intersection area as a local contrast observation area, which is the original microscopic imaging sample before dynamic block processing.

[0077] Reference Figure 8 This is a microscopic image of microfilaments and microtubes with a resolution of 1200×1200 after processing by the dynamic segmentation method in this invention, and... Figure 7 The image field of view, microfilament and microtubule network structure, and fiber distribution are perfectly matched, and the position of the dashed box is consistent with... Figure 7 The dashed boxes are kept in the same position to compare the imaging optimization effect of the dynamic block algorithm on dense microfilament and microtubule structures.

[0078] Reference Figure 9 This invention Figure 7 The magnified view of the area within the dashed box shows imaging defects such as blurred lines and poor identification of fine structures at the intersection of microfilaments and microtubules, as seen in the original micrograph.

[0079] Reference Figure 10 This invention Figure 8 Enlarged view of the area within the dashed box, and Figure 9 By creating a comparison, the technical advantages of combining the dynamic segmentation strategy with image enhancement, such as improved separation of intersecting lines of microfilaments and microtubules and clearer texture of fine fibers, can be intuitively demonstrated.

[0080] Reference Figure 11 The image shows the block image after filling the missing areas caused by insufficient size of the last row and last column of the microscopic image with black pixels when the traditional fixed-interval block method is used to divide the microscopic image into blocks. The right side of the image shows the entire black filling edge formed by the filling pixels, which is used to show the inherent black edge filling defect of the traditional fixed block method.

[0081] Reference Figure 12 ,Will Figure 11 The image blocks filled with black pixels are fed into a deep learning model for enhancement and stitching to form an edge artifact effect. In the edge artifact effect, a band-shaped artifact with obvious brightness and darkness distortion appears on the right edge. The dashed box in the image delineates the concentrated area of ​​edge artifacts, which is used to highlight the edge distortion problem after traditional fixed block stitching.

[0082] Reference Figure 13 The image clearly magnifies and shows the strip-shaped light and dark interference artifacts generated after traditional fixed-block black edge filling and processing splicing, highlighting the core improvement effect of the dynamic block method of this invention in eliminating edge artifacts and ensuring the real and complete edge structure of the image.

[0083] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A dynamic partitioning method for microscopic image processing, characterized in that, include: Initialize the deep learning model and read the raw microscopic images to be processed; A square base image is constructed using the maximum side length of the original microscopic image, and the original microscopic image is copied to the upper left corner region of the square base image; Based on the standard input size of the deep learning model, the preset safety boundary and the general fusion distance, the number of single-sided blocks of the image and the actual pixel size of a single block are calculated iteratively, and parity correction is performed on the pixel size of the single block. Based on the positional differences of the blocks in the first row / column, middle row / column, and last row / column, corresponding cropping coordinate rules are used to crop multiple block images from the square base image; Each image block is mirrored and its boundaries are filled to ensure that the size of each image block matches the input requirements of the deep learning model. The images with the boundaries filled are then input into the deep learning model in sequence to obtain the corresponding post-processed image blocks. By combining the size ratio of the block image after mirror boundary filling and the post-processed block image, the correlation parameters of each block are calculated. The post-processed block image is then subjected to layered fusion processing, the safe boundary area is removed, and linear fusion is performed on the overlapping areas of the blocks to obtain the fused image. The fused image undergoes adaptive brightness adjustment, and the final image is cropped according to the original microscope image size.

2. The dynamic partitioning method for microscopic image processing according to claim 1, wherein, The square base image is initially set to black for all pixels. The square base image serves as a uniform computational canvas for carrying the original microscopic image with any aspect ratio. Except for the effective area corresponding to the original microscopic image, the remaining black areas in the square base image do not participate in effective imaging and feature calculation.

3. The dynamic partitioning method for microscopic image processing according to claim 1, wherein, The method for dynamically calculating the number of blocks is as follows: The number of single-sided blocks is initialized to 1, and the number of single-sided blocks is accumulated one by one until the product of the number of single-sided blocks and the theoretical size of a single block is greater than or equal to the side length of the square base image. Finally, the number of single-sided blocks and the total number of blocks are determined.

4. The dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The rule for parity correction of single pixel size is as follows: if the calculated actual pixel size is odd, then the actual pixel size is reduced by 1; if it is even, then the actual pixel size remains unchanged.

5. The dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The clipping coordinate rules include: The first row / column uses the image origin as the starting coordinate for cropping; the middle row / column uses a general fusion distance to calculate the starting coordinate for cropping; the last row / column uses a reverse calculation method to determine the starting coordinate for cropping, so that the end of the block is aligned with the boundary of the square base image.

6. The dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The cropped image blocks are normalized to match the pixel value range requirements of the deep learning model.

7. The dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The mirror boundary filling method is as follows: using the edge pixels of the segmented image as a reference, the pixels are mirrored and extended to the four sides of the segmented image to form a safety boundary of a preset size.

8. The dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The layered fusion process includes three types of region processing methods: The first type of region is the safe boundary region. The safe boundary region of the processed block image is directly removed. The safe boundary region does not participate in the layer fusion process and pixel assignment. The second type of region is the overlapping region of adjacent blocks. For the overlapping region of adjacent blocks, linear fusion is performed sequentially in the row direction, and then a second linear fusion is performed along the column direction. The third type of region is the non-overlapping effective block region, which is directly assigned to the corresponding coordinate position of the fused image.

9. A dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The step of converting the size ratio of the block image after mirror boundary filling and the post-processed block image to calculate the correlation parameters of each block includes: Calculate the size ratio of the block image after mirror boundary filling and the post-processed block image. Based on the overall size ratio, scale the safety boundary size, general fusion distance and single pixel size proportionally to obtain the actual parameters of the adaptation fusion process.

10. A dynamic block segmentation method for microscopic image processing according to claim 1, characterized in that, The method is applicable to any one or more image processing tasks, including deep learning-based microscopic image enhancement, microscopic image denoising, and microscopic image super-resolution.