Image stitching methods, apparatus, devices and readable storage media
Patent Information
- Application Number
- CN202211613560.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-12-15
AI Technical Summary
[0003]本发明的主要目的在于提供一种图像拼接方法、装置、设备及可读存储介质,旨在解决现有技术中难以拍摄得到大视角的高分辨率图像的技术问题
[0039] In this invention, each sub-image captured by a sub-camera in an array camera is obtained, and the image under test is displayed on a display panel. Each sub-image is then corrected. Based on the mapping relationship between each sub-camera and a first template image, the corrected sub-images are filled into corresponding areas of a blank image to obtain an initial stitched image, wherein the blank image and the first template image have the same size. The brightness value of each overlapping area in the initial stitched image is adjusted to obtain the stitched image. This invention corrects and stitches the sub-images captured by the array camera to obtain a large-size, high-resolution image. During stitching, the corrected sub-images are filled into corresponding areas of the blank image based on the mapping relationship between each sub-camera and the first template image, meaning that filling does not rely on overlapping areas between sub-images, thus improving the utilization rate of each sub-camera. Furthermore, the filling operations for each sub-image can be performed in parallel, thereby improving the efficiency of obtaining the stitched image.
Smart Images

Figure CN115880154B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic optical inspection technology, and in particular to an image stitching method, apparatus, device, and readable storage medium. Background Technology
[0002] When inspecting display panels for defects, higher requirements are needed for details such as the size, shape, and brightness of the defect area in order to accurately identify and locate defects and ensure inspection accuracy. To achieve this, the image acquisition resolution is generally required to reach 20–50 μm / pixel. However, some larger display panels cannot be captured in full with a single camera to obtain a high-resolution image. To obtain high-resolution images with a wide viewing angle, wide-angle lenses or fisheye lenses are often used to solve this problem. However, these devices are often expensive, and the captured images usually suffer from severe distortion, making them unsuitable for high-precision defect inspection. Summary of the Invention
[0003] The main objective of this invention is to provide an image stitching method, apparatus, device, and readable storage medium, aiming to solve the technical problem that it is difficult to capture high-resolution images with a wide field of view in the prior art.
[0004] In a first aspect, the present invention provides an image stitching method, the image stitching method comprising:
[0005] Acquire individual sub-images captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed on the display panel under test;
[0006] Correct each sub-image;
[0007] Based on the mapping relationship between each sub-camera and the first template image, the corrected sub-images are filled into the corresponding areas of the blank image to obtain the initial stitched image, wherein the blank image and the first template image have the same size;
[0008] The brightness values of each overlapping region in the initial stitched image are adjusted to obtain the stitched image.
[0009] Optionally, before the step of acquiring each sub-image captured by each sub-camera in the array camera for the image under test, the method further includes:
[0010] Acquire each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0011] Acquire each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test;
[0012] Based on the first sub-image and the second sub-image corresponding to each sub-camera, the affine transformation matrix corresponding to each sub-camera is obtained. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera.
[0013] The steps for correcting each sub-image include:
[0014] The sub-images captured by each sub-camera are corrected based on the affine transformation matrix corresponding to each sub-camera.
[0015] Optionally, before the step of acquiring each sub-image captured by each sub-camera in the array camera for the image under test, the method further includes:
[0016] Acquire each third sub-image captured by each sub-camera in the array camera in response to the first template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0017] Each third sub-image is matched with the first template image for features, and the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image is obtained based on the feature matching results. The mapping relationship between each sub-camera and the first template image is used to identify the region where each third sub-image corresponding to each sub-camera is located in the first template image.
[0018] Optionally, after the step of performing feature matching between each third sub-image and the first template image, and obtaining the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image based on the feature matching results, the method further includes:
[0019] Based on the mapping relationship between each sub-camera and the first template image, each third sub-image is filled into the corresponding area of the blank image to obtain the stitched template image;
[0020] The brightness weight of each overlapping region in the stitched template image is calculated by using the optimal stitching line and the fade-in / fade-out fusion algorithm.
[0021] The step of adjusting the brightness value of each overlapping region in the initial stitched image to obtain the stitched image includes:
[0022] The brightness values of each overlapping region in the initial stitched image are adjusted according to the brightness weight of each overlapping region to obtain the stitched image.
[0023] Optionally, the first template image includes multiple QR code images, and each sub-camera's field of view center and four corner points correspond to a QR code image.
[0024] Optionally, the second template image includes multiple checkerboard images, and different sub-cameras correspond to different checkerboard images. The center of each checkerboard image coincides with the field of view center of its corresponding sub-camera, and each checkerboard image is located within the field of view of its corresponding sub-camera.
[0025] Secondly, the present invention also provides an image stitching device, the image stitching device comprising:
[0026] The acquisition module is used to acquire each sub-image captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed in the display panel under test;
[0027] The correction module is used to correct each sub-image;
[0028] The filling module is used to fill the corresponding areas of the blank image with the corrected sub-images according to the mapping relationship between each sub-camera and the first template image to obtain the initial stitched image, wherein the blank image and the first template image have the same size;
[0029] The adjustment module is used to adjust the brightness value of each overlapping area in the initial stitched image to obtain the stitched image.
[0030] Optionally, the acquisition module is further configured to:
[0031] Acquire each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0032] Acquire each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test;
[0033] The image stitching device also includes a computing module, used for:
[0034] Based on the first sub-image and the second sub-image corresponding to each sub-camera, the affine transformation matrix corresponding to each sub-camera is obtained. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera.
[0035] The correction module is used for:
[0036] The sub-images captured by each sub-camera are corrected based on the affine transformation matrix corresponding to each sub-camera.
[0037] Thirdly, the present invention also provides an image stitching device, the image stitching device including a processor, a memory, and an image stitching program stored in the memory and executable by the processor, wherein when the image stitching program is executed by the processor, it implements the steps of the image stitching method described above.
[0038] Fourthly, the present invention also provides a readable storage medium storing an image stitching program, wherein when the image stitching program is executed by a processor, it implements the steps of the image stitching method described above.
[0039] In this invention, each sub-image captured by a sub-camera in an array camera is obtained, and the image under test is displayed on a display panel. Each sub-image is then corrected. Based on the mapping relationship between each sub-camera and a first template image, the corrected sub-images are filled into corresponding areas of a blank image to obtain an initial stitched image, wherein the blank image and the first template image have the same size. The brightness value of each overlapping area in the initial stitched image is adjusted to obtain the stitched image. This invention corrects and stitches the sub-images captured by the array camera to obtain a large-size, high-resolution image. During stitching, the corrected sub-images are filled into corresponding areas of the blank image based on the mapping relationship between each sub-camera and the first template image, meaning that filling does not rely on overlapping areas between sub-images, thus improving the utilization rate of each sub-camera. Furthermore, the filling operations for each sub-image can be performed in parallel, thereby improving the efficiency of obtaining the stitched image. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating the first embodiment of the image stitching method of the present invention;
[0041] Figure 2 This is a flowchart illustrating the second embodiment of the image stitching method of the present invention;
[0042] Figure 3 This is a schematic diagram of the second template image in one embodiment of the image stitching method of the present invention;
[0043] Figure 4 This is a schematic diagram of the first template image in one embodiment of the image stitching method of the present invention;
[0044] Figure 5 This is a functional module diagram of an embodiment of the image stitching device of the present invention;
[0045] Figure 6 This is a schematic diagram of the hardware structure of the image stitching device involved in the embodiment of the present invention.
[0046] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0048] In a first aspect, embodiments of the present invention provide an image stitching method.
[0049] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the image stitching method of the present invention. Figure 1 As shown, image stitching methods include:
[0050] Step S10: Obtain each sub-image captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed on the display panel under test;
[0051] In this embodiment, when performing defect detection on the display panel under test, the display panel under test is placed on the work platform manually or by machine, and the display panel under test is lit up to display the image under test. The specific form of the image under test is set according to actual needs.
[0052] The array camera system uses individual sub-cameras to capture images of the target image and acquires individual sub-images captured by each sub-camera.
[0053] Assuming the array camera includes sub-camera 1 to sub-camera N, then sub-image 1 to sub-image N are acquired.
[0054] Step S20: Correct each sub-image;
[0055] In this embodiment, considering that placing the display panel under test onto the work platform manually or by machine will cause a positional error between the actual placement position of the display panel under test and the standard placement position, resulting in differences between the obtained sub-images and the theoretical sub-images, it is necessary to correct each sub-image.
[0056] Furthermore, in one embodiment, reference is made to Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the image stitching method of the present invention. Figure 2 As shown, before step S10, the procedure further includes:
[0057] Step S01: Obtain each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0058] In this embodiment, the first display panel is placed in a standard position (i.e., the standard placement position described above), and then the first display panel is turned on to display the second template image. Alternatively, the first display panel can be turned on first to display the second template image, and then the first display panel can be placed in the standard position. No limitation is imposed here.
[0059] It should be noted that the first display panel mentioned here and the second display panel mentioned later can be the same display panel, or they can be the same model of display panel as the second display panel mentioned later.
[0060] Each sub-camera in the array camera takes a picture of the second template image displayed on the first display panel, and acquires each first sub-image captured by each sub-camera.
[0061] Further, in one embodiment, the second template image includes multiple checkerboard images, and different sub-cameras correspond to different checkerboard images. The center of each checkerboard image coincides with the field of view center of its corresponding sub-camera, and each checkerboard image is located within the field of view of its corresponding sub-camera. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the second template image in one embodiment of the image stitching method of the present invention. It should be noted that this is only an illustrative description of the second template image and does not constitute a limitation on the second template image. Other forms of second template images can be set to achieve the same effect.
[0062] Step S02: Obtain each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test;
[0063] In this embodiment, after the display panel to be tested is placed on the work platform manually or by machine, the second template image displayed on the display panel to be tested is captured by each sub-camera in the array camera, thereby obtaining each second sub-image captured by each sub-camera.
[0064] Step S03: Based on the first sub-image and the second sub-image corresponding to each sub-camera, obtain the affine transformation matrix corresponding to each sub-camera. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera.
[0065] In this embodiment, taking the first sub-image 11 and the second sub-image 21 corresponding to the sub-camera 1 as examples, the first sub-image 11 is equivalent to the image captured by the sub-camera 1 when the display panel is correctly positioned; the second sub-image 21 is equivalent to the image captured by the sub-camera 1 when the position of the display panel deviates from the standard position. Based on the first sub-image 11 and the second sub-image 21, the affine transformation matrix f1 required to transform the second sub-image 21 into the first sub-image 11 can be calculated. It is easy to understand that the affine transformation matrix f1 can eliminate the image error in the second sub-image 21 captured by the sub-camera 1 caused by the placement error.
[0066] Similarly, the affine transformation matrix corresponding to each sub-camera can be obtained.
[0067] Based on the above embodiments, step S20 includes:
[0068] Step S201: Correct each sub-image captured by each sub-camera according to the affine transformation matrix corresponding to each sub-camera.
[0069] In this embodiment, each sub-image captured by each sub-camera is corrected according to the affine transformation matrix corresponding to each sub-camera. That is, the affine transformation is performed on each sub-image captured by each sub-camera according to the affine transformation matrix corresponding to each sub-camera, thereby eliminating image errors caused by placement errors.
[0070] Step S30: According to the mapping relationship between each sub-camera and the first template image, fill the corresponding area of the blank image with the corrected sub-images to obtain the initial stitched image, wherein the blank image and the first template image have the same size.
[0071] In this embodiment, it is easy to understand that the field of view of each sub-camera cannot encompass the entire first template image; that is, each sub-camera can only capture a portion of the first template image. Based on this, a mapping relationship between each sub-camera and the first template image can be constructed, specifying which region of the first template image each sub-camera corresponds to. For example, sub-camera 1 corresponds to region 1 of the first template image, sub-camera 2 corresponds to region 2 of the first template image, and sub-camera 3 corresponds to region 3 of the first template image. Since the blank image has the same size as the first template image, it also includes regions 1 to 3. Therefore, the corrected sub-image 1 is filled into region 1 of the blank image, the corrected sub-image 2 is filled into region 2 of the blank image, and the corrected sub-image 3 is filled into region 3 of the blank image.
[0072] Furthermore, in one embodiment, the first template image includes multiple QR code images, and each sub-camera's field of view center and four corner points correspond to a QR code image. (See also...) Figure 4 , Figure 4 This is a schematic diagram of the first template image in one embodiment of the image stitching method of the present invention. Figure 4 As shown, Figure 4 The dashed box in the image represents the field of view of sub-camera 1, and the same applies to other sub-cameras; details are omitted here. It is easy to understand that this dashed box does not actually exist in the first template image; it is shown here only for better illustration of this embodiment.
[0073] It is easy to understand that a blank image is the image after the QR code image is removed from the first template image.
[0074] It should be noted that this is only an illustrative description of the first template image and does not constitute a limitation on the first template image. Other forms of the first template image can be set to achieve the same effect.
[0075] Furthermore, in one embodiment, before step S10, the method further includes:
[0076] Step S04: Obtain each third sub-image captured by each sub-camera in the array camera in response to the first template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0077] In this embodiment, referring to step S01 above, it is easy to understand that the second template image can be displayed when the first display panel is in the standard position, thereby executing step S01, and then the display screen can be switched to the first template image, thereby executing step S04; or the first template image can be displayed when the first display panel is in the standard position, thereby executing step S04, and then the display screen can be switched to the second template image, thereby executing step S01.
[0078] The third sub-images captured by each sub-camera are the images captured by each sub-camera against the first template image when the display panel is positioned without error.
[0079] Step S05: Perform feature matching between each third sub-image and the first template image, and obtain the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image based on the feature matching results. The mapping relationship between each sub-camera and the first template image is used to identify the region where each third sub-image corresponding to each sub-camera is located in the first template image.
[0080] In this embodiment, taking the third sub-image 31 captured by sub-camera 1 as an example, the SURF feature point extraction algorithm is used to extract features from both the third sub-image 31 and the first template image. Then, feature matching is performed based on the extracted features to determine the region where the third sub-image 31 is located in the first template image. This region is then used as the mapping relationship between the sub-camera 1 and the first template image corresponding to the third sub-image 31. This process is repeated to obtain the mapping relationship between each sub-camera and the first template image.
[0081] Based on this embodiment, the corrected sub-images can be filled into the corresponding areas of the blank image according to the mapping relationship between each sub-camera and the first template image.
[0082] Step S40: Adjust the brightness value of each overlapping area in the initial stitched image to obtain the stitched image.
[0083] In this embodiment, the brightness value of each overlapping region in the initial stitched image is adjusted based on image fusion technology to obtain the stitched image.
[0084] Furthermore, in one embodiment, after step S05, the method further includes:
[0085] Based on the mapping relationship between each sub-camera and the first template image, each third sub-image is filled into the corresponding area of the blank image to obtain the stitched template image; the brightness weight of each overlapping area in the stitched template image is calculated by the optimal stitching line and the fade-in / fade-out fusion algorithm.
[0086] In this embodiment, based on the mapping relationship between each sub-camera and the first template image, each third sub-image is filled into the corresponding area of the blank image to obtain the stitched template image. Considering that there may be overlapping areas in the stitched template image (the size of the overlapping area is related to the setting position of the field of view of each sub-camera), and since the brightness of the overlapping area differs from the actual brightness, it is necessary to calculate the brightness weight of each overlapping area in the stitched template image using the optimal stitching line and the fade-in / fade-out fusion algorithm, so as to adjust the brightness value of each overlapping area in the subsequently obtained initial stitched image.
[0087] The step of adjusting the brightness value of each overlapping region in the initial stitched image to obtain the stitched image includes:
[0088] The brightness values of each overlapping region in the initial stitched image are adjusted according to the brightness weight of each overlapping region to obtain the stitched image.
[0089] In this embodiment, the specific implementation of calculating the brightness weight of each overlapping region and adjusting the brightness value of each overlapping region in the initial stitched image according to the brightness weight of each overlapping region can refer to the existing technology, and will not be elaborated here.
[0090] Furthermore, before taking pictures through each sub-camera in the array camera, parameters can be set according to actual needs, such as configuring camera exposure time, camera type selection, data storage path, enabling moiré removal function, enabling FFC function, and other parameters.
[0091] In this embodiment, each sub-image captured by each sub-camera in the array camera for the image under test is acquired, and the image under test is displayed on the display panel. Each sub-image is corrected. Based on the mapping relationship between each sub-camera and the first template image, the corrected sub-images are filled into the corresponding areas of the blank image to obtain an initial stitched image, wherein the blank image and the first template image have the same size. The brightness value of each overlapping area in the initial stitched image is adjusted to obtain the stitched image. Through this embodiment, the sub-images captured by the array camera are corrected and stitched to obtain a large-size and high-resolution image. During stitching, the corrected sub-images are filled into the corresponding areas of the blank image based on the mapping relationship between each sub-camera and the first template image. This means that the filling does not rely on the overlapping areas between sub-images, thus improving the utilization rate of each sub-camera. Furthermore, the filling actions for each sub-image can be performed in parallel, thereby improving the efficiency of obtaining the stitched image.
[0092] Secondly, embodiments of the present invention also provide an image stitching device.
[0093] In one embodiment, reference is made to Figure 5 , Figure 5 This is a schematic diagram of the functional modules of an embodiment of the image stitching device of the present invention. Figure 5 As shown, the image stitching device includes:
[0094] The acquisition module 10 is used to acquire each sub-image captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed in the display panel under test;
[0095] Correction module 20 is used to correct each sub-image;
[0096] The filling module 30 is used to fill the corresponding area of the blank image with the corrected sub-images according to the mapping relationship between each sub-camera and the first template image to obtain an initial stitched image, wherein the blank image and the first template image have the same size;
[0097] The adjustment module 40 is used to adjust the brightness value of each overlapping area in the initial stitched image to obtain the stitched image.
[0098] Furthermore, in one embodiment, the acquisition module 10 is also used for:
[0099] Acquire each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0100] Acquire each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test;
[0101] The image stitching device also includes a computing module, used for:
[0102] Based on the first sub-image and the second sub-image corresponding to each sub-camera, the affine transformation matrix corresponding to each sub-camera is obtained. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera.
[0103] The correction module 20 is used for:
[0104] The sub-images captured by each sub-camera are corrected based on the affine transformation matrix corresponding to each sub-camera.
[0105] Furthermore, in one embodiment, the acquisition module 10 is also used for:
[0106] Acquire each third sub-image captured by each sub-camera in the array camera in response to the first template image displayed on the first display panel, wherein the first display panel is located in a standard position;
[0107] The image stitching device further includes a feature matching module, used for:
[0108] Each third sub-image is matched with the first template image for features, and the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image is obtained based on the feature matching results. The mapping relationship between each sub-camera and the first template image is used to identify the region where each third sub-image corresponding to each sub-camera is located in the first template image.
[0109] Furthermore, in one embodiment, the filling module is also used for:
[0110] Based on the mapping relationship between each sub-camera and the first template image, each third sub-image is filled into the corresponding area of the blank image to obtain the stitched template image;
[0111] The image stitching device further includes a weight calculation module, used for:
[0112] The brightness weight of each overlapping region in the stitched template image is calculated by using the optimal stitching line and the fade-in / fade-out fusion algorithm.
[0113] The adjustment module 40 is used for:
[0114] The brightness values of each overlapping region in the initial stitched image are adjusted according to the brightness weight of each overlapping region to obtain the stitched image.
[0115] Furthermore, in one embodiment, the first template image includes multiple QR code images, and the center of the field of view and the four corner points of each sub-camera correspond to a QR code image.
[0116] Furthermore, in one embodiment, the second template image includes multiple checkerboard images, and different sub-cameras correspond to different checkerboard images. The center of each checkerboard image coincides with the field of view center of its corresponding sub-camera, and each checkerboard image is located within the field of view of its corresponding sub-camera.
[0117] The functions of each module in the above-mentioned image stitching device correspond to the steps in the above-mentioned image stitching method embodiment, and their functions and implementation processes will not be described in detail here.
[0118] Thirdly, embodiments of the present invention provide an image stitching device, which can be a personal computer (PC), laptop computer, server or other device with data processing capabilities.
[0119] Reference Figure 6 , Figure 6 This is a schematic diagram of the hardware structure of the image stitching device involved in the embodiment of the present invention. In this embodiment, the image stitching device may include a processor 1001 (e.g., a Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize communication between these components; the user interface 1003 may include a display screen or an input unit such as a keyboard; the network interface 1004 may optionally include a standard wired interface or a wireless interface (e.g., Wireless Fidelity, Wi-Fi interface); the memory 1005 may be high-speed random access memory (RAM) or stable memory (non-volatile memory), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001. Those skilled in the art will understand that… Figure 6 The hardware structure shown does not constitute a limitation of the invention and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0120] Continue to refer to Figure 6 , Figure 6 The memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an image stitching program. The processor 1001 can call the image stitching program stored in the memory 1005 and execute the image stitching method provided in this embodiment of the invention.
[0121] Fourthly, embodiments of the present invention also provide a readable storage medium.
[0122] The present invention provides an image stitching program stored on a readable storage medium, wherein when the image stitching program is executed by a processor, it implements the steps of the image stitching method described above.
[0123] The method implemented when the image stitching program is executed can be referred to in various embodiments of the image stitching method of the present invention, and will not be repeated here.
[0124] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0125] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of the present invention.
[0127] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An image stitching method, characterized in that, The image stitching method includes: Acquire individual sub-images captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed on the display panel under test; Correct each sub-image; Based on the mapping relationship between each sub-camera and the first template image, the corrected sub-images are filled into the corresponding areas of the blank image to obtain the initial stitched image, wherein the blank image and the first template image have the same size; The brightness values of each overlapping region in the initial stitched image are adjusted to obtain the stitched image; Before the step of acquiring the sub-images captured by each sub-camera in the array camera for the image under test, the method further includes: Acquire each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position; Acquire each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test; Based on the first sub-image and the second sub-image corresponding to each sub-camera, the affine transformation matrix corresponding to each sub-camera is obtained. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera. The steps for correcting each sub-image include: The sub-images captured by each sub-camera are corrected based on the affine transformation matrix corresponding to each sub-camera.
2. The image stitching method as described in claim 1, characterized in that, Before the step of acquiring the sub-images captured by each sub-camera in the array camera for the image under test, the method further includes: Acquire each third sub-image captured by each sub-camera in the array camera in response to the first template image displayed on the first display panel, wherein the first display panel is located in a standard position; Each third sub-image is matched with the first template image for features, and the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image is obtained based on the feature matching results. The mapping relationship between each sub-camera and the first template image is used to identify the region where each third sub-image corresponding to each sub-camera is located in the first template image.
3. The image stitching method as described in claim 2, characterized in that, After the steps of performing feature matching between each third sub-image and the first template image, and obtaining the mapping relationship between each sub-camera corresponding to each third sub-image and the first template image based on the feature matching results, the method further includes: Based on the mapping relationship between each sub-camera and the first template image, each third sub-image is filled into the corresponding area of the blank image to obtain the stitched template image; The brightness weight of each overlapping region in the stitched template image is calculated by using the optimal stitching line and the fade-in / fade-out fusion algorithm. The step of adjusting the brightness value of each overlapping region in the initial stitched image to obtain the stitched image includes: The brightness values of each overlapping region in the initial stitched image are adjusted according to the brightness weight of each overlapping region to obtain the stitched image.
4. The image stitching method as described in claim 1, characterized in that, The first template image includes multiple QR code images, and each sub-camera's field of view center and four corner points correspond to a QR code image.
5. The image stitching method as described in claim 1, characterized in that, The second template image includes multiple checkerboard images, and different sub-cameras correspond to different checkerboard images. The center of each checkerboard image coincides with the field of view center of its corresponding sub-camera, and each checkerboard image is located within the field of view of its corresponding sub-camera.
6. An image stitching device, characterized in that, The image stitching device includes: The acquisition module is used to acquire each sub-image captured by each sub-camera in the array camera for the image under test, wherein the image under test is displayed in the display panel under test; The correction module is used to correct each sub-image; The filling module is used to fill the corresponding areas of the blank image with the corrected sub-images according to the mapping relationship between each sub-camera and the first template image to obtain the initial stitched image, wherein the blank image and the first template image have the same size; The adjustment module is used to adjust the brightness value of each overlapping area in the initial stitched image to obtain the stitched image; The acquisition module is also used for: Acquire each first sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the first display panel, wherein the first display panel is located in a standard position; Acquire each second sub-image captured by each sub-camera in the array camera in response to the second template image displayed on the display panel under test; The image stitching device also includes a computing module, used for: Based on the first sub-image and the second sub-image corresponding to each sub-camera, the affine transformation matrix corresponding to each sub-camera is obtained. The affine transformation matrix corresponding to each sub-camera is the affine transformation matrix required to transform the second sub-image captured by each sub-camera into the first sub-image captured by each sub-camera. The correction module is used for: The sub-images captured by each sub-camera are corrected based on the affine transformation matrix corresponding to each sub-camera.
7. An image stitching device, characterized in that, The image stitching device includes a processor, a memory, and an image stitching program stored in the memory and executable by the processor, wherein when the image stitching program is executed by the processor, it implements the steps of the image stitching method as described in any one of claims 1 to 5.
8. A readable storage medium, characterized in that, The readable storage medium stores an image stitching program, wherein when the image stitching program is executed by a processor, it implements the steps of the image stitching method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Image splicing processing method, device and equipment and computer storage medium
CN114972023A