Stator inner wall image splicing compensation method, device and medium

By establishing a background consistency model using a unified unfolded coordinate system and prior stator periodic structure in the image stitching of the inner wall of a large generator stator, the occlusion area is accurately identified and classified, and an occlusion mask and pixel weight map are generated. The occlusion area is removed or downweighted and the missing area is compensated, thus solving the problems of feature mismatch and seam tearing caused by occlusion, and achieving robust stitching and complete coverage.

CN122510083APending Publication Date: 2026-08-04HUANENG NUCLEAR ENERGY TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUANENG NUCLEAR ENERGY TECH RES INST CO LTD
Filing Date
2026-04-24
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

During the inspection of the narrow air gap inside the stator of a large generator, the existing splicing methods cannot meet the requirements of robust splicing and complete coverage due to feature mismatch, seam tearing and cumulative drift caused by occlusion and unusable areas when the robot performs close-range imaging.

Method used

By projecting the image onto a unified unfolded coordinate system and combining the prior of the stator periodic structure to establish a background consistency model, the occlusion region is accurately identified and classified, an occlusion mask and pixel weight map are generated, the occlusion region is removed or downweighted, and the missing region is compensated by using redundant frames.

Benefits of technology

It significantly improves the integrity and readability of panoramic images, avoids missing inner wall image coverage, and meets the requirements for robust stitching and complete coverage in narrow air gap environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510083A_ABST
    Figure CN122510083A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a stator inner wall image stitching compensation method, device and medium. The stator inner wall image stitching compensation method comprises: obtaining a single frame unfolded tile corresponding to a stator inner wall; establishing a normal background consistency model on the single frame unfolded tile based on structure design data, generating a background credibility map; determining various types of occluded areas; based on the various types of occluded areas, generating a target occlusion mask corresponding to the various types of occluded areas, and generating a pixel weight map based on the target occlusion mask and the background credibility map; generating a global geometric alignment relationship based on the target occlusion mask and the pixel weight map; performing pixel fusion and joint optimization processing on the multiple unfolded tiles based on the global geometric alignment relationship, the target occlusion mask and the pixel weight map, to obtain a preliminary seamless panorama, and performing missing area compensation on the preliminary seamless panorama to obtain a compensated stator inner wall unfolded image. Thus, the robust stitching and complete coverage requirements in a narrow air gap environment can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method, device and medium for image stitching compensation of the inner wall of a stator. Background Technology

[0002] During the inspection of the narrow air gap inside the stator of a large generator, the image is easily obscured by factors such as the robot's body edge, dragging cables, local foreign objects, water and oil stains, and strong reflections during close-range imaging of the robot, resulting in obstruction and large unusable areas.

[0003] Currently, when stitching images acquired by robots, occluded and unusable areas directly participate in feature matching and registration calculations, which can easily lead to problems such as feature mismatch, seam tearing, and cumulative drift. If the image frames corresponding to occluded and unusable areas are discarded, the inner wall image coverage will be incomplete, and a complete unfolded image of the stator inner wall cannot be formed. Therefore, existing image stitching methods are difficult to meet the requirements of robust stitching and complete coverage in narrow air gap environments. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a method, device, and medium for image stitching compensation of the inner wall of a stator.

[0005] A first aspect of this disclosure provides a method for image stitching compensation of the inner wall of a stator, comprising: Obtain the structural design data, original image sequence, and imaging parameters corresponding to the original image sequence corresponding to the inner wall of the stator. Based on the structural design data, project and unfold each frame of the original image sequence to the unfolded coordinate system corresponding to the cylindrical surface of the stator to generate a single-frame unfolded image block. Based on structural design data, a normal background consistency model is established on a single frame unfolded tile to generate a background credibility map. Based on the background confidence map, occlusion region detection and classification are performed on the unfolded tiles of a single frame to obtain various occlusion regions; Based on various occlusion regions, a target occlusion mask corresponding to each type of occlusion region is generated, and a pixel weight map is generated based on the target occlusion mask and the background confidence map. Based on the target occlusion mask and pixel weight map, various occlusion regions are masked or downweighted, and a global geometric alignment relationship is generated based on the masked or downweighted occlusion regions. The global geometric alignment relationship is used to characterize the spatial position mapping relationship between the single frame unfolded tile and the global unfolded canvas. Based on global geometric alignment, target occlusion mask, and pixel weight map, pixel fusion and seam optimization are performed on multi-frame unfolded images to obtain a preliminary seamless panoramic image. Missing areas are compensated for in the preliminary seamless panoramic image to obtain the compensated unfolded image of the stator inner wall.

[0006] A second aspect of this disclosure provides a stator inner wall image stitching compensation device, comprising: The unfolded image generation module is used to obtain the structural design data, original image sequence and imaging parameters corresponding to the original image sequence corresponding to the inner wall of the stator, and project each frame of the original image sequence onto the unfolded coordinate system corresponding to the cylindrical surface of the stator based on the structural design data to generate a single-frame unfolded image. The credibility map generation module is used to build a normal background consistency model on a single frame unfolded tile based on structural design data and generate a background credibility map. The occlusion region identification module is used to detect and classify occlusion regions in a single frame unfolded tile based on the background confidence map, and obtain various types of occlusion regions. The pixel weight map generation module is used to generate target occlusion masks corresponding to various occlusion regions, and generate pixel weight maps based on the target occlusion masks and the background confidence map. The alignment relationship determination module is used to mask or reduce the weight of various occlusion regions based on the target occlusion mask and pixel weight map, and generate global geometric alignment relationship based on the masked or reduced weighted occlusion regions. The global geometric alignment relationship is used to characterize the spatial position mapping relationship between the single frame unfolded tile and the global unfolded canvas. The image compensation module is used to perform pixel fusion and seam optimization on multi-frame unfolded images based on global geometric alignment, target occlusion mask and pixel weight map to obtain a preliminary seamless panoramic image. The module then compensates for missing areas in the preliminary seamless panoramic image to obtain the compensated unfolded image of the stator inner wall.

[0007] A third aspect of this disclosure provides an electronic device, including: processor; Memory, used to store executable instructions; The processor is used to read executable instructions from memory and execute the executable instructions to implement the stator inner wall image stitching compensation method provided in the first aspect above.

[0008] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the stator inner wall image stitching compensation method provided in the first aspect.

[0009] A fifth aspect of this disclosure provides a computer program product comprising a computer program or instructions that, when executed by a processor, implement the stator inner wall image stitching compensation method as described in the first aspect above.

[0010] The technical solution provided in this disclosure has the following advantages compared with the prior art: The stator inner wall image stitching compensation method, device, and medium provided in this disclosure can accurately identify and classify various occlusion areas such as robot parts, cables, foreign objects, strong reflections, and water and oil stains by projecting the image onto a unified unfolded coordinate system and establishing a background consistency model based on the prior knowledge of the stator periodic structure. This generates a traceable occlusion mask and pixel weight map, and then forcibly removes or downweights occlusion areas during the anchor point extraction, registration, and geometric optimization stages, effectively suppressing problems such as mismatch and seam tearing caused by occlusion. At the same time, based on pixel fusion and seam optimization, redundant frames are used to compensate and fill missing areas, significantly improving the integrity and readability of the panoramic image, avoiding the problem of missing inner wall image coverage and the inability to form a complete unfolded image of the stator inner wall, and meeting the requirements of robust stitching and complete coverage in narrow air gap environments. Attached Figure Description

