Image stitching method and device based on genetic algorithm and readable storage medium

By using an image stitching method based on genetic algorithms, the correction coefficients of multiple image sensor chips are optimized, solving the problems of brightness jumps and detail breaks in multi-chip stitched imaging, and achieving high-precision global image consistency and brightness uniformity.

CN122288977APending Publication Date: 2026-06-26JILIN SHANGSHI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JILIN SHANGSHI TECHNOLOGY CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In multi-image sensor chip stitching imaging systems, obvious brightness jumps and detail breaks appear at the seams, resulting in poor global image consistency. Existing technologies are unable to effectively solve the problem of response differences between chips.

Method used

A genetic algorithm-based image stitching method is adopted. By setting correction coefficients for each image sensor chip and optimizing these coefficients using a genetic algorithm, the consistency constraints of the overlapping area are met. A direct correspondence between the correction coefficients and the algorithm genes is established, thereby optimizing the inter-chip collaborative correction requirements of multi-chip stitching.

Benefits of technology

It significantly improves the global consistency of multi-chip stitched imaging, solves the problems of local optima and incomplete constraint coverage in traditional methods, and achieves overall brightness uniformity and detail continuity of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122288977A_ABST
    Figure CN122288977A_ABST
Patent Text Reader

Abstract

This invention relates to the field of digital image processing technology, and more particularly to an image stitching method, device, and readable storage medium based on a genetic algorithm. The method includes: acquiring multiple images from different image sensor chips, each image having at least one area to be stitched, with the areas to be stitched in adjacent images overlapping to form multiple overlapping regions; acquiring the average code value of the area to be stitched in each image; setting a correction coefficient for each image sensor chip and establishing consistency constraints for the overlapping regions, such that the product of the average code value of the area to be stitched within the same overlapping region and its corresponding correction coefficient is equal; and solving for the correction coefficient using a genetic algorithm. This invention ensures that the obtained correction coefficients simultaneously satisfy the consistency constraints of all overlapping regions through a genetic algorithm, fundamentally solving the problems of local optima and incomplete constraint coverage in traditional optimization methods, and significantly improving the overall accuracy of inter-chip consistency correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of digital image processing technology, and particularly relates to an image stitching method, device and readable storage medium based on genetic algorithm. Background Technology

[0002] With the continuous development of technology, the demand for large field-of-view and high-resolution image acquisition is increasing. Imaging systems based on image sensor chips are becoming increasingly widely used due to their low cost, low power consumption, simple structure, and ease of on-chip system integration. Stitching imaging cameras, by stitching together multiple image sensor chips, effectively expand the imaging field of view and are widely used in many fields such as precision agriculture, earth observation, and environmental monitoring.

[0003] However, a problem exists that all types of image sensor chips exhibit varying degrees of inhomogeneity, which often requires non-uniformity correction techniques in practical applications. This non-uniformity manifests as intra-chip inconsistency and inter-chip inconsistency. Intra-chip inconsistency refers to inconsistencies in the pixel response of the detector; inter-chip inconsistency refers to inconsistencies in the light response between different detectors.

[0004] The main reason for this situation is that, under no-light conditions, the weak dark current of pixels generates noise differences in the substrate, and the dark current characteristics of different pixels exhibit individual fluctuations. Simultaneously, external environmental factors such as temperature fluctuations and electromagnetic interference directly affect the stability of the detector's photoelectric conversion system. Furthermore, uneven thickness of the surface optical coatings between different detectors, differences in the intensity of light received, and subtle differences in manufacturing processes can also cause inconsistencies. Ensuring that the image sensor chip outputs high-quality, highly consistent images is crucial for subsequent applications such as image analysis, feature extraction, and target recognition.

[0005] In existing technologies, most image non-uniformity correction methods are designed to address the non-uniformity of the photosensitive response of a single image sensor chip (such as a CMOS chip). For example, they address issues like stripe noise and fixed-pattern noise within the single-chip imaging range by optimizing dark current compensation and response function fitting for individual pixels. These solutions perform well in single-chip, independent imaging scenarios, meeting basic imaging quality requirements. However, when the imaging system is upgraded to a multi-chip stitched architecture, such as in industrial panoramic cameras, the limitations of existing technologies become fully apparent.

