Panoramic image stitching method, device, equipment and storage medium

By detecting angle parameters and feature point distribution in panoramic image stitching, the stitching parameters are generated, which solves the problem of low panoramic image stitching quality in long and narrow corridors and other scenes, and achieves high-quality panoramic image stitching.

CN111833250BActive Publication Date: 2024-09-03BEIJING AIBI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010668390.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-13
Publication Date
2024-09-03
Estimated Expiration
2040-07-13

AI Technical Summary

Technical Problem

When shooting scenes such as long and narrow corridors and white walls, panoramic image stitching is prone to large-area seams and distortions, resulting in reduced stitching quality and even the inability to stitch a panoramic image.

Method used

By obtaining multiple pictures of the target shooting point, perform feature detection on angle parameters and feature point distribution, determine whether the pictures meet the preset splicing conditions, generate target splicing parameters, and splice the pictures based on these parameters to avoid distortion at the splicing point. and patchwork.

Benefits of technology

It effectively improves the splicing quality of panoramic images, avoids large-area seams and distortions at splicing points, and ensures that the spliced ​​panoramic images are of high quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111833250B
    Figure CN111833250B
Patent Text Reader

Abstract

The embodiment of the present application discloses a panoramic image stitching method, device, equipment and storage medium, wherein the method comprises: obtaining multiple pictures taken at a target shooting point; performing feature detection on the multiple pictures according to the angle parameters corresponding to each of the multiple pictures and the distribution of feature points in each picture combination composed of the multiple pictures; each of the picture combinations includes two pictures with adjacent stitching positions; judging whether the multiple pictures meet the preset stitching conditions according to the feature detection results, and if so, generating target stitching parameters according to the pictures included in each of the picture combinations; stitching the multiple pictures according to the target stitching parameters to obtain a target panoramic image. The method can effectively improve the stitching quality of panoramic images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a panoramic image stitching method, device, equipment and storage medium. Background Art

[0002] Panoramic images are usually obtained by stitching together multiple pictures (such as fisheye pictures) taken at a fixed position by a SLR camera or other equipment. In practical applications, photographers can select a panoramic point in a specific area (such as a shopping mall, parking lot, office building, etc.) and take multiple pictures from different angles at the panoramic point. The pictures taken at adjacent times are then stitched together in sequence to obtain a panoramic image at the panoramic point.

[0003] However, in many shooting areas there are some special scenes, such as very long and relatively narrow corridors and white walls. There are few textures in the pictures taken in these scenes. The panoramic images obtained by stitching such pictures together are prone to large-area seams. Distortion and chaos may occur at the stitching points of the panoramic images. In severe cases, the panoramic image cannot even be stitched together.

[0004] In summary, how to improve the stitching quality of panoramic images and avoid large-area stitching seams and distortion and confusion at the stitching points in the stitched panoramic images has become a problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a panoramic image stitching method, apparatus, device and storage medium, which can effectively improve the stitching quality of panoramic images and avoid the presence of large-area seams and distortion and confusion at the stitching points in the stitched panoramic images.

[0006] In view of this, the first aspect of the present application provides a panoramic image stitching method, the method comprising:

[0007] Get multiple pictures taken at the target shooting point;

[0008] Performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions;

[0009] Determining whether the plurality of images meet a preset stitching condition according to the feature detection result, and if so, generating target stitching parameters according to the images included in each of the image combinations;

[0010] The multiple pictures are stitched together according to the target stitching parameters to obtain a target panoramic image.

[0011] Optionally, performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and based on the distribution of feature points in each image combination composed of the multiple images includes:

[0012] Performing angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images;

[0013] According to the distribution of feature points in each picture combination, adjacent feature detection is performed on the multiple pictures;

[0014] When it is determined that the multiple images pass the angle feature detection and the adjacent feature detection, a feature detection result is generated for indicating that the multiple images meet the preset stitching condition.

[0015] Optionally, performing angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images includes:

[0016] Rotating a reference picture among the multiple pictures so that the pitch angle, yaw angle and roll angle corresponding to the reference picture reach a reference pitch angle, a reference yaw angle and a reference roll angle respectively; the reference picture is the picture with the earliest shooting time among the multiple pictures;

[0017] For each picture among the multiple pictures except the reference picture, rotating the picture according to the relative position relationship between the picture and the reference picture, and determining the pitch angle, yaw angle and roll angle corresponding to the rotated picture;

