A color fusion method for adjacent images of construction sites based on BGR weight gradient and CIHS iterative adjustment
Through the BGR weight gradient and CIHS iterative adjustment methods at the construction site, the images collected by the drone are fused in color, solving the problem of color differences after image stitching, and achieving high-quality three-dimensional real-life modeling.
Patent Information
- Application Number
- CN202411469574.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-10-21
AI Technical Summary
In three-dimensional real-life modeling of construction sites, images collected using drones are prone to color differences during the stitching process, resulting in image joint marks and obvious color difference problems, and it is difficult for the existing technology to achieve high-quality color fusion.
The BGR weight gradient and CIHS iterative adjustment methods are used to perform color fusion on adjacent images. The specific steps include selecting image feature points, determining the fusion direction and region, calculating the pixel point weight, performing BGR value calculation and CIHS conversion, and adjusting the weights iteratively to achieve the best fusion effect.
The natural transition and effective fusion of adjacent images are realized, the joint marks and chromatic aberration problems that occur after image stitching are solved, and the quality and efficiency of the three-dimensional model are improved.
Smart Images

Figure CN119559060B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of engineering information technology, and in particular relates to a construction site neighboring image color fusion method with BGR weight gradient and CIHS iterative adjustment. Background Art
[0002] In the 3D real-scene modeling of construction sites, the use of small drones to collect images of construction sites has the outstanding advantages of high efficiency and low cost, but the collected images are small and large in number, and image registration and splicing are required to obtain a complete image of the construction site. Especially in the splicing of images, since the aerial photography of drone images is inevitably affected by factors such as aerial photography time difference, sunshine intensity, wind force and direction, temperature and humidity, the aerial images will have different degrees of differences in color. These differences will appear in the image color difference and obvious joints at the splicing of the generated images. At present. There are several methods to solve this problem, and the main methods used are color-based spatial transformation, multi-scale transformation and exposure difference processing.
[0003] (1) Fusion method based on color space transformation
[0004] The fusion method based on color space transformation is a method of processing changes from the perspective of image color, and is mostly used in high-resolution remote sensing image fusion. In the color fusion of adjacent images, this method transforms the BGR (BlueGreenRed) parameters describing the image into the IHS (IntensityHueSaturation) space, and then resamples the image at high resolution, and completes the image fusion based on the resampling result. Since the processing process of this method is relatively simple and does not consider the natural transition of image color, the fusion effect of the spliced images is average.
[0005] (2) Fusion method based on multi-scale transformation
[0006] The fusion method of multi-scale transformation is a method that selects, transforms and synthesizes multiple factors to finally obtain the multi-resolution analysis coefficients of the fused image, and then completes the image fusion through the inverse operation of multi-resolution analysis. The main steps of this method are: determine the multi-resolution analysis coefficients of the two images A and B to be fused, and then fuse the sub-images of the corresponding levels in the original image according to the fusion rules including determining the active factor, matching factor, coefficient selection and synthesis coefficient to form a new sub-image. On this basis, the final fused image is obtained through the inverse operation of multi-resolution analysis. Due to the excessive number of layers in the decomposition of the original image, this method may cause data redundancy in the calculation data and lose some high-frequency information. Although the reconstructed image is improved to a certain extent in terms of color, it may make the image blurred or even distorted.
[0007] (3) Exposure difference processing method
[0008] When drones are shooting images, the brightness and color distribution of different images will differ to a certain extent due to factors such as shooting conditions or exposure time. In this regard, in image registration and stitching, the exposure difference processing method uses the grayscale averaging method to process the colors of overlapping image areas. From the actual effect, although the local effect of the image can be improved, when the grayscale values between images differ greatly, the overall image will still have color spots, and it is difficult to achieve an ideal smoothing effect.
[0009] In the process of carrying out 3D real-scene modeling of engineering project construction sites, after completing the registration of a large number of construction site images collected by drones, in order to obtain a high-quality full-color image of the construction site, it is also necessary to perform color fusion processing on the registered adjacent images. Summary of the invention
[0010] In view of the above problems existing in the prior art, the purpose of the present invention is to provide a regional color fusion method considering the BGR weight gradient of adjacent images and the CIHS iterative adjustment, which can achieve the natural transition and effective fusion of all pixels in the overlapping area of adjacent images.
[0011] In order to solve the above problems, the technical solution adopted by the present invention is as follows:
[0012] The method for color fusion of adjacent images of a construction site by BGR weight gradient and CIHS iterative adjustment of the present invention comprises the following steps:
[0013] Step 1: Select adjacent images and their feature points to obtain the BGR values of the feature points;
[0014] For two adjacent images to be fused I h and I l , and their corresponding registration feature points are p ij and p nm , (i, j) and (n, m) represent the feature points in image I h and I l The row and column numbers in p are obtained by image analysis software ij and p nm BGR value (c bij ,c gij ,c rij ) and (c bnm ,c gnm ,c rnm );
[0015] Step 2: The directions of adjacent image fusion include up and down, left and right, left oblique direction and right oblique direction, and the image fusion direction is determined;
[0016] Step 3: Determine the feature point fusion area and the weights ω of all pixels in the area;
[0017] Determine the image fusion feature point p ij and p nm After that, take these two points as the center, select the 3×3 pixels adjacent to the feature points as the fusion area, and then determine the pixel weights according to the weight setting principle;
[0018] The weight setting principle is to make the sum of the weight values of the nine pixels in the area equal to one, and give the weight values of the surrounding neighboring pixels with the feature point as the center according to the image fusion direction;
[0019] Step 4: Calculate the BGR value of the feature point fusion area containing weights;
[0020] Step 5: Calculate the BGR mean of the two feature points after fusion and
[0021] Get C through Step 4 ij With C nm Then, the RGB mean of the two feature points after fusion is obtained according to the following formula and
[0022]
[0023] Step 6: and Convert CI, H and S values;
[0024] Obtained through Step 5 and After that, and Convert to CI, S, H type values, and set the converted values to CI k ′、S k ′、H k ′, where k represents the number of conversions of CIHS value;
[0025]
[0026] Step 7: Check and correct the image fusion effect;
[0027] If the preset standard is met after fusion, the image fusion process is terminated; if the preset standard is not met after fusion, a better fusion effect is obtained by adjusting the weight of each pixel.
[0028] Furthermore, in Step 1, the image parsing software OpenCV is used to read the image through the cv2.imread() function, and the BGR value of a specific pixel is directly accessed through the coordinate value index.
[0029] Furthermore, in Step 3, the maximum weight of the feature point is 0.2.
[0030] Furthermore, in Step 4, when merging in the up and down directions, the feature point p ij and p nm The BGR values are C ij (c bij ,c gij ,c rij ) and C nm (c bnm ,c gnm ,c rnm ), considering the pixel weights p ij and p nm The RGB values of the feature point fusion area are:
[0031]
[0032] Furthermore, in Step 7, when k = 1, CI 1 ′、S 1 ′、H 1 ′ is the CIHS value obtained after taking the value of the allocation weight described in Step 3.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] By adopting the adjacent image color fusion method described in the present invention, adjacent images that need to be spliced can be spliced to obtain a better fusion effect, effectively solve the image joints and obvious color difference problems that appear after the adjacent images are spliced, and provide support for obtaining high-quality three-dimensional models.
[0035] Compared with the current construction site image registration method, this method has small computational complexity, simpler data acquisition, faster fusion speed, better fusion effect, and can speed up the aerial triangulation calculation and 3D modeling speed of later modeling, thereby improving the efficiency and overall quality of 3D real-scene modeling at the construction site of construction projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic diagram of the steps of the image color fusion method of the present invention and its role in three-dimensional modeling of a construction site;
[0037] Figure 2 Schematic diagram of image fusion direction in the present invention;
[0038] Figure 3 It is a schematic diagram of weight allocation of the remaining pixel points in four directions except the feature points in the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described below in conjunction with specific embodiments.
[0040] like Figure 1 As shown, the method for color fusion of construction site neighboring images with BGR weight gradient and CIHS iterative adjustment of the present invention comprises the following steps:
[0041] Step 1: Select adjacent images and their feature points to obtain the BGR values of the feature points;
[0042] For two adjacent images to be fused I h and I l , and their corresponding registration feature points are p ij and p nm , (i, j) and (n, m) represent the feature points in image I h and I l The row and column numbers in p are obtained by image analysis software ij and p nm BGR value (c bij ,c gij ,c rij ) and (c bnm ,c gnm ,c rnm ).
[0043] For example, if the image analysis software OpenCV is used, the image can be read through the cv2.imread() function in the OpenCV software, and the BGR value of a specific pixel can be directly accessed through the coordinate value index. For example, image[i,j] can obtain the BGR value of the pixel at position [i,j], and image[i,j,0], image[i,j,1] and image[i,j,2] can obtain the blue, green and red values of the pixel respectively (c b ,c g ,c r ).
[0044] Step 2: In image registration and stitching, the images that need to be registered and stitched are all adjacent images, so the images that need to be fused are also adjacent images. The directions of adjacent image fusion include up and down, left and right, left oblique and right oblique. Determine the image fusion direction, such as Figure 2 As shown, after completing Step 1, the fusion direction of the image can be known.
[0045] Step 3: Determine the feature point fusion area and the weights ω of all pixels in the area;
[0046] Determine the image fusion feature point p ij and p nm After that, take these two points as the center, select the 3×3 pixels adjacent to the feature points as the fusion area, and then determine the pixel weights according to the weight setting principle;
[0047] The weight setting principle is to make the sum of the weight values of the nine pixels in the area equal to one, and give the weight values of the surrounding pixels with the feature point as the center according to the image fusion direction. Since the feature point is the key fusion point, its weight value is the highest value of 0.20. In addition to the feature point, the weight distribution of the remaining pixels in the four directions is as follows Figure 3 shown.
[0048] Step 4: Calculate the BGR value of the feature point fusion area containing weights.
[0049] In the up and down fusion direction, the feature point p ij and p nm The BGR values are C ij (c bij ,c gij ,c rij ) and C nm (c bnm ,c gnm ,c rnm ), considering the pixel weights p ij and p nm The RGB values of the feature point fusion area are:
[0050]
[0051] Step 5: Calculate the BGR mean of the two feature points after fusion and
[0052] Get C through Step 4 ij With C nm Then, the RGB mean of the two feature points after fusion is obtained according to the following formula and
[0053]
[0054] Step 6: and Convert CI, H and S values;
[0055] Obtained through Step 5 and After that, and Convert to CI, S, H type values, and set the converted values to CI k ′、S k ′、H k ′, where k represents the number of conversions of CIHS value;
[0056]
[0057]
[0058] Step 7: Check and correct the image fusion effect; when k = 1, CI 1 ′、S 1 ′、H 1 ′ is the CIHS value obtained after the weight distribution described in Step 3. If the fusion reaches the preset standard, the image fusion process ends; if the fusion does not reach the preset standard, a better fusion effect is obtained by adjusting the weight of each pixel. Generally, after three or four weight adjustments and iterative calculations, a fusion effect that meets the accuracy requirements of construction site management can be obtained.
Claims
1. A method for color fusion of adjacent images of construction sites with BGR weight gradient and CIHS iterative adjustment, characterized in that: The method comprises the following steps: Step 1: Select adjacent images and their feature points to obtain the BGR values of the feature points; For two adjacent images to be fused I h and I l , and their corresponding registration feature points are p ij and p nm , (i, j) and (n, m) represent the feature points in image I h and I l The row and column numbers in p are obtained by image analysis software ij and p nm BGR value (c bij ,c gij ,c rij ) and (c bnm ,c gnm ,c rnm ); Step 2: The directions of adjacent image fusion include up and down, left and right, left oblique direction and right oblique direction, and the image fusion direction is determined; Step 3: Determine the feature point fusion area and the weights ω of all pixels in the area; Determine the image fusion feature point p ij and p nm After that, take these two points as the center, select the 3×3 pixels adjacent to the feature points as the fusion area, and then determine the pixel weights according to the weight setting principle; The weight setting principle is to make the sum of the weight values of the nine pixels in the area equal to one, and give the weight values of the surrounding neighboring pixels with the feature point as the center according to the image fusion direction; Step 4: Calculate the BGR value of the feature point fusion area containing weights; Step 5: Calculate the BGR mean of the two feature points after fusion and Get C through Step 4 ij With C nm Then, the RGB mean of the two feature points after fusion is obtained according to the following formula and Step 6: and Convert CI, H and S values; Obtained through Step 5 and After that, and Convert to CI, S, H type values, and set the converted values to CI k ′、S k ′、H k ′, where k represents the number of conversions of the CIHS value; Step 7: Check and correct the image fusion effect; If the preset standard is met after fusion, the image fusion process is terminated; if the preset standard is not met after fusion, a better fusion effect is obtained by adjusting the weight of each pixel.
2. The method for color fusion of adjacent images of a construction site with BGR weight gradient and CIHS iterative adjustment according to claim 1, characterized in that: In Step 1, the image parsing software OpenCV is used to read the image through the cv2.imread() function, and the BGR value of a specific pixel is directly accessed through the coordinate value index.
3. The method for color fusion of adjacent images of a construction site with BGR weight gradient and CIHS iterative adjustment according to claim 1, characterized in that: In Step 3, the maximum weight of the feature point is 0.
2.
4. The method for color fusion of adjacent images of a construction site with BGR weight gradient and CIHS iterative adjustment according to claim 1, characterized in that: In Step 4, when merging in the up and down directions, the feature point p ij and p nm The BGR values are C ij (c bij ,c gij ,c rij ) and C nm (c bnm ,c gnm ,c rnm ), considering the pixel weights p ij and p nm The RGB values of the feature point fusion area are:
5. The method for color fusion of adjacent images of a construction site with BGR weight gradient and CIHS iterative adjustment according to claim 1, characterized in that: In Step 7, when k=1, CI1′, S1′, and H1′ are CIHS values obtained by taking values according to the allocation weights in Step 3.
Citation Information
Patent Citations
Image registration and multi-resolution fusion-based panoramic image splicing method
CN108416732A
Image fusion method and apparatus, computer device, and storage medium
WO2022199710A1