[0006] It is evident that the core challenge in multi-image sensor chip stitching imaging has shifted from intra-chip pixel differences to inter-chip response differences. Even within the same model and batch, different image sensor chips exhibit inherent variations in pixel photosensitivity, dark current baseline, and photoelectric conversion efficiency during manufacturing. While these variations can be offset through internal corrections in single-image sensor scenarios, they directly manifest as brightness gradients and color banding in the imaging areas of adjacent chips during multi-image sensor chip stitching. Furthermore, differences in the optical path and installation location of the multi-image sensor chip stitching system, as well as the varying impacts of ambient temperature fluctuations on different image sensor chips during use, further exacerbate inter-chip non-uniformity.

[0007] Therefore, how to solve the problem of significant brightness jumps and detail breaks at the seams in images after multi-image sensor chip stitching imaging, which affect the global consistency of the image, remains an urgent problem to be solved in this field. Summary of the Invention

[0008] In view of this, the present invention aims to provide an image stitching method, device and readable storage medium based on genetic algorithm, so as to ensure that the final correction coefficient can simultaneously meet the consistency constraints of all overlapping areas through genetic algorithm, fundamentally solving the problems of local optima and incomplete constraint coverage of traditional optimization methods, and significantly improving the overall accuracy of inter-image consistency correction.

[0009] To achieve the above objectives, the technical solution created by this invention is implemented as follows:

[0010] In a first aspect, the present invention provides an image stitching method based on a genetic algorithm, comprising the following steps: Multiple images from different image sensor chips are acquired, each image having at least one area to be stitched together, and the areas to be stitched together from adjacent images overlap to form multiple overlapping areas; S20. Obtain the average code value of the area to be spliced ​​corresponding to the overlapping area; S30. Set a correction coefficient for each of the image sensor chips and establish consistency constraints for all the overlapping regions; The consistency constraint condition is to make the product of the mean code value of the region to be spliced ​​within the same overlapping region and its corresponding correction coefficient equal; S40. The correction coefficient is solved using a genetic algorithm.

[0011] Furthermore, the overlapping region includes two overlapping regions where the areas to be stitched of two images overlap, and three overlapping regions where the areas to be stitched of three images overlap.

[0012] Furthermore, step S40 specifically includes: Each correction coefficient is used as a gene for each individual in the genetic algorithm, and each gene corresponds to a brightness gain value for chip imaging; several individuals with random genes are generated to form an initial population; Crossover, mutation, and merging operations are performed on the initial population.

[0013] Furthermore, the crossover operation involves performing it on two individuals, randomly selecting 1 to 3 gene loci, and exchanging their genes; The mutation operation includes performing it on a single individual, randomly selecting a gene locus for mutation; The merging operation involves merging offspring individuals with parent individuals to form a new population.

[0014] Furthermore, in the mutation operation, an adaptive mutation operation is adopted, which increases the range of mutations in the early stage of the iteration and decreases the range of mutations in the later stage of the iteration.

[0015] Furthermore, step S40 also includes: Calculate the individual fitness, which is the sum of the standardized mean square errors of all corresponding pixels in the overlapping region; Select the individual with the lowest fitness as the offspring.

[0016] Furthermore, after selecting the individual with the lowest fitness as the offspring, the process further includes the following steps: The offspring are normalized and then multiplied by the number of image sensor chips to obtain the final gain value.

[0017] Furthermore, the sum of the correction coefficients is equal to the total number of the image sensor chips.

[0018] In a second aspect, the present invention provides a computer device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the image stitching method based on genetic algorithms provided by the present invention.

[0019] Thirdly, the present invention provides a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the image stitching method based on genetic algorithm provided by the present invention.

[0020] Compared with the prior art, the present invention can achieve the following beneficial effects: (1) Applying the genetic algorithm to the inter-chip consistency correction of multi-image sensor stitching imaging, clearly defining the correction coefficient of each image sensor as the gene of an individual in the genetic algorithm, specifically solving the core optimization problem of "multiple correction coefficients coordinating to satisfy all overlapping area constraints", and establishing a direct correspondence between the correction coefficient and the algorithm gene; can realize the imaging consistency between complex multi-chip stitching imaging image sensor chips (detectors).

[0021] (2) Improve the mutation operation of traditional genetic algorithm. In the early stage of iteration, expand the mutation range to increase population diversity and improve global optimization ability. In the later stage of iteration, narrow the mutation range to focus on the optimal solution region and improve local optimization accuracy, thus solving the pain points of traditional mutation: "low efficiency and poor accuracy".