[0018] For each picture among the multiple pictures except the benchmark picture, determine the reference yaw angle corresponding to the picture according to the relative position relationship between the picture and the benchmark picture; judge whether the error between the pitch angle corresponding to the picture and the benchmark pitch angle is within the pitch angle error range, and judge whether the error between the yaw angle corresponding to the picture and the reference yaw angle corresponding to the picture is within the yaw angle error range, and judge whether the error between the roll angle corresponding to the picture and the benchmark roll angle is within the roll angle error range. If all of them are yes, it is determined that the picture passes the angle feature detection.

[0019] Optionally, performing adjacent feature detection on the multiple images according to the distribution of feature points in each image combination includes:

[0020] For each of the picture combinations, determine whether two pictures included in the picture have the same control point, and if so, determine that the picture combination passes the adjacent feature detection;

[0021] In the case that each of the picture combinations passes the adjacent feature detection, it is determined that the multiple pictures pass the adjacent feature detection.

[0022] Optionally, generating target splicing parameters according to the pictures included in each of the picture combinations includes:

[0023] For each of the picture combinations, feature extraction is performed on the same control points in the two pictures included in the picture combination to generate the target splicing parameters.

[0024] Optionally, after generating target stitching parameters according to the pictures included in each of the picture combinations, the method further includes:

[0025] Setting the target splicing parameters as legal splicing parameters, and saving the legal splicing parameters;

[0026] If the multiple pictures taken at other shooting points within the target scene range do not meet the preset stitching conditions, the legal stitching parameters are retrieved, and the multiple pictures taken at the shooting point are stitched according to the legal stitching parameters to obtain a panoramic image corresponding to the shooting point; the target scene range includes the target shooting point.

[0027] A second aspect of the present application provides a panoramic image stitching device, the device comprising:

[0028] An acquisition module is used to acquire multiple pictures taken at a target shooting point;

[0029] A feature detection module, used for performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions;

[0030] A splicing parameter generating module, used for judging whether the plurality of pictures meet the preset splicing condition according to the feature detection result, and if so, generating target splicing parameters according to the pictures included in each picture combination;

[0031] The stitching module is used to stitch the multiple pictures according to the target stitching parameters to obtain a target panoramic image.

[0032] Optionally, the feature detection module includes:

[0033] An angle feature detection unit, used to perform angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images;

[0034] An adjacent feature detection unit, configured to perform adjacent feature detection on the plurality of images according to the distribution of feature points in each image combination;

[0035] The detection result generating unit is used to generate a feature detection result for indicating that the multiple images meet the preset splicing condition when it is determined that the multiple images pass the angle feature detection and the adjacent feature detection.

[0036] A third aspect of the present application provides a device, the device comprising: a processor and a memory;

[0037] The memory is used to store computer programs;

[0038] The processor is used to call the computer program to execute the panoramic image stitching method described in the first aspect.

[0039] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the panoramic image stitching method described in the first aspect.

[0040] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0041] In the panoramic image stitching method provided in the embodiment of the present application, a plurality of pictures shot at a target shooting point are first obtained; then, feature detection is performed on the plurality of pictures according to the angle parameters corresponding to each of the plurality of pictures and the distribution of feature points in each picture combination composed of the plurality of pictures, wherein each picture combination includes two pictures adjacent to each other in the stitching position; then, it is determined whether the plurality of pictures meet the preset stitching conditions according to the feature detection results, and if so, target stitching parameters are generated according to the pictures included in each picture combination; finally, the plurality of pictures are stitched accordingly according to the target stitching parameters to obtain a target panoramic image. Before stitching together a plurality of pictures taken at a target shooting point into a panoramic image, the above method first performs feature detection on the plurality of pictures based on the angle parameters of the plurality of pictures and the distribution of feature points in each picture combination, so as to measure whether large-area seams and distortion and disorder at the splicing points will appear when the plurality of pictures are stitched together. After determining that the plurality of pictures meet the preset stitching conditions according to the feature detection results, that is, after determining that the panoramic image obtained by stitching the plurality of pictures will not have large-area seams and distortion and disorder at the splicing points, the plurality of pictures are stitched together, thereby effectively ensuring that the stitched panoramic image has a high quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of a flow chart of a panoramic image stitching method provided in an embodiment of the present application;

