A Large Image Processing Method and System Based on Adaptive Slicing and Feathering Fusion

By using adaptive slicing and feathering fusion methods, the problems of discontinuous seams and high computational costs in large image processing are solved, achieving efficient and low-cost seamless stitching results.

CN122134553APending Publication Date: 2026-06-02深圳牛学长科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳牛学长科技有限公司
Filing Date
2026-01-19
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing large image processing methods suffer from discontinuous seams and high computational costs during stitching, especially when the image size is not an integer multiple of the model input size. A fixed overlap ratio leads to wasted computational resources or poor seam quality.

Method used

An adaptive slicing and feathering fusion method is adopted. The slicing parameters are determined by iterative calculation. The boundary expansion and stitching of image slices are performed by combining reflection filling and Gaussian weighted mask to achieve seamless stitching. Parallel processing is used to optimize computational efficiency.

Benefits of technology

It achieves high visual quality while reducing the total number of calls and computational cost of downstream processing units, providing efficient and seamless splicing effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134553A_ABST
    Figure CN122134553A_ABST
Patent Text Reader

Abstract

This invention discloses a large image processing method and system based on adaptive slicing and feathering fusion, comprising: acquiring the original image and parameters; adaptively determining the slicing parameters through iterative calculation with a minimum overlap width requirement as a constraint, and outputting slicing configuration information; expanding the boundaries of the original image according to the filling amount, and extracting multiple image slices with sizes conforming to the input size of the target processing unit from the expanded image; and performing feathering fusion and layered stitching on the image slices using a weight mask generated based on a Gaussian function based on the overlap size to reconstruct a final image with the same size as the original image. This invention calculates the minimum slice grid layout required to meet seamless stitching quality requirements. Through the synergy of reflection filling and Gaussian weighted feathering fusion techniques, it achieves imperceptible pixel value changes at the seams while minimizing the total number of calls to downstream processing units, thereby resolving the contradiction between image quality and computational cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing technology, specifically to a large image processing method and system based on adaptive slicing and feathering fusion. Background Technology

[0002] With the rapid development of high-resolution sensors and imaging technologies, the size of digital images is constantly increasing. However, downstream core processing units, especially deep learning-based AI models, typically have fixed and relatively small input sizes due to limitations in computing resources and architecture. Therefore, large images need to be cut into multiple small blocks (slices) that conform to the model's input size for separate processing, and then the processing results are stitched together to restore the complete image. Currently, existing block processing methods mainly suffer from the following technical problems: The most direct method of segmentation is to perform simple grid division, process the slices independently, and then directly stitch them together. However, due to the lack of contextual information in the processing of the edge areas of each slice, and the possibility of introducing inconsistencies in the processing, visible and discontinuous seams are generated at the stitching boundaries, which seriously damages the visual integrity of the image and the effectiveness of subsequent analysis.

[0003] To alleviate the seam problem, one improvement is to maintain a certain overlap between adjacent slices. However, existing methods typically use a fixed overlap ratio or a fixed number of overlapping pixels. A fixed overlap can lead to excessive overlap, especially when the image size is not an integer multiple of the model input size, significantly increasing the total number of slices to be processed and thus multiplying the number of inferences and overall computational cost of the AI ​​model. A fixed overlap may not be sufficient to ensure a smooth transition in all regions, especially in areas with complex image textures, where visible seams may still occur; conversely, blindly increasing the fixed overlap to ensure quality can lead to unnecessary computational waste. Its performance is highly dependent on manually preset overlap parameters and cannot be dynamically optimized according to different image sizes, model input sizes, and acceptable quality requirements, lacking intelligence and universality. Summary of the Invention