[0022] (3) The error weight is dynamically adjusted according to the pixel gray value, so that even the slight error in the dark area can be effectively optimized and the uniformity of correction is improved; the sum of the correction coefficients is forced to be equal to the total number of all image sensors, thus locking the overall brightness unchanged from a mathematical perspective and avoiding the problem of image brightness distortion after correction.

[0023] (4) An architecture is designed for the inter-chip collaborative correction requirements of multi-chip splicing by using an optimized genetic algorithm. The quantitative evaluation dimension of the response difference between multiple chips is used to establish a chip-level correction parameter association mechanism, and differentiated compensation parameters are assigned to different chips to solve the problem of obvious brightness jumps and detail breaks in the spliced ​​image at the chip seam, and to maintain the global consistency of the image.

[0024] (5) By utilizing the information characteristics of overlapping areas, the correction parameters of each chip are optimized in reverse by comparing the gray values ​​of overlapping pixels between chips, so that the core requirements of large field of view and high resolution imaging system for global seamlessness and brightness uniformity can be met in the complex application environment of multi-chip stitching imaging camera. Attached Figure Description

[0025] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic flowchart of the image stitching method based on genetic algorithm described in an embodiment of the present invention; Figure 2 This is a schematic diagram showing the positional arrangement of the ten image sensor chips corresponding to the image in an embodiment of the present invention; Figure 3 This is a schematic diagram showing the arrangement of the ten image sensor chips corresponding to the cropped image in an embodiment of the present invention; Figure 4A flowchart illustrating step S10 of the image stitching method based on genetic algorithm described in this invention; Figure 5 A flowchart illustrating step S40 in the image stitching method based on genetic algorithm described in this invention; Figure 6 A schematic diagram illustrating the structure of the computer device described in this invention.

[0026] Explanation of reference numerals in the attached figures: 30. Area to be spliced; 40. Overlapping area; 41. Pairwise overlapping area; 42. Triple-overlapping area; 62. Computer equipment; 64. External device; 66. Processing unit; 68. Bus; 70. Network adapter; 72. Input / output (I / O) interface; 74. Display; 78. System memory; 80. Random access memory (RAM); 82. Cache memory; 84. Storage system; 92. Program module; 90. Program / utility. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and do not constitute a limitation thereof. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, some operations related to the invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0028] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined to form various implementations. Furthermore, the order of the steps or actions in the method description can be changed or adjusted in a manner readily apparent to those skilled in the art. Therefore, the various orders in the specification and drawings are merely for the clear description of a particular embodiment and do not imply a mandatory order, unless otherwise stated that a particular order must be followed.

[0029] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this invention. The term "based on" should be understood as "at least partially based on." Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more, and the term "including" means "including but not limited to." Various embodiments of the present invention may exist in the form of a range; it should be understood that the description in the form of a range is merely for convenience and brevity and should not be construed as a rigid limitation on the scope of the invention; therefore, it should be considered that the range description has specifically disclosed all possible sub-ranges and single numerical values ​​within that range; for example, it should be considered that the range description from 1 to 6 has specifically disclosed sub-ranges, such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., and single numbers within the range, such as 1, 2, 3, 4, 5, and 6, regardless of the range. Furthermore, whenever a numerical range is referred to herein, it means including any referenced number (fraction or integer) within the range referred to.

[0030] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0031] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0032] Example 1 like Figure 1 As shown, this invention provides an image stitching method based on a genetic algorithm, which is an inter-chip consistency correction scheme designed for multi-chip stitching imaging cameras. The method includes the following steps: S10. Acquire multiple images from different image sensor chips, each image having at least one area to be stitched together, and the areas to be stitched together of adjacent images overlap to form multiple overlapping areas. To ensure that the stitched image does not have any missing parts, necessary pixel overlap must be performed between different image sensor chips (detectors) during optical design. The final effect is that the boundaries of some adjacent image sensor chips will display the same area of ​​the image. To achieve the ideal effect of the final displayed image, necessary cropping must be performed on the stitched image. That is, when the image of the same area is displayed repeatedly, only one is kept and the rest are cropped. In this invention, these boundary areas that display the same area of ​​the image are denoted as the stitching area.