[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a stator inner wall image stitching compensation method provided in an embodiment of this disclosure; Figure 2 This is a flowchart of a method for determining geometric alignment relationships provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a stator inner wall image stitching compensation device provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0016] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0017] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0019] Typically, during the inspection of the narrow air gap inside the stator of a large generator, the image is easily obscured by factors such as the robot's body edge, dragging cables, local foreign objects, accumulated water and oil, and strong reflections, resulting in obstructions and large unusable areas.

[0020] Currently, when stitching images acquired by robots, occlusion and unusable areas directly participate in feature matching and registration calculations, easily leading to problems such as feature mismatch, seam tearing, and cumulative drift. Discarding image frames corresponding to occlusion and unusable areas results in missing inner wall image coverage, making it impossible to form a complete unfolded image of the stator inner wall. Simultaneously, due to the periodic structure of slots and ventilation hole arrays in large generator stators, texture repeatability is high and effective features are scarce, further amplifying the impact of occlusion on registration accuracy. Existing image stitching methods struggle to meet the requirements for robust stitching and complete coverage in narrow air gap environments. Therefore, a method is urgently needed that can automatically identify occlusion, effectively shield interference areas, and reliably compensate for missing parts to improve stitching quality and the reliability of inner wall defect detection. To address this problem, this disclosure provides a stator inner wall image stitching compensation method, which is described below with reference to specific embodiments.

[0021] Figure 1 This is a flowchart of a stator inner wall image stitching compensation method provided in an embodiment of the present disclosure. The method can be executed by a stator inner wall image stitching compensation device, which can be implemented in software and / or hardware. The stator inner wall image stitching compensation device can be configured in an electronic device, such as a server or terminal, wherein the terminal specifically includes a mobile phone, computer or tablet computer, etc.

[0022] like Figure 1 As shown, the stator inner wall image stitching compensation method provided in this embodiment includes the following steps.

[0023] S110. Obtain the structural design data, original image sequence, and imaging parameters corresponding to the original image sequence corresponding to the inner wall of the stator. Based on the structural design data, project each frame of the original image sequence onto the unfolded coordinate system corresponding to the cylindrical surface of the stator to generate a single-frame unfolded block.

[0024] In this embodiment of the disclosure, the original image sequence is a sequence of multiple frames of images continuously captured by an image acquisition device (such as a robot) during its movement along the inner wall of the stator, arranged in a temporal or spatial order.

[0025] Structural design data (G) refers to the set of design parameters for the generator stator, mainly including the stator inner diameter D, number of slots N, slot spacing rules, circumferential and axial arrangement rules of ventilation holes, hole row spacing, end reference position, axial zero point definition, circumferential zero point definition, and unfolding resolution. These parameters are known and precise geometric prior information.

[0026] Imaging parameters corresponding to the original image sequence may include the timestamp of each frame, the pose or relative motion information of the image acquisition device such as a robot, and the intrinsic parameters and distortion parameters of the image acquisition device.

[0027] Specifically, the electronic device can obtain the structural design data corresponding to the inner wall of the stator, the original image sequence, and the imaging parameters corresponding to the original image sequence from a preset database. It obtains the design radius r0 by dividing the stator inner diameter D by 2, calculates the total circumferential arc length C0 based on the design radius r0, and divides the total circumferential arc length C0 by the number of slots N to obtain the single-slot arc length ΔS0. Distortion correction and pose compensation are performed on each frame of the image. After projecting the pixels onto the stator cylindrical surface, a unified unfolded coordinate system is obtained. For any three-dimensional point (x, y, z), the circumferential angle θ = atan2(y, x) and the circumferential arc length S = r θ, axial distance Z=z. After aligning the zero points, the expanded coordinates are X=S. S0, Y=Z-Z0, generate a single-frame unfolded patch and pixel source index.

[0028] S120. Based on the structural design data, establish a normal background consistency model on the unfolded tiles of a single frame and generate a background credibility map.

[0029] In the embodiments of this disclosure, the background confidence map can be understood as a map used to characterize the confidence of each pixel.

[0030] Specifically, electronic devices can generate slot structure reliability maps and hole position reliability maps based on the distance rules and the circumferential and axial arrangement rules of ventilation holes in the structural design data. Then, based on the slot structure reliability map and hole position reliability map, the background reliability of each pixel is determined, and a background reliability map is generated.

[0031] S130. Based on the background confidence map, perform occlusion region detection and classification on the unfolded tiles of a single frame to obtain various types of occlusion regions.

[0032] In this embodiment of the disclosure, various occlusion areas may include structural occlusion candidate areas, cable occlusion areas, highly reflective occlusion areas, water stains and oil stains occlusion areas, texture abrupt change areas, etc.

[0033] Specifically, after acquiring the background confidence map, the electronic device can detect and classify the single-frame unfolded map based on the confidence value of each pixel in the background confidence map, as well as the contrast index, texture energy, brightness and other information of each pixel, and determine various occlusion areas.

[0034] S140. Based on various occlusion regions, generate target occlusion masks corresponding to various occlusion regions, and generate pixel weight maps based on target occlusion masks and background confidence maps.

[0035] In this embodiment of the disclosure, the pixel weight map is a map used to characterize the weight of each pixel.

[0036] Specifically, after acquiring various occlusion regions, the electronic device can generate a binary occlusion mask, i.e., an initial occlusion mask, for each type of occlusion region. Based on the type of each occlusion region, it can generate a target occlusion mask corresponding to each type of occlusion region. Furthermore, based on the background confidence map, it can write the background confidence into the target occlusion mask to generate a pixel weight map.

[0037] S150. Based on the target occlusion mask and pixel weight map, various occlusion regions are masked or weighted, and a global geometric alignment relationship is generated based on the masked or weighted occlusion regions.

[0038] In this embodiment of the disclosure, the global geometric alignment relationship is used to characterize the spatial position mapping relationship between a single-frame unfolded tile and the global unfolded canvas.

[0039] Specifically, electronic devices can determine trusted regions based on pixel weight maps, extract feature anchor points within trusted regions, and then perform registration and optimization based on feature anchor points to generate global geometric alignment relationships.

[0040] S160. Based on global geometric alignment, target occlusion mask and pixel weight map, pixel fusion and seam optimization are performed on the multi-frame unfolded image to obtain a preliminary seamless panoramic image. Missing areas are compensated for in the preliminary seamless panoramic image to obtain the compensated unfolded image of the stator inner wall.

[0041] Specifically, the electronic device can establish a global unfolded canvas to uniformly record pixel values, weights, and source indices in a grid. Based on the fusion writing rules, it can prohibit writing to the mask area and select the main source frame for the trusted area according to the comprehensive score. At the same time, it can construct a seam cost map based on the global geometric alignment relationship, target occlusion mask, and pixel weight map, and perform a smooth transition involving only brightness and color along the minimum cost path to generate a preliminary seamless panoramic image. On this basis, it can search for candidate frames in priority to compensate and fill missing areas. When compensation is not possible, it can output gap information and supplementary sampling suggestions. Finally, it can output the compensated unfolded image of the stator inner wall.

[0042] In this embodiment, by projecting the image onto a unified unfolded coordinate system and combining it with the prior knowledge of the stator periodic structure to establish a background consistency model, various occlusion areas such as robot parts, cables, foreign objects, strong reflections, and water and oil stains can be accurately identified and classified. A traceable occlusion mask and pixel weight map are generated, and then occlusion areas are forcibly removed or downweighted during the anchor point extraction, registration, and geometric optimization stages, effectively suppressing problems such as mismatch and seam tearing caused by occlusion. At the same time, based on pixel fusion and seam optimization, redundant frames are used to compensate and fill missing areas, significantly improving the integrity and readability of the panoramic image, avoiding the problem of missing inner wall image coverage and the inability to form a complete unfolded image of the stator inner wall, and meeting the requirements of robust stitching and complete coverage in narrow air gap environments.

