Multi-image wide-angle splicing and black edge removing method and system
By preprocessing and matching feature points on multiple images to be stitched, combined with geometric transformation and correction, the problems of chromatic aberration, black edges and stitching misalignment in image stitching are solved, and high-quality wide-angle stitching image generation is achieved.
Patent Information
- Application Number
- CN202411695312.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-14
AI Technical Summary
When processing images under different light conditions, the prior art often occurs in chromatic aberration, black edges and misalignment of splicing, resulting in unsatisfactory image quality.
By preprocessing multiple images to be stitched, the color values of black pixels are adjusted, feature point matching and geometric transformation correction are used to use the ORB feature detection algorithm, and finally, the black edge area is cropped to generate a wide-angle stitching image.
It improves the visual consistency of the stitched image, keeps the quality of the stitched image undamaged in low-light environments, and enhances the system's adaptability in different scenarios.
Smart Images

Figure CN119444565A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for multi-image wide-angle stitching and black edge removal. Background Art
[0002] With the advancement of photography technology and the proliferation of smart devices, users are increasingly demanding wide-angle and panoramic photography. Traditional image capture is often limited by the camera's field of view, making it impossible to capture a wide range of scenes in a single shot. Therefore, stitching multiple photos together to create wide-angle images has become a common method for achieving wide-angle photography. This technology is widely used in mobile phone cameras, drone photography, surveillance equipment, and other fields, providing users with a more complete and stunning visual experience.
[0003] However, existing image stitching technologies often suffer from color aberration, black edges, and misaligned stitching when processing complex scenes, such as images captured under varying lighting conditions. In particular, during the stitching process, due to operations such as image rotation, translation, and transformation, some areas may lack valid pixels, resulting in black edges. Furthermore, improperly addressing color and brightness differences between photos can also lead to unsatisfactory stitching results. These issues severely impact image quality and user experience, necessitating an urgent need for a robust image processing technology to address these challenges. Summary of the Invention
[0004] In view of the shortcomings of the above-mentioned technology that images taken under different light conditions have color aberration, black edges and splicing misalignment, resulting in poor image quality, the present invention provides a method and system for multi-image wide-angle stitching and black edge removal.
[0005] To achieve the above object, the present invention provides a method for multi-image wide-angle stitching and black edge removal, comprising the following steps: S1, receives multiple pre-stitched images; S2, preprocessing the image, detecting feature points in the image and performing feature point matching; S3, geometric transformation and correction are performed based on the image after feature point matching; S4, stitching and cropping multiple images to generate a wide-angle stitched image.
[0006] Among them, in S2, the preprocessing mainly adjusts the color values of black pixels in the image so as to distinguish black pixels from invalid pixels in the original image.
[0007] Among them, in S2, the feature detection algorithm is mainly used to identify key points in the image and determine the correspondence between images.
[0008] Among them, in S3, the visual differences between images are mainly reduced through lighting and color correction.
[0009] Among them, in S4, the black edge area in the image is mainly cropped.
[0010] A multi-image wide-angle stitching and black edge removal system, which executes the multi-image wide-angle stitching and black edge removal method, includes: An image input module, configured to receive pre-stitched images; An image preprocessing module is used to preprocess images to improve image quality; Image matching module, used to detect and match feature points of an image; Image transformation and correction module, used to perform geometric transformation and correction on images; The image stitching module is used to stitch and crop the corrected images.
[0011] The image preprocessing module improves the image quality by adjusting the color values of black pixels in the image.
[0012] The image matching module identifies key points of the image through a feature detection algorithm and pairs the associated key points.
[0013] The image transformation and correction module mainly performs geometric transformation on the image through rotation, translation, and scaling, and corrects the illumination and color of the image to reduce the visual differences between images.
[0014] The image stitching module generates a wide-angle or ultra-wide-angle image by stitching, and crops the black edge area in the stitched image.
[0015] The beneficial effects of the present invention are as follows: compared with the prior art, the present invention provides a multi-image wide-angle stitching and black edge removal method and system, which mainly pre-processes multiple images to be stitched and optimizes the brightness of black pixels in the images to ensure that the images can maintain image quality and integrity in strong light, weak light, and dark light environments. It also uses the ORB feature detection algorithm to pair similar feature points in the image, improves the real-time performance of the stitched image, determines the stitching relationship between each image, and then stitches multiple images into a wide-angle stitched image. The present invention improves the visual consistency of the stitched image, maintains the quality of the stitched image without damage in a weak light environment, and ensures the adaptability of the system in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a functional flow chart of the present invention; Figure 2 It is a module relationship diagram of the present invention. DETAILED DESCRIPTION
[0017] In order to more clearly illustrate the present invention, the present invention will be further described below with reference to the accompanying drawings.
[0018] In the following description, example details are provided to provide a deeper understanding of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. It should be understood that the specific embodiments are only used to illustrate the present invention and are not intended to limit the present invention.
[0019] It should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of the stated features, integers, steps, operations, elements or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components or combinations thereof.
[0020] See also Figure 1 The present invention provides a multi-image wide-angle stitching and black edge removal method, comprising the following steps: S1, receives multiple pre-stitched images; S2, preprocessing the image, detecting feature points in the image and performing feature point matching; S3, geometric transformation and correction are performed based on the image after feature point matching; S4, stitching and cropping multiple images to generate a wide-angle stitched image.
[0021] After receiving multiple pre-stitched images, the pre-stitched images are first pre-processed. The feature points in each pre-stitched image are detected and matched to determine the stitching relationship between the images, so that they can be stitched in order according to the stitching relationship. Then, the images after matching are geometrically transformed and corrected. Through geometric transformation, it is ensured that the content in each image is in the correct direction to ensure that there is no confusion. While performing geometric transformation, the image is also corrected so that the parameters between the images are close to unity. After the correction is completed, the images are stitched together and the stitched image is cropped to generate a complete stitched image. The stitched image after the above processing has significantly improved image quality compared to conventional stitched images.
[0022] When processing night scene images, a large number of black or nearly black pixels often appear in the image due to insufficient light. Therefore, this application increases the RGB value of black pixels and adjusts the overall brightness of black pixels to reduce the sense of incongruity of black pixels in the image. In this embodiment, the preprocessing mainly adjusts the color values of black pixels in the image to distinguish black pixels from invalid pixels in the original image, and especially optimizes the black pixels in night scene images. By adjusting the brightness of black pixels to reduce black edges and stitching defects, it ensures that the black areas in the original image will not be mistakenly judged as invalid pixels after stitching, thereby maintaining the integrity of the image.
[0023] In this embodiment, after the images are stitched, the black edge areas in the images are mainly cropped. The present invention crops the black edge areas by scanning the invalid pixels at the edge of the image line by line, dynamically crops out the valid image area, further optimizes the edge quality of the image, and avoids the visual incoherence problem caused by the invalid pixel area.
[0024] It improves the image stitching effect and enhances the system's adaptability in different scenarios, especially in night scenes. At the same time, while ensuring image quality, it improves the stitching effect and the available area of the final image, giving it a significant advantage in market competition and ensuring the output of better quality night scene stitching images.
[0025] In this embodiment, a feature detection algorithm is mainly used to identify key points in an image and determine the correspondence between images. The feature detection algorithm mainly uses the ORB feature detection algorithm to calculate the RGB difference value between the black pixel and the surrounding pixels, and if the RGB difference value between the black pixel and the surrounding pixels is large, it is identified as a corner point, i.e., a feature point. This method generates feature points of black pixels in the image, and then generates corresponding identification codes for the feature points. The identification codes mainly encode specific information of the image around the black pixel, such as pixel intensity, pixel position and direction. Matching is performed through similar identification codes to match the closest image. The ORB feature detection algorithm can match feature points of images in real time. Since the ORB feature detection algorithm mainly locates key points in the image quickly and generates a binary feature vector, and the vector is represented by binary 1 and 0 , it is extremely fast in image algorithm recognition, has strong real-time characteristics, and can adapt to different application scenarios, and can quickly detect in strong light, weak light, dark light and other scenes; specifically, when recognizing an image, the ORB feature detection algorithm first identifies the significant points in the image, such as two points in the darker area of the image, dark points in the brighter area, etc., that is, in a pixel area with similar RGB values, find the pixel point with a large difference between RGB and the average value of the area as the feature point. For example, if the grayscale difference of the feature point is set to X, multiple adjacent pixels are randomly selected in the area, and the grayscale value between the pixels is calculated. If it is greater than the set grayscale difference X, if the difference between one of the pixels and the adjacent pixels is greater than X, then the pixel is determined to be a feature point, and then the relationship between the spliced images is matched through the feature points to achieve the correct splicing order and logic.
[0026] The present invention also discloses a multi-image wide-angle stitching and black edge removal system, comprising: An image input module, configured to receive pre-stitched images; An image preprocessing module is used to preprocess images to improve image quality; Image matching module, used to detect and match feature points of an image; Image transformation and correction module, used to perform geometric transformation and correction on images; The image stitching module is used to stitch and crop the corrected images.
[0027] The image preprocessing module improves the image quality by adjusting the color values of black pixels in the image.
[0028] The image matching module identifies key points of the image through a feature detection algorithm and pairs the associated key points.
[0029] The image transformation and correction module mainly performs geometric transformation on the image through rotation, translation, and scaling, and corrects the illumination and color of the image to reduce the visual differences between images.
[0030] The image stitching module generates a wide-angle or ultra-wide-angle image by stitching, and crops the black edge area in the stitched image.
[0031] The advantages of the present invention are: 1) By increasing the RGB value of black pixels, the difference between black pixels and surrounding pixels is reduced, reducing the degree of disharmony, so that the image quality and integrity can be maintained in strong light, weak light, and dark light environments.
[0032] 2) The ORB feature detection algorithm is used to match feature points of the image, thereby improving the real-time stitching speed and real-time performance.
[0033] The above disclosures are only several specific embodiments of the present invention, but the present invention is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present invention.
Claims
1. A method for multi-image wide-angle stitching and black edge removal, characterized in that: The following steps are involved: S1, receiving multiple pre-stitched images; S2, preprocessing the image, detecting feature points in the image and matching the feature points; S3, performing geometric transformation and correction based on the image after feature point matching; S4, stitching and cropping multiple images to generate a wide-angle stitched image.
2. The method for multi-image wide-angle stitching and black edge removal according to claim 1, characterized in that: In S2, the preprocessing mainly adjusts the color values of black pixels in the image so as to distinguish the black pixels from invalid pixels in the original image.
3. The method for multi-image wide-angle stitching and black edge removal according to claim 1, characterized in that: In S2, feature detection algorithms are mainly used to identify key points in images and determine the corresponding splicing relationships between images.
4. The method for multi-image wide-angle stitching and black edge removal according to claim 1, characterized in that: In S3, the visual differences between images are reduced mainly through lighting and color correction.
5. The method for multi-image wide-angle stitching and black edge removal according to claim 1, characterized in that: In S4, the black edge area in the image is mainly cropped.
6. A multi-image wide-angle stitching and black edge removal system, applied to the multi-image wide-angle stitching and black edge removal method of claims 1-5, characterized in that: include, An image input module, used for receiving pre-stitched images; An image preprocessing module is used to preprocess the image to improve the image quality; An image matching module is used to detect and match feature points of an image; Image transformation and correction module, used for geometric transformation and correction of images; The image stitching module is used to stitch and crop the corrected images.
7. A multi-image wide-angle stitching and black edge removal system, characterized in that: The image preprocessing module improves the image quality by adjusting the color values of black pixels in the image.
8. A multi-image wide-angle stitching and black edge removal system, characterized in that: The image matching module identifies image key points through a feature detection algorithm and pairs the associated key points to determine the splicing relationship between images.
9. A multi-image wide-angle stitching and black edge removal system, characterized in that: The image transformation and correction module mainly performs geometric transformation on the image through rotation, translation, and scaling, and corrects the illumination and color of the image to reduce the visual differences between images.
10. A multi-image wide-angle stitching and black edge removal system, characterized in that: The image stitching module generates a wide-angle or ultra-wide-angle image by stitching, and performs cropping processing on the black edge area in the stitched image.
Citation Information
Cited By
Lossless view field expansion method and system based on light path regulation and control and multimode image fusion
CN121078336A