[0033] Please refer to the following at the same time Figure 2 , Figure 3 In this embodiment, ten images are used as an example. These ten images come from ten different image sensor chips. Each image sensor chip corresponds to an image with at least one stitching area 30. The number of stitching areas 30 depends on the number of overlapping areas generated after stitching. Taking the image corresponding to image sensor 1 as an example, after stitching, this image will overlap with the image corresponding to image sensor 2 to generate the first overlapping area, overlap with the images corresponding to image sensors 2 and 5 to generate the second overlapping area, overlap with the image corresponding to image sensor 4 to generate the third overlapping area, overlap with the image corresponding to image sensor 5 to generate the fourth overlapping area, and overlap with the images corresponding to image sensors 4 and 5 to generate the fifth overlapping area. Therefore, the image corresponding to image sensor 1 has five stitching areas 30.

[0034] When images are stitched together, the areas to be stitched from adjacent images overlap to form an overlapping region. Therefore, an overlapping region is formed by at least two areas to be stitched together. For example, if using... Figure 2 The splicing method shown will result in the following: Figure 3 As shown, at this time, the overlapping area 40 includes a pairwise overlapping area 41 where the areas to be stitched of two images overlap, and a triple overlapping area 42 where the areas to be stitched of three images overlap. Of course, if other stitching methods are used, a quadruple overlapping area where the areas to be stitched of four images overlap may also be generated, and the present invention does not limit this.

[0035] S20. Obtain the average code value of the region to be stitched in each of the images; To ensure the reliability of the obtained correction coefficients, multiple images under uniform lighting conditions can be captured, and the code values ​​of all overlapping areas can be exported and the average code value can be calculated.

[0036] In this embodiment, for each pair of overlapping areas, Tab represents the average code value of one of the areas to be stitched in the image corresponding to image sensor a. This area to be stitched will overlap with the image corresponding to image sensor b after stitching. For example, T12 represents the average code value of one of the areas to be stitched in the image corresponding to image sensor 1. This area to be stitched will overlap with the image corresponding to image sensor 2 after stitching; and so on, without further explanation.

[0037] For a triple overlap region, let Tabc represent the average code value of one of the regions to be stitched on image sensor a, where the stitched region will overlap with the images corresponding to image sensors b and c simultaneously. For example, T145 represents the average code value of one of the regions to be stitched in the image corresponding to image sensor 1, which will overlap with the images corresponding to image sensors 4 and 5 simultaneously after stitching, and so on. Further details are omitted.

[0038] S30. Set a correction coefficient for each of the image sensor chips and establish a consistency constraint condition for the overlapping area. The consistency constraint condition is to make the product of the mean code value of the area to be spliced ​​in the same overlapping area and its corresponding correction coefficient equal. Assume that the correction coefficient of image sensor 1 is A1, the correction coefficient of image sensor 2 is A2, and so on, so that the correction coefficient of image sensor 10 is A10.

[0039] By establishing consistency constraints, we can traverse the stitching area on the image corresponding to each image sensor chip, in order to... Figure 2 Taking the image corresponding to image sensor chip 1 as an example, its corresponding consistency constraints include: A1 T11=A2 T21; A1 T14=A4 T41; A1 T15=A5 T51; A1 T125=A2 T215=A5 T512; A1 T145=A4 T415=A5 T514; The images corresponding to other image sensor chips can be obtained in the same way, and will not be elaborated here.

[0040] S40. The correction coefficient is solved using a genetic algorithm.

[0041] Solving for the correction coefficients A1-A10 while simultaneously satisfying all constraints constitutes a multivariate, multi-constraint collaborative optimization problem. This invention employs a genetic algorithm to solve this challenging multivariate collaborative optimization problem.

[0042] Although Figure 2 , Figure 3 The example used is the consistency correction of ten image sensor chips. However, this invention does not limit the number of image sensor chips, nor does it limit the type of image sensor chips; they can be CMOS chips or other imaging series chips.

[0043] Example 2 Based on Example 1, step S10 may specifically include as follows: Figure 4 The steps shown are as follows: S11. Stitch together n images, where n is a natural number greater than 1; S12. Crop the area of ​​the image to be stitched to obtain the stitched image; It's important to note that not all areas to be stitched will be cropped. When multiple areas of the same image are displayed repeatedly, only one area is retained for display; this is the overlapping area. The remaining areas are cropped (or simply overlapped). Figure 2 The 10 images shown are stitched together to form the final image. Figure 3 As shown.

[0044] S13. Find the coordinates of all regions to be spliced; In practical implementation, the origin of the coordinate system can be selected on the stitched image, and the calculation can be performed based on the increment of the X-axis coordinate and the increment of the Y-axis coordinate of the image corresponding to a certain image sensor chip after cropping.