[0004] The purpose of this invention is to provide a large image processing method and system based on adaptive slicing and feathering fusion to solve the problems of efficiency and quality of splicing seams and overlapping blocks mentioned in the background art.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: According to one aspect of the present invention, a large image processing method based on adaptive slicing and feathering fusion is provided, the method comprising: The dimensions of the original image, the input dimensions of the target processing unit, and the minimum overlap width requirement are obtained. Using the minimum overlap width requirement as a constraint, the slicing parameters are adaptively determined through iterative calculation, and the slicing configuration information is output. The slicing configuration information includes the grid layout, the actual slice size, the fill amount, and the overlap size. The original image is expanded according to the filling amount to obtain an expanded image, and multiple image slices with sizes that conform to the input size of the target processing unit are extracted from the expanded image based on the slice configuration information. Based on the overlap size, a weight mask generated based on a Gaussian function is used to feather and blend the image slices and stitch them together in layers to reconstruct a final image with the same size as the original image.

[0006] Based on the aforementioned scheme, the step of adaptively determining the slice parameters through iterative calculation includes calculating the initial number of grid slices based on the size of the original image and the input size of the target processing unit; calculating the actual slice size by reverse calculation based on the initial number of grid slices, and calculating the amount of padding to be added around each slice; iteratively checking whether the calculated amount of padding meets the minimum overlap width requirement, and if not, adjusting the number of slices and recalculating until the minimum overlap width requirement is met.

[0007] Based on the aforementioned scheme, the iterative check and the slice quantity adjustment adopt a directional adjustment strategy, including increasing the slice quantity in the horizontal direction only when the horizontal fill amount does not meet the requirements; increasing the slice quantity in the vertical direction only when the vertical fill amount does not meet the requirements; and increasing the slice quantity in both directions simultaneously when the fill amount in both directions does not meet the requirements.

[0008] Based on the aforementioned scheme, the boundary expansion of the original image using a reflection filling method includes copying the original image to the central area of ​​the expanded canvas; filling the left and right boundaries of the expanded canvas by copying the image edge pixels in a mirror-symmetric manner; and filling the top and bottom boundaries of the expanded canvas by copying the image edge pixels in a mirror-symmetric manner.

[0009] Based on the aforementioned scheme, the feathering and fusion of the image slices using a weighted mask generated based on a Gaussian function includes generating a horizontal weighted mask for the horizontally overlapping region and a vertical weighted mask for the vertically overlapping region according to the overlap size; and weighting and fusing the corresponding pixel values ​​in the overlapping region with the weighted mask during stitching.

[0010] Based on the aforementioned scheme, the layered stitching includes performing horizontal feathering and fusion stitching on each row of image slices in parallel to obtain multiple stitched long strip images; performing vertical feathering and fusion stitching on the multiple long strip images to obtain a complete image including the filled area; and cropping the filled area to obtain the final image.

[0011] Based on the aforementioned scheme, the original image is a series of related images with the same spatial resolution; the method further includes: synchronously slicing the series of related images using the same slice configuration information, so that slices with the same position index are geometrically aligned in each image.

[0012] Based on the aforementioned scheme, the step of extracting multiple image slices with sizes matching the input size of the target processing unit from the expanded image further includes integrated preprocessing: merging multiple image slices from different associated images with the same location index to directly generate a multi-channel tensor, which serves as the input unit for subsequent processing.

[0013] Based on the aforementioned scheme, the multiple associated images are two temporally adjacent frames in the video sequence; the multi-channel tensor is a seven-channel tensor, including three color channels for each of the two frames and a parameter channel representing the time dimension.

[0014] According to another aspect of the present invention, a large image processing system based on adaptive slicing and feathering fusion is provided, the system comprising a parameter calculation module, a slicing processing module, and a stitching and reconstruction module; The parameter calculation module is used to obtain the size of the original image, the input size of the target processing unit, and the minimum overlap width requirement. Using the minimum overlap width requirement as a constraint, it adaptively determines the slicing parameters through iterative calculation and outputs the slicing configuration information. The slicing configuration information includes the grid layout, actual slicing size, fill amount, and overlap size. The slicing processing module is used to expand the boundaries of the original image according to the filling amount to obtain an expanded image, and extract multiple image slices with sizes that conform to the input size of the target processing unit from the expanded image based on the slicing configuration information. The stitching and reconstruction module is used to feather and blend the image slices and stitch them in layers using a weight mask generated based on a Gaussian function, based on the overlap size, to reconstruct a final image with the same size as the original image.