[0043] In this embodiment, a normal background consistency model is established on a single-frame unfolded image based on structural design data to generate a background credibility map. Specifically, this may include: generating theoretical slot centerline position coordinates in the single-frame unfolded image based on slot spacing rules in the structural design data; calculating actual slot centerline position coordinates, slot centerline error, and slot centerline confidence based on the axial structural response of the single-frame unfolded image to generate a slot structure credibility map; generating theoretical ventilation hole centerline position coordinates in the single-frame unfolded image based on ventilation hole rules in the structural design data; performing hole position detection in the single-frame unfolded image to obtain actual ventilation hole centerline position coordinates and ventilation hole center error to generate a hole position credibility map; calculating the minimum credibility value corresponding to each pixel in the slot structure credibility map and hole position credibility map, and determining the minimum value as the background credibility of each pixel; determining brightness anomaly candidate regions and low gradient anomaly candidate regions in the single-frame unfolded image, adjusting the background credibility of each pixel based on the brightness anomaly candidate regions and low gradient anomaly candidate regions, and generating a background credibility map based on the adjusted target background credibility.

[0044] Specifically, generating a slot structure confidence map may include: generating theoretical slot centerline position coordinates based on slot spacing rules in structural design data; for each unfolded block, extracting structural feature information (including slot line response map) corresponding to the unfolded block in the axial direction, determining the actual slot centerline position coordinates corresponding to the unfolded block based on the structural feature information and theoretical slot centerline position coordinates; determining the slot centerline error and slot centerline confidence based on the theoretical slot centerline position coordinates and the actual slot centerline position coordinates; and determining the slot structure confidence map corresponding to the actual slot centerline based on the actual slot centerline position coordinates.

[0045] For example, the structural response along the axial direction is extracted from the unfolded block Ui to obtain the slot line response map R_slot (i.e., structural feature information); then, based on the slot spacing rules in the structural design data, the theoretical slot centerline position coordinate sequence X_k = X0 + k·ΔS (k is an integer) is generated with the circumferential starting zero point X0 and the single slot arc length ΔS. The actual peak position of the slot line response map is searched in the local neighborhood near each theoretical slot centerline X_k, and it is used as the actual slot centerline position coordinate. Based on this, the slot line deviation e_k and slot line confidence q_k between the theoretical position and the actual position are calculated; finally, based on the above results, the slot structure confidence map C_slot is generated, and its assignment rule is: take a high confidence value in the area near the actual slot centerline, take the median value in the slot area between adjacent slots, and take a low confidence value in abnormal areas where the slot line is missing or the deviation exceeds a preset threshold.

[0046] The generation of the hole position confidence map can specifically include: generating the theoretical ventilation hole center position coordinates based on the ventilation hole rules in the structural design data; performing hole position detection on each unfolded block to obtain the actual ventilation hole center position coordinates; determining the ventilation hole center error based on the theoretical ventilation hole center position coordinates and the actual ventilation hole center position coordinates; and determining the hole position confidence map corresponding to the actual ventilation hole center based on the actual ventilation hole center position coordinates.

[0047] For example, firstly, based on the ventilation hole rules in the structural design data (including the axial spacing, circumferential spacing, and array arrangement of ventilation holes), a predicted grid of theoretical ventilation hole center position coordinates is generated, resulting in the predicted hole center set H_pred; then, hole position detection (such as morphological or template matching methods) is performed on each unfolded tile Ui to extract the actually observed ventilation hole center positions, resulting in the actual ventilation hole center set H_obs; next, each actually detected ventilation hole center is matched with the nearest theoretical predicted hole center, and the spatial distance residual e_h between the two is calculated, which is the ventilation hole center error; finally, based on the above results, a hole position confidence map C_hole is generated, and its assignment rule is as follows: for the location area with a small distance residual e_h (i.e., the actual hole position and the theoretical position are highly consistent) and the hole shape meets the characteristics of boundary closure and regular shape, a high confidence value is assigned, while for the area with a large residual or abnormal hole shape (such as defects, deformation, or partial occlusion), a low confidence value is assigned.

[0048] The determination of candidate regions for brightness anomalies and candidate regions for low gradient anomalies may specifically include: for each unfolded patch, calculating the mean local brightness and variance local brightness of the unfolded patch; calculating the sum of the absolute values ​​of the brightness changes of each pixel in the unfolded patch in the circumferential direction and the sum of the absolute values ​​of the brightness changes in the circumferential direction, and determining the local gradient energy of the unfolded patch; determining candidate patches for brightness anomalies based on the mean local brightness and variance local brightness; comparing the local gradient energy with a preset energy threshold to determine candidate patches for low gradient anomalies, wherein the candidate patches for low gradient anomalies include local anomaly regions with low gradients.

[0049] For example, for each unfolded patch Ui, firstly, its local brightness mean μ_L and local brightness variance σ_L² are calculated to characterize the average brightness and contrast level within each local window; simultaneously, the sum of the absolute values ​​of the brightness changes of each pixel in the unfolded patch in the circumferential direction (X direction) and the axial direction (Y direction) is calculated, i.e., the local gradient energy G = | I / X|+| I / Y| is used to characterize the texture richness and edge strength of the region. Then, based on the specific model and the configuration of the ambient light source, various normal range thresholds are pre-frozen and set. Regions where the local brightness mean μ_L and local brightness variance σ_L² exceed the normal range are marked as brightness anomaly candidate patches M_L, and regions where the local gradient energy G is lower than the preset energy threshold are marked as low gradient anomaly candidate patches M_G. Finally, brightness anomaly candidate patches M_L and low gradient anomaly candidate patches M_G are output as binary candidate maps, where the low gradient anomaly candidate patch M_G contains all local anomaly regions with insufficient gradient energy due to texture blurring and loss of detail.

[0050] Furthermore, generating the background credibility map may specifically include: determining the minimum value of the credibility corresponding to each pixel in the slot structure credibility map and the hole position credibility map, and determining the minimum value as the background credibility corresponding to each pixel; adjusting the background credibility based on the brightness anomaly candidate map block and the low gradient anomaly candidate map block to obtain the target background credibility, and obtaining the background credibility map based on the target background credibility.

[0051] For example, for each pixel location, the minimum confidence value between the slot structure confidence map C_slot and the hole confidence map C_hole is taken as the base background confidence C_bg for that pixel. In scenarios without ventilation holes, the slot structure confidence map is directly used as the base background confidence. Then, the brightness anomaly candidate patch M_L and the low gradient anomaly candidate patch M_G are introduced as penalty terms into the adjustment process: for regions marked as "true" (i.e., brightness anomaly or low gradient anomaly exists) in the brightness anomaly candidate patch M_L and the low gradient anomaly candidate patch M_G, a reduction penalty operation is performed on the base background confidence C_bg to further decrease the confidence value of these regions; for regions without anomalies, the base background confidence remains unchanged. After the above adjustments, the final target background confidence C_bg′ for each pixel is obtained. The C_bg′ of all pixels together constitute the final background confidence map, which comprehensively reflects the overall confidence level of the pixel in multiple dimensions such as structural periodicity, hole accuracy, brightness normality, and texture clarity.