[0045] The resolution of a single CMOS chip is known to be 1920. 1200, at Figure 3 If we take the top left corner of the image corresponding to image sensor chip 1 as the origin of the coordinate system, we define the rightward direction as the positive X-axis and the downward direction as the positive Y-axis.

[0046] The coordinates of each stitching region in the image corresponding to image sensor chip 1 can be determined from the coordinates of the image corresponding to image sensor chip 2 after cropping. For example, if the stitching region T21 overlapping with the image corresponding to image sensor chip 1 in the image corresponding to image sensor chip 2 is cropped, and the increments of the X-axis coordinate X1 and Y-axis coordinates of the image corresponding to image sensor chip 2 after cropping are given, and if the upper left corner coordinates of the stitching region T12 in the image corresponding to image sensor chip 1 are (X4, Y4) and the lower right corner coordinates are (X5, Y5), then the upper left corner coordinates of the stitching region T21 in the image corresponding to image sensor chip 2 are (X4+X1, Y4) and the lower right corner coordinates are (X5+X1, Y5). Similarly, the coordinates of all stitching regions before cropping can be determined.

[0047] S14. Export multiple images taken under uniform lighting conditions; It is known that the scenes captured by overlapping regions in pairs or triplets are the same. Therefore, theoretically, under uniform lighting conditions, the code values ​​of the area to be stitched in the image corresponding to image sensor chip 1 (e.g., T12) and the area to be stitched in the image corresponding to image sensor chip 2 (e.g., T21) should also be the same. However, due to manufacturing process, inter-chip noise and other factors, the code values ​​of the detectors between chips that capture the same scene are inconsistent. Therefore, it is necessary to perform consistency correction on the detectors.

[0048] S15. Export the code values ​​of all areas to be spliced.

[0049] Example 3 Based on Example 1, step S40 may specifically include, as follows: Figure 5 The steps shown are as follows: S41. Initialize the population; Each correction coefficient is used as a gene for each individual in the genetic algorithm, and each gene corresponds to a brightness gain value for chip imaging; several individuals with random genes are generated to form an initial population.

[0050] S42, Cross Operation; Crossover refers to the process of randomly selecting 1 to 3 gene loci between two individuals and exchanging their genes.

[0051] S43, Mutation operation; Mutation refers to performing a mutation on a single individual, randomly selecting a gene locus for mutation; at the same time, in order to increase the efficiency of finding the optimal solution, an adaptive mutation operation is adopted, which increases the mutation range in the early stage of the iteration and decreases the mutation range in the later stage of the iteration, thereby improving the accuracy of finding the solution.

[0052] S44, Merge operation; The merging operation involves merging offspring individuals with parent individuals to form a new population.

[0053] S45, Fitness Calculation; Individual fitness is the sum of the standardized mean square errors of all corresponding pixels within the overlapping region; The normalized mean square error of a pixel is calculated by dividing the square of the difference between the gray values ​​of corresponding pixels in the two overlapping areas to be stitched together, after brightness gain correction, by the sum of the gray values ​​of those two pixels. The formula is as follows:

[0054] in, The standardized mean square error of the two pixels. and It is the grayscale value of the i-th corresponding pixel in the overlapping region.

[0055] In this way, by dynamically adjusting the error weight according to the pixel gray value, even subtle errors in dark areas can be effectively optimized, and the uniformity of correction can be improved. S46. Select operation; Select the individual with the lowest fitness as the offspring; To ensure that adjustments to the image do not alter its overall brightness and prevent the overall brightness adjustment from affecting the resulting image, the offspring image is uniformized and then multiplied by the number of image sensor chips to obtain the final gain value. This ensures that the sum of the gains equals the number of image sensor chips, guaranteeing that the overall image brightness remains constant. By forcibly ensuring that the sum of all correction coefficients equals the total number of chips, the overall brightness is mathematically locked in, avoiding the problem of brightness distortion in the corrected image.

[0056] S47. Determine whether the maximum number of iterations has been reached; if yes, proceed to step S48; if no, return to step S42.

[0057] S48. Obtain the final correction coefficient.

[0058] This embodiment utilizes the swarm intelligence characteristic of genetic algorithms to achieve global optimization, which can traverse more potential solution spaces and ensure that the final correction coefficients can simultaneously satisfy the consistency constraints of all overlapping regions. This fundamentally solves the problems of local optima and incomplete constraint coverage in traditional optimization methods, and significantly improves the overall accuracy of inter-slice consistency correction.

[0059] Example 4 Accordingly, according to embodiments of the present invention, the present invention also provides a computer device, a readable storage medium, and a computer program product.