[0015] As can be seen from the above technical solutions, this invention has at least the following advantages and positive effects compared with the prior art: By using an adaptive closed-loop iterative algorithm constrained by the minimum overlap width, the minimum slice grid layout required to meet the seamless stitching quality requirements is automatically calculated, achieving the highest visual quality (imperceptible seams) while minimizing the total number of calls to downstream processing units (i.e., the total number of slices), thus resolving the contradiction between quality and computational cost. Through the synergy of reflection filling and Gaussian weighted feathering fusion techniques, the smoothness of the stitching is jointly guaranteed from both data preparation and fusion algorithm perspectives; reflection filling provides a natural contextual extension for edge slices, and Gaussian fusion weights provide a high-order continuous smooth transition function; the combination of the two makes pixel value changes at the stitching seams imperceptible. The structured configuration information (SliceConfig) output by the adaptive parameter calculation enables one-time calculation and full reuse, avoiding repetitive geometric operations; the hierarchical parallel stitching strategy decomposes the complex two-dimensional stitching task into multiple highly parallelizable one-dimensional tasks, fully utilizing the computing power of multi-core processors and significantly shortening image reconstruction time.

[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a flowchart of a large image processing method based on adaptive slicing and feathering fusion according to the present invention; Figure 2 This is a schematic diagram of the horizontal feathering fusion splicing of the present invention; Figure 3 This is a schematic diagram of the vertical feathering fusion splicing of the present invention; Figure 4 This is a schematic diagram of a large image processing system based on adaptive slicing and feathering fusion according to the present invention. Detailed Implementation

[0018] To more clearly illustrate the purpose, technical solutions, and advantages of the present invention, 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 only some embodiments of the present invention, and not all embodiments. The exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein. On the contrary, these embodiments are provided so that the present invention will be more comprehensive and complete, and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0019] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.

[0020] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0021] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0022] The present invention will now be described in detail with reference to specific embodiments: Example 1

[0023] like Figure 1 As shown, this embodiment provides a large image processing method based on adaptive slicing and feathering fusion. The specific steps of this method are as follows: S1: Obtain the size of the original image, the input size of the target processing unit, and the minimum overlap width requirement. Using the minimum overlap width requirement as a constraint, adaptively determine the slicing parameters through iterative calculation and output the slicing configuration information. The slicing configuration information includes the grid layout, actual slicing size, fill amount, and overlap size.

[0024] Since fixed partitioning can lead to a contradiction between the quality of image stitching and the overall processing cost (the number of slices), in this embodiment, adaptive slicing parameters are calculated. The input parameters include the size of the original image (width W and height H), the input size (target width TW and target height TH) predefined by the model architecture for subsequent processing, and the minimum overlap width threshold MO set to ensure seamless stitching. First, the input parameters are initialized, and the initial number of grid slices is calculated, that is, the grid layout: TC_X = ceil(W / TW), TC_Y = ceil(H / TH), where ceil( ) is the ceiling function, and TC_X and TC_Y are the number of slices into which the original image is divided in the horizontal and vertical directions respectively; this initialization gives the theoretical lower bound of the number of slices required to cover the entire image.