[0043] Figure 2A schematic diagram of a process flow of a panoramic image stitching device provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0048] For some special shooting scenes, such as very long and relatively narrow corridors and white walls, the pictures taken in such shooting scenes usually have less texture. The panoramic images obtained by stitching such pictures together are prone to large-area seams. Distortion and confusion may occur at the stitching points of the panoramic images. In severe cases, the panoramic image cannot even be stitched together.

[0049] In response to the above technical problems, an embodiment of the present application provides a panoramic image stitching method, which can avoid large-area seams and distortion and confusion at the stitching points in the stitched panoramic image, and effectively ensure the quality of the stitched panoramic image.

[0050] Specifically, in the panoramic image stitching method provided in the embodiment of the present application, a plurality of pictures taken at the target shooting point are first obtained; then, according to the angle parameters corresponding to each of the plurality of pictures and the distribution of feature points in each picture combination composed of the plurality of pictures, feature detection is performed on the plurality of pictures, wherein each picture combination includes two pictures adjacent to each other in the stitching position; then, according to the feature detection result, it is determined whether the plurality of pictures meet the preset stitching conditions, and if so, the target stitching parameters are generated according to the pictures included in each picture combination; finally, the plurality of pictures are stitched accordingly according to the target stitching parameters to obtain the target panoramic image.

[0051] The panoramic image stitching method provided in the embodiment of the present application performs feature detection on the multiple pictures taken at the target shooting point and the distribution of feature points in each picture combination before stitching the multiple pictures into a panoramic image, so as to measure whether large-area seams and distortion and chaos at the stitching will occur when the multiple pictures are stitched together. After determining that the multiple pictures meet the preset stitching conditions according to the feature detection results, that is, after determining that the panoramic image obtained by stitching the multiple pictures will not have large-area seams and distortion and chaos at the stitching, the multiple pictures are stitched together, thereby effectively ensuring that the panoramic image obtained by stitching has high quality.

[0052] It should be noted that the panoramic image stitching method provided in the embodiment of the present application can be applied to various devices with image processing capabilities, such as terminal devices and servers. Among them, the terminal devices may include smart phones, computers, tablet computers, etc. The server may be an application server or a web server. When specifically deployed, the server may be an independent server or a cluster server.

[0053] The panoramic image stitching method provided by the present application is described in detail below through embodiments.

[0054] See also Figure 1 , Figure 1 The following is a flow chart of a panoramic image stitching method provided in an embodiment of the present application. For ease of description, the following embodiment is introduced by taking a server as an execution subject. Figure 1 As shown, the panoramic image stitching method includes the following steps:

[0055] Step 101: Acquire multiple pictures taken at target shooting points.

[0056] In actual applications, when a photographer takes pictures for stitching panoramic images within a target panoramic range, he needs to first select a target shooting point within the target panoramic range, and then continuously change the shooting angle at the target shooting point to take multiple pictures, and upload these multiple pictures to a server.

[0057] For example, the photographer can determine the initial shooting angle at the target shooting point, shoot a picture based on the initial shooting angle, rotate the shooting angle 60° counterclockwise after completing the shooting of the picture based on the initial shooting angle, and then shoot the next picture based on the rotated shooting angle, and repeat this process until six pictures with different shooting angles are taken at the target shooting point. After the shooting of the six pictures is completed, the six pictures can be stored with the shooting time as the directory name, and the six pictures can be uploaded to the server so that the server can subsequently stitch the six pictures together in the order of the directory name.

[0058] Of course, in actual application, the photographer can also choose to change the shooting angle by rotating 60° clockwise, or the photographer can also choose a specific rotation angle according to his own needs. This application does not impose any limitation on the rotation angle when taking multiple pictures at the target shooting point.

[0059] Considering that in some special shooting scenes (such as very long and relatively narrow corridors and white walls, etc.), the texture of the pictures taken is relatively small and it is difficult to stitch a panoramic image well. Therefore, when the photographer selects the initial shooting point, he can choose a shooting point with rich objects and textures as the initial shooting point to ensure that the pictures taken at the initial shooting point can be stitched into a panoramic image with good quality. In this way, the photographer no longer needs to make special requirements for other shooting points within the target scene range. Even if a good quality panoramic image cannot be stitched directly based on multiple pictures taken at other shooting points, the server can also stitch the multiple pictures taken at other shooting points with the stitching parameters determined based on the pictures taken at the initial shooting point.