[0052] In this embodiment, a background credibility map is constructed by taking the minimum value of the fused slot credibility and aperture credibility, and then using brightness anomalies and low gradient anomalies as penalty terms for correction. This multi-dimensional conservative fusion strategy ensures that pixels are only assigned high credibility when both structural periodicity and aperture position accuracy are reliable, effectively suppressing misjudgments caused by single structural feature anomalies. At the same time, optical imaging quality (brightness anomalies, texture blurring) is explicitly included in the penalty mechanism, so that the credibility of occluded areas such as strong reflections, water stains, and oil stains is reasonably reduced, avoiding their contamination of subsequent feature extraction and registration processes. In addition, this method uniformly quantizes into a single background credibility map, providing a stable and configurable input for occlusion candidate detection, and can adapt to different models with / without ventilation holes, ultimately improving the robustness, accuracy, and traceability of the stitching system.

[0053] In this embodiment of the disclosure, based on the background confidence map, occlusion region detection and classification are performed on the unfolded map of a single frame to obtain various types of occlusion regions. Specifically, this may include: based on the background confidence map, determining the target region in the unfolded map of a single frame with a background confidence lower than a preset confidence threshold to obtain a set of connected components; determining the area, perimeter, aspect ratio of the minimum bounding rectangle, and first principal direction angle corresponding to the connected component; and determining that the difference between the first principal direction angle corresponding to the target connected component and the second principal direction angle corresponding to the center line of the slot in the set of connected components is less than a preset angle threshold, and that the target connected component spans multiple slot areas and does not exhibit a periodic repetition feature of slot spacing, then determining the target connected component as a structural occlusion candidate region, i.e., a large outline occlusion candidate region.

[0054] Slender ridge structures are extracted from the unfolded tiles of a single frame to obtain a set of line structures. The width, length, curvature and number of slots of each line structure in the line structure combination are calculated. If the width of the target line structure in the line structure set is within the preset width range, the length exceeds the preset length threshold, the number of slots is greater than the preset number threshold, and the target line structure appears at the same coordinate position in the unfolded tiles of adjacent frames, the line structure is determined to be a cable-type occlusion area.

[0055] The pixel intensity in the unfolded image is compared with a preset intensity threshold to generate a highlight determination image. The highlighted connected components in the highlight determination image are extracted, as well as the first area, saturation coverage (the ratio of saturated pixel area to the total area of ​​the connected components), and mean local gradient energy corresponding to the highlighted connected components. If it is determined that the saturation coverage is greater than the preset coverage threshold or the first area is greater than the preset area threshold, and the mean local gradient energy is higher than the preset gradient energy threshold, the highlighted connected component is determined to be a strong reflective occlusion area, i.e., an optically unusable area. Determine the local contrast index and local mean texture energy T=| ​​for each region of the unfolded tile in a single frame. ²I|, where, ²I is the Laplacian operator, which represents the second derivative of the image brightness. When the local contrast index is determined to be lower than the preset contrast threshold, the local mean of texture energy is lower than the preset texture energy threshold, and the region is continuously distributed in a sheet-like manner and the center line of the occlusion groove is blocked, the region is determined to be a water stain or oil stain occlusion region.

[0056] In a single-frame unfolded tile, identify texture abrupt changes in the center lines of each slot at the theoretical slot center line coordinates or in each ventilation hole at the theoretical ventilation hole center coordinates. If the texture abrupt change region has clear boundaries, its internal texture is inconsistent with the slot texture direction, and it does not appear repeatedly at the same coordinate position in adjacent frame unfolded tiles, then this texture abrupt change region is identified as a candidate region for foreign object occlusion. This candidate region for foreign object occlusion is also output as a key anomaly object; it is not smoothed before subsequent compensation, and its original boundary evidence is preserved.

[0057] In this embodiment, differentiated and accurate detection and classification can be achieved based on the geometric shape, texture features, and spatiotemporal distribution patterns of different occlusion sources, thereby providing a basis for category adaptation processing for subsequent mask expansion, weight assignment, and compensation strategies. At the same time, by solidifying the occlusion category and confidence level into the metadata, the credible area, compensation source, and uncompensable gap of the final panoramic image can all be traced back to the specific occlusion type, which significantly improves the interpretability of the generator inner wall detection results and the pertinence of on-site verification and supplementary sampling operations.

[0058] In this embodiment of the disclosure, a target occlusion mask corresponding to each type of occlusion region is generated. Specifically, this may include: generating an initial occlusion mask based on each type of occlusion region; determining the expansion radius corresponding to each type of occlusion region based on the occlusion type of each type of occlusion region; and performing dilation processing on the initial occlusion mask based on the expansion radius to obtain the target occlusion mask.

[0059] Specifically, the electronic device can merge the generated occlusion regions to obtain merged occlusion regions, and generate an initial mask corresponding to the merged occlusion regions, i.e., a binary occlusion mask. Preprocessing is performed on the initial mask (including morphological closing operations to fill holes, and then morphological opening operations to remove isolated noise points) to obtain a preprocessed mask. The expansion radius corresponding to different occlusion types is determined based on the occlusion type of the occlusion region. Based on the expansion radius, the preprocessed mask is dilated to obtain the target occlusion mask M_occ. Among these, the expansion radius of candidate regions with strong reflections and cables is larger, while the expansion radius of occlusion regions with foreign objects is smaller.

[0060] Furthermore, generating a pixel weight map based on the target occlusion mask and the background confidence map can specifically include: inverting each pixel in the target mask, i.e., W0=1-M_occ, to obtain the basic weight map W0; writing the background confidence into the weights, i.e., W1=W0·C_bg′, to obtain the first weight map W1; and constructing a smoothing buffer on the mask boundary corresponding to the first weight map W1 to obtain the second weight map W, i.e., the pixel weight map.

[0061] The occlusion area is determined based on the target mask, and the ratio of the occlusion area to the total area inside the stator is determined as the occlusion coverage rate. The area of ​​the effective region where the weight value of a pixel in the pixel weight map is higher than the first preset weight threshold is determined, and the ratio of the effective region area to the total region area is calculated to obtain the effective coverage rate. The occlusion area percentage corresponding to each occlusion type is calculated, and the occlusion area percentage, mask version number, threshold version number, frame number, and coordinate range are recorded.

[0062] In this embodiment, a continuous and spatially adaptive pixel-level weight field is generated by combining the occlusion mask, background confidence map, and boundary buffer smooth transition. This results in zero weight for the occlusion core area, reduced weight for the low-confidence background area, and smooth gradient of weight for the mask boundary area. This achieves dual control of shielding and reducing weight for occlusion and unusable areas during subsequent anchor point extraction, registration optimization, and fusion writing processes. This not only eliminates the participation of occlusion areas in feature matching from the source to reduce the risk of misregistration, but also avoids tearing caused by hard boundaries at the seams, while retaining the progressive contribution of usable pixels near the boundaries, ultimately improving the geometric consistency and visual continuity of panoramic stitching.

[0063] The following will combine Figure 2 The details of generating global geometric alignment relationships are explained in detail.

[0064] Figure 2 This is a flowchart of a method for determining geometric alignment relationships provided in an embodiment of this disclosure, such as... Figure 2 As shown, various occlusion regions are masked or downweighted based on the target occlusion mask and pixel weight map, and a global geometric alignment relationship is generated based on the masked or downweighted occlusion regions. Specifically, this may include the following steps: S210. Determine the reliable region based on the pixel weight map, and extract the center line of the slot, the boundary of the slot opening and the center of the ventilation hole within the reliable region as feature anchor points for image registration.

