Surround view image stitching method, device and medium
By extracting and calibrating target features through the pre-trained recognition model, the brightness independence of surround image splicing is achieved, solving the splicing problem of the optical flow method in scenes with large brightness changes, and expanding the application scenarios.
Patent Information
- Application Number
- CN202010879615.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-08-27
AI Technical Summary
The existing optical flow method assumes constant target brightness in surround image splicing, resulting in poor splicing results in scenes with large brightness changes, which limits the application scenarios of splicing.
A pre-trained recognition model is used to extract target features and perform calibration, and the surrounding images are spliced based on the calibration results to reduce dependence on brightness changes.
The splicing of surround-view images is achieved without considering the brightness, which reduces the restrictions on splicing scenes and is especially suitable for environments with large brightness differences.
Smart Images

Figure CN112116068B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a surround view image stitching method, device and medium. Background Art
[0002] Surround view image stitching refers to the process of stitching a series of images captured by a camera device to finally obtain a single image.
[0003] In the prior art, when stitching images, the optical flow method is usually used. Optical flow is the instantaneous speed of the pixel movement of a moving object in space on the observation imaging plane. The optical flow method uses the change of pixels in the time domain in the image sequence and the correlation between adjacent frames to find the corresponding relationship between the previous frame and the current frame, thereby calculating the motion information of the object between adjacent frames. The instantaneous change rate of grayscale at a specific coordinate point on the two-dimensional image plane is usually defined as an optical flow vector.
[0004] However, the optical flow method has an assumption that the brightness is constant, that is, the brightness of the same target will not change when it moves between different frames. This is the assumption of the basic optical flow method, and all optical flow method variants must satisfy it to obtain the basic equation of the optical flow method. This greatly limits the use of the optical flow method for surround view image stitching. Summary of the invention
[0005] In order to solve the above problems, the present application proposes a surround view image stitching method, including: determining multiple frames of images captured by a camera device; for each frame of the multiple frames, extracting target features of a corresponding target in the frame image through a pre-trained recognition model; calibrating the corresponding target through the target features, and feeding back the calibration result to the frame image; and according to each frame of the image carrying the calibration result, performing surround view stitching on the multiple frames of images to obtain a stitched image.
[0006] In one example, determining a plurality of frames of images captured by a camera device includes: determining a plurality of frames of images captured by a plurality of cameras at the same time point, wherein the plurality of cameras have different acquisition ranges.
[0007] In one example, determining a plurality of frames of images captured by a camera device includes: determining a plurality of frames of images captured by a single camera device at different time points, wherein the capture ranges of the single camera device at different time points are different.
[0008] In one example, after calibrating the corresponding target through the target features and feeding back the calibration results to the frame image, the method further includes: estimating the corresponding target in the next frame image according to the calibration results corresponding to the frame image, as well as the posture and acquisition range of the camera device; extracting the target features of the corresponding target in the next frame image according to the estimation results and the recognition model; calibrating the corresponding target through the target features, feeding back the calibration results to the next frame image, and using the calibration results of the next frame image for the next round of estimation process.
[0009] In one example, the recognition model includes: 3 sampling layers and 2 fully connected layers, each sampling layer includes 1 convolution layer and 1 pooling layer; the sampling layer is used to: perform edge segmentation on the input image; the fully connected layer is used to: output pixel classification and calibrate the pixel coordinates back to the original image.
[0010] In one example, according to each frame image carrying the calibration result, the multiple frames of images are stitched together to obtain a stitched image, including: determining a sparse point cloud of each frame image according to each frame image carrying the calibration result; obtaining a dense point cloud of each frame image based on the sparse point cloud; and performing superposition and deduplication based on the dense point cloud of each frame image to obtain a stitched image.
[0011] In one example, before superimposing and deduplicating the dense point cloud of each frame image, the method further includes: performing correction using the dense point cloud of a specified frame image, wherein the specified frame image is an image of a specified number of frames starting from the first frame image.
[0012] In one example, the camera device is applied in a specified scene, and the specified scene refers to a scene in which the difference between the highest brightness and the lowest brightness in the image captured by the camera device in the specified scene is greater than a preset threshold.
[0013] On the other hand, the present application also proposes a surround view image stitching device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: perform a method as described in any of the above examples.
[0014] On the other hand, the present application also proposes a non-volatile computer storage medium for surround view image stitching, which stores computer executable instructions, and the computer executable instructions are configured to be: a method as described in any one of the above examples.
[0015] The surround image stitching method proposed in this application can bring the following beneficial effects:
[0016] In this application, the target is calibrated by a pre-trained recognition model to obtain the position of the corresponding target, and then the surround view image is spliced according to the position of the corresponding target. In this way, the surround view image can be spliced without considering the brightness, which solves the principle that the target brightness needs to be constant when using the optical flow method for image video, and reduces the restrictions on surround view image splicing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic diagram of the flow of the surround image stitching method in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a surround view image stitching device in an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of a specific process of the surround view image stitching method in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. 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 making creative work are within the scope of protection of the present application.
[0022] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0023] The embodiment of the present application provides a surround view image stitching method. In the embodiment of the present application, surround view image stitching refers to stitching a series of collected images, and in the final surround view image, the user can observe the images within a certain angle around by rotating the interface in one interface.
[0024] like Figure 1 As shown, the method includes:
[0025] S101: Determine a plurality of frames of images captured by a camera device.
[0026] A camera device refers to a device with a camera function, which may be a surveillance camera, a network camera, an infrared camera, etc. The multiple frames of images captured by the camera device refer to a series of images. There is a corresponding connection between the frames in this series of images, so that the multiple frames of images can be used to stitch together to obtain a surround view image.
[0027] Specifically, when the camera device is capturing images, multiple cameras can be used to capture images at the same time point to obtain multiple frames of images. Of course, the capture ranges of the multiple cameras are different, and the capture ranges of the multiple cameras are intersecting, so that similar parts exist between the captured multiple frames of images, which is convenient for image stitching. For example, the multiple cameras can be formed into a ring or a sphere, each used to capture images of the outer range of the corresponding ring, and the capture ranges between any two adjacent cameras have an intersection, so as to capture images and obtain multiple frames of images.
[0028] When capturing images, a single camera device may move or rotate to adjust its own capture range, and then continuously shoot at different time points to capture multiple frames of images in different ranges. For example, a single camera device may rotate and / or move with a preset point as the center of the circle to obtain multiple frames of images corresponding to a ring.
[0029] Of course, when the camera device collects images, it can also be a superposition of the above two forms, that is, multiple camera devices are used, the collection ranges of the multiple camera devices are different, and the multiple camera devices can also move or rotate accordingly, so as to collect multiple frames of images. In the multiple frames of images obtained in this way, at each time point there are multiple frames of images collected by multiple camera devices, and at different time points, the images collected by each camera device itself are different from those at other time points.
[0030] S102 . For each frame of the multiple frames of images, extract target features of a corresponding target in the frame of the image using a pre-trained recognition model.
[0031] S103, calibrating the corresponding target using the target feature, and feeding back the calibration result to the frame image.
[0032] After obtaining multiple frames of images captured by the camera device, the target features of the corresponding target can be extracted in each frame of the image through a pre-trained recognition model, and then the target is calibrated based on the target features to obtain the corresponding calibration results, and the calibration results are fed back to the corresponding image, thereby obtaining an image containing the corresponding target calibration results. In principle, each frame of the image collected must be calibrated through the recognition model, and generally the first few frames are correction frames. However, in the actual working process, only part of the frame images can be used for surround stitching. At this time, only this part of the frame images can be calibrated, which will not be repeated here.
[0033] Specifically, the recognition model can be a certain number of images collected in advance by camera devices of different scenes as training samples, and then supervised training is performed based on convolutional neural networks or deep neural networks. The recognition model finally trained may include: 3 sampling layers, 2 fully connected layers, and each sampling layer includes 1 convolution layer and 1 pooling layer. The sampling layer is mainly used to: perform edge segmentation on the input image (i.e., each frame image in the above embodiment); and the fully connected layer is mainly used to: output pixel classification, and calibrate the pixel coordinates back to the original image (i.e., the input image).
[0034] When determining the target to be calibrated, the recognition model can be different based on different scenarios. And for different scenarios, if the corresponding targets to be recognized are different, multiple recognition models can be pre-selected and trained, corresponding to different targets in different application scenarios. Figure 3 As shown in the figure, when calibrating the corresponding target in the input image, the key points of the target, that is, the feature pixels, are mainly calibrated. After the feature pixels are extracted, the feature pixels are classified and output, so that the feature pixels are calibrated, and the position of the target is marked. Among them, the key points include the edge points of the target in the image, and other key points. Here, other key points are different based on different targets. As long as they play a positive role in the calibration of the target, they can be used as key points.
[0035] S104 . Perform surround stitching on the multiple frames of images according to each frame of image carrying the calibration result to obtain a stitched image.
[0036] After the corresponding target has been calibrated in the image, each frame of the image carries the calibration result of the target. At this time, multiple frames of images can be stitched together based on the calibration result to finally obtain a stitched image.
[0037] Specifically, if the multiple frames of images are collected by multiple cameras at the same time point, the corresponding splicing process can be directly performed. If the multiple frames of images are collected by a single camera at different time points during the movement and / or rotation process, it may be difficult to calibrate the target in the image due to the movement or rotation path of the camera. Therefore, after the calibration result is determined from the frame image (usually starting from the first frame image), the position of the corresponding target in the next frame image can be preliminarily estimated based on the acquisition range and rate of the camera device. Among them, the rate of the camera device here refers to the rate of its own movement or rotation. Since the rate and acquisition range of the camera device are pre-set, the position of the target can be roughly estimated based on the rate and acquisition range, as well as the length of the time interval between the two frames of images. At this time, the estimation result can be used in the target calibration process of the next frame image to assist in calibrating the target in the next frame, and so on, until the targets in the multiple frames of images are calibrated and the corresponding splicing process is performed. By using the estimation results to calibrate the target, the corresponding amount of calculation can be reduced and the accuracy of the target calibration results in the next round can be increased.
[0038] Furthermore, for the stitching process, once the calibration result is determined, the sparse point cloud corresponding to each frame of the image is also determined. Then, based on the sparse point cloud, the dense point cloud corresponding to each frame of the image can be obtained. At this time, the corresponding correction can be performed through the dense point cloud in the specified frame image, and then the similar key points between the two adjacent frames of the image can be obtained, so as to perform superposition and deduplication to complete the stitching between the two adjacent frames. Then, by analogy, the superposition and deduplication operation is repeated, and finally the stitching process between multiple frames of images can be completed to obtain a stitched image. Among them, the specified frame here is the image of a specified number of frames starting from the first frame of the image, which is what we commonly call the first few frames of the image.
[0039] It should be noted that, since the prior art requires very high brightness of the target when performing image stitching using the optical flow method, the stitching method in the embodiment of the present application has no requirements for brightness. Therefore, compared to the prior art, the stitching method described in the embodiment of the present application is particularly suitable for scenes with obvious contrast between strong light and weak light, that is, when the camera device captures images in the scene, the difference between the highest brightness and the lowest brightness in the image captured under the current environment is greater than the preset threshold, indicating that the contrast between strong light and weak light in the current scene is obvious. In actual work, the scene may be, for example, a scene in a building or other structure with a large range of shadows. When collecting images in this scene, the brightness difference between the target in the shadow and the target under direct sunlight may be large due to the building or related structures, making it impossible to use the optical flow method for image stitching.
[0040] In one embodiment, after determining the multiple frames of images captured by the camera device, the brightness of each frame of the multiple frames is judged. If the brightness difference between the frames is less than the preset brightness difference, the optical flow method is used to perform surround stitching on the multiple frames. Otherwise, the surround stitching is performed through a pre-trained recognition model in accordance with the method in the above embodiment. If the brightness difference is less than the preset brightness difference, it means that the surround image stitching process can use the optical flow method or the recognition model. However, since the optical flow method is already an existing mature technology and is more stable than the recognition model, the optical flow method can be used for surround stitching at this time. For brightness differences greater than the preset measurement difference, the optical flow method cannot be used. At this time, the recognition model can be used for image stitching to ensure the implementation of image stitching.
[0041] like Figure 2 As shown, the embodiment of the present application also provides a surround view image stitching device, including:
[0042] at least one processor; and,
[0043] a memory communicatively connected to the at least one processor; wherein,
[0044] 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 to enable the at least one processor to: perform the method as described in any one of the above embodiments.
[0045] The embodiment of the present application further provides a non-volatile computer storage medium for surround view image stitching, which stores computer executable instructions, and the computer executable instructions are configured to be: a method as described in any one of the above embodiments.
[0046] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0047] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0048] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0049] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0050] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0052] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0053] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0054] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0055] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0056] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A surround image stitching method, It is characterized in that include: Determine a plurality of frames of images captured by a camera device; For each frame of the multiple frames of images, extracting target features of a corresponding target in the frame of the image by using a pre-trained recognition model; Calibrate the corresponding target by using the target feature, and feed back the calibration result to the frame image; According to each frame of image carrying the calibration result, the multiple frames of image are stitched together to obtain a stitched image; According to each frame image carrying the calibration result, the multiple frames of images are stitched together to obtain a stitched image, including: Determine a sparse point cloud of each frame of image according to each frame of image carrying the calibration result; Based on the sparse point cloud, a dense point cloud of each frame image is obtained; The dense point cloud of each frame of the image is superimposed and deduplicated to obtain a spliced image.
2. The method according to claim 1, It is characterized in that Determine the multiple frames of images captured by the camera device, including: A plurality of frames of images captured by a plurality of camera devices at the same time point are determined, wherein the plurality of camera devices have different acquisition ranges.
3. The method according to claim 1, It is characterized in that Determine the multiple frames of images captured by the camera device, including: A plurality of frames of images captured by a single camera at different time points are determined, wherein the capture ranges of the single camera at different time points are different.
4. The method according to claim 3, It is characterized in that After calibrating the corresponding target by using the target feature and feeding back the calibration result to the frame image, the method further includes: According to the calibration result corresponding to the frame image, as well as the posture and acquisition range of the camera device, the corresponding target in the next frame image is estimated; Extracting target features of the corresponding target in the next frame image according to the estimation result and the recognition model; The corresponding target is calibrated by using the target feature, the calibration result is fed back to the next frame image, and the calibration result of the next frame image is used in the next round of estimation process.
5. The method according to claim 1, It is characterized in that The recognition model includes: 3 sampling layers and 2 fully connected layers, each sampling layer includes 1 convolution layer and 1 pooling layer; The sampling layer is used to: perform edge segmentation on the input image; The fully connected layer is used to output pixel classification and calibrate the pixel coordinates back to the original image.
6. The method according to claim 1, It is characterized in that Before performing overlay deduplication according to the dense point cloud of each frame of image, the method further includes: Correction is performed using a dense point cloud of a specified frame image, where the specified frame image is an image of a specified number of frames starting from the first frame image.
7. The method according to claim 1, It is characterized in that The camera device is applied in a specified scene, and the specified scene refers to a scene in which the difference between the highest brightness and the lowest brightness in the image captured by the camera device in the specified scene is greater than a preset threshold.
8. A surround view image stitching device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: perform the method according to any one of claims 1 to 7.
9. A non-volatile computer storage medium for surround view image stitching, storing computer executable instructions, It is characterized in that The computer executable instructions are configured as follows: a method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and system for measuring tensional amount of screen mesh of vibration screen
CN102798383A
Dynamic calibration system, and combined optimization method and combined optimization device in dynamic calibration system
CN105844624A
Picture processing method and device
CN106981048A
A vision image mosaic system and a method of a mobile robot
CN109064409A
A method and apparatus for image segmentation
CN109447992A