[0025] Furthermore, a closed-loop iterative optimization algorithm is adopted, and in each iteration, the following are performed: 1) Based on the current number of slices (TC_X, TC_Y), the actual slice size to be extracted from the original image is calculated inversely, that is, the actual slice size: TileW = W / TC_X, TileH = H / TC_Y; TileW and TileH are the effective width and height actually extracted from the original image for each slice respectively. To enable the extracted TileW×TileH area to reach the standard input size of TW×TH required by the model through boundary padding, the unilateral padding amount PadW = (TW - TileW) / 2 and PadH = (TH - TileH) / 2 to be added around each slice are calculated. PadW and PadH are the unilateral padding amounts to be added to the left and right, and top and bottom sides of each slice respectively. Here, PadW and PadH determine the overlapping area size between adjacent slices in the horizontal and vertical directions: the horizontal overlap width OW = TW - TileW = 2*PadW, and the vertical overlap height OH = TH - TileH = 2*PadH. 2) After calculating PadW and PadH, check whether PadW≥MO and PadH≥MO are both satisfied; this condition ensures that the width of the overlapping area for feathering fusion between adjacent slices is not less than the preset minimum threshold MO, so as to have sufficient overlapping area for high-quality feathering fusion. 3) If the above condition is not satisfied, enter the directional adjustment stage and perform minimum increment directional optimization; if only PadW < MO, only increase the number of slices TC_X in the horizontal direction by 1, and keep the vertical number TC_Y unchanged; if only PadH < MO, only increase the number of slices TC_Y in the vertical direction by 1, and keep the horizontal number TC_X unchanged; if both PadW and PadH are less than MO, increase both TC_X and TC_Y by 1. This adjustment strategy realizes the minimum necessary incremental adjustment only in the dimension with insufficient overlap; ensures that the algorithm has an optimal path when searching for the minimum total number of slices N = TC_X×TC_Y that meets the quality requirements, and avoids unnecessary computational redundancy.

[0026] The algorithm iterates through the above steps until the dual constraints are met. Since the fill amount increases monotonically with the number of slices, the algorithm will converge within a finite number of steps to a state that satisfies PadW≥MO and PadH≥MO. The (TC_X, TC_Y) at convergence is the minimum total number of slices that satisfies the seamless stitching quality requirement.

[0027] Once the iteration converges, the algorithm outputs a structured pre-computed parameter set, SliceConfig. This set contains pre-computed information required for subsequent steps: the final slice grid layout grid_size (TC_X,TC_Y), the actual slice size tile_size (TileW,TileH), the slice padding amount padding (PadW,PadH), and the total size of the padded image padded_image_size (PaddedW,PaddedH), where PaddedW=TileW*TC_X+2*PadW, and PaddedH is calculated similarly; as well as the actual overlap width of adjacent slices in the horizontal and vertical directions overlap_size (TW-TileW,TH-TileH); and the precise coordinate range of each slice in the padded image is pre-computed and stored, i.e., the slice coordinates tile_coordinates ((x_start,y_start),(x_end,y_end)), which guides subsequent efficient slice extraction. Subsequent steps do not require real-time geometric calculations; the required data can be obtained simply by looking up a table.

[0028] S2: Expand the boundaries of the original image according to the filling amount to obtain an expanded image, and extract multiple image slices with sizes that conform to the input size of the target processing unit from the expanded image based on the slice configuration information.

[0029] Based on the structured parameter set SliceConfig output in step S1, the original large image is converted into a series of slices that meet the input size requirements of downstream processing units (such as AI models). The system receives the original image data, with a size of W×H, and slice configuration information calculated in step S1, including necessary geometric parameters such as padding, padded_image_size, and tile_coordinates.

[0030] This embodiment employs a reflection-fill method to extend the boundaries of the original image. This includes copying the original image to the center region of the extended canvas; mirror-symmetrically copying and filling the left and right boundaries of the extended canvas with image edge pixels; and mirror-symmetrically copying and filling the top and bottom boundaries of the extended canvas with image edge pixels. This boundary extension operation ensures that the slices extracted from the image edge regions contain sufficient contextual information, avoiding a decrease in subsequent processing quality due to abrupt truncation of boundary pixels.

[0031] Specifically, first, an extended canvas is created, and a contiguous buffer of size PaddedW×PaddedH is allocated in memory as the storage space for the padded image PaddedImage. All pixel data of the original image OriginalImage[0:W,0:H] is copied to the corresponding center area of ​​the padded image PaddedImage, i.e., the target position is: [PadW:PadW+W,PadH:PadH+H].