[0065] In this embodiment of the disclosure, the trusted region is the region where the pixel weight is higher than a preset pixel weight threshold.

[0066] Specifically, the electronic device can process reliable regions with weights higher than a preset threshold based on the unfolded single-frame patches corresponding to two adjacent image frames and their respective pixel weight maps generated in the pre-stitching step. Within these regions, feature points with definite structural identities, such as the center line of the slot, the boundary of the slot opening, and the center of the ventilation hole, are detected and extracted as high-reliability feature anchor points for registration. This results in high-quality anchor point sets for each of the two image frames. Anchor point extraction is prohibited in the masked area to avoid misidentifying occluded edges as structural features.

[0067] S220. With the goal of minimizing the total error of the feature anchor points, the unfolded blocks of adjacent frames are registered based on the feature anchor points to obtain the geometric transformation relationship between frames.

[0068] Specifically, the electronic device can process the anchor points of the two frames based on the high-confidence anchor point set obtained above, and the prior knowledge of the periodic structure of the stator slot pitch and hole positions. It establishes accurate inter-frame anchor point matching pairs through slot / hole number alignment and geometric consistency verification (such as the RANSAC algorithm). This results in a matching relationship set composed of reliable, one-to-one corresponding anchor point pairs. Based on all anchor point pairs in the matching relationship set, iterative optimization is performed with the objective of minimizing the sum of squared residuals of the position transformations of all matching anchor point pairs. This yields the optimal inter-frame geometric transformation relationship characterizing the relative position and orientation between the two frames.

[0069] S230. Construct a global pose graph based on the inter-frame geometric transformation relationship, optimize the global pose graph, and obtain the global geometric alignment relationship.

[0070] Specifically, a global pose graph is constructed using all inter-frame geometric transformation relationships as edges and the poses of each frame as nodes. For each pair of frames, the effective overlap area and the number of effective anchor points are calculated simultaneously. If the effective overlap area or the number of effective anchor points is lower than a preset threshold, the weight of that edge in the global optimization is reduced, potentially triggering a re-sampling suggestion or replacing it with an adjacent frame. Finally, optimization (such as nonlinear least squares optimization based on the Levenberg-Marquardt algorithm) is performed on the global pose graph to find the optimal pose for each frame that minimizes the global reprojection error of anchor points in all reliable regions. This yields the spatial mapping relationship between each frame's unfolded tiles and the global unfolded canvas, i.e., the global geometric alignment relationship. After optimization, anchor point residual statistics are output and compared with the residuals before masking, serving as quantitative evidence for reducing mismatch risk during occlusion processing.

[0071] In this embodiment of the disclosure, by constructing and optimizing the global pose graph, the global geometric alignment relationship can be completely dominated by the reliable background structure (groove lines and hole positions), which significantly improves the global consistency of splicing in the environment of large periodic repetitive structure. In addition, by outputting the change in anchor point residuals before and after occlusion, quantifiable evidence is provided for reducing the risk of mismatch in occlusion processing, which enhances the credibility and auditability of the splicing results.

[0072] In this embodiment, pixel fusion and seam optimization are performed on multi-frame unfolded patches based on global geometric alignment, target occlusion mask, and pixel weight map to obtain a preliminary seamless panoramic image. Specifically, this may include: constructing a global unfolded canvas and mapping single-frame unfolded patches onto the global unfolded canvas according to global geometric alignment; performing pixel fusion on each grid on the global unfolded canvas based on the target occlusion mask and pixel weight map; constructing a seam cost map based on the gradient energy corresponding to the single-frame unfolded patch, the target occlusion mask, and the local alignment residual mapping, wherein the local alignment residual mapping is determined based on the difference between the position differences of each feature anchor point in the unfolded patches of adjacent frames; determining the seam path based on the seam cost map, and performing seam optimization on the seam path to obtain a preliminary seamless panoramic image.

[0073] Specifically, the electronic device can establish a global canvas based on an unfolded coordinate system. Each grid of the global canvas records information such as pixel value, pixel weight, source frame image index, and source pixel index. Each single-frame unfolded patch is mapped to its corresponding grid position on the canvas according to global geometric alignment. Then, pixel fusion processing is performed on each grid on the global unfolded canvas based on the target occlusion mask and pixel weight map. Specifically, the pixel weight of the target occlusion mask region is forcibly set to zero, prohibiting its writing to the canvas. Confidential regions are written according to the comprehensive score. When multiple frames compete for the same grid, the frame with the highest comprehensive score is selected as the primary writing source, and the remaining frames are retained as secondary evidence. Next, a seam cost map is constructed based on the gradient energy corresponding to the single-frame unfolded patch, the target occlusion mask, and the local alignment residual mapping. A seam path is determined along the minimum cost path using dynamic programming or graph cut methods, prioritizing the avoidance of occlusion boundaries and high residual regions. Finally, seam optimization processing is performed on the seam path. During fusion, only brightness and color are smoothly transitioned, without changing the positions of structural boundaries such as slot lines and hole positions, thus generating a preliminary seamless panoramic image.

[0074] The specific formula for calculating the overall score is as follows: Score = a·Q_sharp + b·Q_expo + c·Q_angle + d·Q_residual, where Q_sharp is the sharpness score, Q_expo is the exposure reasonableness score, Q_angle is the near normal angle score, Q_residual is the anchor point residual consistency score, and a, b, c, and d are fixed weights and versioned.

[0075] Seam cost diagram cost=λ1·| I|+λ2·M_occ+λ3·E_align, where E_align is the local alignment residual mapping and λ is a fixed weight and versioning.

[0076] In this embodiment, by constructing a global unfolded canvas and selectively writing to it during multi-frame competition based on a comprehensive score, while forcing the weight of the occluded mask area to be zero and the trusted area to be fused according to weight, it is ensured that each pixel in the panoramic image comes from the best quality and unoccluded available frame, significantly improving the clarity, exposure consistency and viewpoint rationality of the unfolded image. On this basis, the seam cost map is used to guide the seam path to pass through the direction of minimum cost, prioritizing the avoidance of occlusion boundaries and high residual areas, effectively suppressing the seam tearing phenomenon. In addition, the seam fusion only performs a smooth transition on brightness and color without changing the position of structural boundaries such as groove lines and hole positions, ensuring the true expression of the defect body shape, avoiding the concealment of real anomalies or the introduction of false structures due to splicing processing, and providing a high-fidelity panoramic image foundation for subsequent defect identification and trend analysis.

[0077] In this embodiment of the disclosure, missing area compensation is performed on the preliminary seamless panoramic image to obtain a compensated unfolded image of the stator inner wall. Specifically, this may include: if it is determined that there are pixel missing areas in the preliminary seamless panoramic image, using the coordinates of the pixel missing areas in the unfolded coordinate system as an index, retrieving image frames covering the coordinate range as candidate compensation frames; calculating the target comprehensive score of each candidate compensation frame within the pixel missing area, and sorting the target comprehensive scores to obtain a sorting result; determining the target compensation frame based on the sorting result, and filling the pixel missing areas based on the target compensation frame to obtain the compensated unfolded image of the stator inner wall.