[0060] It should be noted that, in actual applications, the multiple pictures taken at the target point are usually fisheye pictures. Of course, they can also be pictures of other forms. This application does not impose any limitation on the form of pictures used when stitching panoramic images.

[0061] Step 102: performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions.

[0062] After the server receives multiple pictures taken at the target shooting point, it can perform feature detection on the multiple pictures according to the angle parameters corresponding to each of the multiple pictures and the distribution of feature points in each picture combination composed of the multiple pictures. If the feature detection result indicates that the multiple pictures have passed the feature detection, the stitching parameters required for stitching the panoramic image can be further generated.

[0063] It should be noted that the above picture combination includes two pictures with adjacent stitching positions. Exemplarily, assuming that six pictures are taken in succession at the target shooting point in a 60° counterclockwise rotation, the two pictures with adjacent shooting times are the two pictures with adjacent stitching positions; assuming that the six pictures taken at the target shooting point include picture a, picture b, picture c, picture d, picture e and picture f, then six picture combinations can be formed accordingly based on these six pictures, including a picture combination consisting of picture a and picture b, a picture combination consisting of picture b and picture c, a picture combination consisting of picture c and picture d, a picture combination consisting of picture d and picture e, a picture combination consisting of picture e and picture f, and a picture combination consisting of picture f and picture a.

[0064] In some embodiments, the server may perform angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images, and perform adjacent feature detection on the multiple images according to the distribution of feature points in each image combination; when it is determined that the multiple images pass the angle feature detection and the adjacent feature detection, the server may determine that the multiple images pass the feature detection and generate a feature detection result for characterizing that the multiple images meet the preset stitching conditions.

[0065] The following introduces the implementation methods of angle feature detection and adjacent feature detection respectively:

[0066] When performing angle feature detection on multiple images, the server can rotate the reference image among the multiple images so that the pitch angle, yaw angle and roll angle corresponding to the reference image reach the reference pitch angle, reference yaw angle and reference roll angle respectively. The reference image here is the image with the earliest shooting time among the multiple images. Then, for each image except the reference image among the multiple images, according to the relative position relationship between the image and the reference image, the image is rotated to determine the pitch angle, yaw angle and roll angle corresponding to the image after the rotation processing; according to the relative position relationship between the image and the reference image, the reference yaw angle corresponding to the image is determined; it is determined whether the error between the pitch angle corresponding to the image and the reference pitch angle is within the pitch angle error range, and whether the error between the yaw angle corresponding to the image and the reference yaw angle is within the yaw angle error range, and whether the error between the roll angle corresponding to the image and the reference roll angle is within the roll angle error range. If all are true, it is determined that the image passes the angle feature detection.

[0067] Taking six pictures taken at the target shooting point in a 60° counterclockwise rotation as an example, the server can perform center rotation processing on the picture with the earliest shooting time (i.e., the reference picture), so that the pitch angle pitch corresponding to the reference picture is rotated to 0° along the x-axis, the yaw angle yaw corresponding to the reference picture is rotated to 0° along the y-axis, and the roll angle roll corresponding to the reference picture is rotated to 0° along the z-axis, so that the reference picture is located at the center. Following the center rotation processing of the reference picture, the server also performs center rotation processing on the other five pictures based on the relative position relationship between the other pictures and the reference picture, and determines the pitch angle pitch, yaw angle yaw and roll angle roll corresponding to each of the other five pictures after the center rotation processing.

[0068] Since the camera rotates counterclockwise when taking pictures, taking one picture every 60°, and taking six pictures after one rotation, the theoretical values ​​of the yaw angles yaw corresponding to the six pictures (i.e., the reference yaw angles) should be 0, -60°, -120°, -180°, 120°, and 60°, respectively, and the theoretical values ​​of the pitch angles pitch and roll angles roll corresponding to the six pictures (i.e., the reference pitch angle and the reference roll angle) should all be 0. The server can detect the pitch angles pitch, yaw angles yaw, and roll angles roll corresponding to the six pictures according to the above theoretical values. If the errors between the pitch angles pitch, yaw angles yaw, and roll angles roll corresponding to the six pictures and the corresponding theoretical values ​​are within the error range, it is determined that the six pictures pass the angle detection, otherwise, it is determined that the six pictures fail the angle detection.

