Fundus image splicing method, device and computer equipment
By determining the exponential factor and fusion weight in the overlapping area during fundus image stitching and performing weighted fusion, the problem of inconsistent brightness in fundus image stitching is solved, and the image quality is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SVISION IMAGING LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, there is a problem of inconsistent brightness when stitching fundus images, which causes brightness jumps at the stitching points. Existing methods only retain the brightest information in the overlapping areas, resulting in a decrease in image quality.
By determining the exponential factors of each overlapping strip image within the overlapping region, calculating the fusion weights, and performing weighted fusion based on these weights to generate the target pixel value, weighted fusion of the overlapping region is achieved, retaining effective information, reducing information loss, and suppressing brightness jumps.
It improves the quality of the generated target fundus image, fully preserves the effective information in the fundus strip image, reduces information loss in overlapping areas, and suppresses brightness jumps at the stitching points.
Smart Images

Figure CN122199289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus and computer device for stitching fundus images. Background Technology
[0002] Fundus images are the primary imaging method for observing structures such as the retina, optic disc, and macula. They play an important role in the screening and diagnosis of diseases such as diabetic retinopathy, glaucoma, and macular degeneration. Therefore, acquiring high-quality fundus images with a wider field of view, clearer details, and more consistent brightness has become an important goal of clinical imaging systems.
[0003] Currently, ultra-wide-angle fundus cameras are typically used to acquire strip images using a strip scanning method. Multiple strip images are then fused and stitched together to generate a complete fundus image. However, there is a problem of brightness inconsistency between different strip images, resulting in brightness abrupt changes at the image stitching points. Existing technologies typically employ a pixel-wise maximum value fusion strategy in the overlapping areas of adjacent strip images to suppress brightness abrupt changes at the image stitching points.
[0004] However, this method can only retain the brightest information in the overlapping areas, while all other information is discarded, resulting in a decrease in image quality. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, and computer device for stitching fundus images to address the aforementioned technical problems.
[0006] In a first aspect, this application provides a method for stitching fundus images, including:
[0007] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0008] Based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images, the fusion weight corresponding to the target position in each of the overlapping strip images is determined;
[0009] The target pixel value at the target location is determined based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images.
[0010] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0011] In one embodiment, determining the exponential factor corresponding to the target location in each overlapping strip image includes:
[0012] For each of the overlapping strip images, determine the gradient and contrast corresponding to the target position in the overlapping strip image;
[0013] Based on the gradient and the contrast, the exponential factor corresponding to the target location in the overlapping strip image is determined.
[0014] In one embodiment, determining the gradient and contrast corresponding to the target location in the overlapping strip image includes:
[0015] Determine the target area centered on the target location;
[0016] The gradient and contrast corresponding to the target location are determined based on the pixel values within the target area.
[0017] In one embodiment, determining the exponential factor corresponding to the target location in the overlapping strip image based on the gradient and the contrast includes:
[0018] The adjustment factor is determined based on the gradient and the contrast.
[0019] The index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position.
[0020] In one embodiment, determining the adjustment factor based on the gradient and the contrast includes:
[0021] The gradient and the contrast are weighted and summed based on a preset adjustment coefficient to obtain the adjustment factor.
[0022] In one embodiment, determining the fusion weight corresponding to the target position in each of the overlapping strip images based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images includes:
[0023] For each of the overlapping strip images, determine the exponential factor of the pixel value at the target location in the overlapping strip image;
[0024] Determine the summation result of the exponent factors raised to the power of each overlapping bar image;
[0025] The fusion weight corresponding to the target position in the overlapping strip image is determined by the ratio of the exponent of the pixel value at the target position in the overlapping strip image to the summation result.
[0026] In one embodiment, determining the target pixel value at the target location based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images includes:
[0027] Based on the fusion weights corresponding to the target position in each of the overlapping strip images, the pixel values are weighted and fused to obtain the target pixel value at the target position.
[0028] In one embodiment, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0029] Secondly, this application also provides a fundus image stitching device, comprising:
[0030] The first determining module is used to determine the exponential factor corresponding to the target location in each overlapping strip image for the target location within the overlapping region of the fundus strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location among multiple fundus strip images acquired.
[0031] The second determining module is used to determine the fusion weight corresponding to the target position in each overlapping strip image based on the exponential factor corresponding to the target position in each overlapping strip image and the pixel value corresponding to the target position in each overlapping strip image.
[0032] The third determining module is used to determine the target pixel value of the target position based on the fusion weight corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images.
[0033] The image stitching module is used to stitch together the strip-shaped fundus images based on the target pixel values of each pixel position within the overlapping area to obtain the target fundus image.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0036] Based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images, the fusion weight corresponding to the target position in each of the overlapping strip images is determined;
[0037] The target pixel value at the target location is determined based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images.
[0038] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0041] Based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images, the fusion weight corresponding to the target position in each of the overlapping strip images is determined;
[0042] The target pixel value at the target location is determined based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images.
[0043] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0044] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0045] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0046] Based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images, the fusion weight corresponding to the target position in each of the overlapping strip images is determined;
[0047] The target pixel value at the target location is determined based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images.
[0048] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0049] The aforementioned fundus image stitching method, apparatus, and computer equipment determine an exponential factor corresponding to the target location within the overlapping region of a fundus strip image. The target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images. Based on the exponential factor and pixel value corresponding to the target location in each overlapping strip image, a fusion weight is determined. Based on the fusion weight and pixel value corresponding to the target location in each overlapping strip image, a target pixel value is determined. Based on the target pixel value of each pixel location within the overlapping region, the fundus strip images are stitched together to obtain the target fundus image. In this embodiment, by constructing a fusion weight related to the brightness of each pixel location in the overlapping region using an exponential factor, the overlapping region is weighted and fused. This fully preserves the effective information in the fundus strip image, reduces information loss in the overlapping region, and suppresses brightness jumps at the stitching point, thereby improving the quality of the generated target fundus image. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is an internal structural diagram of a computer device provided in an embodiment of this application;
[0052] Figure 2 This is a schematic flowchart of a fundus image stitching method provided in an embodiment of this application;
[0053] Figure 3 This is a schematic diagram of a strip-shaped image of the fundus provided in an embodiment of this application;
[0054] Figure 4 This is a schematic diagram of another strip-shaped fundus image provided in an embodiment of this application;
[0055] Figure 5 This is a flowchart illustrating a method for determining an index factor provided in an embodiment of this application;
[0056] Figure 6This is a flowchart illustrating a gradient and contrast determination method provided in an embodiment of this application;
[0057] Figure 7 This is a flowchart illustrating another method for determining the index factor provided in an embodiment of this application;
[0058] Figure 8 This is a flowchart illustrating a method for determining fusion weights provided in an embodiment of this application;
[0059] Figure 9 This is a schematic diagram of the fundus image stitching result corresponding to a maximum value fusion method provided in an embodiment of this application;
[0060] Figure 10 This is a schematic diagram of the fundus image stitching result corresponding to a weighted fusion method provided in an embodiment of this application;
[0061] Figure 11 This is a structural block diagram of a fundus image stitching device provided in an embodiment of this application. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0063] Fundus images are the primary imaging method for observing structures such as the retina, optic disc, and macula. They play an important role in the screening and diagnosis of diseases such as diabetic retinopathy, glaucoma, and macular degeneration. Therefore, acquiring high-quality fundus images with a wider field of view, clearer details, and more consistent brightness has become an important goal of clinical imaging systems.
[0064] Currently, ultra-wide-angle fundus cameras are typically used to acquire strip images using a strip scanning method. Multiple strip images are then fused and stitched together to generate a complete fundus image. However, there is a problem of brightness inconsistency between different strip images, resulting in brightness abrupt changes at the image stitching points. Existing technologies typically employ a pixel-wise maximum value fusion strategy in the overlapping areas of adjacent strip images to suppress brightness abrupt changes at the image stitching points.
[0065] However, this method can only retain the brightest information in the overlapping areas, while all other information is discarded, resulting in a decrease in image quality.
[0066] The fundus image stitching method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown. Figure 1This is an internal structure diagram of a computer device provided in an embodiment of this application. The computer device may be a server, and its internal structure diagram may be as follows: Figure 1 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a fundus image stitching method.
[0067] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0068] In one embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a fundus image stitching method provided in an embodiment of this application. This method can be applied to... Figure 1 The method, using a computer device, includes the following steps:
[0069] S201, for the target location in the overlapping area of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image.
[0070] The target location is any pixel location within the overlapping area, and the overlapping strip image is the image containing the target location among multiple acquired fundus strip images.
[0071] Reference Figure 3-4 , Figure 3-4 This is a schematic diagram of two adjacent fundus strip images provided in an embodiment of this application. For example, multiple fundus strip images can be acquired sequentially from top to bottom using a fundus camera, with adjacent fundus strip images having some overlap in the vertical direction, such as... Figure 3-4 As shown, these overlapping areas are the aforementioned overlapping areas. By sequentially aligning and stitching the strip images based on their relative positions in the fundus coordinate system, a complete fundus image can be obtained.
[0072] In this embodiment, a pixel location in the overlapping region will exist in multiple fundus strip images. These fundus strip images containing that pixel location are the overlapping strip images corresponding to that pixel location.
[0073] For example, Figure 3 and Figure 4 These are two adjacent striped images of the fundus. Figure 3 and Figure 4 If there are several overlapping rows in the vertical direction, then for any pixel position in the overlapping region, Figure 3 and Figure 4 These are all their corresponding overlapping strip images.
[0074] In this embodiment, each pixel position in the overlapping region of each fundus strip image can be sequentially determined as the target position, and the exponential factor of the target position in its corresponding overlapping strip images can be determined. The exponential factor characterizes the degree of preference for highlight information during the weighted fusion process. The larger the exponential factor, the greater the fusion weight of the pixel value corresponding to the highlight region; the smaller the exponential factor, the more uniform the distribution of fusion weights.
[0075] In one possible implementation, the initial exponential factor can be determined experimentally, and the experimentally obtained initial exponential factor can be used as the aforementioned exponential factor.
[0076] Alternatively, the initial exponential factor can be adaptively adjusted for each overlapping strip image, and the adjusted exponential factor can be used as the exponential factor corresponding to the target position in each overlapping strip image.
[0077] Optionally, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0078] S202, determine the fusion weight corresponding to the target position in each overlapping strip image based on the exponential factor corresponding to the target position in each overlapping strip image and the pixel value corresponding to the target position in each overlapping strip image.
[0079] In this embodiment, for each overlapping strip image corresponding to the target position, the contribution ratio of the pixel value corresponding to the target position in the overlapping strip image to the fused pixel value corresponding to the target position under the action of the exponential factor can be determined based on the exponential factor and pixel value corresponding to the target position in the overlapping strip image. This is also the fusion weight corresponding to the target position in the overlapping strip image.
[0080] Optionally, each strip image can be preprocessed, and fusion weights can be calculated based on the preprocessed overlapping strip images to further improve the quality of strip image fusion.
[0081] For example, artifact removal processing can be performed on the strip images, brightness normalization processing can be performed on the strip images to make the brightness distribution of each strip image consistent and improve the brightness consistency after fusion, and filtering processing can be performed on the strip images to reduce noise in each strip image and enhance the signals of tissues such as blood vessels.
[0082] S203, determine the target pixel value of the target position based on the fusion weight corresponding to the target position in each overlapping strip image and the pixel value corresponding to the target position in each overlapping strip image.
[0083] In this embodiment, the pixel values can be weighted and fused based on the fusion weights corresponding to the target positions in each overlapping strip image to obtain the target pixel values at the target positions.
[0084] For example, the above weighted fusion process can be represented as:
[0085]
[0086] in, For the target pixel value, For the first Fusion weights corresponding to the target locations in overlapping strip images. For the first The pixel value corresponding to the target location in an overlapping strip image. This represents the number of overlapping strip images corresponding to the target location.
[0087] S204. Based on the target pixel values at each pixel position within the overlapping area, the strip images of each fundus are stitched together to obtain the target fundus image.
[0088] In this embodiment, for each pixel position within the overlapping area, the target pixel value can be used as the output; for non-overlapping areas, the original pixel value acquired by the fundus camera is directly used as the output, thereby obtaining a complete target fundus image.
[0089] In this embodiment, for the target location within the overlapping region of the fundus strip image, an exponential factor corresponding to the target location in each overlapping strip image is determined. The target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images. Based on the exponential factor and pixel value corresponding to the target location in each overlapping strip image, a fusion weight is determined for the target location. Based on the fusion weight and pixel value corresponding to the target location in each overlapping strip image, a target pixel value is determined for the target location. Based on the target pixel value of each pixel location within the overlapping region, the fundus strip images are stitched together to obtain the target fundus image. In this embodiment, by constructing a fusion weight related to the brightness of each pixel location in the overlapping region through an exponential factor, the overlapping region is weighted and fused. This fully preserves the effective information in the fundus strip image, reduces information loss in the overlapping region, and suppresses brightness jumps at the stitching point, thereby improving the quality of the generated target fundus image.
[0090] Reference Figure 5 , Figure 5 This is a flowchart illustrating an exponential factor determination method provided in an embodiment of this application. This embodiment relates to a possible implementation of how to determine the exponential factor corresponding to a target position in each overlapping strip image. Based on the above embodiment, S201 includes the following steps:
[0091] S501, for each overlapping strip image, determine the gradient and contrast corresponding to the target position in the overlapping strip image.
[0092] Optionally, a local window can be selected in the overlapping striped image with the target location as the center, and the contrast of the target location in the local window relative to its neighborhood can be calculated. Furthermore, the gradient corresponding to the target location in the overlapping striped image can be calculated using a gradient operator.
[0093] S502, determine the exponential factor corresponding to the target position in the overlapping strip image based on the gradient and contrast.
[0094] In this embodiment, for any overlapping strip image corresponding to the target position, the initial exponential factor can be adjusted according to the gradient and contrast of the target position in the overlapping strip image to obtain the exponential factor corresponding to the target position in the overlapping strip image.
[0095] In this embodiment, for each overlapping strip image, the gradient and contrast corresponding to the target position in the overlapping strip image are determined; based on the gradient and contrast, the exponential factor corresponding to the target position in the overlapping strip image is determined, thereby introducing gradient and contrast to enable the exponential factor to be adaptively adjusted, further optimizing the accuracy of the fusion weight allocation.
[0096] Reference Figure 6 , Figure 6 This is a flowchart illustrating a gradient and contrast determination method provided in an embodiment of this application. This embodiment relates to a possible implementation of how to determine the gradient and contrast corresponding to a target position in an overlapping stripe image. Based on the above embodiment, S501 includes the following steps:
[0097] S601, Determine the target area centered on the target location.
[0098] Alternatively, a local window can be selected in the overlapping striped image, centered on the target location. In order to obtain the target area mentioned above.
[0099] Among them, local window The size and shape can be determined experimentally.
[0100] S602 determines the gradient and contrast corresponding to the target position based on the pixel values within the target area.
[0101] Optionally, for the first Target location in overlapping strip images It can calculate the standard deviation of each pixel value within the target area and use it as the first standard deviation. Contrast at the target location in an overlapping strip image:
[0102]
[0103] in, for Pixel value at that location, The average brightness within the target area; This represents the number of pixels within the target area.
[0104] Optionally, for the first Target location in overlapping strip images The target position can be calculated using the gradient operator. horizontal gradient with vertical gradient Therefore, based on the obtained horizontal gradient with vertical gradient Get the first The gradient corresponding to the target location in the overlapping strip image:
[0105]
[0106] The above contrast is used to characterize the first Overlapping strip images at the target location The gradient is used to characterize the degree of brightness variation in the vicinity. Overlapping strip images at the target location Clarity of nearby structures (such as blood vessels).
[0107] In this embodiment, a target region centered on the target location is determined; the gradient and contrast corresponding to the target location are determined based on the pixel values within the target region, thereby enabling the exponential factor to be adaptively adjusted based on the gradient and contrast, further optimizing the accuracy of the fusion weight allocation.
[0108] Reference Figure 7 , Figure 7 This is a flowchart illustrating another method for determining the exponential factor provided in this application embodiment. This embodiment relates to a possible implementation of determining the exponential factor corresponding to a target position in an overlapping strip image based on gradient and contrast. Based on the above embodiment, S502 includes the following steps:
[0109] S701 determines the adjustment factor based on gradient and contrast.
[0110] Optionally, the gradient and contrast can be weighted and summed based on a preset adjustment coefficient to obtain the adjustment factor.
[0111] S702, determine the index factor corresponding to the target position based on the adjustment factor and the initial index factor corresponding to the target position.
[0112] For example, the adjustment process of the exponential factor can be represented as follows:
[0113]
[0114] in, As the initial exponential factor; If the preset adjustment coefficient is used, then These are the aforementioned regulatory factors.
[0115] In this embodiment, the adjustment factor is determined based on the gradient and contrast; the index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position. By introducing the gradient and contrast, the index factor can be adaptively adjusted, further optimizing the accuracy of the fusion weight allocation.
[0116] Reference Figure 8 , Figure 8 This is a flowchart illustrating a method for determining fusion weights according to an embodiment of this application. This embodiment relates to a possible implementation of determining the fusion weights corresponding to the target positions in each overlapping strip image based on the exponential factor corresponding to the target position and the pixel value corresponding to the target position in each overlapping strip image. Based on the above embodiment, S202 includes the following steps:
[0117] S801, for each overlapping strip image, determine the exponential factor power of the pixel value at the target position in the overlapping strip image.
[0118] S802, determine the summation result of the exponent factors raised to the power of each overlapping bar image.
[0119] S803, determine the fusion weight corresponding to the target position in the overlapping strip image based on the ratio of the exponent factor of the pixel value at the target position in the overlapping strip image to the summation result.
[0120] In this embodiment, the calculation process of steps S801-S803 above can be expressed as the following formula:
[0121]
[0122] in, For the first Fusion weights corresponding to the target locations in overlapping strip images. These are the pixel values corresponding to the target location in multiple overlapping strip images. It is an exponential factor.
[0123] It should be noted that the fundus image stitching method provided in this application embodiment can be used for images of any channel, such as three-channel color images, single-channel infrared images, autofluorescence images, etc. If it is a multi-channel image, each channel is processed independently.
[0124] To more clearly illustrate the beneficial effects of the embodiments of this application, the following is combined with... Figure 9-10 A comparative explanation will be provided. Figure 9 This is a schematic diagram of the fundus image stitching result corresponding to a maximum value fusion method provided in an embodiment of this application. Figure 10 This is a schematic diagram of the fundus image stitching result corresponding to a weighted fusion method provided in an embodiment of this application.
[0125] like Figure 9-10 As shown, for the same set of data, compared to the fundus image stitching method using the maximum value fusion method, the fundus image stitching method using the weighted fusion method retains more details in the image, specifically in the optic disc region of the figure (e.g., Figure 10The highlighted areas (marked in the image) indicate that the target fundus image obtained by stitching together the fundus images corresponding to the weighted fusion method has higher quality.
[0126] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0127] Based on the same inventive concept, this application also provides a fundus image stitching device for implementing the fundus image stitching method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more fundus image stitching device embodiments provided below can be found in the limitations of the fundus image stitching method above, and will not be repeated here.
[0128] In one embodiment, such as Figure 11 As shown, Figure 11 This is a structural block diagram of a fundus image stitching device provided in an embodiment of this application. The device 1100 includes:
[0129] The first determining module 1101 is used to determine the exponential factor corresponding to the target position in each overlapping strip image for the target position in the overlapping area of the fundus strip image; the target position is any pixel position in the overlapping area, and the overlapping strip image is an image in which the target position exists among multiple fundus strip images acquired.
[0130] The second determining module 1102 is used to determine the fusion weight corresponding to the target position in each overlapping strip image based on the exponential factor corresponding to the target position in each overlapping strip image and the pixel value corresponding to the target position in each overlapping strip image.
[0131] The third determining module 1103 is used to determine the target pixel value of the target position based on the fusion weight corresponding to the target position in each overlapping strip image and the pixel value corresponding to the target position in each overlapping strip image.
[0132] The image stitching module 1104 is used to stitch together the strip images of the fundus based on the target pixel values of each pixel position in the overlapping area to obtain the target fundus image.
[0133] In one embodiment, the first determining module 1101 includes:
[0134] The first determining unit is used to determine the gradient and contrast corresponding to the target position in each overlapping strip image for each overlapping strip image;
[0135] The second determining unit is used to determine the exponential factor corresponding to the target position in the overlapping strip image based on the gradient and contrast.
[0136] In one embodiment, the first determining unit is specifically used to determine a target region centered on the target location; and to determine the gradient and contrast corresponding to the target location based on the pixel values within the target region.
[0137] In one embodiment, the second determining unit includes:
[0138] The first determining subunit is used to determine the adjustment factor based on the gradient and contrast.
[0139] The second determining subunit is used to determine the exponential factor corresponding to the target position based on the adjustment factor and the initial exponential factor corresponding to the target position.
[0140] In one embodiment, the second determining subunit is specifically used to perform a weighted summation of the gradient and contrast based on a preset adjustment coefficient to obtain an adjustment factor.
[0141] In one embodiment, the second determining module 1102 includes:
[0142] The third determining unit is used to determine the exponential factor power of the pixel value at the target position in each overlapping strip image.
[0143] The fourth determining unit is used to determine the summation result of the exponent factor powers corresponding to each overlapping strip image.
[0144] The fifth determining unit is used to determine the fusion weight corresponding to the target position in the overlapping strip image based on the ratio of the exponent factor of the pixel value of the target position in the overlapping strip image to the summation result.
[0145] In one embodiment, the third determining module 1103 includes:
[0146] The weighted fusion unit is used to perform weighted fusion of each pixel value based on the fusion weight corresponding to the target position in each overlapping strip image, so as to obtain the target pixel value at the target position.
[0147] In one embodiment, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0148] Each module in the aforementioned fundus image stitching device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0149] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0150] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0151] The fusion weights corresponding to the target positions in each overlapping strip image are determined based on the exponential factors and pixel values corresponding to the target positions in each overlapping strip image.
[0152] The target pixel value of the target location is determined based on the fusion weight corresponding to the target location in each overlapping strip image and the pixel value corresponding to the target location in each overlapping strip image.
[0153] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0154] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0155] For each overlapping strip image, determine the gradient and contrast corresponding to the target position in the overlapping strip image;
[0156] Based on gradient and contrast, determine the exponential factor corresponding to the target location in the overlapping strip image.
[0157] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0158] Determine the target area centered on the target location;
[0159] The gradient and contrast corresponding to the target location are determined based on the pixel values within the target area.
[0160] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0161] The adjustment factor is determined based on the gradient and contrast.
[0162] The index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position.
[0163] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0164] The adjustment factor is obtained by weighted summation of gradient and contrast based on preset adjustment coefficients.
[0165] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0166] For each overlapping strip image, determine the exponential factor power of the pixel value at the target location in the overlapping strip image;
[0167] Determine the summation result of the exponent factors raised to the power of each overlapping bar image;
[0168] The fusion weight corresponding to the target position in the overlapping strip image is determined by the ratio of the exponent of the pixel value at the target position in the overlapping strip image to the summation result.
[0169] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0170] Based on the fusion weights corresponding to the target positions in each overlapping strip image, the pixel values are weighted and fused to obtain the target pixel values at the target positions.
[0171] In one embodiment, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0172] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0173] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0174] The fusion weights corresponding to the target positions in each overlapping strip image are determined based on the exponential factors and pixel values corresponding to the target positions in each overlapping strip image.
[0175] The target pixel value of the target location is determined based on the fusion weight corresponding to the target location in each overlapping strip image and the pixel value corresponding to the target location in each overlapping strip image.
[0176] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0177] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0178] For each overlapping strip image, determine the gradient and contrast corresponding to the target position in the overlapping strip image;
[0179] Based on gradient and contrast, determine the exponential factor corresponding to the target location in the overlapping strip image.
[0180] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0181] Determine the target area centered on the target location;
[0182] The gradient and contrast corresponding to the target location are determined based on the pixel values within the target area.
[0183] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0184] The adjustment factor is determined based on the gradient and contrast.
[0185] The index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position.
[0186] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0187] The adjustment factor is obtained by weighted summation of gradient and contrast based on preset adjustment coefficients.
[0188] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0189] For each overlapping strip image, determine the exponential factor power of the pixel value at the target location in the overlapping strip image;
[0190] Determine the summation result of the exponent factors raised to the power of each overlapping bar image;
[0191] The fusion weight corresponding to the target position in the overlapping strip image is determined by the ratio of the exponent of the pixel value at the target position in the overlapping strip image to the summation result.
[0192] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0193] Based on the fusion weights corresponding to the target positions in each overlapping strip image, the pixel values are weighted and fused to obtain the target pixel values at the target positions.
[0194] In one embodiment, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0195] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0196] For the target location within the overlapping region of the fundus strip image, determine the exponential factor corresponding to the target location in each overlapping strip image; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images;
[0197] The fusion weights corresponding to the target positions in each overlapping strip image are determined based on the exponential factors and pixel values corresponding to the target positions in each overlapping strip image.
[0198] The target pixel value of the target location is determined based on the fusion weight corresponding to the target location in each overlapping strip image and the pixel value corresponding to the target location in each overlapping strip image.
[0199] Based on the target pixel values at each pixel location within the overlapping region, the strip images of the fundus are stitched together to obtain the target fundus image.
[0200] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0201] For each overlapping strip image, determine the gradient and contrast corresponding to the target position in the overlapping strip image;
[0202] Based on gradient and contrast, determine the exponential factor corresponding to the target location in the overlapping strip image.
[0203] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0204] Determine the target area centered on the target location;
[0205] The gradient and contrast corresponding to the target location are determined based on the pixel values within the target area.
[0206] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0207] The adjustment factor is determined based on the gradient and contrast.
[0208] The index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position.
[0209] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0210] The adjustment factor is obtained by weighted summation of gradient and contrast based on preset adjustment coefficients.
[0211] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0212] For each overlapping strip image, determine the exponential factor power of the pixel value at the target location in the overlapping strip image;
[0213] Determine the summation result of the exponent factors raised to the power of each overlapping bar image;
[0214] The fusion weight corresponding to the target position in the overlapping strip image is determined by the ratio of the exponent of the pixel value at the target position in the overlapping strip image to the summation result.
[0215] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0216] Based on the fusion weights corresponding to the target positions in each overlapping strip image, the pixel values are weighted and fused to obtain the target pixel values at the target positions.
[0217] In one embodiment, the exponential factor is a positive integer not less than 3 and not greater than 7.
[0218] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0219] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0220] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for stitching fundus images, characterized in that, The method includes: For the target location within the overlapping region of the fundus strip image, an exponential factor corresponding to the target location in each overlapping strip image is determined; the target location is any pixel location within the overlapping region, and the overlapping strip image is an image containing the target location from multiple acquired fundus strip images; The fusion weight corresponding to the target position in each of the overlapping strip images is determined based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images; The target pixel value of the target position is determined based on the fusion weight corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images; Based on the target pixel values at each pixel position within the overlapping area, the strip images of the fundus are stitched together to obtain the target fundus image.
2. The method according to claim 1, characterized in that, Determining the exponential factor corresponding to the target position in each overlapping strip image includes: For each of the overlapping strip images, determine the gradient and contrast corresponding to the target position in the overlapping strip image; Based on the gradient and the contrast, the exponential factor corresponding to the target position in the overlapping strip image is determined.
3. The method according to claim 2, characterized in that, Determining the gradient and contrast corresponding to the target position in the overlapping strip image includes: Determine the target area centered on the target location; The gradient and contrast corresponding to the target position are determined based on the pixel values within the target area.
4. The method according to claim 2, characterized in that, The step of determining the exponential factor corresponding to the target position in the overlapping strip image based on the gradient and the contrast includes: The adjustment factor is determined based on the gradient and the contrast. The index factor corresponding to the target position is determined based on the adjustment factor and the initial index factor corresponding to the target position.
5. The method according to claim 4, characterized in that, Determining the adjustment factor based on the gradient and the contrast includes: The gradient and the contrast are weighted and summed based on a preset adjustment coefficient to obtain the adjustment factor.
6. The method according to any one of claims 1-5, characterized in that, The step of determining the fusion weight corresponding to the target position in each of the overlapping strip images based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images includes: For each of the overlapping strip images, determine the exponential factor power of the pixel value at the target location in the overlapping strip image; Determine the summation result of the exponent factors raised to the power of each overlapping bar image; The fusion weight corresponding to the target position in the overlapping strip image is determined based on the ratio of the exponent factor of the pixel value at the target position in the overlapping strip image to the summation result.
7. The method according to any one of claims 1-5, characterized in that, The step of determining the target pixel value at the target location based on the fusion weight corresponding to the target location in each of the overlapping strip images and the pixel value corresponding to the target location in each of the overlapping strip images includes: Based on the fusion weights corresponding to the target positions in each of the overlapping strip images, the pixel values are weighted and fused to obtain the target pixel value at the target position.
8. The method according to any one of claims 1-5, characterized in that, The exponential factor is a positive integer that is not less than 3 and not greater than 7.
9. A fundus image stitching device, characterized in that, The device includes: The first determining module is used to determine the exponential factor corresponding to the target position in each overlapping strip image for the target position within the overlapping region of the fundus strip image; the target position is any pixel position within the overlapping region, and the overlapping strip image is an image containing the target position among multiple fundus strip images acquired; The second determining module is used to determine the fusion weight corresponding to the target position in each of the overlapping strip images based on the exponential factor corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images; The third determining module is used to determine the target pixel value of the target position based on the fusion weight corresponding to the target position in each of the overlapping strip images and the pixel value corresponding to the target position in each of the overlapping strip images; The image stitching module is used to stitch together the strip-shaped fundus images based on the target pixel values of each pixel position within the overlapping area to obtain a target fundus image.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.