A liquid lens multi-focus image fusion method based on radial region division
Patent Information
- Application Number
- CN202611167819.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-09-25
AI Technical Summary
可以解决现有技术中因液态镜头调焦产生径向畸变导致图像结构错位、传统融合方式与清晰区域径向分布特性不匹配而引发融合伪影及细节丢失的问题
[0010]通过本申请,由于对液态镜头采集的多幅不同焦距图像进行径向畸变校正以统一空间结构,并以图像中心建立径向坐标体系划分同心环区域,在各区域内评价清晰度并选取最优区域进行融合,因此,可以解决现有技术中因液态镜头调焦产生径向畸变导致图像结构错位、传统融合方式与清晰区域径向分布特性不匹配而引发融合伪影及细节丢失的问题,达到保证多焦图像空间结构一致性、提升融合图像全视场清晰度与结构连续性的技术效果。
Smart Images

Figure CN122820459A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision technology, and in particular to a liquid lens multifocal image fusion method based on radial region division. Background Technology
[0002] In the field of industrial vision inspection, for targets with a large depth range, such as pipe holes, deep cavities, and pipe inner walls, fixed-focus lenses struggle to achieve clear imaging across the entire field of view in a single shot. Liquid lenses, with their advantages of electronically controlled rapid focusing and the absence of mechanical moving parts, can quickly acquire multiple images from different focal planes, providing an imaging foundation for multi-focal image fusion to generate clear, full-depth images. However, existing multi-focal image fusion methods still have significant shortcomings when applied to liquid lens imaging systems.
[0003] On the one hand, liquid lenses achieve focusing by altering the curvature of the liquid interface. Different focal lengths result in varying degrees of radial geometric distortion, causing pixel shifts in the same object structure across multiple images. Direct fusion of these images easily leads to structural misalignment and ghosting in image edge regions, failing to guarantee spatial structural consistency across multi-focal images. On the other hand, traditional fusion methods often employ pixel-by-pixel sharpness comparison or rectangular region division for sharpness evaluation and region selection. This is incompatible with the radially concentric distribution of sharp regions in liquid lens imaging and the structural characteristics of axisymmetric targets. This easily leads to fusion artifacts and detail loss in focal transition areas, making it difficult to consistently acquire sharp fused images across the entire field of view, thus limiting the accuracy and operational stability of industrial visual inspection. Summary of the Invention
[0004] This application provides a multifocal image fusion method for liquid lenses based on radial region division. It can solve the problems in existing technologies, such as image structure misalignment caused by radial distortion due to focusing of liquid lenses, and fusion artifacts and loss of detail caused by the mismatch between traditional fusion methods and the radial distribution characteristics of sharp regions.
[0005] According to a first aspect of this application, a liquid lens multifocal image fusion method based on radial region partitioning is provided, comprising: Multiple images were captured using a liquid lens at different focal lengths; Radial distortion correction is performed on multiple acquired images to ensure that the spatial structure of the images remains consistent. A radial coordinate system is established with the image center as the reference, and each image is divided into multiple concentric ring regions according to a preset radius interval; For each concentric ring region, calculate the sharpness evaluation value of each image within that region; For each concentric ring region, compare the sharpness evaluation values of all images in the corresponding region, select the image with the highest sharpness evaluation value as the pixel source of that region, and generate a pixel source mapping map; Based on the pixel source map, pixels from corresponding regions are selected from multiple images and fused to generate a fused image.
[0006] According to a second aspect of this application, a liquid lens multifocal image fusion apparatus based on radial region partitioning is provided, comprising: The acquisition module is configured to acquire multiple images at different focal lengths using a liquid lens. The correction module is configured to perform radial distortion correction on multiple acquired images to ensure that the spatial structure of the multiple images remains consistent. The segmentation module is configured to establish a radial coordinate system based on the image center and divide each image into multiple concentric ring regions according to a preset radius interval; The calculation module is configured to calculate the sharpness evaluation value of each image within each concentric ring region. The first generation module is configured to compare the sharpness evaluation values of all images in the corresponding region for each concentric ring region, select the image with the highest sharpness evaluation value as the pixel source of that region, and generate a pixel source mapping map. The second generation module is configured to select pixels from corresponding regions in multiple images based on the pixel source map and fuse them to generate a fused image.
[0007] According to a third aspect of this application, an electronic device is provided, comprising: At least one processor; and memory that is communicatively connected to at least one processor; The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the aforementioned first aspect of the liquid lens multifocal image fusion method based on radial region division.
[0008] According to a fourth aspect of this application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the liquid lens multifocal image fusion method based on radial region division of the first aspect described above.
[0009] According to a fifth aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the liquid lens multifocal image fusion method based on radial region partitioning as described in the first aspect above.
[0010] By performing radial distortion correction on multiple images with different focal lengths acquired by the liquid lens to unify the spatial structure, and establishing a radial coordinate system based on the image center to divide concentric ring regions, the sharpness of each region is evaluated and the optimal region is selected for fusion. Therefore, the problems of image structure misalignment caused by radial distortion due to focusing of the liquid lens, fusion artifacts and loss of details caused by mismatch between traditional fusion methods and the radial distribution characteristics of sharp regions can be solved in the prior art. This achieves the technical effect of ensuring the consistency of the spatial structure of multi-focal images and improving the sharpness and structural continuity of the fused image across the entire field of view.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A schematic flowchart illustrating a liquid lens multifocal image fusion method based on radial region partitioning provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a liquid lens multifocal image fusion device based on radial region division, provided in an embodiment of this application. Detailed Implementation
[0014] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0015] The following describes an embodiment of the liquid lens multifocal image fusion method based on radial region division according to the accompanying drawings.
[0016] Figure 1 This is a flowchart illustrating a liquid lens multifocal image fusion method based on radial region division, provided in an embodiment of this application.
[0017] like Figure 1 As shown, the method includes the following steps: Step 101: Acquire multiple images at different focal lengths using a liquid lens.
[0018] In some embodiments, in a liquid lens imaging system, by changing the driving voltage of the liquid lens, the curvature of the liquid interface inside the lens can be changed, thereby achieving continuous adjustment of the focal length and obtaining imaging effects under different focal length conditions.
[0019] During the acquisition process, multiple sets of different driving voltage parameters were sequentially set, corresponding to different focal lengths and focal plane positions, and multiple images were acquired in succession. These images correspond to clear focal planes at different depth positions, collectively covering the overall depth range of the detected target, providing raw imaging data for subsequent panoramic depth image fusion.
[0020] This acquisition method relies on the characteristics of liquid lenses, which have no moving mechanical parts and fast focusing speed, to complete the acquisition of multi-focal image sequences in a short time. It is suitable for the high-efficiency imaging requirements of industrial visual inspection, while ensuring the consistency of the field of view of images with different focal lengths, providing a reliable raw data foundation for subsequent image processing.
[0021] Step 102: Perform radial distortion correction on the acquired multiple images to ensure that the spatial structure of the multiple images remains consistent.
[0022] In some embodiments, liquid lenses achieve focal length adjustment by changing the curvature of the liquid interface. At different focal lengths, the morphology of the liquid interface inside the lens differs, resulting in varying degrees of radial geometric distortion in the image. This type of distortion exhibits a regular distribution with reference to the image center, with lower distortion in the central region and gradually increasing distortion in the peripheral regions further away from the center, ultimately causing the pixel positions of the same object structure to shift in images at different focal lengths.
[0023] Radial distortion correction is performed on multiple acquired images. The geometric deformation of each focal length image is corrected by radial geometric transformation, eliminating the spatial structure differences between different images. This ensures that all images to be fused maintain a consistent spatial structure under a unified coordinate system, ensuring that the same target structure corresponds to the same pixel position in different images, thus providing a consistent spatial reference for subsequent image fusion processing.
[0024] This correction step effectively eliminates geometric shifts between images with different focal lengths, avoids structural misalignment and ghosting during the fusion process, ensures the spatial accuracy of multifocal image fusion, and improves the overall quality of the final fused image.
[0025] Step 103: Establish a radial coordinate system based on the image center, and divide each image into multiple concentric ring regions according to a preset radius interval.
[0026] In some embodiments, a radial coordinate system is established with the image center as the reference origin. The radial distance from each pixel in the image to the center is calculated, generating a corresponding radial distance map. This allows the pixel positions of the entire image to be uniformly described by the radial radius parameter. This coordinate system is adapted to the structural characteristics of axisymmetric targets in industrial inspection and also matches the optical characteristics of the radial distribution of the clear area during liquid lens imaging.
[0027] The entire image is divided into multiple concentric ring regions radially according to a preset radius interval. The radius interval is set based on the image resolution and the size of the target structure, dividing the image radius into 10 to 30 concentric rings to ensure that the number of pixels within a single ring is sufficient to support stable feature calculations, while controlling the total number of regions to balance processing efficiency. Smaller radius intervals are used in regions near the image center to improve the segmentation accuracy of the central region; larger radius intervals are used in the peripheral regions far from the center to adapt to the variation of radial distortion as the radius increases.
[0028] By using the above radial region division method, the image region division logic can be matched with the target structure distribution and lens imaging characteristics, avoiding the problem of mismatch between traditional rectangular blocks and radial distribution features, and providing reasonable region units for subsequent regional image processing.
[0029] Step 104: For each concentric ring region, calculate the sharpness evaluation value of each image within that region.
[0030] In some embodiments, sharpness evaluation processing is performed on the image after radial region segmentation. First, a Laplacian operation is performed on the entire image to extract the second-order differential features. The absolute value of the result is taken as the initial sharpness response. This response can intuitively reflect the richness of edge details in the local area of the image; the higher the value, the higher the image sharpness of the corresponding area. Subsequently, Gaussian filtering is applied to the initial sharpness response to suppress the interference of image noise and local texture fluctuations on the evaluation result, resulting in a smoothed sharpness response map.
[0031] For each concentric ring region, extract the sharpness response values corresponding to all pixels within that region, calculate the arithmetic mean of all values, and use this mean as the sharpness evaluation value of the image in the corresponding concentric ring region. Perform the above calculation sequentially for each input image to obtain the set of sharpness evaluation values for all concentric ring regions corresponding to each image.
[0032] This evaluation method combines radial region division to carry out regional-level clarity quantification, which can not only ensure the stability of the evaluation results and reduce misjudgments caused by noise, but also adapt to the radial distribution characteristics of the clear area of liquid lens, providing an accurate quantitative basis for the subsequent selection of the optimal focus area. At the same time, it effectively reduces the computational complexity compared with the pixel-by-pixel evaluation method.
[0033] Step 105: For each concentric ring region, compare the sharpness evaluation values of all images in the corresponding region, select the image with the highest sharpness evaluation value as the pixel source of that region, and generate a pixel source mapping map.
[0034] In some embodiments, for each concentric ring region, all images with different focal lengths to be fused are traversed, and the sharpness evaluation value of each image in that region is compared one by one. The image with the highest evaluation value is selected and determined as the pixel source of that concentric ring region. Since the sharpness region of liquid lens imaging is radially concentrically distributed, this selection logic is highly compatible with the imaging characteristics and can match the most accurately focused focal plane image for each radial radius interval.
[0035] After determining the source images for all concentric ring regions, a pixel source mapping map is generated. This mapping map has the same size as the original image, and each pixel position records the source image identifier corresponding to its concentric ring region. It can be directly used to indicate the source of each pixel value during the final fusion process, realizing region-level image source mapping.
[0036] By using this region-level optimal focus selection method, the problem of noise interference in pixel-by-pixel selection can be avoided, the structural continuity of the fusion region can be improved, and the clear regional features of radial distribution can be adapted to reduce fusion artifacts at the focus transition, thus ensuring the overall clarity and structural consistency of the subsequent fused image.
[0037] Step 106: Based on the pixel source mapping map, select pixels from the corresponding regions of multiple images for fusion to generate a fused image.
[0038] In some embodiments, based on the constructed pixel source map, the source image identifier corresponding to each position is read pixel by pixel. Pixel values at the same coordinate positions are extracted from the image at the corresponding focal length according to the identifier. Pixels at all positions are then combined according to their spatial positions to generate the final fused image. This fusion process uses concentric ring regions as basic units to switch pixel sources. The region selection logic matches the radial distribution characteristics of the clear area of the liquid lens, ensuring that each radial region is taken from the focal plane image with the clearest focus.
[0039] This fusion method selects pixels based on regional-level sharpness evaluation results, without the need for complex multi-scale transformations or frequency domain decomposition. The processing logic is clear, the computational load is controllable, and it can adapt to the processing efficiency requirements of industrial vision inspection scenarios.
[0040] This fusion step integrates the sharp regions of images with different focal lengths, achieving high-definition imaging across the entire field of view of the image. This effectively compensates for the insufficient depth of field of a single focal length image, providing a stable and reliable image foundation for subsequent structural detail recognition and defect detection.
[0041] Compared with related technologies, this embodiment acquires multiple images at different focal lengths using a liquid lens; radial distortion correction is performed on the acquired images to ensure consistent spatial structure; a radial coordinate system is established with the image center as the reference, and each image is divided into multiple concentric ring regions at preset radius intervals; for each concentric ring region, the sharpness evaluation value of each image within that region is calculated; for each concentric ring region, the sharpness evaluation values of all images in the corresponding region are compared, and the image with the highest sharpness evaluation value is selected as the pixel source for that region, generating a pixel source mapping map; based on the pixel source mapping map, pixels from the corresponding regions are selected from the multiple images for fusion to generate a fused image. This solves the problems of image structure misalignment caused by radial distortion due to focusing of the liquid lens, and fusion artifacts and detail loss caused by the mismatch between traditional fusion methods and the radial distribution characteristics of sharp regions in existing technologies, achieving the technical effect of ensuring the consistency of spatial structure of multi-focal images and improving the sharpness and structural continuity of the fused image across the entire field of view.
[0042] As a specific embodiment of this application, based on the basic scheme, each image is further divided into multiple concentric ring regions according to a preset radius interval, including: Based on the image resolution and target structure size, a preset radius interval is set to divide the image radius into 10 to 30 concentric rings; A smaller radius interval is used in the area near the center, and a larger radius interval is used in the area far from the center.
[0043] Specifically, when dividing concentric ring regions, the preset radius interval needs to be set in combination with the image resolution and the target structure size. The higher the image resolution and the richer the details of the target structure, the smaller the radius interval can be to improve the region division accuracy; when the target structure size is large and the texture features are few, the interval can be increased to reduce the amount of computation.
[0044] After the overall segmentation is completed, the number of concentric rings in the radial direction of the image is controlled between 10 and 30. This range ensures that each ring contains a sufficient number of pixels to support stable sharpness evaluation calculations and avoids significant fluctuations in evaluation results due to insufficient pixels; at the same time, it keeps the number of regions within a reasonable range to avoid excessive rings that would increase computational complexity, thus balancing fusion accuracy and processing efficiency.
[0045] The region segmentation adopts a non-uniform interval strategy. A smaller radius interval is used in the region near the image center to improve the segmentation granularity and sharpness evaluation accuracy of the central region. A larger radius interval is used in the peripheral region far from the image center to adapt to the change law of radial distortion with the increase of radius in the liquid lens imaging process, while matching the distribution characteristics of more pixels in the peripheral region.
[0046] This partitioning method allows the region granularity to be adapted to the structural features and distortion characteristics of different radial positions in the image. Under the premise of controlling the overall computational load, it improves the fusion detail performance of the central region and makes the region partitioning more in line with the imaging characteristics of the liquid lens and the structural features of the axisymmetric detection target.
[0047] As a specific implementation of this application, based on the basic scheme, radial distortion correction is further defined for multiple acquired images, including: Each image is preprocessed, including grayscale conversion, noise reduction, and edge extraction; Edge contour extraction is performed on the preprocessed image to obtain circular or annular structures in the image, and the common center position of the image is estimated using the random sampling consistency method. Based on the location of the common center, calculate the distance from each contour point to the center, perform cluster analysis on the radius, and obtain multiple feature radii; Select one of the feature radii as the anchor point radius, and estimate the radial distortion parameters between different images based on the anchor point radius; Radial geometric transformation is performed on multiple images based on radial distortion parameters to ensure that the spatial structure of the multiple images remains consistent.
[0048] Specifically, when performing radial distortion correction, each image is first preprocessed. The images are converted to single-channel grayscale to simplify computation, noise reduction is performed to suppress random noise introduced during the acquisition process, and then edge extraction is performed to highlight structural boundary information in the images, providing a stable data foundation for subsequent contour analysis.
[0049] Edge contour extraction is performed on the preprocessed image to identify circular or annular structures within the image. A random sampling consistency method is used to fit the contour data, estimating the location of the common center of the image. This method effectively eliminates interference from abnormal edge points, improving the reliability of the center localization results. Based on the common center location, the radial distance from all contour points to the center is calculated. Cluster analysis is performed on the radius values to obtain multiple feature radii in the image. One feature radius with high stability is selected as the anchor point radius. Using this radius as a benchmark, the radii differences of corresponding structures in images with different focal lengths are compared to estimate the radial distortion parameters between different images.
[0050] Based on the estimated radial distortion parameters, radial geometric transformation is performed on each image to correct the geometric deformation caused by different focal lengths, so that all images to be fused maintain a consistent spatial structure under a unified coordinate system.
[0051] This correction process relies on the structural features of the image itself to estimate distortion parameters. No additional calibration equipment is required. It is adaptable to industrial imaging environments and can effectively eliminate radial geometric offset between images with different focal lengths. It avoids structural misalignment and ghosting during the fusion process and ensures the spatial accuracy of subsequent fusion processing.
[0052] As a specific embodiment of this application, based on the basic scheme, the estimation method of the radial distortion parameter is further defined as follows: The first distortion parameter is estimated based on the radius distribution of the image structure, and the second distortion parameter is estimated based on the image contour structure. The first distortion parameter and the second distortion parameter are then weighted and fused to obtain the final radial distortion parameter.
[0053] Specifically, radial distortion parameters are estimated using a multi-source structural feature fusion approach. The first distortion parameter is estimated based on the image's structural radius distribution. Multiple feature radii are extracted from the image, and the deformation distribution patterns at different radial positions are analyzed. This is then fitted using a radial distortion model to obtain the corresponding distortion parameter. This parameter reflects the overall radial distortion trend of the image and is suitable for large-scale radius deformation correction requirements. The second distortion parameter is estimated based on the image's contour structure. Structural edges and complete contour information are extracted from the image, and the geometric shape changes in different radius regions are analyzed. The distortion parameter is calculated through curve fitting. This parameter provides a more refined characterization of local contour deformation and is suitable for precise edge structure correction requirements.
[0054] The first and second distortion parameters are weighted and fused, with corresponding weight coefficients set according to the stability of the structural features within the image. When the ring structure in the image is uniformly distributed and the radius feature is stable, the weight ratio of the first distortion parameter is increased; when the image has rich contour details and complete edge structure, the weight ratio of the second distortion parameter is increased. The final radial distortion parameter is obtained after weighted calculation.
[0055] By fusing the estimation results of two different types of structural features, the estimation bias caused by noise and missing local structures of a single feature can be reduced, the stability and accuracy of distortion parameter estimation can be improved, and the accuracy of radial geometric correction can be improved, thus ensuring the reliability of spatial structure alignment of multiple images.
[0056] As a specific implementation of this application, based on the basic scheme, the calculation method for the sharpness evaluation value is further defined as follows: The image is processed by Laplacian operation, and the absolute value is taken as the sharpness response. Gaussian filtering is then used for smoothing. The mean sharpness value is calculated within each concentric ring region as the sharpness evaluation value for that region.
[0057] Specifically, when calculating the sharpness evaluation value, a Laplacian operation is first performed on the image. This extracts information about abrupt changes in grayscale using a second-order differential operator, enhancing the response intensity of edges and detailed textures. Regions with higher image sharpness exhibit more dramatic grayscale changes, resulting in higher amplitude Laplacian operation responses. The absolute value of the calculation result is taken as the initial sharpness response, eliminating the difference between positive and negative signs in the differential operation and uniformly representing the sharpness of a region using numerical values.
[0058] The initial sharpness response is smoothed by Gaussian filtering. The weighted average of neighboring pixels is used to suppress local response fluctuations caused by image noise and isolated texture points, so as to avoid local outliers from interfering with the overall evaluation results and make the distribution of sharpness response more consistent with the distribution of sharp areas on the actual focal plane.
[0059] After smoothing, within each concentric ring region, the sharpness response values of all pixels covered by that region are statistically analyzed, and the arithmetic mean of all values is calculated. This mean is used as the sharpness evaluation value of the image in the corresponding concentric ring region.
[0060] This evaluation method combines the high sensitivity of the Laplacian operator to details with the stability of regional mean statistics. It is adapted to the regional division form of radial concentric rings, can accurately quantify the imaging clarity of each radial region, effectively reduce noise interference, and provide a reliable quantitative basis for the subsequent selection of the optimal focal region.
[0061] As a specific implementation of this application, in addition to the basic solution, before generating the fused image, it further includes: Gaussian smoothing is applied to the pixel source map to smooth the pixel transition at the boundaries of each concentric ring region.
[0062] Specifically, before generating the final fused image, the constructed pixel source map is Gaussian smoothed. The pixel source map is divided by concentric ring boundaries, with different ring regions corresponding to different source image identifiers. There are clear pixel source jumps at the boundaries, and directly using them for pixel selection can easily produce abrupt region stitching marks in the fusion result.
[0063] Gaussian smoothing uses a Gaussian kernel function to convolve the mapping image. Through weighted calculations of neighboring pixels, it smooths the boundary regions, resulting in a gradual change in pixel source identification at the ring boundaries, rather than an abrupt jump. The smoothing level can be adjusted according to the actual imaging scene and target structural features, softening the boundary transitions between adjacent concentric rings while preserving the source identification results for each ring region.
[0064] This smoothing process effectively eliminates splicing marks and visual abrupt changes at the boundaries of annular regions in fused images, avoids fusion artifacts in focal transition areas, makes the connection between image content on different focal planes more natural, ensures the structural continuity and visual consistency of fused images, and improves the reliability of boundary region detail and defect identification in subsequent industrial inspections.
[0065] As a specific implementation of this application, based on the basic scheme, the target to be detected is further defined as an axisymmetric structure, including a pipe seat water flow hole, a central hole, or the inner wall of a casing pipe.
[0066] Specifically, this method is applicable to the detection of targets with axisymmetric structures, such as water outlets, central holes, and inner walls of cladding tubes. These targets are common in industrial inspection scenarios. Their overall structure is distributed in a concentric ring around the central axis. After imaging, they exhibit radially symmetrical structural features with the image center as the reference in the image plane. Structural details and defects are mostly distributed along the ring direction.
[0067] These types of targets typically have a large depth range, and single-focal-length imaging is insufficient to simultaneously capture clear details across the entire depth region. Therefore, multi-focal fusion is necessary to obtain a full depth-of-field image. Furthermore, their inherent axisymmetric structural characteristics are highly compatible with the processing logic of radial coordinate systems based on the image center and concentric ring region division. This allows the image region division method to match the target's structural distribution, avoiding fusion boundary problems caused by misalignment between rectangular block methods and ring structures.
[0068] By adapting a radial region fusion scheme to this type of axisymmetric target, the multi-focal image fusion effect of pipe holes and inner wall structures can be effectively improved, ensuring the clear presentation of key information such as inner wall texture and minor defects, and improving the detection accuracy and operational stability of industrial automation inspection systems.
[0069] Figure 2 This is a schematic diagram of the structure of a liquid lens multifocal image fusion device based on radial region division provided in an embodiment of this application, as shown below. Figure 2 As shown, it includes: The acquisition module 201 is configured to acquire multiple images at different focal lengths using a liquid lens. The correction module 202 is configured to perform radial distortion correction on multiple acquired images to ensure that the spatial structure of the multiple images remains consistent. The segmentation module 203 is configured to establish a radial coordinate system based on the image center and divide each image into multiple concentric ring regions according to a preset radius interval; The calculation module 204 is configured to calculate the sharpness evaluation value of each image in each concentric ring region. The first generation module 205 is configured to compare the sharpness evaluation values of all images in the corresponding region for each concentric ring region, select the image with the highest sharpness evaluation value as the pixel source of that region, and generate a pixel source mapping map. The second generation module 206 is configured to select pixels from corresponding regions in multiple images and fuse them to generate a fused image based on the pixel source map.
[0070] It should be noted that other corresponding descriptions of the functional units involved in the liquid lens multifocal image fusion device based on radial region division provided in this embodiment can be found in [reference]. Figure 1 The corresponding descriptions in [the document] will not be repeated here.
[0071] Based on the above, Figure 1 The embodiment illustrates a liquid lens multifocal image fusion method based on radial region partitioning. Correspondingly, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method. Figure 1 This paper presents a liquid lens multifocal image fusion method based on radial region division.
[0072] Based on the above, Figure 1 This embodiment illustrates a liquid lens multifocal image fusion method based on radial region partitioning. Correspondingly, it also provides a computer program product storing a computer program that, when executed by a processor, implements the above-described method. Figure 1 This paper presents a liquid lens multifocal image fusion method based on radial region division.
[0073] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0074] Based on the above, Figure 1 This illustrates a liquid lens multifocal image fusion method based on radial region partitioning, and... Figure 2To achieve the above objectives, the present application also provides an electronic device, such as a personal computer or a server, in the illustrated virtual device embodiment. This device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to implement the above-described virtual device. Figure 1 This paper presents a liquid lens multifocal image fusion method based on radial region division.
[0075] In some embodiments, the aforementioned physical device may further include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, an input unit such as a keyboard, etc., and optionally, a USB interface, a card reader interface, etc. In some embodiments, the network interface may include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc.
[0076] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0077] 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. Unless otherwise specified, 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 the element.
[0078] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. 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 application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for multifocal image fusion using a liquid lens based on radial region partitioning, characterized in that, include: Multiple images were captured using a liquid lens at different focal lengths; Radial distortion correction is performed on the acquired multiple images to ensure that the spatial structure of the multiple images remains consistent; A radial coordinate system is established with the image center as the reference, and each image is divided into multiple concentric ring regions according to a preset radius interval; For each of the concentric ring regions, calculate the sharpness evaluation value of each image within that region; For each concentric ring region, the sharpness evaluation values of all images in the corresponding region are compared, and the image with the highest sharpness evaluation value is selected as the pixel source of that region, generating a pixel source mapping map; Based on the pixel source mapping, pixels from corresponding regions are selected from the multiple images and fused to generate a fused image.
2. The liquid lens multifocal image fusion method based on radial region division according to claim 1, characterized in that, The step of dividing each image into multiple concentric ring regions according to a preset radius interval includes: The preset radius interval is set according to the image resolution and the target structure size, dividing the image radius into 10 to 30 concentric rings; A smaller radius interval is used in the area near the center, and a larger radius interval is used in the area far from the center.
3. The liquid lens multifocal image fusion method based on radial region division according to claim 1, characterized in that, The radial distortion correction of the acquired multiple images includes: Each image is preprocessed, including grayscale conversion, noise reduction, and edge extraction; Edge contour extraction is performed on the preprocessed image to obtain circular or annular structures in the image, and the common center position of the image is estimated using the random sampling consistency method. Based on the location of the common center, the distance from each contour point to the center is calculated, and cluster analysis is performed on the radius to obtain multiple feature radii; Select one of the feature radii as the anchor point radius, and estimate the radial distortion parameters between different images based on the anchor point radius; The radial geometric transformation is performed on the multiple images according to the radial distortion parameters to keep the spatial structure of the multiple images consistent.
4. The liquid lens multifocal image fusion method based on radial region division according to claim 3, characterized in that, The radial distortion parameter is estimated as follows: The first distortion parameter is estimated based on the radius distribution of the image structure, and the second distortion parameter is estimated based on the image contour structure. The first distortion parameter and the second distortion parameter are then weighted and fused to obtain the final radial distortion parameter.
5. The liquid lens multifocal image fusion method based on radial region division according to claim 1, characterized in that, The method for calculating the sharpness evaluation value is as follows: The image is subjected to a Laplacian operation, and the absolute value is taken as the sharpness response. The image is then smoothed using a Gaussian filter. The mean sharpness value is calculated within each concentric ring region as the sharpness evaluation value for that region.
6. The liquid lens multifocal image fusion method based on radial region division according to claim 1, characterized in that, Before generating the fused image, the process also includes: The pixel source map is subjected to Gaussian smoothing to smooth the pixel transition at the boundaries of each concentric ring region.
7. The liquid lens multifocal image fusion method based on radial region division according to claim 1, characterized in that, The target being detected is an axisymmetric structure, including a pipe seat water outlet, a central hole, or the inner wall of a casing pipe.
8. A liquid lens multifocal image fusion device based on radial region division, characterized in that, include: The acquisition module is configured to acquire multiple images at different focal lengths using a liquid lens. The correction module is configured to perform radial distortion correction on the acquired multiple images to ensure that the spatial structure of the multiple images remains consistent. The segmentation module is configured to establish a radial coordinate system based on the image center and divide each image into multiple concentric ring regions according to a preset radius interval. The calculation module is configured to calculate the sharpness evaluation value of each image in each of the concentric ring regions. The first generation module is configured to compare the sharpness evaluation values of all the images in the corresponding region for each concentric ring region, select the image with the highest sharpness evaluation value as the pixel source of that region, and generate a pixel source mapping map. The second generation module is configured to select pixels from the corresponding regions of the multiple images and fuse them according to the pixel source mapping map to generate a fused image.
9. An electronic device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the liquid lens multifocal image fusion method based on radial region division as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the liquid lens multifocal image fusion method based on radial region division according to any one of claims 1-7.