[0069] It should be understood that the above error ranges (including the pitch angle error range, the yaw angle error range and the roll angle error range) can be set according to actual needs, and this application does not specifically limit each error range. In addition, if the shooting device is based on multiple pictures taken at other shooting angles, the server can also change the angle value of each reference yaw angle accordingly.

[0070] When performing adjacent feature detection on multiple images, the server can determine, for each image combination, whether two images included in the image have the same control points. If so, it is determined that the image combination passes the adjacent feature detection; when each image combination passes the adjacent feature detection, it is determined that multiple images taken at the target shooting point pass the adjacent feature detection.

[0071] Still taking the example of taking six pictures at the target shooting point in a 60° counterclockwise rotation, the server combines two pictures in each group of six pictures with adjacent shooting times to obtain six picture combinations; for each picture combination, the server detects whether the two pictures in the picture combination have the same control point, that is, detects whether there are points in the two pictures with an image feature matching degree higher than a preset matching degree threshold, and if so, determines that the picture combination passes the adjacent feature detection. If the same control point exists in all six picture combinations, that is, it is determined that all six picture combinations pass the adjacent feature detection, then it can be determined that the six pictures taken at the target shooting point pass the adjacent feature detection.

[0072] It should be understood that in actual applications, the server may perform angle feature detection first and then adjacent feature detection, or may perform adjacent feature detection first and then angle feature detection, or may perform angle feature detection and adjacent feature detection at the same time. This application does not impose any limitation on the execution order of angle feature detection and adjacent feature detection.

[0073] Step 103: judging whether the plurality of images meet preset stitching conditions according to the feature detection result, and if so, generating target stitching parameters according to the images included in each of the image combinations.

[0074] After the server determines that multiple pictures taken at the target shooting point have passed angle feature detection and adjacent feature detection, it can generate a feature detection result for characterizing that the multiple pictures meet the preset stitching conditions; the server determines that the multiple pictures meet the preset stitching conditions based on the feature detection result, which means that the panoramic image obtained by stitching the multiple pictures will not have large-area seams and distortion and confusion at the stitching, so the target stitching parameters can be further generated according to the pictures included in each picture combination.

[0075] When specifically generating the target stitching parameters, the server may, for each picture combination, perform feature extraction on the same control points in the two pictures included in the picture combination, thereby generating the target stitching parameters corresponding to the picture combination; when stitching a panoramic image, the server may perform stitching processing on the two pictures in the picture combination accordingly based on the target stitching parameters.

[0076] The server determines that the multiple images meet the preset stitching conditions according to the feature detection results, and after generating the target stitching parameters according to each image combination, the generated target stitching parameters can be set as legal stitching parameters and the legal stitching parameters can be maintained. When the multiple images taken at other shooting points within the target scene range do not meet the above preset stitching conditions, the server can retrieve the saved legal stitching parameters and stitch the multiple images taken at the shooting point according to the legal stitching parameters to obtain a panoramic image corresponding to the shooting point.

[0077] As introduced above, the photographer can select a shooting point with richer objects and textures as the initial shooting point to ensure that the pictures taken at the initial shooting point can be stitched into a panoramic image with good quality. The selection of the initial shooting point can ensure that the stitching parameters of at least one shooting point within the target scene range are legal, and the subsequent shooting points can stitch the pictures taken based on the stitching parameters of the initial shooting point.

[0078] Step 104: stitching the multiple pictures according to the target stitching parameters to obtain a target panoramic image.

[0079] After the server generates the target stitching parameters according to the two pictures in each picture combination, the two pictures in a picture combination can be stitched together based on the target stitching parameters corresponding to the picture combination. In this way, based on the target stitching parameters corresponding to each picture combination, multiple pictures taken at the target shooting point are stitched together to obtain a target panoramic image.

[0080] In the above-mentioned panoramic image stitching method, a plurality of pictures shot at a target shooting point are first obtained; then, according to the angle parameters corresponding to each of the plurality of pictures and the distribution of feature points in each picture combination composed of the plurality of pictures, feature detection is performed on the plurality of pictures, wherein each picture combination includes two pictures adjacent to each other in the stitching position; then, according to the feature detection result, it is determined whether the plurality of pictures meet the preset stitching conditions, and if so, target stitching parameters are generated according to the pictures included in each picture combination; finally, the plurality of pictures are stitched accordingly according to the target stitching parameters to obtain a target panoramic image. Before stitching together a plurality of pictures taken at a target shooting point into a panoramic image, the above method first performs feature detection on the plurality of pictures based on the angle parameters of the plurality of pictures and the distribution of feature points in each picture combination, so as to measure whether large-area seams and distortion and disorder at the splicing points will appear when the plurality of pictures are stitched together. After determining that the plurality of pictures meet the preset stitching conditions according to the feature detection results, that is, after determining that the panoramic image obtained by stitching the plurality of pictures will not have large-area seams and distortion and disorder at the splicing points, the plurality of pictures are stitched together, thereby effectively ensuring that the stitched panoramic image has a high quality.