[0078] Specifically, when it is determined that the target grid in the global canvas is missing valid pixels and the target grid has candidate pixels with pixel weights higher than a preset weight threshold in any frame image, a compensation mechanism is triggered. This mechanism prioritizes the gaps in the defect interest area for compensation. The gap regions within the preset defect interest area are determined. Based on the coordinate range corresponding to the gap regions, a candidate frame set is determined. The candidate frame set is a collection of multiple frames containing the coordinate range corresponding to the gap regions. A comprehensive target score is calculated for each candidate frame in the candidate frame set. The candidate frames are then sorted based on the comprehensive target score to obtain a ranking result. Based on the ranking result, the top-ranked main compensation frame is first selected to fill the gap regions (specifically, the pixel position to be filled is determined; the gap regions are filled based on the pixel data corresponding to the pixel position of the optimal candidate frame). If the gap is not completely filled, the remaining area is filled sequentially using subsequent candidate compensation frames. When multiple frames overlap in the same coordinate area, they are fused according to their weights, and a list of source frames and their respective weights are retained for each grid for easy review and traceability. If the weights of all candidate compensation frames in the gap area are lower than the threshold, it is determined to be an uncompensable gap. The coordinate range, area, occlusion category, and suggested re-sampling action of the gap are output as the basis for the closed-loop operation on site, and finally the compensated stator inner wall unfolded image is obtained.

[0079] In this embodiment, candidate compensation frames are retrieved using global expanded coordinates as an index, and the highest-quality main compensation frame is prioritized for filling after being sorted by comprehensive score. Simultaneously, alternative frames are used sequentially to fill in any gaps, achieving refined, multi-layered compensation for occluded areas and significantly improving pixel availability and coverage integrity. Higher priority is given to defect-related areas of interest, ensuring the priority preservation of key evidence chains. When multiple frames overlap, they are fused according to weights, and the source frame list and weight records are retained, guaranteeing the traceability of the compensation process and the verifiability of the results. For gaps that cannot be compensated, the coordinate range, area, occlusion type, main cause, and supplementary acquisition suggestions are clearly output, providing a closed-loop operational basis for on-site re-inspection and secondary acquisition. This improves the completeness of the panoramic image while also considering the audit friendliness and engineering operability of the evidence chain.

[0080] In this embodiment of the disclosure, after obtaining the compensated stator inner wall unfolded image, the stator inner wall image stitching compensation method may further include: calculating the compensation fill rate and the compensation gap rate of the compensated stator inner wall unfolded image; establishing the correlation between the compensation fill rate, the compensation gap rate, and the parameter information of various occlusion areas and the compensated stator inner wall unfolded image.

[0081] In this embodiment of the disclosure, the compensation fill rate is obtained as the ratio of the area in the occluded region successfully filled by redundant frames to the total area of ​​the original occluded region. That is, the compensation fill rate R_fill = A_fill ÷ A_occ, where A_fill is the area in the occluded region successfully filled by redundant frames.

[0082] The compensation gap ratio R_gap = A_gap ÷ A_total, where A_gap is the area still missing; A_total is the total area of ​​the panoramic unfolded view of the stator inner wall.

[0083] Specifically, the electronic device can calculate the compensation fill rate and compensation gap rate of the compensated stator inner wall unfolded image, and establish the correlation between the above-mentioned compensation fill rate, compensation gap rate, and parameter information of various occlusion areas (including the occlusion coverage rate and area ratio of each category output per frame, the occlusion heat map and occlusion category distribution map of panoramic output, anchor point residual change, overlap area consistency index, seam continuity index, etc.) and the compensated stator inner wall unfolded image. The specific method is as follows: for each occlusion, record its coordinate range, category, confidence level, mask parameter version, frame index participating in compensation, and compensation result level, and bind all records with the unfolded image version number to ensure traceability of cross-round review, thereby forming a complete quality audit closed loop.

[0084] In this embodiment, by calculating the compensation fill rate and the compensation gap rate, and establishing the correlation between these quantitative indicators, various occlusion area parameter information, and the final unfolded image, a quantitative evaluation and end-to-end traceability of the occlusion processing and compensation effect are achieved. Specifically, indicators such as occlusion coverage rate and anchor point residual change can intuitively demonstrate the actual contribution of occlusion shielding and compensation operations to reducing the risk of mismatch and improving stitching quality. Furthermore, binding information such as the coordinate range, category, confidence level, mask version, compensation source frame index, and compensation result level of each occlusion with the unfolded image version number provides a complete audit basis for on-site review, dispute verification, and cross-round trend comparison, significantly enhancing the credibility, interpretability, and engineering closed-loop capability of the detection results, and ensuring traceability of cross-round review.

[0085] Figure 3 This is a schematic diagram of the structure of a stator inner wall image stitching compensation device provided in an embodiment of this disclosure.

[0086] In this embodiment, the stator inner wall image stitching compensation device can be disposed within an electronic device and is understood as a functional module of the aforementioned electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes mobile phones, computers, or tablet computers, etc., without limitation.

[0087] like Figure 3As shown, the stator inner wall image stitching compensation device 300 may include an unfolded patch generation module 310, a confidence map generation module 320, an occlusion area recognition module 330, a pixel weight map generation module 340, an alignment relationship determination module 350, and an image compensation module 360.

[0088] The unfolded block generation module 310 can be used to obtain the structural design data, original image sequence and imaging parameters corresponding to the original image sequence corresponding to the inner wall of the stator, and project each frame of the original image sequence onto the unfolded coordinate system corresponding to the cylindrical surface of the stator based on the structural design data to generate a single-frame unfolded block. The credibility map generation module 320 can be used to establish a normal background consistency model on a single frame unfolded tile based on structural design data and generate a background credibility map. The occlusion region recognition module 330 can be used to detect and classify occlusion regions in a single frame unfolded tile based on the background confidence map, and obtain various types of occlusion regions. The pixel weight map generation module 340 can be used to generate target occlusion masks corresponding to various occlusion regions, and generate pixel weight maps based on the target occlusion mask and the background confidence map. The alignment relationship determination module 350 can be used to mask or reduce the weight of various occlusion regions based on the target occlusion mask and pixel weight map, and generate a global geometric alignment relationship based on the masked or reduced weighted occlusion regions. The global geometric alignment relationship is used to characterize the spatial position mapping relationship between the single frame unfolded tile and the global unfolded canvas. The image compensation module 360 ​​can be used to perform pixel fusion and seam optimization on multi-frame unfolded blocks based on global geometric alignment, target occlusion mask and pixel weight map to obtain a preliminary seamless panoramic image. Then, the missing area of ​​the preliminary seamless panoramic image is compensated to obtain the compensated unfolded image of the stator inner wall.

[0089] In this embodiment, by projecting the image onto a unified unfolded coordinate system and combining it with the prior knowledge of the stator periodic structure to establish a background consistency model, various occlusion areas such as robot parts, cables, foreign objects, strong reflections, and water and oil stains can be accurately identified and classified. A traceable occlusion mask and pixel weight map are generated, and then occlusion areas are forcibly removed or downweighted during the anchor point extraction, registration, and geometric optimization stages, effectively suppressing problems such as mismatch and seam tearing caused by occlusion. At the same time, based on pixel fusion and seam optimization, redundant frames are used to compensate and fill missing areas, significantly improving the integrity and readability of the panoramic image, avoiding the problem of missing inner wall image coverage and the inability to form a complete unfolded image of the stator inner wall, and meeting the requirements of robust stitching and complete coverage in narrow air gap environments.