[0032] Further, four-sided reflection filling is performed. For each row y of the PaddedImage, the leftmost PadW pixels of the central region are mirror-symmetrically copied to the left filling area; similarly, the rightmost PadW pixels of the central region are mirror-copied to the right filling area. For each column x of the PaddedImage, the topmost PadH pixels of the central region are mirror-copied to the upper filling area; the bottommost PadH pixels of the central region are mirror-copied to the lower filling area. For the rectangular areas at the four corners, two-dimensional mirror filling is used. For example, the pixel values ​​of the upper left corner area [0:PadW, 0:PadH] are determined by first mirroring the adjacent pixels of the central region horizontally, and then mirroring them vertically, thus ensuring the continuity of texture and gradient at the corners. A complete PaddedImage matrix is ​​generated for subsequent slice extraction.

[0033] The aforementioned reflection filling allows texture, color, and gradient information at image boundaries to extend smoothly outwards, creating a natural visual extension in the filled area. In the subsequent stitching stage, the fusion weights of the overlapping areas follow a Gaussian distribution. The smooth boundary transition provided by reflection filling is mathematically highly compatible with the smooth decay characteristics of Gaussian weights. The combination of these two factors results in a higher-order continuity in the pixel value change function at the stitching seam (determined by both the filled boundary information and the fusion weights), making the seam imperceptible both visually and numerically.

[0034] After filling is completed, all slices are extracted from the PaddedImage according to the pre-computed slice coordinates in SliceConfig.tile_coordinates. Traverse the tile_coordinates list. For the i-th item of coordinates ((x_start_i, y_start_i), (x_end_i, y_end_i)) in the list, directly extract the rectangular region PaddedImage[x_start_i:x_end_i, y_start_i:y_end_i] from the PaddedImage. The size of this region is always TW×TH and can be directly used as the standard input.

[0035] Based on the pre-computed tile_coordinates list, extract slices in row-major order, which is consistent with the row-major storage method of PaddedImage in memory, making full use of the spatial locality of the CPU cache; when extracting each slice, the system cache can pre-load adjacent memory rows, significantly reducing cache misses. During the process of copying slice data from PaddedImage to the output buffer, synchronously perform the data format conversion required by the downstream comb processing unit;示例性地, when the downstream model requires the CHW (channel-first) format, optimize using the SIMD instruction set (such as AVX2 / NEON), and complete the conversion from HWC to CHW format by simultaneously reading pixel values, separating channels, and rearranging data in a single memory operation, merging the two rounds of memory traversals of the traditional method of first completely extracting and then separately converting, reducing the total memory access times and data transfer overhead. Further, adopt an adaptive dynamic parallel scheduling strategy; maintain a thread pool and dynamically determine the parallel granularity according to the total number of slices N (N = TC_X×TC_Y);示例性地, set the threshold T to twice the number of available CPU logical cores; if N≥T, allocate the extraction tasks (such as each row of slices or every K consecutive slices) to different threads in the thread pool for parallel execution; if N<T, use an asynchronous task queue or directly execute sequentially to avoid excessive parallel overhead; this dynamic scheduling mechanism ensures high CPU utilization under different scale tasks while avoiding excessive thread creation and synchronization overhead.

[0036] Output an ordered slice array List[Tile], where each Tile is a standard image block of size TW×TH and can be directly fed into the downstream processing unit.