[0081] The present application also provides a panoramic image stitching device. Figure 2 , Figure 2 A schematic diagram of the structure of a panoramic image stitching device provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device comprises:

[0082] An acquisition module 201 is used to acquire multiple pictures taken at a target shooting point;

[0083] A feature detection module 202 is used to perform feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions;

[0084] A stitching parameter generating module 203 is used to determine whether the plurality of images meet a preset stitching condition according to the feature detection result, and if so, to generate target stitching parameters according to the images included in each of the image combinations;

[0085] The stitching module 204 is configured to stitch the multiple pictures together according to the target stitching parameters to obtain a target panoramic image.

[0086] Optionally, the feature detection module includes:

[0087] An angle feature detection unit, used to perform angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images;

[0088] An adjacent feature detection unit, configured to perform adjacent feature detection on the plurality of images according to the distribution of feature points in each image combination;

[0089] The detection result generating unit is used to generate a feature detection result for indicating that the multiple images meet the preset splicing condition when it is determined that the multiple images pass the angle feature detection and the adjacent feature detection.

[0090] Optionally, the angle feature detection unit is specifically used for:

[0091] Rotating a reference picture among the multiple pictures so that the pitch angle, yaw angle and roll angle corresponding to the reference picture reach a reference pitch angle, a reference yaw angle and a reference roll angle respectively; the reference picture is the picture with the earliest shooting time among the multiple pictures;

[0092] For each picture among the multiple pictures except the reference picture, rotating the picture according to the relative position relationship between the picture and the reference picture, and determining the pitch angle, yaw angle and roll angle corresponding to the rotated picture;

[0093] For each picture among the multiple pictures except the benchmark picture, determine the reference yaw angle corresponding to the picture according to the relative position relationship between the picture and the benchmark picture; judge whether the error between the pitch angle corresponding to the picture and the benchmark pitch angle is within the pitch angle error range, and judge whether the error between the yaw angle corresponding to the picture and the reference yaw angle corresponding to the picture is within the yaw angle error range, and judge whether the error between the roll angle corresponding to the picture and the benchmark roll angle is within the roll angle error range. If all of them are yes, it is determined that the picture passes the angle feature detection.

[0094] Optionally, the adjacent feature detection unit is specifically used to:

[0095] For each of the picture combinations, determine whether two pictures included in the picture have the same control point, and if so, determine that the picture combination passes the adjacent feature detection;

[0096] In the case that each of the picture combinations passes the adjacent feature detection, it is determined that the multiple pictures pass the adjacent feature detection.

[0097] Optionally, the splicing parameter generating module 203 is specifically used for:

[0098] For each of the picture combinations, feature extraction is performed on the same control points in the two pictures included in the picture combination to generate the target splicing parameters.

[0099] Optionally, the device further comprises:

[0100] A legal parameter saving module, used for setting the target splicing parameters to legal splicing parameters and saving the legal splicing parameters;

[0101] A legal parameter calling module is used to call the legal stitching parameters if the multiple pictures taken at other shooting points within the target scene range do not meet the preset stitching conditions, and stitch the multiple pictures taken at the shooting point according to the legal stitching parameters to obtain a panoramic image corresponding to the shooting point; the target scene range includes the target shooting point.