[0090] In some embodiments of this disclosure, the confidence map generation module 320 can be specifically used to generate the theoretical slot centerline position coordinates in a single-frame unfolded block based on the slot spacing rules in the structural design data; Based on the structural response of a single-frame unfolded block along the axial direction, the actual centerline position coordinates of the groove, the error of the groove centerline, and the confidence level of the groove centerline are calculated to generate a groove structure confidence map. Based on the ventilation hole rules in the structural design data, the coordinates of the theoretical ventilation hole center position are generated in the single-frame unfolded block; Hole location detection is performed in a single frame unfolded block to obtain the actual center position coordinates of the ventilation hole and the center error of the ventilation hole, and a hole location reliability map is generated. Calculate the minimum confidence level of each pixel in the slot structure confidence map and hole location confidence map, and determine the minimum value as the background confidence level of each pixel; Identify the candidate regions for brightness anomalies and low gradient anomalies in the unfolded image of a single frame. Adjust the background confidence of each pixel based on the candidate regions for brightness anomalies and low gradient anomalies. Generate a background confidence map based on the adjusted target background confidence.

[0091] In some embodiments of this disclosure, the occlusion region identification module 330 can be specifically used to determine, based on the background confidence map, the target region in the unfolded map of a single frame with a background confidence level lower than a preset confidence threshold, and obtain a set of connected components. If the difference between the first principal direction angle corresponding to the target connected region and the second principal direction angle corresponding to the center line of the slot is less than a preset angle threshold, and the target connected region spans multiple slot regions and does not exhibit the characteristic of periodic repetition of slot spacing, the target connected region is determined as a candidate region for structural occlusion. Extract the slender ridge structure from the unfolded tiles of a single frame to obtain a set of line structures; If the width of the target line structure in the set of line structures is within the preset width range, the length exceeds the preset length threshold, the number of slots is greater than the preset number threshold, and the target line structure appears at the same coordinate position in the unfolded tiles of adjacent frames, then the line structure is determined to be a cable-type occlusion area. Determine the highlighted connected components in the unfolded image of a single frame, as well as the first area, saturation coverage, and mean local gradient energy of the highlighted connected components; If the saturation coverage rate is greater than the preset coverage rate threshold or the first area is greater than the preset area threshold, and the average local gradient energy is higher than the preset gradient energy threshold, the bright connected region is determined to be a strong reflective occlusion region. Determine the local contrast index and local mean texture energy of each region in the unfolded image of a single frame; If the local contrast index is lower than the preset contrast threshold, the local average texture energy is lower than the preset texture energy threshold, and the area is distributed in a continuous sheet pattern and the center line of the occlusion groove is blocked, the area is determined to be a water stain and oil stain occlusion area. Identify texture abrupt regions in a single frame unfolded block that do not conform to the ventilation hole structure at the coordinates of the theoretical slot centerline or the coordinates of the theoretical ventilation hole centerline. If the boundaries of the texture mutation region are clear, the internal texture and groove direction of the texture mutation region are inconsistent, and it does not appear repeatedly at the same coordinate position in the unfolded tiles of adjacent frames, the texture mutation region is determined as a candidate region for foreign object occlusion.

[0092] In some embodiments of this disclosure, the pixel weight map generation module 340 can be specifically used to generate an initial occlusion mask based on various occlusion regions; The expansion radius corresponding to each type of occlusion area is determined based on the occlusion type of each occlusion area. The initial occlusion mask is expanded based on the expansion radius to obtain the target occlusion mask.

[0093] In some embodiments of this disclosure, the alignment relationship determination module 350 can be specifically used to determine a reliable region based on a pixel weight map, and extract the center line of the slot, the boundary of the slot opening and the center of the ventilation hole in the reliable region as feature anchor points for image registration. The reliable region is a region where the pixel weight is higher than a preset pixel weight threshold. With the goal of minimizing the total error of feature anchor points, the unfolded patches of adjacent frames are registered based on feature anchor points to obtain the geometric transformation relationship between frames. A global pose graph is constructed based on the inter-frame geometric transformation relationship. The global pose graph is then optimized to obtain the global geometric alignment relationship.

[0094] In some embodiments of this disclosure, the image compensation module 360 ​​can be specifically used to construct a global unfolded canvas and map single-frame unfolded tiles to the global unfolded canvas according to global geometric alignment relationships; Pixel fusion processing is performed on each grid on the globally expanded canvas based on the target occlusion mask and pixel weight map; A seam cost map is constructed based on the gradient energy, target occlusion mask, and local alignment residual mapping corresponding to the unfolded patch of a single frame. The local alignment residual mapping is determined based on the difference between the position differences of each feature anchor point in the unfolded patch of adjacent frames. The seam path is determined based on the seam cost map, and the seam path is optimized to obtain a preliminary seamless panoramic image.

[0095] In some embodiments of this disclosure, the image compensation module 360 ​​may also be specifically used to retrieve image frames covering the coordinate range as candidate compensation frames when it is determined that there are pixel missing areas in the preliminary seamless panoramic image, using the coordinates of the pixel missing areas in the unfolded coordinate system as an index. Calculate the overall target score of each candidate compensation frame within the pixel missing region, and sort the overall target scores to obtain the sorting results; The target compensation frame is determined based on the sorting results. The pixel missing area is filled and compensated based on the target compensation frame to obtain the compensated stator inner wall unfolded image.

[0096] In some embodiments of this disclosure, the stator inner wall image stitching compensation device 300 may further include an information processing module.

[0097] The information processing module can be used to calculate the compensation fill rate and compensation gap rate of the compensated stator inner wall unfolded image after obtaining the compensated stator inner wall unfolded image; Establish the correlation between the compensation fill rate, the compensation gap rate, the parameter information of various occluded areas, and the unfolded image of the stator inner wall after compensation.

[0098] It should be noted that, Figure 3 The stator inner wall image stitching compensation device 300 shown can perform each step in the above method embodiments and achieve each process and effect in the above method embodiments, which will not be elaborated here.

[0099] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0100] In this embodiment of the disclosure, Figure 4 The electronic devices shown can be servers or terminals, and terminals specifically include mobile phones, computers, or tablets, etc., without limitation.

[0101] like Figure 4 As shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.

[0102] Specifically, the processor 410 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this disclosure.

[0103] Memory 420 may include a large-capacity storage device for information or instructions. For example, and not limitingly, memory 420 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 420 may include removable or non-removable (or fixed) media. Where appropriate, memory 420 may be internal or external to the integrated gateway device. In a particular embodiment, memory 420 is a non-volatile solid-state memory. In a particular embodiment, memory 420 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0104] The processor 410 reads and executes the computer program instructions stored in the memory 420 to perform the steps of the stator inner wall image stitching compensation method provided in the embodiments of this disclosure.

[0105] In one example, the electronic device may also include a transceiver 430 and a bus 440. Wherein, as... Figure 4 As shown, the processor 410, memory 420 and transceiver 430 are connected via bus 440 and communicate with each other.

[0106] Bus 440 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 440 may include one or more buses.

[0107] This disclosure also provides a computer-readable storage medium that can store a computer program. When the computer program is executed by a processor, the processor enables the processor to implement the stator inner wall image stitching compensation method provided in this disclosure.

[0108] The aforementioned storage medium may, for example, include a memory 420 containing computer program instructions, which can be executed by a processor 410 of an electronic device to complete the stator inner wall image stitching compensation method provided in this embodiment. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device.

[0109] This disclosure also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the stator inner wall image stitching compensation method provided in this disclosure, and can achieve the various processes and effects in the above embodiments of this disclosure, which will not be elaborated here.