[0037] In one implementation, multiple associated images are simultaneously sliced ​​and preprocessed. Multiple associated images with the same spatial resolution (W×H) are received, exemplarily two left and right view images Image_L and Image_R used for stereo matching, or two adjacent frames Frame_t and Frame_{t+1} in a video sequence. The SliceConfig calculated in step S1 is used as the slice configuration information for all images; that is, all input images are bounded using the same padding amount (PadW, PadH) and divided according to the exact same grid layout (TC_X, TC_Y); therefore, slices with the same position index (tile_id) in different images are geometrically aligned in their respective original images. Further, slice extraction is deeply integrated with a task-specific preprocessing flow to achieve multi-task completion in a single traversal; this includes channel merging of multiple image slices with the same position index from different associated images to directly generate a multi-channel tensor as the input unit for subsequent processing. This embodiment uses a specific video frame interpolation task as an example to illustrate the integrated process. This task requires packaging two adjacent RGB frames (Frame_t, Frame_{t+1}) into a 7-channel tensor as input to the interpolation model. The following operations are performed sequentially: 1) While extracting pixels from the synchronously generated PaddedImage_t and PaddedImage_{t+1}, convert uint8 pixel values ​​to floating-point numbers and normalize them to the range specified by the model (e.g., [0,1]). 2) For the interpolation task, a 7th channel representing the time dimension needs to be generated. For each pair of aligned slices of Frame_t and Frame_{t+1}, a temporal parameter matrix with the same spatial size (TH×TW) as the 7th channel is created. Each pixel value in this matrix represents a normalized timestamp. For example, all values ​​for the Frame_t slice can be set to 0.0; all values ​​for the Frame_{t+1} slice can be set to 1.0; for interpolation requiring intermediate timestamps, it can be set to 0.5. This matrix is ​​combined with the pixel data through a broadcast mechanism. 3) The six color channel data (R, G, B of Frame_t and R, G, B of Frame_{t+1}) converted from the two image slices are fused with the above-mentioned time parameter channel (the 7th channel) in the order required by the model. The data is then directly written into the pre-allocated continuous memory buffer for the output tensor through interleaving storage to form a three-dimensional tensor of (TH,TW,7).

[0038] 4) Batch processing and model input adaptation. All slice pairs are processed in a loop, and all generated (TH,TW,7) tensors are stacked along the batch dimension to finally obtain a batch tensor Tensor_Batch with shape (N,TH,TW,7), where N is the total number of slices. This tensor can be directly input into the interpolation model for inference without any additional transformation.

[0039] S4: Based on the overlap size in the slice configuration information, use Gaussian weights to feather and blend the multiple processed slices and stitch them into layers to reconstruct a final image with the same size as the original image.

[0040] Combination Figure 2 and Figure 3 This embodiment introduces a weighted feathering fusion technique based on Gaussian functions and adopts a hierarchical parallel grid stitching strategy to eliminate stitching seams and achieve seamless image reconstruction.

[0041] A smooth Gaussian weighted mask is pre-computed. For the horizontally overlapping region (size OW×TH, where OW is the horizontal overlap width and TH is the target height of the slice), its horizontal weighted mask hmask is generated by convolving an ideal step function with a Gaussian kernel, defined as:

[0042] in, For a unit two-dimensional step function, in the left half of the overlapping region ( The value is 1, in the right half ( A value of 0 indicates a 2D discrete convolution operation; * indicates a 2D discrete convolution operation. The kernel is a two-dimensional Gaussian kernel; OW represents the horizontal overlap width. Similarly, for the vertical overlap region (size TW×OH, where OH is the vertical overlap height and TW is the target width of the slice), the vertical weight mask vmask is defined as:

[0043] Where OH represents the vertical overlap height.

[0044] Furthermore, a two-layer layering strategy is adopted, first horizontal and then vertical. During the stitching process, the corresponding pixel values ​​in the overlapping areas are weighted and fused with the weight mask. In parallel, the image slices of each row are feathered and fused horizontally to obtain multiple stitched long strip images. The multiple long strip images are feathered and fused vertically to obtain a complete image including the filled area. The filled area is then cropped to obtain the final image.

[0045] Specifically, for horizontal inline stitching, the stitching task of the TC_Y row slices is independently allocated. A row canvas is created for each row, with a width equal to the padded width PaddedW of the final image and a height equal to the slice height TH. The first slice (column 0) of the row is completely copied to the leftmost side of the row canvas. For the j-th (j≥1) slice in the row: calculate the starting horizontal coordinate startX = j * TileW of the slice in the row canvas; where TileW is the actual width extracted from the original image for each slice (calculated in step S1), i.e., the effective contribution width of each slice to the final image after removing the overlapping portion. The overlapping area of ​​OW pixels wide on the left side of the slice is extracted and weighted pixel-wise with the [startX, startX+OW) region in the row canvas. The fusion formula is: RowCanvas_pixel←RowCanvas_pixel*hmask+Tile_pixel*(1-hmask) Here, RowCanvas_pixel is the pixel value to be updated on the row canvas; hmask is the horizontal weight mask value, smoothly transitioning from 1 at the left edge to 0 at the right edge along the horizontal direction; Tile_pixel is the source pixel value at the corresponding position in the currently stitched slice (the j-th slice); the remaining non-overlapping part on the right side of this slice is directly copied to the row canvas position [startX+OW, startX+TW). The row canvas is updated and saved, and TC_Y strips of horizontally stitched image are output in parallel.

[0046] For vertical row stitching, create the final full-screen canvas with dimensions PaddedW × PaddedH, and copy the first row (row 0) of the long strip image completely to the top of the canvas. For the i-th (i≥1) row of the long strip image: calculate the starting vertical coordinates of this row in the full-screen canvas: startY = i * TileH, where TileH is the actual height extracted from the original image for each slice determined in step S1; extract the overlapping area with a pixel height of OH pixels at the top of this row of the image, and perform pixel-wise weighted fusion with the [startY, startY+OH) region in the full-screen canvas. The fusion formula is: FullCanvas_pixel←FullCanvas_pixel*vmask+Strip_pixel*(1-vmask) Here, `FullCanvas_pixel` represents the pixel value to be updated on the full-screen canvas; `vmask` is the vertical weight mask value, smoothly transitioning from 1 at the top edge to 0 at the bottom edge along the vertical direction; `Strip_pixel` is the source pixel value at the corresponding position in the currently stitched strip image (row i); the remaining non-overlapping portion of this row is directly copied to the canvas at position [startY+OH, startY+TH). This layer operation is usually performed sequentially, but can be partially parallelized if there is no data dependency between rows.

[0047] After the stitching is completed, the boundary fill area added in step S2 is cropped from the full image canvas (i.e., the pixels of the width of PadW and PadH around the edges are removed) to obtain the final processing result with the same size as the original image (W×H). Example 2

[0048] like Figure 4 As shown in the figure, this embodiment exemplarily presents a large image processing system based on adaptive slicing and feathering fusion, including a parameter calculation module, a slicing processing module, and a stitching and reconstruction module.

[0049] The parameter calculation module is used to obtain the size of the original image, the input size of the target processing unit, and the minimum overlap width requirement. With the minimum overlap width requirement as a constraint, it adaptively determines the slice parameters through iterative calculation and outputs the slice configuration information. The slice configuration information includes the grid layout, actual slice size, fill amount, and overlap size.

[0050] The slicing module is used to expand the boundaries of the original image according to the padding amount in the slice configuration information to obtain the expanded image. Based on the slice coordinates in the slice configuration information, it extracts multiple image slices of the same size as the input size of the target processing unit from the expanded image in parallel. It ensures that each slice contains complete context information and that the extraction process does not require repeated calculation of geometric parameters.

[0051] The stitching and reconstruction module is used to feather and blend the overlapping areas of image slices based on the overlap size in the slice configuration information, using a weight mask (divided into horizontal and vertical directions) generated by a Gaussian function to eliminate seams. At the same time, a layered parallel stitching strategy is adopted to stitch the slices layer by layer, first combining each row of slices into a long strip image, then stitching all the long strip images into a complete image, and finally cropping the initial filling boundary to output a final image with the same size as the original image.

[0052] The parameter calculation module, slicing processing module, and splicing and reconstruction module are connected in sequence to form a complete processing pipeline. The modules are decoupled through a structured SliceConfig, which makes the system easy to optimize, expand and integrate.

[0053] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims. It should be understood that the invention is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A large image processing method based on adaptive slicing and feathering fusion, characterized in that, The method includes: The dimensions of the original image, the input dimensions of the target processing unit, and the minimum overlap width requirement are obtained. Using the minimum overlap width requirement as a constraint, the slicing parameters are adaptively determined through iterative calculation, and the slicing configuration information is output. The slicing configuration information includes the grid layout, the actual slice size, the fill amount, and the overlap size. The original image is expanded according to the filling amount to obtain an expanded image, and multiple image slices with sizes that conform to the input size of the target processing unit are extracted from the expanded image based on the slice configuration information. Based on the overlap size, a weight mask generated based on a Gaussian function is used to feather and blend the image slices and stitch them together in layers to reconstruct a final image with the same size as the original image.

2. The large image processing method based on adaptive slicing and feathering fusion according to claim 1, characterized in that, The step of adaptively determining the slicing parameters through iterative calculation includes calculating the initial number of grid slices based on the size of the original image and the input size of the target processing unit; calculating the actual slice size based on the initial number of grid slices; and calculating the amount of padding to be added around each slice. Iteratively check whether the calculated fill amount meets the minimum overlap width requirement. If it does not meet the requirement, adjust the number of slices and recalculate until the minimum overlap width requirement is met.

3. The large image processing method based on adaptive slicing and feathering fusion according to claim 2, characterized in that, The iterative check and the slice quantity adjustment adopt a directional adjustment strategy, including increasing the slice quantity in the horizontal direction only when the horizontal fill amount does not meet the requirements; increasing the slice quantity in the vertical direction only when the vertical fill amount does not meet the requirements; and increasing the slice quantity in both directions simultaneously when the fill amount in both directions does not meet the requirements.

4. The large image processing method based on adaptive slicing and feathering fusion according to claim 1, characterized in that, The boundary expansion of the original image using a reflection-fill method includes copying the original image to the center area of ​​the expanded canvas; filling the left and right boundaries of the expanded canvas by copying the image edge pixels in a mirror-symmetric manner; and filling the top and bottom boundaries of the expanded canvas by copying the image edge pixels in a mirror-symmetric manner.

5. The large image processing method based on adaptive slicing and feathering fusion according to claim 1, characterized in that, The step of using a weighted mask generated based on a Gaussian function to feather and fuse the image slices includes generating a horizontal weighted mask for the horizontally overlapping region and a vertical weighted mask for the vertically overlapping region according to the overlap size; and weighting and fusing the corresponding pixel values ​​in the overlapping region with the weighted mask during stitching.

6. The large image processing method based on adaptive slicing and feathering fusion according to claim 1, characterized in that, The layered stitching includes performing horizontal feathering and fusion stitching on each row of image slices in parallel to obtain multiple stitched long strip images; performing vertical feathering and fusion stitching on the multiple long strip images to obtain a complete image including the filled area; and cropping the filled area to obtain the final image.

7. The large image processing method based on adaptive slicing and feathering fusion according to claim 1, characterized in that, The original image is a series of related images with the same spatial resolution; the method further includes: synchronously slicing the series of related images using the same slice configuration information, so that slices with the same position index are geometrically aligned in each image.

8. A large image processing method based on adaptive slicing and feathering fusion according to claim 7, characterized in that, The step of extracting multiple image slices from the expanded image with sizes matching the input size of the target processing unit also includes integrated preprocessing: merging multiple image slices from different associated images with the same location index to directly generate a multi-channel tensor, which serves as the input unit for subsequent processing.

9. A large image processing method based on adaptive slicing and feathering fusion according to claim 8, characterized in that, The multiple associated images are two temporally adjacent frames in the video sequence; the multi-channel tensor is a seven-channel tensor, including three color channels for each of the two frames and a parameter channel representing the time dimension.

10. A large image processing system based on adaptive slicing and feathering fusion, used to implement the method as described in any one of claims 1-9, characterized in that, It includes a parameter calculation module, a slicing processing module, and a stitching and reconstruction module; The parameter calculation module is used to obtain the size of the original image, the input size of the target processing unit, and the minimum overlap width requirement. Using the minimum overlap width requirement as a constraint, it adaptively determines the slicing parameters through iterative calculation and outputs the slicing configuration information. The slicing configuration information includes the grid layout, actual slicing size, fill amount, and overlap size. The slicing processing module is used to expand the boundaries of the original image according to the filling amount to obtain an expanded image, and extract multiple image slices with sizes that conform to the input size of the target processing unit from the expanded image based on the slicing configuration information. The stitching and reconstruction module is used to feather and blend the image slices and stitch them in layers using a weight mask generated based on a Gaussian function, based on the overlap size, to reconstruct a final image with the same size as the original image.