[0060] Figure 6 This is a schematic diagram of the structure of a computer device 62 provided in an embodiment of the present invention. Figure 6 A block diagram of an exemplary computer device 62 suitable for implementing embodiments of the present invention is shown. Figure 6 The computer device 62 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0061] like Figure 6 As shown, computer device 62 is represented in the form of a general-purpose computing device. Computer device 62 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0062] The components of computer device 62 may include, but are not limited to: one or more processors or processing units 66, system memory 78, and bus 68 connecting different system components (including system memory 78 and processing unit 66).

[0063] Bus 68 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0064] Computer device 62 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 62, including volatile and non-volatile media, removable and non-removable media.

[0065] System memory 78 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 80 and / or cache memory 82. Computer device 62 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 84 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 68 via one or more data media interfaces. System memory 78 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0066] A program / utility 90 having a set (at least one) of program modules 92 may be stored, for example, in system memory 78. Such program modules 92 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 92 typically perform the functions and / or methods described in the embodiments of the present invention.

[0067] Computer device 62 can also communicate with one or more external devices 64 (e.g., keyboard, pointing device, display 74, etc.), and with one or more devices that enable a user to interact with computer device 62, and / or with any device that enables computer device 62 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 72. Furthermore, computer device 62 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 70. As shown, network adapter 70 communicates with other modules of computer device 62 via bus 68. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 62, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0068] The processing unit 66 executes various functional applications and data processing by running programs stored in the system memory 78, such as implementing the image stitching method based on genetic algorithms provided in the embodiments of the present invention.

[0069] This invention also provides a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, wherein the program, when executed by a processor, implements the image stitching method based on genetic algorithms provided in all embodiments of this invention.

[0070] The computer storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0071] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0072] The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. The computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0073] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the image stitching method based on the genetic algorithm described above.

[0074] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0075] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An image stitching method based on a genetic algorithm, characterized in that, Including the following steps: S10. Acquire multiple images from different image sensor chips, each image having at least one area to be stitched together, and the areas to be stitched together of adjacent images overlap to form multiple overlapping areas. S20. Obtain the average code value of the area to be spliced ​​corresponding to the overlapping area; S30. Set a correction coefficient for each of the image sensor chips and establish consistency constraints for all the overlapping regions; The consistency constraint condition is to make the product of the mean code value of the region to be spliced ​​within the same overlapping region and its corresponding correction coefficient equal; S40. The correction coefficient is solved using a genetic algorithm.

2. The image stitching method based on genetic algorithm according to claim 1, characterized in that: The overlapping areas include two overlapping areas where the areas to be stitched from two of the images overlap, and three overlapping areas where the areas to be stitched from three of the images overlap.

3. The image stitching method based on genetic algorithm according to claim 1, characterized in that: Step S40 specifically includes: Each correction coefficient is used as a gene for each individual in the genetic algorithm, and each gene corresponds to a brightness gain value for chip imaging; several individuals with random genes are generated to form an initial population; Crossover, mutation, and merging operations are performed on the initial population.

4. The image stitching method based on genetic algorithm according to claim 3, characterized in that: The crossover operation involves performing the operation on two individuals, randomly selecting 1 to 3 gene loci, and exchanging their genes; The mutation operation includes performing it on a single individual, randomly selecting a gene locus for mutation; The merging operation involves merging offspring individuals with parent individuals to form a new population.

5. The image stitching method based on genetic algorithm according to claim 3, characterized in that, In the mutation operation, an adaptive mutation operation is adopted, which increases the range of mutations in the early stage of the iteration and decreases the range of mutations in the later stage of the iteration.

6. The image stitching method based on genetic algorithm according to claim 3, characterized in that, Step S40 further includes: Calculate the individual fitness, which is the sum of the standardized mean square errors of all corresponding pixels in the overlapping region; Select the individual with the lowest fitness as the offspring.

7. The image stitching method based on genetic algorithm according to claim 6, characterized in that, After selecting the individual with the lowest fitness as the offspring, the process further includes the following steps: The offspring are normalized and then multiplied by the number of image sensor chips to obtain the final gain value.

8. The image stitching method based on genetic algorithm according to claim 1, characterized in that, The sum of the correction coefficients is equal to the total number of the image sensor chips.

9. A computer device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the image stitching method based on a genetic algorithm as described in any one of claims 1 to 8.

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 image stitching method based on genetic algorithms as described in any one of claims 1 to 8.