[0110] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for image stitching compensation of the inner wall of a stator, characterized in that, The method includes: Obtain the structural design data, original image sequence, and imaging parameters corresponding to the original image sequence corresponding to the inner wall of the stator. Based on the structural design data, project and unfold each frame of the original image sequence to the unfolded coordinate system corresponding to the cylindrical surface of the stator to generate a single-frame unfolded image block. Based on the structural design data, a normal background consistency model is established on the single-frame unfolded block to generate a background credibility map. Based on the background confidence map, occlusion region detection and classification are performed on the single frame unfolded tile to obtain various occlusion regions; Based on the various occlusion regions, a target occlusion mask corresponding to each type of occlusion region is generated, and a pixel weight map is generated based on the target occlusion mask and the background confidence map. Based on the target occlusion mask and the pixel weight map, the various types of occlusion regions are masked or downweighted, and a global geometric alignment relationship is generated based on the masked or downweighted occlusion regions. The global geometric alignment relationship is used to characterize the spatial position mapping relationship between a single frame unfolded tile and the global unfolded canvas. Based on the global geometric alignment relationship, the target occlusion mask, and the pixel weight map, pixel fusion and seam optimization are performed on the unfolded blocks of multiple frames to obtain a preliminary seamless panoramic image. Missing regions are compensated for in the preliminary seamless panoramic image to obtain the compensated unfolded image of the stator inner wall.

2. The method according to claim 1, characterized in that, The process of establishing a normal background consistency model on the single-frame unfolded tile based on the structural design data and generating a background credibility map includes: Based on the slot spacing rules in the structural design data, the theoretical slot centerline position coordinates are generated in the single-frame unfolded block; Based on the axial structural response of the single-frame unfolded block, the actual groove centerline position coordinates, groove centerline error and groove centerline confidence are calculated to generate a groove structure confidence map. Based on the ventilation hole rules in the structural design data, the theoretical ventilation hole center position coordinates are generated in the single-frame unfolded block; Hole position detection is performed in the single-frame unfolded block to obtain the actual ventilation hole center position coordinates and ventilation hole center error, and a hole position reliability map is generated. Calculate the minimum confidence level of each pixel in the groove structure confidence map and the hole position confidence map, and determine the minimum value as the background confidence level of each pixel; Identify the candidate regions for brightness anomalies and low gradient anomalies in the single-frame unfolded image, adjust the background confidence of each pixel based on the candidate regions for brightness anomalies and low gradient anomalies, and generate a background confidence map based on the adjusted target background confidence.

3. The method according to claim 1, characterized in that, Based on the background confidence map, occlusion region detection and classification are performed on the unfolded tiles of the single frame to obtain various types of occlusion regions, including: Based on the background confidence map, target regions in the single-frame unfolded map with background confidence lower than a preset confidence threshold are determined, and a set of connected components is obtained. If the difference between the first principal direction angle corresponding to the target connected region and the second principal direction angle corresponding to the center line of the slot in the set of connected regions is less than a preset angle threshold, and the target connected region spans multiple slot areas and does not exhibit the characteristic of periodic repetition of slot spacing, the target connected region is determined to be a candidate region for structural occlusion. The elongated ridge structure is extracted from the single-frame unfolded image to obtain a set of line structures; If the width of the target line structure in the set of line structures is within a preset width range, the length exceeds a preset length threshold, the number of slots is greater than a preset number threshold, and the target line structure appears at the same coordinate position in the unfolded tiles of adjacent frames, then the line structure is determined to be a cable-type occlusion area. Determine the highlighted connected components in the single-frame unfolded image, as well as the first area, saturation coverage, and mean local gradient energy of the highlighted connected components; If the saturation coverage rate is greater than a preset coverage threshold or the first area is greater than a preset area threshold, and the average local gradient energy is higher than a preset gradient energy threshold, then the bright connected region is determined to be a strong reflective occlusion region. Determine the local contrast index and local mean texture energy of each region corresponding to the single-frame unfolded patch; If the local contrast index is lower than the preset contrast threshold, the local average texture energy is lower than the preset texture energy threshold, and the area is distributed in a continuous sheet shape and the center line of the occlusion groove is blocked, then the area is determined to be a water stain or oil stain occlusion area. Identify texture abrupt regions in the single-frame unfolded block that do not conform to the ventilation hole structure at the coordinates of the theoretical slot centerline or the coordinates of the theoretical ventilation hole centerline. If the boundary of the texture abrupt change region is clear, the internal texture and groove direction of the texture abrupt change region are inconsistent, and it does not appear repeatedly at the same coordinate position in the unfolded tiles of adjacent frames, the texture abrupt change region is determined to be a candidate region for foreign object occlusion.

4. The method according to claim 1, characterized in that, The step of generating a target occlusion mask corresponding to each of the various occlusion regions includes: An initial occlusion mask is generated based on the various occlusion regions; The expansion radius corresponding to each type of occlusion area is determined based on the occlusion type of the occlusion area. The initial occlusion mask is expanded based on the expansion radius to obtain the target occlusion mask.

5. The method according to claim 1, characterized in that, The step of masking or downweighting the various occlusion regions based on the target occlusion mask and the pixel weight map, and generating a global geometric alignment relationship based on the masked or downweighted occlusion regions, includes: Based on the pixel weight map, a reliable region is determined, and the center line of the slot, the boundary of the slot opening, and the center of the ventilation hole within the reliable region are extracted as feature anchor points for image registration. The reliable region is a region where the pixel weight is higher than a preset pixel weight threshold. With the goal of minimizing the total error of the feature anchor points, the unfolded blocks of adjacent frames are registered based on the feature anchor points to obtain the inter-frame geometric transformation relationship. A global pose graph is constructed based on the inter-frame geometric transformation relationship, and the global pose graph is optimized to obtain the global geometric alignment relationship.

6. The method according to claim 1, characterized in that, The process of performing pixel fusion and seam optimization on multi-frame unfolded patches based on the global geometric alignment relationship, the target occlusion mask, and the pixel weight map to obtain a preliminary seamless panoramic image includes: Construct a global expandable canvas, and map the single-frame expandable tiles to the global expandable canvas according to the global geometric alignment relationship; Pixel fusion processing is performed on each grid on the global expanded canvas based on the target occlusion mask and the pixel weight map; A seam cost map is constructed based on the gradient energy corresponding to the single-frame unfolded patch, the target occlusion mask, and the local alignment residual mapping. The local alignment residual mapping is determined based on the difference between the position differences of each feature anchor point in the unfolded patches of adjacent frames. Based on the seam cost map, the seam path is determined, and the seam path is optimized to obtain the preliminary seamless panoramic image.

7. The method according to claim 1, characterized in that, The step of compensating for missing regions in the preliminary seamless panoramic image to obtain a compensated unfolded image of the stator inner wall includes: If it is determined that there are pixel missing areas in the preliminary seamless panoramic image, the image frames covering the coordinate range of the pixel missing areas in the unfolded coordinate system are retrieved as candidate compensation frames, using the coordinates of the pixel missing areas in the unfolded coordinate system as indexes. Calculate the target comprehensive score of each candidate compensation frame within the pixel missing area, and sort the target comprehensive scores to obtain the sorting result; Based on the sorting results, a target compensation frame is determined, and the pixel missing area is filled and compensated based on the target compensation frame to obtain the compensated stator inner wall unfolded image.

8. The method according to claim 1, characterized in that, After obtaining the compensated unfolded image of the stator inner wall, the method further includes: Calculate the compensation fill rate and the compensation gap rate of the expanded image of the inner wall of the stator after compensation; Establish the correlation between the compensation fill rate and the compensation gap rate, as well as the parameter information of the various occlusion areas, and the unfolded image of the compensated stator inner wall.

9. An electronic device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the stator inner wall image stitching compensation method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the stator inner wall image stitching compensation method according to any one of claims 1-8.