[0102] In the above-mentioned panoramic image stitching device, a plurality of pictures shot at a target shooting point are first obtained; then, according to the angle parameters corresponding to each of the plurality of pictures and the distribution of feature points in each picture combination composed of the plurality of pictures, feature detection is performed on the plurality of pictures, wherein each picture combination includes two pictures adjacent to each other in the stitching position; then, according to the feature detection result, it is determined whether the plurality of pictures meet the preset stitching conditions, and if so, target stitching parameters are generated according to the pictures included in each picture combination; finally, the plurality of pictures are stitched accordingly according to the target stitching parameters to obtain a target panoramic image. Before stitching together a plurality of pictures taken at a target shooting point into a panoramic image, the above-mentioned device first performs feature detection on the plurality of pictures based on the angle parameters of the plurality of pictures and the distribution of feature points in each picture combination, so as to measure whether large-area seams and distortion and disorder at the splicing points will appear when the plurality of pictures are stitched together. After determining that the plurality of pictures meet the preset stitching conditions according to the feature detection result, that is, after determining that the panoramic image obtained by stitching together the plurality of pictures will not have large-area seams and distortion and disorder at the splicing points, the plurality of pictures are stitched together, thereby effectively ensuring that the stitched panoramic image has a high quality.

[0103] The embodiment of the present application also provides a device for stitching panoramic images, which may specifically be a server or a terminal device. The server and terminal device provided in the embodiment of the present application will be introduced below from the perspective of hardware instantiation.

[0104] See also Figure 3 , Figure 3A schematic diagram of the structure of a server 300 provided for an embodiment of the present application. The server 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 may be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the server 300.

[0105] The server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0106] The steps performed by the server in the above embodiment can be based on the Figure 3 The server structure shown.

[0107] The CPU 322 is used to execute the following steps:

[0108] Get multiple pictures taken at the target shooting point;

[0109] Performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions;

[0110] Determining whether the plurality of images meet a preset stitching condition according to the feature detection result, and if so, generating target stitching parameters according to the images included in each of the image combinations;

[0111] The multiple pictures are stitched together according to the target stitching parameters to obtain a target panoramic image.

[0112] Optionally, the CPU 322 may also be configured to execute steps of any implementation of the panoramic image stitching method provided in the embodiments of the present application.

[0113] See also Figure 4 , Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The terminal can be any terminal device including a computer, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), etc., taking the terminal as a computer as an example:

[0114] Figure 4 FIG. 1 is a block diagram showing a partial structure of a computer related to a terminal provided in an embodiment of the present application. Figure 4 The computer includes: a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will appreciate that Figure 4 The computer structure shown in the figure does not constitute a limitation of the computer, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0115] The memory 420 can be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the computer by running the software programs and modules stored in the memory 420. The memory 420 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the computer (such as audio data, a phone book, etc.), etc. In addition, the memory 420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0116] The processor 480 is the control center of the computer. It uses various interfaces and lines to connect various parts of the entire computer. It executes various functions of the computer and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420, so as to monitor the computer as a whole. Optionally, the processor 480 may include one or more processing units; preferably, the processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 480.

[0117] In the embodiment of the present application, the processor 480 included in the terminal also has the following functions:

[0118] Get multiple pictures taken at the target shooting point;

[0119] Performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions;

[0120] Determining whether the plurality of images meet a preset stitching condition according to the feature detection result, and if so, generating target stitching parameters according to the images included in each of the image combinations;

[0121] The multiple pictures are stitched together according to the target stitching parameters to obtain a target panoramic image.

[0122] Optionally, the processor 480 is further configured to execute steps of any implementation method of the panoramic image stitching method provided in the embodiments of the present application.

[0123] The embodiment of the present application further provides a computer-readable storage medium for storing program code, wherein the program code is used to execute any one of the implementation methods of the panoramic image stitching method described in the aforementioned embodiments.

[0124] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any one of the implementations of the panoramic image stitching method described in the aforementioned embodiments.

[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0126] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store computer programs.

[0130] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0131] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A panoramic image stitching method, It is characterized in that The method comprises: Get multiple pictures taken at the target shooting point; According to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images, feature detection is performed on the multiple images; each of the image combinations includes two images with adjacent splicing positions, and the feature detection includes angle feature detection and adjacent feature detection, the angle feature detection is used to determine whether the pitch angle, yaw angle and roll angle corresponding to the image are within the error range, and the adjacent feature detection is used to detect whether there are points in the two images with an image feature matching degree higher than a preset matching degree threshold; Determining whether the plurality of images meet a preset stitching condition according to the feature detection result, and if so, generating target stitching parameters according to the images included in each of the image combinations; The multiple pictures are stitched together according to the target stitching parameters to obtain a target panoramic image.

2. The method according to claim 1, It is characterized in that The performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images includes: Performing angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images; According to the distribution of feature points in each picture combination, adjacent feature detection is performed on the multiple pictures; When it is determined that the multiple images pass the angle feature detection and the adjacent feature detection, a feature detection result is generated for indicating that the multiple images meet the preset stitching condition.

