Image splicing method and device and storage medium
By acquiring and processing the shooting position information and perspective transformation of the nuclear power inspection images collected by the drone, the problems of low image stitching efficiency and large errors in the prior art are solved, and efficient and accurate image stitching is achieved.
Patent Information
- Application Number
- CN202411470535.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In nuclear power inspection scenarios, the existing multi-image stitching algorithm has huge adjacent image search space, a large number of invalid matches, exponentially growing matching time and memory space requirements when processing large-scale image stitching, and the discontinuous image timing information leads to cumulative errors in stitching.
By obtaining the image information collected by the camera, including shooting position coordinates, shooting distance and position type, the image stitching sequence is determined, and perspective transformation is performed based on this information, and finally the stitching image is generated based on the perspective transformed image and stitching sequence.
It effectively reduces the cumulative error and time of stitching, improves the efficiency and accuracy of image stitching, and avoids huge search space and invalid matching of adjacent images.
Smart Images

Figure CN119540043A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image stitching method, device and storage medium. Background Art
[0002] In nuclear power inspection scenarios, in order to ensure the safety of power plant workers and improve the efficiency of nuclear containment (a sturdy container used to surround and protect the core of a nuclear reactor) crack inspection, it is usually necessary to synthesize multiple images containing local information taken by drones into a large-viewing, high-resolution image. This image synthesis can help relevant personnel accurately obtain the overall information of the target area in a short time. However, compared with general images, drone-collected images in inspection projects have some particularities, including a large number of images, large size, weak texture information, and fewer overlapping parts.
[0003] Current multi-image stitching algorithms face some challenges in handling large-scale image stitching requirements in inspection projects. For example, pure visual methods require pairwise matching of all images, and then select the image with the highest matching score for stitching, which results in a huge adjacent image search space, a large number of invalid matches, and exponentially growing matching time and memory space requirements. Although there are some studies that can improve stitching efficiency by analyzing the time series of images taken by drones, in inspection projects, the time series information of images may be discontinuous, resulting in cumulative errors in image stitching, so it is impossible to use time series information to reduce the search space of adjacent images. Summary of the invention
[0004] The main purpose of this application is to provide an image stitching method, device and storage medium, aiming to prevent the emergence of a huge adjacent image search space and a large number of invalid matches, thereby reducing the stitching cumulative error and reducing the image stitching time, thereby improving the efficiency and accuracy of image stitching.
[0005] To achieve the above object, the present application proposes an image stitching method, which comprises:
[0006] Acquire first image information captured by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images;
[0007] Based on the shooting position coordinates, determining an image stitching sequence;
[0008] Based on the shooting distance and the position type, performing perspective transformation on each of the first images;
[0009] A second image is obtained based on the perspective-transformed first images and the image stitching sequence.
[0010] In one embodiment, the shooting position coordinates include a first coordinate value;
[0011] The step of determining the image stitching sequence based on the shooting position coordinates includes:
[0012] Matching the shooting position coordinates with a preset stitching rule to obtain a sequence row number of each of the first images;
[0013] Based on the first coordinate value and the sequence line number, storing each of the first images into a two-dimensional list;
[0014] The two-dimensional list is used as the image stitching sequence.
[0015] In one embodiment, performing perspective transformation on each of the first images based on the shooting distance and the position type includes:
[0016] The first image whose shooting distance meets the preset distance rule is used as the third image;
[0017] Taking the plane corresponding to the third image as the target projection plane;
[0018] Based on the position type and the target projection plane, perspective transformation is performed on each of the first images.
[0019] In one embodiment, performing perspective transformation on each of the first images based on the position type and the target projection plane includes:
[0020] If the position type of the first image is an oblique position, obtaining an oblique angle of the first image;
[0021] Based on the oblique shooting angle and the target projection plane, calculate the pixel length and width of the normal shooting area of the first image, and obtain matching points between the first image and the third image;
[0022] Calculating the length and width of pixels in the orthographic area and the matching points to obtain a perspective transformation matrix;
[0023] Based on the perspective transformation matrix, perspective transformation is performed on the first image.
[0024] In one embodiment, performing perspective transformation on each of the first images based on the position type and the target projection plane includes:
[0025] If the position type of the first image is a dome position, obtaining a rotation angle of the first image;
[0026] Based on the rotation angle, a rotation transformation matrix is calculated, and a plane projection parameter between the first image and the third image is obtained;
[0027] Calculating the rotation transformation matrix and the plane projection parameters to obtain a perspective transformation matrix;
[0028] Based on the perspective transformation matrix, perspective transformation is performed on the first image.
[0029] In one embodiment, obtaining the second image based on each of the perspective transformed first images and the image stitching sequence includes:
[0030] Inputting each of the perspective-transformed first images into an offset prediction model to obtain a first pixel offset output by the offset prediction model;
[0031] Based on the first pixel offset, each of the perspective-transformed first images is spliced according to the image splicing sequence to obtain the second image.
[0032] In one embodiment, after obtaining the second image based on the perspective transformed first images and the image stitching sequence, the method further includes:
[0033] If an image registration failure notification is detected, obtaining fourth image information;
[0034] Calculating a second pixel offset based on the fourth image information;
[0035] The second image is adjusted based on the second pixel offset and the fourth image information.
[0036] In one embodiment, the fourth image information includes a plurality of fourth images and shooting position coordinates, shooting frames, shooting distances, and position types corresponding to each of the fourth images;
[0037] The calculating the second pixel offset based on the fourth image information includes:
[0038] If the position type of the fourth image is the barrel body position, calculating the second pixel offset based on the shooting position coordinates, shooting frame and shooting distance of the fourth image;
[0039] If the position type of the fourth image is a dome position, obtaining a rotation angle and a center point distance of the fourth image;
[0040] A second pixel offset is calculated based on the shooting position coordinates, the rotation angle, and the center distance of the fourth image.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes an image stitching device, which includes:
[0042] An acquisition module, used to acquire first image information collected by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images;
[0043] A determination module, used for determining an image stitching sequence based on the shooting position coordinates;
[0044] A transformation module, configured to perform perspective transformation on each of the first images based on the shooting distance and the position type;
[0045] The stitching module is used to obtain a second image based on the first images after the perspective transformation and the image stitching sequence.
[0046] In addition, to achieve the above-mentioned purpose, the present application also proposes an image stitching device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image stitching method described above.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image stitching method described above are implemented.
[0048] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the image stitching method described above are implemented.
[0049] The present application provides an image stitching method, device and storage medium. The image stitching method obtains first image information collected by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distances and position types corresponding to each of the first images, and then determines an image stitching sequence based on the shooting position coordinates, and then performs perspective transformation on each of the first images based on the shooting distance and the position type, and then obtains a second image based on each of the perspective-transformed first images and the image stitching sequence, thereby preventing a huge adjacent image search space and a large number of invalid matches, thereby reducing the stitching cumulative error and reducing the image stitching time, thereby improving the efficiency and accuracy of image stitching. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0052] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the image stitching method of the present application;
[0053] Figure 2 A schematic diagram of a flow chart provided for the second embodiment of the image stitching method of the present application;
[0054] Figure 3 An example diagram of a brief training process of the offset prediction model provided in this application;
[0055] Figure 4 A brief flowchart of the image stitching method provided in this application;
[0056] Figure 5 This is a schematic diagram of the module structure of the image stitching device according to an embodiment of the present application;
[0057] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the image stitching method in the embodiment of the present application.
[0058] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0059] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0060] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a big data service platform, an image stitching system, etc. The following takes the image stitching system as an example to illustrate this embodiment and the following embodiments.
[0062] Based on this, the present application embodiment provides an image stitching method, referring to Figure 1, Figure 1 A flowchart diagram of the first embodiment of the image stitching method of the present application is provided.
[0063] In this embodiment, the image stitching method includes steps S11 to S14:
[0064] Step S11, obtaining first image information collected by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images;
[0065] It should be noted that the camera refers to a camera, a drone, or other cameras in other devices with shooting functions, to collect the first image information, wherein, in order to improve the efficiency of image acquisition and meet the stitching requirements, the shooting parameters of the camera can be set according to the preset constraints, for example, the preset constraints are 3 meters away from the wall of the nuclear containment, the shooting frame size is 1.2 meters wide and 0.8 meters high, and the image overlap rate is set to 35%, etc., which are not limited here and can be set according to actual conditions, so as to effectively control the imaging effect of the first image, ensure the consistency and accuracy of the shooting, and facilitate subsequent analysis and stitching. In addition, the first image information refers to information related to the first image, including the shooting position coordinates, shooting distance, and position type corresponding to the first image and each of the first images, wherein the first image refers to an image collected by the camera, and in one embodiment, the first image can be an image of the nuclear containment collected by the drone, for example, the shooting content of the first image is a quarter dome of the nuclear containment.
[0066] It should be further explained that the shooting position coordinates refer to the coordinate information converted from the camera position information, including the first coordinate value, the second coordinate value and the third coordinate value, such as ARH coordinates, etc., to characterize the position of the camera in the three-dimensional space. In addition, the shooting distance refers to the distance between the camera and the shooting object, and the position type refers to the position type corresponding to the shooting content in the first image. Taking the shooting of the nuclear containment as an example, it includes the barrel position, the dome position, the normal shooting position and the oblique shooting position, etc. For example, if the shooting content in the first image is a quarter dome of the nuclear containment, the position type is the dome position.
[0067] Specifically, the first image information may be obtained by capturing and uploading with a camera, etc., which is not limited here.
[0068] Step S12, determining an image stitching sequence based on the shooting position coordinates;
[0069] It should be noted that the image stitching sequence represents a two-dimensional list consisting of the correct stitching order of each first image, so that each first image can be directly stitched together according to the image stitching sequence to form a large image that meets user needs, effectively improving the efficiency of image stitching.
[0070] Specifically, the shooting position coordinates are matched with preset stitching rules to obtain the serial row number of each first image, and then based on the first coordinate value and the serial row number, each first image is stored in a two-dimensional list, so that the two-dimensional list is used as the image stitching sequence.
[0071] Step S13, performing perspective transformation on each of the first images based on the shooting distance and the position type;
[0072] Specifically, the first image whose shooting distance meets the preset distance rule is used as the third image, and then the plane corresponding to the third image is used as the target projection plane, so as to perform perspective transformation on each of the first images based on the position type and the target projection plane.
[0073] Step S14, obtaining a second image based on the perspective transformed first images and the image stitching sequence.
[0074] It should be noted that the second image refers to a large image that meets user needs after image stitching, for example, a large field of view and high resolution image that allows users to accurately obtain overall information of the target area in a short time, and there is no limitation here.
[0075] Specifically, each of the first images after perspective transformation is input into an offset prediction model to obtain a first pixel offset output by the offset prediction model, and then based on the first pixel offset, each of the first images after perspective transformation is spliced according to the image splicing sequence to obtain the second image.
[0076] The embodiment of the present invention obtains first image information captured by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distances, and position types corresponding to each of the first images, and then determines an image stitching sequence based on the shooting position coordinates, thereby performing a perspective transformation on each of the first images based on the shooting distance and the position type, and then obtains a second image based on each of the perspective-transformed first images and the image stitching sequence, thereby preventing the occurrence of a huge adjacent image search space and a large number of invalid matches, thereby reducing the stitching cumulative error and reducing the image stitching time, thereby improving the efficiency and accuracy of image stitching.
[0077] In a feasible implementation manner, the shooting position coordinates include a first coordinate value; and determining the image stitching sequence based on the shooting position coordinates includes:
[0078] Step S21, matching the shooting position coordinates with a preset stitching rule to obtain a sequence row number of each of the first images;
[0079] It should be noted that the preset stitching rules refer to the composition rules of the pre-set image stitching sequence. For example, first, the image with the smallest first coordinate value and the largest third coordinate value is regarded as the image in the upper right corner; second, each row is arranged in ascending order of the first coordinate value; third, the sequence row numbers are stored in a two-dimensional list from small to large. There is no restriction here and it can be set according to actual conditions.
[0080] It should be further explained that the first coordinate value refers to the coordinate value in the shooting position coordinate, for example, the first coordinate value is the A value in the ARH coordinate, the second coordinate value is the R value in the ARH coordinate, and the third coordinate value is the H value in the ARH coordinate. In addition, the sequence row number refers to the row number in the image stitching sequence, such as the first row.
[0081] Specifically, the shooting position coordinates corresponding to each of the first images are matched with the preset stitching rules to obtain the serial row numbers of each of the first images. For example, the serial row numbers of each of the first images are determined by sorting them from large to small according to the H value. The serial row number corresponding to the first image with the largest H value is the first row, and there is no limitation here.
[0082] Step S22, storing each of the first images into a two-dimensional list based on the first coordinate value and the sequence line number;
[0083] It should be noted that the two-dimensional list is used to store data in multiple rows and columns, and each element in the two-dimensional list can be accessed through two indexes, namely, the row and the column.
[0084] Specifically, according to the preset stitching rules, each of the first images is stored in a two-dimensional list according to the first coordinate value and the serial row number. For example, the first image with the smallest A value and the largest H value is matched, and the first image is stored in the upper right corner of the two-dimensional list, and then the first image in each row is determined, and the ARH coordinates of all the first images in the row are traversed, and each first image is stored from right to left in the order of A value from small to large to the position of the row, so as to obtain the arrangement order of the first images in all rows, and then the rows corresponding to all serial row numbers are combined from top to bottom in order from large to small, so as to obtain a complete two-dimensional list.
[0085] In addition, since the stitching order is from the upper right to the lower left, for the current image, it is only necessary to find its right adjacent image and the upper adjacent image for feature matching. For example, to find the right adjacent image of the current image, it is only necessary to find the image with the previous index according to the index of the current image in the current row, which is the right adjacent image; to find the upper adjacent image of the current image, it is only necessary to get the row number of the previous row according to the row number of the current row, and then use the binary search method to find the image with the smallest difference in A value with the current image in the images of the previous row, which is the upper adjacent image, thereby realizing fast image search, preventing the emergence of a huge adjacent image search space and a large number of invalid matches, thereby reducing the stitching cumulative error and reducing the image stitching time, thereby improving the efficiency and accuracy of image stitching.
[0086] Step S23: using the two-dimensional list as the image stitching sequence.
[0087] It should be noted that if a new image needs to be added to the image stitching sequence, it is only necessary to add the shooting position coordinates to the two-dimensional list, and there is no need to perform image search and image matching, thereby improving the convenience and scalability of image stitching.
[0088] This embodiment obtains the serial row number of each first image by matching the shooting position coordinates with the preset stitching rules, and then stores each first image in a two-dimensional list based on the first coordinate value and the serial row number, so that the two-dimensional list is used as the image stitching sequence, thereby generating a continuous and complete stitched image, while achieving fast indexing and access to specific images, and allowing flexible definition of stitching strategies according to different scenarios and requirements. In addition, the storage space is optimized by storing image information in a two-dimensional list, and the memory space used by the tree structure is less.
[0089] Based on this, the present application embodiment provides an image stitching method, referring to Figure 2 , Figure 2 A flowchart diagram of the second embodiment of the image stitching method of the present application is provided.
[0090] In a feasible implementation manner, performing perspective transformation on each of the first images based on the shooting distance and the position type includes:
[0091] Step S31, taking the first image whose shooting distance meets the preset distance rule as the third image;
[0092] It should be noted that the preset distance rule refers to the distance requirement that the image should meet in advance, such as the minimum shooting distance, etc., to determine the plane to which the first image needs to be projected. The third image refers to an image that meets the preset distance rule.
[0093] Specifically, the shooting position coordinates of all the first images are traversed and matched to obtain a first image whose shooting distance meets the preset distance rule, and then the first image whose shooting distance meets the preset distance rule is used as the third image. For example, the ARH coordinates of all the first images are traversed to obtain the first image closest to the nuclear containment wall, and the first image is used as the third image.
[0094] Step S32, taking the plane corresponding to the third image as the target projection plane;
[0095] It should be noted that the target projection plane refers to the plane onto which the first image needs to be projected, so that the projection method of the spliced image remains consistent and the unity of the overall vision is increased.
[0096] Specifically, one or more key points of the third image may be selected, and then a plane may be determined according to the key points, and the plane may be used as the target projection plane. There is no limitation here, and the plane may be set according to actual conditions.
[0097] Step S33: performing perspective transformation on each of the first images based on the position type and the target projection plane.
[0098] It should be noted that the perspective transformation refers to the process of projecting a two-dimensional image onto another two-dimensional plane. The perspective transformation can convert images taken at different angles and distances into images with the same perspective effect, thereby simplifying subsequent processing steps, such as feature matching, image registration, etc.
[0099] Specifically, if the position type of the first image is a normal shooting position (that is, the shooting direction between the camera and the object is horizontal or vertical), the matching points between the first image and the third image are obtained, wherein the matching points can be obtained by feature point matching or area matching, etc., and there is no limitation here. The matching points are then calculated to obtain a perspective transformation matrix, and the first image is perspective transformed according to the perspective transformation matrix and a preset perspective transformation algorithm.
[0100] Furthermore, if the position type of the first image is an oblique position, the oblique angle of the first image is obtained, and then based on the oblique angle and the target projection plane, the pixel length and width of the orthogonal area of the first image are calculated, and the matching points between the first image and the third image are obtained, so as to calculate the pixel length and width of the orthogonal area and the matching points to obtain a perspective transformation matrix, and then based on the perspective transformation matrix, the first image is perspective transformed.
[0101] Furthermore, if the position type of the first image is a dome position, the rotation angle of the first image is obtained, and then based on the rotation angle, the rotation transformation matrix is calculated, and the plane projection parameters between the first image and the third image are obtained, so as to calculate the rotation transformation matrix and the plane projection parameters to obtain the perspective transformation matrix, and then based on the perspective transformation matrix, the first image is perspective transformed.
[0102] In this embodiment, the first image whose shooting distance meets the preset distance rule is used as the third image, and the plane corresponding to the third image is used as the target projection plane, so as to perform perspective transformation on each of the first images based on the position type and the target projection plane, thereby maintaining the sense of perspective while reducing image distortion, thereby increasing the overall visual unity and improving the quality and accuracy of image stitching.
[0103] In a feasible implementation manner, performing perspective transformation on each of the first images based on the position type and the target projection plane includes:
[0104] Step S41, if the position type of the first image is an oblique position, obtaining the oblique angle of the first image;
[0105] It should be noted that the oblique shooting position refers to the position type where the camera shoots from an oblique angle. In addition, the oblique shooting angle refers to the tilt angle.
[0106] Specifically, if the position type of the first image is an oblique position, the oblique angle of the first image is obtained. For example, when the camera is a camera in a drone, the oblique angle in the vertical direction can be the pitch angle of the drone; and because the drone only provides a heading angle, the oblique angle in the horizontal direction needs to be calculated through the heading angle of the drone. There is no restriction on the acquisition method here, and it can be set according to actual conditions.
[0107] Step S42, calculating the pixel length and width of the normal shooting area of the first image based on the oblique shooting angle and the target projection plane, and obtaining matching points between the first image and the third image;
[0108] It should be noted that the pixel length and width of the orthophoto area refers to the pixel length and width of the orthophoto area of the image that currently needs to be perspective transformed and has the same frame size as the third image, including pixel length and pixel width. In addition, a matching point refers to a corresponding point in two different images, that is, when there is a point a in the photographed object and point a is captured in both images, then point a is a matching point.
[0109] Specifically, based on the oblique shooting angle and the target projection plane, the pixel length and width of the front shooting area of the first image are calculated, and the matching points between the first image and the third image are obtained. For example, the oblique shooting angle x of the camera is obtained, and then the pixel width W and pixel length H of the front shooting area of the first image at the oblique shooting angle x are calculated, so as to obtain the matching points between the first image and the third image through area matching and other methods, wherein the four vertices of the photographed object in the first image can be obtained as matching points, which are not limited here and can be set according to actual conditions.
[0110] Step S43, calculating the length and width of the pixels in the orthographic area and the matching points to obtain a perspective transformation matrix;
[0111] It should be noted that the perspective transformation matrix is used to perform perspective transformation in image processing and computer vision.
[0112] Specifically, the perspective transformation matrix can be obtained by calculating the existing perspective transformation matrix calculation formula, or by inputting the pixel length and width of the orthophoto area and the matching points into a calculation software or system for calculation, without limitation.
[0113] Step S44: performing perspective transformation on the first image based on the perspective transformation matrix.
[0114] Specifically, the perspective transformation matrix may be input into OpenCV to perform perspective transformation on the first image, which is not limited here.
[0115] In this embodiment, if the position type of the first image is an oblique position, the oblique angle of the first image is obtained, and then based on the oblique angle and the target projection plane, the pixel length and width of the normal area of the first image are calculated, and matching points between the first image and the third image are obtained, so as to calculate the pixel length and width of the normal area and the matching points to obtain a perspective transformation matrix, and then based on the perspective transformation matrix, the first image is perspective transformed, thereby solving the problem of how to achieve perspective transformation when there is an oblique angle, and then eliminating perspective distortion, thereby effectively improving image quality and accuracy and reducing cumulative errors.
[0116] In a feasible implementation manner, performing perspective transformation on each of the first images based on the position type and the target projection plane includes:
[0117] Step S51, if the position type of the first image is a dome position, obtaining a rotation angle of the first image;
[0118] It should be noted that the dome position refers to the position of the top cover of the nuclear containment vessel when the first image is taken. In addition, since the drone ensures that the nose is always facing the center of the dome when taking pictures, there is a certain rotation angle between each image and the previous image.
[0119] Specifically, if the position type of the first image is a dome position, the rotation angle of the first image is obtained, wherein the rotation angle can be obtained by the yaw angle of the drone between the two photos.
[0120] Step S52, calculating a rotation transformation matrix based on the rotation angle, and obtaining a plane projection parameter between the first image and the third image;
[0121] It should be noted that the rotation transformation matrix is used to rotate an image around a certain axis by a specified angle. In addition, the plane projection parameters usually involve calculating the relative position and size changes between images, including scaling factors and translation vectors.
[0122] Specifically, the rotation transformation matrix can be calculated according to the rotation angle and the rotation transformation matrix calculation formula, and the plane projection parameters between the first image and the third image can be obtained. The parameters can be obtained by matching feature points and calculating the transformation between feature points, and there is no limitation here.
[0123] Step S53, calculating the rotation transformation matrix and the plane projection parameters to obtain a perspective transformation matrix;
[0124] Specifically, the rotation transformation matrix and the plane projection parameters can be calculated using the existing perspective transformation matrix calculation formula, or the rotation transformation matrix and the plane projection parameters can be input into a calculation software or system for calculation to obtain a perspective transformation matrix, which is not limited here.
[0125] Step S54: performing perspective transformation on the first image based on the perspective transformation matrix.
[0126] Specifically, the perspective transformation matrix may be input into OpenCV to perform perspective transformation on the first image, which is not limited here.
[0127] In this embodiment, if the position type of the first image is a dome position, the rotation angle of the first image is obtained, and then based on the rotation angle, a rotation transformation matrix is calculated, and the plane projection parameters between the first image and the third image are obtained, so as to calculate the rotation transformation matrix and the plane projection parameters to obtain a perspective transformation matrix, and then based on the perspective transformation matrix, the first image is perspectively transformed, thereby solving the problem of how to achieve perspective transformation when there is a dome angle, and then eliminating perspective distortion, thereby effectively improving image quality and accuracy and reducing cumulative errors.
[0128] In a feasible implementation manner, obtaining the second image based on each of the perspective transformed first images and the image stitching sequence includes:
[0129] Step S61, inputting each of the perspective-transformed first images into an offset prediction model to obtain a first pixel offset output by the offset prediction model;
[0130] It should be noted that after all images are projected onto the same plane, there will be a certain image overlap rate between the images. Therefore, in order to reduce the image overlap rate and improve the accuracy and precision of stitching, it is necessary to determine the pixel offset between images. The offset prediction model is used to predict the pixel offset between images, and can be iteratively trained through a large number of image samples and corresponding sample labels. The logical steps of the training algorithm are: taking the feature that the pixel gradient is almost unchanged before and after translation as the entry point, dividing the image samples into a certain number of grids, and using the Sobel operator and convolutional network to extract the maximum pixel gradient feature of each grid, and then superimposing multiple layers of Transformer self-attention and cross-attention, so that the maximum pixel gradient feature has a global view of the two images, thereby using the nearest neighbor method to achieve feature matching, and filtering the matching results through a random sampling consensus algorithm, and finally obtaining an accurate prediction result, which can be referred to. Figure 3 , Figure 3 An example diagram of a brief training process for the offset prediction model provided in this application.
[0131] It should be further explained that the first pixel offset refers to the pixel offset between two spliced images output by the offset prediction model, and represents the amount of error occurring between two adjacent first images.
[0132] Specifically, each of the first images after perspective transformation is input into an offset prediction model to obtain a first pixel offset output by the offset prediction model, wherein the offset prediction model may be a maximum gradient feature model (such as an MGFT model), which is not limited here.
[0133] Step S62: based on the first pixel offset, stitching the perspective-transformed first images according to the image stitching sequence to obtain the second image.
[0134] Specifically, a translation transformation matrix is calculated according to the first pixel offset, and then the second image is obtained by applying the translation transformation matrix to perform translation and image fusion operations on each of the first images, thereby achieving image stitching.
[0135] In this embodiment, the first images after each perspective transformation are input into an offset prediction model to obtain a first pixel offset output by the offset prediction model, and then based on the first pixel offset, the first images after each perspective transformation are spliced according to the image stitching sequence to obtain the second image, thereby improving the consistency and continuity of image stitching, preventing the occurrence of a huge adjacent image search space and a large number of invalid matches, thereby reducing the stitching cumulative error and reducing the image stitching time, thereby improving the efficiency and accuracy of image stitching.
[0136] In a feasible implementation manner, after obtaining the second image based on the perspective transformed first images and the image stitching sequence, the method further includes:
[0137] Step S71, if an image registration failure notification is detected, obtaining fourth image information;
[0138] It should be noted that in order to solve the problem of stitching errors when stitching images of different horizontal lines or adjacent images on the same horizontal line due to lack of overlapping areas resulting in image registration failure, the stitching error can be offset by calculating the second pixel offset, thereby improving the accuracy of image stitching.
[0139] It should be further explained that the image registration failure notification refers to a warning or notification generated when the expected image registration effect fails to meet the predetermined standard or a problem occurs. It can be automatically generated by the algorithm or triggered by a manual monitoring system, and there is no limitation here. The image registration failure notification includes the cause of registration failure (such as the relative position deviation between images exceeds the threshold, etc.), the fourth image information, abnormal data in the registration process, and log records.
[0140] Furthermore, the fourth image information refers to information related to the fourth image, including several fourth images and image numbers corresponding to each of the fourth images, shooting position coordinates, shooting frames, shooting distances and position types, so as to quickly locate the problem, wherein the fourth image refers to an image that has errors due to failure of image registration.
[0141] Specifically, if an image registration failure notification is detected, the fourth image information is obtained, wherein the fourth image information can be obtained by reading the information in the image registration failure notification or by detecting an image abnormality, which is not limited here.
[0142] Step S72, calculating a second pixel offset based on the fourth image information;
[0143] It should be noted that the second pixel offset refers to the pixel offset between the two stitched images where image registration fails, and represents the error amount between the two fourth images.
[0144] Specifically, if the position type of the fourth image is the barrel position, the second pixel offset is calculated based on the shooting position coordinates, shooting frame and shooting distance of the fourth image. Additionally, if the position type of the fourth image is the dome position, the rotation angle and center point distance of the fourth image are obtained, and then the second pixel offset is calculated based on the shooting position coordinates, rotation angle and center distance of the fourth image.
[0145] Step S73: adjusting the second image based on the second pixel offset and the fourth image information.
[0146] Specifically, according to the image number of the fourth image in the fourth image information and the second pixel offset between the two fourth images, the second image can be adjusted through an image adjustment model or an interpolation algorithm, wherein the adjustment method includes translation, filling, etc., so as to reduce the image registration error and improve the accuracy of image stitching. There is no limitation here and it can be set according to actual conditions.
[0147] In this embodiment, if an image registration failure notification is detected, the fourth image information is obtained, and then based on the fourth image information, the second pixel offset is calculated, and then based on the second pixel offset and the fourth image information, the second image is adjusted, and the problem of image stitching errors is discovered and processed in time, thereby reducing image stitching errors and effectively improving the overall work efficiency and image stitching accuracy.
[0148] In a feasible implementation manner, the fourth image information includes a plurality of fourth images and shooting position coordinates, shooting frames, shooting distances, and position types corresponding to each of the fourth images; and calculating the second pixel offset based on the fourth image information includes:
[0149] Step S81, if the position type of the fourth image is the barrel position, calculating the second pixel offset based on the shooting position coordinates, shooting frame and shooting distance of the fourth image;
[0150] It should be noted that the shooting frame refers to the physical size of the photosensitive element (sensor) in the camera, and the frame size directly affects the field of view, resolution and imaging quality of the image.
[0151] It should be further explained that the barrel position refers to the position type when the shooting content in the fourth image is the barrel position of the nuclear containment vessel.
[0152] Specifically, if the position type of the fourth image is the barrel body position, the second pixel offset is calculated according to the shooting position coordinates, shooting frame and shooting distance of the fourth image, wherein the calculation can be performed by the pixel offset calculation formula corresponding to the barrel body position, wherein the pixel offset calculation formula corresponding to the barrel body position is specifically as follows:
[0153] w p1 =(A1-A2) / 400×2πR×w s / (w c / 3×d m )
[0154] h p1 =(A1-A2) / 400×2πR×h s / (h c / 3×d m )
[0155] Among them, w p1 and h p1 is the second pixel offset corresponding to the two fourth images, A1 and A2 are the first coordinate values in the shooting position coordinates, R is the barrel radius of the nuclear containment shell, d m is the shooting distance, w c and h c is the shooting frame corresponding to the fourth image at the shooting distance (the two may be inconsistent), w s and h s is the preset image pixel size.
[0156] Step S82, if the position type of the fourth image is a dome position, obtaining a rotation angle and a center point distance of the fourth image;
[0157] It should be noted that the dome position refers to the position type when the shooting content in the fourth image is the dome position of the nuclear containment. In addition, the center point spacing refers to the distance relative to the center point.
[0158] Specifically, if the position type of the fourth image is a dome position, the rotation angle and center point distance of the fourth image are obtained, which can be achieved by image measurement and other methods, and is not limited here.
[0159] Step S83: Calculate the second pixel offset based on the shooting position coordinates, rotation angle and center distance of the fourth image.
[0160] Specifically, the second pixel offset is calculated according to the shooting position coordinates, the rotation angle, and the center distance of the fourth image, wherein the second pixel offset can be calculated by a pixel offset calculation formula corresponding to the dome position, wherein the pixel offset calculation formula corresponding to the dome position is specifically as follows:
[0161]
[0162] Among them, w p2 and h p2 is the second pixel offset corresponding to the two fourth images, A1 and A2 are the first coordinate values in the shooting position coordinates, A f It is the first coordinate value in the shooting position coordinates of the first image in the image stitching sequence where the current image is located. Mind (modality-independent neighborhood descriptor, which aims to extract the structural information of the local area around each pixel / voxel) refers to an image registration algorithm. The values required in the algorithm can be obtained according to actual conditions and are not limited here.
[0163] In this embodiment, if the position type of the fourth image is the barrel position, the second pixel offset is calculated based on the shooting position coordinates, the shooting frame and the shooting distance of the fourth image, and if the position type of the fourth image is the dome position, the rotation angle and the center point distance of the fourth image are obtained, and the second pixel offset is calculated based on the shooting position coordinates, the rotation angle and the center distance of the fourth image, thereby improving the adaptability and robustness of the system to different stitching scenes, reducing stitching errors, thereby achieving high-precision image stitching, and improving the accuracy of image processing.
[0164] For example, to help understand the implementation process of the image stitching method, please refer to Figure 4 , Figure 4A brief flow chart of the image stitching method provided in the present application is an example of a large image of a nuclear containment vessel obtained by a drone. Specifically, taking the acquisition of a large image of a nuclear containment vessel by a drone as an example, firstly, constraints are imposed on the position of the drone, that is, a drone is set at a certain distance to collect images, and then the image information of the nuclear containment vessel collected by the drone is obtained. Then, the ARH coordinates of all images are determined by the drone position information, and the image stitching sequence is determined according to the ARH coordinates; then, how to implement the perspective transformation is determined by the image position type. For example, when the position type is a barrel body orthophoto, the orthophoto area in the image and the required projection plane are determined, and then the perspective transformation matrix (i.e., parameter estimation) is calculated to unify the integrity of the image; then, in order to reduce the overlap rate of image stitching, the pixel offset (e.g., translation matrix) is determined by feature matching (e.g., image registration) or based on the drone position information (e.g., through a large model), so that image stitching is implemented according to the pixel offset and the image stitching sequence, and the stitching result (i.e., the second image) is output.
[0165] It should be noted that the examples in the figure are only used to understand the present application and do not constitute a limitation on the image stitching method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0166] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0167] This application also provides an image stitching device, please refer to Figure 5 , the image stitching device comprises:
[0168] An acquisition module 51 is used to acquire first image information collected by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images;
[0169] A determination module 52, configured to determine an image stitching sequence based on the shooting position coordinates;
[0170] A transformation module 53, configured to perform perspective transformation on each of the first images based on the shooting distance and the position type;
[0171] The stitching module 54 is used to obtain a second image based on the first images after the perspective transformation and the image stitching sequence.
[0172] The image stitching device is also used for:
[0173] Matching the shooting position coordinates with a preset stitching rule to obtain a sequence row number of each of the first images;
[0174] Based on the first coordinate value and the sequence line number, storing each of the first images into a two-dimensional list;
[0175] The two-dimensional list is used as the image stitching sequence.
[0176] The image stitching device is also used for:
[0177] The first image whose shooting distance meets the preset distance rule is used as the third image;
[0178] Taking the plane corresponding to the third image as the target projection plane;
[0179] Based on the position type and the target projection plane, perspective transformation is performed on each of the first images.
[0180] The image stitching device is also used for:
[0181] If the position type of the first image is an oblique position, obtaining an oblique angle of the first image;
[0182] Based on the oblique shooting angle and the target projection plane, calculate the pixel length and width of the normal shooting area of the first image, and obtain matching points between the first image and the third image;
[0183] Calculating the length and width of pixels in the orthographic area and the matching points to obtain a perspective transformation matrix;
[0184] Based on the perspective transformation matrix, perspective transformation is performed on the first image.
[0185] The image stitching device is also used for:
[0186] If the position type of the first image is a dome position, obtaining a rotation angle of the first image;
[0187] Based on the rotation angle, a rotation transformation matrix is calculated, and a plane projection parameter between the first image and the third image is obtained;
[0188] Calculating the rotation transformation matrix and the plane projection parameters to obtain a perspective transformation matrix;
[0189] Based on the perspective transformation matrix, perspective transformation is performed on the first image.
[0190] The image stitching device is also used for:
[0191] Inputting each of the perspective-transformed first images into an offset prediction model to obtain a first pixel offset output by the offset prediction model;
[0192] Based on the first pixel offset, each of the perspective-transformed first images is spliced according to the image splicing sequence to obtain the second image.
[0193] The image stitching device is also used for:
[0194] If an image registration failure notification is detected, obtaining fourth image information;
[0195] Calculating a second pixel offset based on the fourth image information;
[0196] The second image is adjusted based on the second pixel offset and the fourth image information.
[0197] The image stitching device is also used for:
[0198] If the position type of the fourth image is the barrel body position, calculating the second pixel offset based on the shooting position coordinates, shooting frame and shooting distance of the fourth image;
[0199] If the position type of the fourth image is a dome position, obtaining a rotation angle and a center point distance of the fourth image;
[0200] A second pixel offset is calculated based on the shooting position coordinates, the rotation angle, and the center distance of the fourth image.
[0201] The image stitching device provided by the present application adopts the image stitching method in the above embodiment, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the image stitching device provided by the present application are the same as the beneficial effects of the image stitching method provided by the above embodiment, and other technical features in the image stitching device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0202] The present application provides an image stitching device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image stitching method in the above-mentioned embodiment 1.
[0203] Reference below Figure 6, which shows a schematic diagram of the structure of an image stitching device suitable for implementing the embodiment of the present application. The image stitching device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The image stitching device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0204] like Figure 6 As shown, the image stitching device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the image stitching device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the image stitching device to communicate with other devices wirelessly or by wire to exchange data. Although the image stitching device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0205] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0206] The image stitching device provided by the present application adopts the image stitching method in the above embodiment, which can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the image stitching device provided by the present application are the same as the beneficial effects of the image stitching method provided by the above embodiment, and other technical features in the image stitching device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0207] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0208] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0209] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the image stitching method in the above-mentioned embodiment.
[0210] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0211] The computer-readable storage medium may be included in the image stitching device; or may exist independently without being assembled into the image stitching device.
[0212] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the image stitching device, the image stitching device:
[0213] Acquire first image information captured by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images;
[0214] Based on the shooting position coordinates, determining an image stitching sequence;
[0215] Based on the shooting distance and the position type, performing perspective transformation on each of the first images;
[0216] A second image is obtained based on the perspective-transformed first images and the image stitching sequence.
[0217] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0218] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0219] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0220] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned image stitching method, and can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the image stitching method provided in the above-mentioned embodiment, and will not be repeated here.
[0221] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned image stitching method when executed by a processor.
[0222] The computer program product provided in this application can solve the technical problems in the background technology. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the image stitching method provided in the above embodiment, which will not be repeated here.
[0223] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An image stitching method, characterized in that: include: Acquire first image information captured by a camera, wherein the first image information includes a plurality of first images and shooting position coordinates, shooting distance, and position type corresponding to each of the first images; Based on the shooting position coordinates, determining an image stitching sequence; Based on the shooting distance and the position type, performing perspective transformation on each of the first images; A second image is obtained based on the perspective-transformed first images and the image stitching sequence.
2. The image stitching method according to claim 1, characterized in that: The shooting position coordinates include a first coordinate value; The step of determining the image stitching sequence based on the shooting position coordinates includes: Matching the shooting position coordinates with a preset stitching rule to obtain a sequence row number of each of the first images; Based on the first coordinate value and the sequence line number, storing each of the first images into a two-dimensional list; The two-dimensional list is used as the image stitching sequence.
3. The image stitching method according to claim 1, characterized in that: The performing perspective transformation on each of the first images based on the shooting distance and the position type includes: The first image whose shooting distance meets the preset distance rule is used as the third image; Taking the plane corresponding to the third image as the target projection plane; Based on the position type and the target projection plane, perspective transformation is performed on each of the first images.
4. The image stitching method according to claim 3, characterized in that: The performing perspective transformation on each of the first images based on the position type and the target projection plane includes: If the position type of the first image is an oblique position, obtaining an oblique angle of the first image; Based on the oblique shooting angle and the target projection plane, calculate the pixel length and width of the normal shooting area of the first image, and obtain matching points between the first image and the third image; Calculating the length and width of pixels in the orthographic area and the matching points to obtain a perspective transformation matrix; Based on the perspective transformation matrix, perspective transformation is performed on the first image.
5. The image stitching method according to claim 3, characterized in that: The performing perspective transformation on each of the first images based on the position type and the target projection plane includes: If the position type of the first image is a dome position, obtaining a rotation angle of the first image; Based on the rotation angle, a rotation transformation matrix is calculated, and a plane projection parameter between the first image and the third image is obtained; Calculating the rotation transformation matrix and the plane projection parameters to obtain a perspective transformation matrix; Based on the perspective transformation matrix, perspective transformation is performed on the first image.
6. The image stitching method according to claim 1, characterized in that: The step of obtaining a second image based on the perspective transformed first images and the image stitching sequence comprises: Inputting each of the perspective-transformed first images into an offset prediction model to obtain a first pixel offset output by the offset prediction model; Based on the first pixel offset, each of the perspective-transformed first images is spliced according to the image splicing sequence to obtain the second image.
7. The image stitching method according to claim 1, characterized in that: After obtaining the second image based on the perspective transformed first images and the image stitching sequence, the method further includes: If an image registration failure notification is detected, obtaining fourth image information; Calculating a second pixel offset based on the fourth image information; The second image is adjusted based on the second pixel offset and the fourth image information.
8. The image stitching method according to claim 7, characterized in that: The fourth image information includes a plurality of fourth images and shooting position coordinates, shooting frames, shooting distances and position types corresponding to each of the fourth images; The calculating the second pixel offset based on the fourth image information includes: If the position type of the fourth image is the barrel body position, calculating the second pixel offset based on the shooting position coordinates, shooting frame and shooting distance of the fourth image; If the position type of the fourth image is a dome position, obtaining a rotation angle and a center point distance of the fourth image; A second pixel offset is calculated based on the shooting position coordinates, the rotation angle, and the center distance of the fourth image.
9. An image stitching device, characterized in that: The image stitching device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image stitching method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image stitching method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Image splicing method and device, electronic equipment and computer readable storage medium
CN111784585A