3. The method according to claim 2, It is characterized in that The performing angle feature detection on the multiple images according to the angle parameters corresponding to the multiple images respectively includes: Rotating a reference picture among the multiple pictures so that the pitch angle, yaw angle and roll angle corresponding to the reference picture reach a reference pitch angle, a reference yaw angle and a reference roll angle respectively; the reference picture is the picture with the earliest shooting time among the multiple pictures; For each picture among the multiple pictures except the reference picture, rotating the picture according to the relative position relationship between the picture and the reference picture, and determining the pitch angle, yaw angle and roll angle corresponding to the rotated picture; For each picture among the multiple pictures except the benchmark picture, determine the reference yaw angle corresponding to the picture according to the relative position relationship between the picture and the benchmark picture; judge whether the error between the pitch angle corresponding to the picture and the benchmark pitch angle is within the pitch angle error range, and judge whether the error between the yaw angle corresponding to the picture and the reference yaw angle corresponding to the picture is within the yaw angle error range, and judge whether the error between the roll angle corresponding to the picture and the benchmark roll angle is within the roll angle error range. If all of them are yes, it is determined that the picture passes the angle feature detection.

4. The method according to claim 2, It is characterized in that The performing adjacent feature detection on the plurality of images according to the distribution of feature points in the image combinations includes: For each of the picture combinations, determine whether two pictures included in the picture have the same control point, and if so, determine that the picture combination passes the adjacent feature detection; In the case that each of the picture combinations passes the adjacent feature detection, it is determined that the multiple pictures pass the adjacent feature detection.

5. The method according to claim 1, It is characterized in that The step of generating target splicing parameters according to the pictures included in each picture combination includes: For each of the picture combinations, feature extraction is performed on the same control points in the two pictures included in the picture combination to generate the target splicing parameters.

6. The method according to claim 1, It is characterized in that After generating target splicing parameters according to the pictures included in each of the picture combinations, the method further includes: Setting the target splicing parameters as legal splicing parameters, and saving the legal splicing parameters; If the multiple pictures taken at other shooting points within the target scene range do not meet the preset stitching conditions, the legal stitching parameters are retrieved, and the multiple pictures taken at the shooting point are stitched according to the legal stitching parameters to obtain a panoramic image corresponding to the shooting point; the target scene range includes the target shooting point.

7. A panoramic image stitching device, It is characterized in that The device comprises: An acquisition module is used to acquire multiple pictures taken at a target shooting point; A feature detection module, used for performing feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images and the distribution of feature points in each image combination composed of the multiple images; each of the image combinations includes two images with adjacent splicing positions, and the feature detection includes angle feature detection and adjacent feature detection, the angle feature detection is used to determine whether the pitch angle, yaw angle and roll angle corresponding to the image are within an error range, and the adjacent feature detection is used to detect whether there are points in the two images with an image feature matching degree higher than a preset matching degree threshold; A splicing parameter generating module, used for judging whether the plurality of pictures meet the preset splicing condition according to the feature detection result, and if so, generating target splicing parameters according to the pictures included in each picture combination; The stitching module is used to stitch the multiple pictures according to the target stitching parameters to obtain a target panoramic image.

8. The device according to claim 7, It is characterized in that The feature detection module comprises: An angle feature detection unit, used to perform angle feature detection on the multiple images according to the angle parameters corresponding to each of the multiple images; An adjacent feature detection unit, configured to perform adjacent feature detection on the plurality of images according to the distribution of feature points in each image combination; The detection result generating unit is used to generate a feature detection result for indicating that the multiple images meet the preset splicing condition when it is determined that the multiple images pass the angle feature detection and the adjacent feature detection.

9. A device, It is characterized in that The device comprises: a processor and a memory; The memory is used to store computer programs; The processor is used to call the computer program to execute the panoramic image stitching method according to any one of claims 1 to 6.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the panoramic image stitching method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Panorama stitching method and system for multi-view panoramic camera

    CN107071268A

  • Panoramic image synthesis method and device, equipment and storage medium

    CN109978755A

  • Panoramic image generation method and device, computer readable storage medium and electronic equipment

    CN111402136A

  • Panoramic image generation method and apparatus for user terminal

    US20180365803A1

  • Electronic apparatus, image processing method, and program

    WO2015029113A1