Three-dimensional reconstruction method based on multi-exposure image edge detection
By using a multi-exposure image edge detection method, combined with Gaussian function gray value matrix fitting of low-exposure and high-exposure images, and utilizing non-maximum suppression algorithm and bilinear interpolation, the problems of blurring and low accuracy in edge detection in existing 3D reconstruction methods are solved, and higher accuracy 3D model reconstruction is achieved.
Patent Information
- Application Number
- CN202411005305.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing 3D reconstruction methods suffer from problems such as blurred edge detection, unevenness, low accuracy, high cost, and poor applicability. They are particularly susceptible to interference when image acquisition environments are demanding, resulting in holes and blurry reconstruction results.
A method based on multi-exposure image edge detection is adopted. By obtaining the Gaussian function gray value matrix of low-exposure and high-exposure two-dimensional images, fitting and convolving it, and combining non-maximum suppression algorithm and bilinear interpolation, the accuracy of edge detection is improved.
It improves the accuracy and robustness of 3D reconstruction, enhances the number and accuracy of extracted structural feature points for edge detection, and reduces sensitivity to noise.
Smart Images

Figure CN119180907B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer vision, in particular to a three-dimensional reconstruction method based on multi-exposure image edge detection. BACKGROUND
[0002] Three-dimensional reconstruction technology is the core technology in the field of computer vision, and is also a common scientific problem in the fields of computer animation and virtual reality. Three-dimensional reconstruction processes image information of an object through surface rendering or volume rendering to achieve reconstruction of a three-dimensional model of the object.
[0003] The edge algorithm was first proposed by Horn et al. in the 1970s. They used a method based on the direction of light and reflectivity to recover the three-dimensional shape of an object from a single image. This was the first time that the edge algorithm was applied to the field of three-dimensional reconstruction. In the 1990s, edge-based three-dimensional reconstruction methods began to combine other information to improve the reconstruction results and robustness. However, the edges of the object in the reconstruction results still have defects such as blurring and unevenness, and there are also disadvantages such as low precision, high cost, and poor applicability. In recent years, the edge algorithm has gradually improved. In 2023, a structured light three-dimensional reconstruction method based on edge curve encoding and decoding was proposed by Guo Min et al. The method uses a sub-pixel edge detection algorithm based on quadratic optimization to extract edge curves, improving the precision of edge detection. The method uses edge curve-based decoding to improve the accuracy of code values. However, this algorithm does not solve the problem of image blurring caused by noise interference, and the calculation error of the intersection method itself in the algorithm leads to uneven surface texture in the reconstruction results. Moreover, the algorithm has high requirements for the image acquisition environment, poor applicability, and low anti-interference degree, which makes the reconstruction results susceptible to various interferences such as insufficient light, too far acquisition distance, and unusual object shape, resulting in holes and blurring in the reconstructed three-dimensional model. Therefore, the current three-dimensional reconstruction has low precision. The present application improves the calculation process of the gray value matrix, effectively combines the edge detection structure feature point method by using the high tolerance and wide range of multi-exposure image gray values, solves the problems of insufficient number of original structure feature points and small applicable range of edge detection structure feature point method, and improves the inherent problems of low precision and sensitivity to noise of edge detection structure feature points by using the high tolerance of multi-exposure image gray values, fitting gray values, and combining non-maximum suppression algorithm and bilinear interpolation, thereby improving the precision of three-dimensional reconstruction. SUMMARY
[0004] Therefore, it is necessary to provide a three-dimensional reconstruction method based on multi-exposure image edge detection to improve the precision of three-dimensional reconstruction.
[0005] A three-dimensional reconstruction method based on multi-exposure image edge detection, the method comprising:
[0006] capturing the target object by using a camera to obtain a raw two-dimensional image;
[0007] based on the raw two-dimensional image, obtaining at least one low-exposure two-dimensional image with lower exposure than the raw two-dimensional image and at least one high-exposure two-dimensional image with higher exposure than the raw two-dimensional image;
[0008] analyzing each high-exposure two-dimensional image to obtain a Gaussian function gray value matrix of each high-exposure two-dimensional image;
[0009] analyzing each low-exposure two-dimensional image to obtain a Gaussian function gray value matrix of each low-exposure two-dimensional image;
[0010] determining a corresponding fitting mode to fit each Gaussian function gray value matrix according to the number of low-exposure two-dimensional images and high-exposure two-dimensional images, to obtain a new Gaussian function gray value matrix;
[0011] for the color space of RGB in the raw two-dimensional image, converting it into a gray color space to fit a gray value matrix of the raw two-dimensional image;
[0012] convolving the gray value matrix of the raw two-dimensional image and the new Gaussian function gray value matrix to obtain a transition gray value matrix after convolution; analyzing the transition gray value matrix to obtain a final edge point matrix;
[0013] performing three-dimensional reconstruction according to the edge points in the final edge point matrix to obtain a three-dimensional model of the target object.
[0014] In one embodiment, the Gaussian function gray value matrix of each high-exposure two-dimensional image and the Gaussian function gray value matrix of each low-exposure two-dimensional image are both obtained by calculating the gray values of the two-dimensional image through a Gaussian function, wherein the Gaussian function gray value matrix G m The calculation process is shown in the following formula:
[0015] G m = [G m (x1,y1)...G m (x I ,y I )], m ∈ 1,2,3...M
[0016]
[0017] g m (x i ,y i ) = 0.299R m,i + 0.587G m,i+0.114B m,i
[0018]
[0019] wherein G m (x1,y1) is the gray value of the first pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x1 is the coordinate value of the first pixel point in the x direction, y1 is the coordinate value of the first pixel point in the y direction, G m (x i ,y i ) is the gray value of the ith pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x i is the coordinate value of the ith pixel point in the x direction, y i is the coordinate value of the ith pixel point in the y direction, G m (x I ,y I ) is the gray value of the Ith pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x I is the coordinate value of the Ith pixel point in the x direction, y I is the coordinate value of the Ith pixel point in the y direction, m is the serial number of the high-exposure two-dimensional image, M is the number of high-exposure two-dimensional images, g m (x i ,y i ) is the gray value of the ith pixel point in the mth high-exposure two-dimensional image, σ m,x is the standard deviation of the coordinate value of the pixel point in the x direction of the mth high-exposure two-dimensional image, σ m,y is the standard deviation of the coordinate value of the pixel point in the y direction of the mth high-exposure two-dimensional image, μ m,x is the average value of the coordinate value of the pixel point in the x direction of the mth high-exposure two-dimensional image, μ m,t is the average value of the coordinate value of the pixel point in the y direction of the mth high-exposure two-dimensional image, i is the serial number of the pixel point, I is the number of pixel points, R m,i is the red channel value of the ith pixel point in the mth high-exposure two-dimensional image, G m,i is the green channel value of the ith pixel point in the mth high-exposure two-dimensional image, B m,i is the blue channel value of the ith pixel point in the mth high-exposure two-dimensional image.
[0020] Similarly, the Gaussian function gray value matrix T v of the low-exposure two-dimensional image is calculated as shown in the following formula:
[0021] T v = [T v (x1,y1)...Tv (x I ,y I )],v∈1,2,3...V
[0022]
[0023] t v (x i ,y i )=0.299R v,i +0.587G v,i +0.114B v,i
[0024]
[0025] wherein, T v (x1,y1) is the gray value of the first pixel point in the vth low exposure two-dimensional image after Gaussian function processing, x1 is the coordinate value of the first pixel point in the x direction, y1 is the coordinate value of the first pixel point in the y direction, T v (x i ,y i ) is the gray value of the ith pixel point in the vth low exposure two-dimensional image after Gaussian function processing, x i is the coordinate value of the ith pixel point in the x direction, y i is the coordinate value of the ith pixel point in the y direction, T v (x I ,y I ) is the gray value of the Ith pixel point in the vth low exposure two-dimensional image after Gaussian function processing, x I is the coordinate value of the Ith pixel point in the x direction, y I is the coordinate value of the Ith pixel point in the y direction, v is the serial number of the low exposure two-dimensional image, V is the number of low exposure two-dimensional images, t v (x i ,y i ) is the gray value of the ith pixel point in the vth low exposure two-dimensional image, σ v,x is the standard deviation of the coordinate value of the pixel point in the x direction of the vth low exposure two-dimensional image, σ v,y is the standard deviation of the coordinate value of the pixel point in the y direction of the vth low exposure two-dimensional image, μ v,x is the average value of the coordinate value of the pixel point in the x direction of the vth low exposure two-dimensional image, μ v,y is the average value of the coordinate value of the pixel point in the y direction of the vth low exposure two-dimensional image, i is the serial number of the pixel point, I is the number of pixel points, R v,i is the red channel value of the ith pixel point in the vth low exposure two-dimensional image, G v,iGv(i) is the green channel value of the i-th pixel in the v-th low-exposure two-dimensional image. v,i Bv(i) is the blue channel value of the i-th pixel in the v-th low-exposure two-dimensional image.
[0026] In one embodiment, the fitting mode corresponding to the number of low-exposure two-dimensional images and high-exposure two-dimensional images is used to fit the Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix, including:
[0027] In the case where the total number of low-exposure two-dimensional images and high-exposure two-dimensional images is two, the Gaussian function fitting mode for two images is used to fit the Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix.
[0028] In the case where the total number of low-exposure two-dimensional images and high-exposure two-dimensional images is more than three, the Gaussian function fitting mode for multiple images is used to fit the Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix.
[0029] In one embodiment, the Gaussian function fitting mode for two images is:
[0030] The Gaussian function gray value matrix of the high-exposure two-dimensional image and the Gaussian function gray value matrix of the low-exposure two-dimensional image are fitted to obtain a new Gaussian function gray value matrix, and the new Gaussian function gray value matrix P1 is:
[0031] P1=[P1(x1,y1)...P1(x i ,y i )...P1(x I ,y I )]
[0032] P1(x i ,y i )=w1·G1(x i ,y i )+w2·T1(x i ,y i ),i∈1,2,3...I
[0033] where P1(x1,y1) is the gray value of the first pixel after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, P1(c i ,y i ) is the gray value of the i-th pixel after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, P1(x I ,y I) is the gray value of the i-th pixel point after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, w1 is the weight coefficient of the high-exposure two-dimensional image, G1(x i ,y i ) is the gray value of the i-th pixel point in the first high-exposure two-dimensional image after Gaussian function processing, w2 is the weight coefficient of the low-exposure two-dimensional image, T1(x i ,y i ) is the gray value of the i-th pixel point in the first low-exposure two-dimensional image after Gaussian function processing, i is the sequential number of the pixel point, and I is the number of pixel points.
[0034] In one embodiment, the Gaussian function fitting mode for the multiple images is as follows:
[0035] The Gaussian function gray value matrix of each high-exposure two-dimensional image is fitted to obtain a fitted high-exposure Gaussian function gray value matrix G mix , which is as follows:
[0036] G mix = [G mix (x1, y1)...G mix (x i ,y i )...G mix (x I ,y I )]
[0037]
[0038] , wherein G mix (x1, y1) is the gray value of the first pixel point after fitting of each high-exposure two-dimensional image, G mix (x i ,y i ) is the gray value of the i-th pixel point after fitting of each high-exposure two-dimensional image, G mix (x I ,y I ) is the gray value of the I-th pixel point after fitting of each high-exposure two-dimensional image, M is the number of high-exposure two-dimensional images, m is the sequential number of the high-exposure two-dimensional image, G m (x i ,y i ) is the gray value of the i-th pixel point in the m-th high-exposure two-dimensional image after Gaussian function processing, i is the sequential number of the pixel point, and I is the number of pixel points.
[0039] The Gaussian function gray value matrix of each low-exposure two-dimensional image is fitted to obtain a fitted low-exposure Gaussian function gray value matrix Tmix is:
[0040] T mix =[t mix (x1,y1)...T mix (x i ,y i )...T mix (x I ,y I )
[0041]
[0042] wherein, T mix (x1,y1) is the gray value of the first pixel point of each low exposure two-dimensional image after fitting, T mix (x i ,y i ) is the gray value of the i-th pixel point of each low exposure two-dimensional image after fitting, T mix (x I ,y I ) is the gray value of the I-th pixel point of each low exposure two-dimensional image after fitting, V is the number of low exposure two-dimensional images, v is the sequential number of low exposure two-dimensional images, T v (x i ,y i ) is the gray value of the i-th pixel point of the v-th low exposure two-dimensional image after Gaussian function processing, i is the sequential number of the pixel point, and I is the number of pixel points.
[0043] The fitted high exposure Gaussian function gray value matrix and the fitted low exposure Gaussian function gray value matrix are fitted to obtain a new Gaussian function gray value matrix, and the new Gaussian function gray value matrix P2 is:
[0044] P2=[P2(x1,y1)...P2(x i ,y i )...P2(x I ,y I )
[0045] P2(x i ,y i )=w1·G mix (x i ,y i )+w2·T mix (x i ,y i ), i∈1,2,3...I
[0046] wherein, P2(x1,y1) is the gray value of the first pixel point after fitting of the high exposure two-dimensional image and the low exposure two-dimensional image, P2(xi ,y i Let P2(x) be the gray value of the i-th pixel after fitting the high-exposure 2D image and the low-exposure 2D image. I ,y I ) represents the grayscale value of the i-th pixel after fitting the high-exposure 2D image and the low-exposure 2D image, w1 is the weighting coefficient of the high-exposure 2D image, and G mix (x i ,y i ) represents the grayscale value of the i-th pixel after fitting each high-exposure 2D image, w2 represents the weighting coefficient of the low-exposure 2D image, and T mix (x i ,y i ) represents the gray value of the i-th pixel after fitting each high-exposure two-dimensional image, where i is the sequential number of the pixel and I is the number of pixels.
[0047] In one embodiment, the grayscale matrix P of the original two-dimensional image ori for:
[0048] P ori =[P ori (x1,y1)...P ori (x i ,y i ...P ori (x I ,y I )]
[0049] P ori (x i ,y i )=0.299R ori,i +0.587G ori,i +0.114B ori,i , i∈1,2,3...I
[0050] Among them, P ori (x1, y1) represents the grayscale value of the first pixel in the original two-dimensional image, P ori (x i ,y i Let P be the gray value of the i-th pixel in the original two-dimensional image. ori (x I ,y I R is the gray value of the i-th pixel in the original two-dimensional image. ori,i G represents the red channel value of the i-th pixel in the original 2D image. ori,i Let B be the green channel value of the i-th pixel in the original 2D image. ori,i Let i be the blue channel value of the i-th pixel in the original two-dimensional image, where i is the sequential number of the pixel and I is the number of pixels.
[0051] In one embodiment, the transition gray value matrix R is:
[0052] R = [R(x1,y1)...R(x i ,y i )...R(x I ,y I )]
[0053]
[0054] wherein R(x1,y1) is the gray value of the first pixel point in the transition gray value matrix, R(x i ,y i ) is the gray value of the i-th pixel point in the transition gray value matrix, and R(x I ,y I ) is the gray value of the I-th pixel point in the transition gray value matrix; k1 represents the value of half of the radius of the convolution kernel in the horizontal direction, k2 represents the value of half of the radius of the convolution kernel in the vertical direction, P(p,q) represents the gray value of the pixel point with coordinates (p,q), P ori (x i +p,y i +q) represents the value obtained after the pixel point with coordinates (x i +p,y i +q) is subjected to the Gaussian function operation, i is the serial number of the pixel point, and I is the number of pixel points. represents rounding down, N1 represents the total number of rows in the new Gaussian function gray value matrix P, and N2 represents the total number of columns in the new Gaussian function gray value matrix P.
[0055] In one embodiment, the analysis of the transition gray value matrix to obtain a final edge point matrix comprises:
[0056] performing operation on the transition gray value matrix using a Laplacian operator to obtain a matrix L after operation;
[0057] performing zero-crossing point detection on the matrix L after operation to obtain an edge point matrix J;
[0058] suppressing the edge points in the edge point matrix J using a non-maximum suppression algorithm to determine a new edge point matrix J new ;
[0059] performing bilinear interpolation processing on the new edge point matrix to obtain a final edge point matrix J'. In one embodiment, the matrix L after operation is:
[0060] L = [L(x1,y1)...L(xi ,y i ...L(x) I ,y I )]
[0061]
[0062] Where L(x1,y1) is the pixel value after the Laplacian operator is applied to the first pixel, L(x i ,y i Let L(x) be the pixel value after the Laplacian operator is applied to the u-th pixel. I ,y I R(x) represents the pixel value after the Laplacian operator is applied to the i-th pixel. i ,y i Let be the gray value of the i-th pixel in the transition gray value matrix, where i is the sequential number of the pixel and I is the number of pixels; perform zero-crossing detection on matrix L to obtain the edge point matrix J.
[0063] In one embodiment, the non-maximum suppression algorithm is used to suppress the edge points in the edge point matrix J to determine a new edge point matrix J. new ,include:
[0064] Applying the Sobel operator to the transition grayscale matrix R, a convolution operation is performed to obtain the horizontal gradient magnitude matrix F. x and the gradient magnitude matrix F in the vertical direction y And using the gradient magnitude matrix F in the horizontal direction x and the gradient magnitude matrix F in the vertical direction y Calculate the gradient magnitude F(x) for each pixel. i ,y i The gradient magnitude F(x) of each pixel i ,y i )for:
[0065]
[0066] Among them, F x (x i ,y i F is the gradient magnitude matrix in the horizontal direction. x The magnitude of the i-th gradient, F y (x i ,y i F is the gradient magnitude matrix in the vertical direction. y The magnitude of the i-th gradient;
[0067] Based on the gradient magnitude matrix F in the horizontal direction x and the gradient magnitude matrix F in the vertical directiony , the gradient direction θ(x i ,y i ) of each pixel point is calculated. i i
[0068]
[0069] According to the gradient amplitude F(x i ,y i ) of each pixel point and the gradient direction θ(x i ,y i ) of each pixel, non-maximum suppression is performed to obtain a new edge point matrix J new .
[0070] The three-dimensional reconstruction method based on multi-exposure image edge detection, by using a camera to shoot a raw two-dimensional image of a target object, based on the raw two-dimensional image, at least one low-exposure two-dimensional image with lower exposure than the raw two-dimensional image and at least one high-exposure two-dimensional image with higher exposure than the raw two-dimensional image are obtained, according to each high-exposure two-dimensional image, a Gaussian function gray value matrix of each high-exposure two-dimensional image is obtained, according to each low-exposure two-dimensional image, a Gaussian function gray value matrix of each low-exposure two-dimensional image is obtained, according to the number of low-exposure two-dimensional images and high-exposure two-dimensional images, a corresponding fitting method is determined to fit each Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix, for the color space of RGB in the raw two-dimensional image, it is converted into a gray color space to fit the gray value matrix of the raw two-dimensional image, according to the gray value matrix of the raw two-dimensional image and the new Gaussian function gray value matrix, convolution is performed to obtain a transition gray value matrix, the transition gray value matrix is analyzed to obtain a final edge point matrix, according to the edge points in the final edge point matrix, three-dimensional reconstruction is performed to obtain a three-dimensional model of the target object. Thus, the Gaussian function gray value matrix of the multi-exposure image gray value is fitted again with the gray value matrix of the raw two-dimensional image, taking advantage of the high tolerance and wide range of multi-exposure image gray value, the advantages of multi-exposure image gray value fitting and edge detection structural feature point extraction method are effectively combined, and the high dependence of edge detection structural feature point extraction on gray value matrix is utilized to ensure that the number and accuracy of structural feature points are improved on the basis of the original feature point extraction; by taking advantage of the high tolerance of multi-exposure image gray value, non-maximum suppression algorithm and bilinear interpolation are applied to the structural feature points extracted by edge detection structural feature point extraction, which improves the extraction accuracy of edge detection structural feature points and improves the inherent characteristics of edge detection structural feature points that are sensitive to noise, thereby improving the accuracy of three-dimensional reconstruction. BRIEF DESCRIPTION OF DRAWINGS
[0071] Figure 1 A flowchart of a three-dimensional reconstruction method based on multi-exposure image edge detection in an embodiment. DETAILED DESCRIPTION
[0072] For the purpose, technical solutions and advantages of the present application to be more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application and not to limit the present application.
[0073] In an embodiment, as shown in Figure 1 A three-dimensional reconstruction method based on multi-exposure image edge detection is provided, which is described below by taking the application of the method to a terminal as an example, including the following steps:
[0074] Step S220, the target object is photographed by a camera to obtain an original two-dimensional image.
[0075] The original two-dimensional image of the target object can include multiple two-dimensional images of the target object at different angles.
[0076] The original two-dimensional image can be an image photographed by the camera in an automatic mode, in which the white balance, shutter, aperture, ISO value, etc. are automatically set by the camera system. The original two-dimensional image can also be obtained by manually setting the white balance, shutter, aperture, ISO value, etc. of the camera to moderate positions.
[0077] Step S240, based on the original two-dimensional image, at least one low-exposure two-dimensional image with lower exposure than the original two-dimensional image and at least one high-exposure two-dimensional image with higher exposure than the original two-dimensional image are obtained.
[0078] It should be understood that if the original two-dimensional image of the target object includes multiple two-dimensional images of the target object at different angles, each original two-dimensional image corresponds to at least one low-exposure two-dimensional image with lower exposure than the original two-dimensional image and at least one high-exposure two-dimensional image with higher exposure than the original two-dimensional image.
[0079] The low-exposure two-dimensional image can be a two-dimensional image with lower exposure than the original two-dimensional image. The low-exposure two-dimensional image can be obtained by using software capable of exposure processing to adjust the exposure of the original two-dimensional image. The low-exposure two-dimensional image can also be obtained by adjusting the camera parameters based on the camera parameters used to photograph the original two-dimensional image, so that the exposure is lower than that of the original two-dimensional image, and then photographing the target object at the same angle.
[0080] The high-exposure two-dimensional image can be a two-dimensional image with higher exposure than the original two-dimensional image. The high-exposure two-dimensional image can be obtained by using software capable of exposure processing to adjust the exposure of the original two-dimensional image, or the high-exposure two-dimensional image can be obtained by adjusting the camera parameters based on the camera parameters used to capture the original two-dimensional image, and then capturing the target object at the same angle.
[0081] In step S260, the Gaussian function gray value matrix of each high-exposure two-dimensional image is obtained by analyzing each high-exposure two-dimensional image.
[0082] In one embodiment, the Gaussian function gray value matrix G m of each high-exposure two-dimensional image is:
[0083] G m = [G m (x1,y1)...G m (x I ,y I )], m∈1,2,3...M
[0084]
[0085] g m (x i ,y i ) = 0.299R m,i + 0.587G m,i + 0.114B m,i
[0086]
[0087] G m (x1,y1) is the gray value of the first pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x1 is the coordinate value of the first pixel point in the x direction, y1 is the coordinate value of the first pixel point in the y direction, G m (x i ,y i ) is the gray value of the i-th pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x i is the coordinate value of the i-th pixel point in the x direction, y i is the coordinate value of the i-th pixel point in the y direction, G m (x I ,y I ) is the gray value of the I-th pixel point in the mth high-exposure two-dimensional image after Gaussian function processing, x I is the coordinate value of the I-th pixel point in the x direction, yI Let be the coordinates of the i-th pixel in the y-direction, m be the sequential number of the high-exposure 2D image, M be the number of high-exposure 2D images, and g be the coordinates of the i-th pixel in the y-direction. m (x i ,y i Let σ be the grayscale value of the i-th pixel in the m-th high-exposure 2D image. m,x Let σ be the standard deviation of the coordinates of the pixels in the x-direction of the m-th high-exposure 2D image. m,y Let μ be the standard deviation of the y-coordinate values of the pixels in the m-th high-exposure 2D image. m,x Let μ be the average coordinate value of the pixels in the x-direction of the m-th high-exposure 2D image. m,y Let R be the average y-coordinate of the pixels in the m-th high-exposure 2D image, where i is the sequential number of the pixel, I is the number of pixels, and R is the average y-coordinate of the pixels in the m-th high-exposure 2D image. m,i Let G be the red channel value of the i-th pixel in the m-th high-exposure 2D image. m,i Let B be the green channel value of the i-th pixel in the m-th high-exposure 2D image. m,i Let i be the blue channel value of the i-th pixel in the m-th high-exposure 2D image;
[0088] Step S280: Analyze each low-exposure two-dimensional image to obtain the Gaussian function grayscale value matrix of each low-exposure two-dimensional image.
[0089] In one embodiment, the Gaussian function grayscale matrix T of each low-exposure 2D image v for:
[0090] T v =[T v (x1,y1)...T v (x I ,y I )],v∈1,2,3...V
[0091]
[0092] t v (x i ,y i )=0.299R v,i +0.587G v,i +0.114B v,i
[0093]
[0094] Among them, T v(x1,y1) is the gray value of the first pixel point in the vth low-exposure two-dimensional image after Gaussian function processing, x1 is the coordinate value of the first pixel point in the x direction, y1 is the coordinate value of the first pixel point in the y direction, T v (x i ,y i ) is the gray value of the i-th pixel point in the vth low-exposure two-dimensional image after Gaussian function processing, x i is the coordinate value of the i-th pixel point in the x direction, y i is the coordinate value of the i-th pixel point in the y direction, T v (x I ,y I ) is the gray value of the I-th pixel point in the vth low-exposure two-dimensional image after Gaussian function processing, x I is the coordinate value of the I-th pixel point in the x direction, y I is the coordinate value of the I-th pixel point in the y direction, v is the sequential number of the low-exposure two-dimensional image, V is the number of low-exposure two-dimensional images, t v (x i ,y i ) is the gray value of the i-th pixel point in the vth low-exposure two-dimensional image, σ v,x is the standard deviation of the coordinate value of the pixel point in the x direction of the vth low-exposure two-dimensional image, σ v,y is the standard deviation of the coordinate value of the pixel point in the y direction of the vth low-exposure two-dimensional image, μ v,x is the average value of the coordinate value of the pixel point in the x direction of the vth low-exposure two-dimensional image, μ v,y is the average value of the coordinate value of the pixel point in the y direction of the vth low-exposure two-dimensional image, i is the sequential number of the pixel point, I is the number of pixel points, R v,i is the red channel value of the i-th pixel point in the vth low-exposure two-dimensional image, G v,i is the green channel value of the i-th pixel point in the vth low-exposure two-dimensional image, B v,i is the blue channel value of the i-th pixel point in the vth low-exposure two-dimensional image.
[0095] Step S300, according to the number of low-exposure two-dimensional images and high-exposure two-dimensional images, determine the corresponding fitting method to fit each Gaussian function gray value matrix, and obtain a new Gaussian function gray value matrix.
[0096] In one embodiment, according to the number of low-exposure two-dimensional images and high-exposure two-dimensional images, determine the corresponding fitting method to fit each Gaussian function gray value matrix, and obtain a new Gaussian function gray value matrix, comprising:
[0097] In the case that the total number of the low-exposure two-dimensional image and the high-exposure two-dimensional image is two, the Gaussian function fitting mode for two images is adopted to fit the Gaussian function gray value matrix, and a new Gaussian function gray value matrix is obtained.
[0098] In the case that the total number of the low-exposure two-dimensional image and the high-exposure two-dimensional image is three or more, the Gaussian function fitting mode for multiple images is adopted to fit the Gaussian function gray value matrix, and a new Gaussian function gray value matrix is obtained.
[0099] In one embodiment, the Gaussian function fitting mode for two images is as follows:
[0100] The Gaussian function gray value matrix of the high-exposure two-dimensional image and the Gaussian function gray value matrix of the low-exposure two-dimensional image are fitted to obtain a new Gaussian function gray value matrix, and the new Gaussian function gray value matrix P1 is as follows:
[0101] P1=[P1(x1,y1)...P1(x i ,y i )...P1(x I ,y I )]
[0102] P1(x i ,y i )=w1·G1(x i ,y i )+w2·T1(x i ,y i ),i∈1,2,3...I
[0103] wherein P1(x1,y1) is the gray value of the first pixel point after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, P1(x i ,y i ) is the gray value of the i-th pixel point after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, P1(x I ,y I ) is the gray value of the I-th pixel point after fitting of the high-exposure two-dimensional image and the low-exposure two-dimensional image, w1 is the weight coefficient of the high-exposure two-dimensional image, G1(x i ,y i ) is the gray value of the i-th pixel point in the first high-exposure two-dimensional image after Gaussian function processing, w2 is the weight coefficient of the low-exposure two-dimensional image, T1(x i ,y i ) is the gray value of the i-th pixel point in the first low-exposure two-dimensional image after Gaussian function processing, i is the serial number of the pixel point, and I is the number of pixel points.
[0104] Wherein, the weight coefficient w1 of high exposure two-dimensional image and the weight coefficient w2 of low exposure two-dimensional image must satisfy w1+w2=1, the more explicit weight relationship of w1 and w2 can be determined according to the required exposure and the relationship of gray value, if the exposure is more important, w1>w2, if the gray value is more important, w2>w1, in the case of equal absolute value in reducing exposure and increasing exposure adjustment, the weight relationship can be w1=w2.
[0105] In one embodiment, the Gaussian function fitting mode about multiple images is:
[0106] The Gaussian function gray value matrix of each high exposure two-dimensional image is fitted to obtain the fitted high exposure Gaussian function gray value matrix, the fitted high exposure Gaussian function gray value matrix G mix is:
[0107] G mix = [G mix (x1,y1)...G mix (x i ,y i )...G mix (x I ,y I )
[0108]
[0109] Wherein, G mix (x1,y1) is the gray value of the first pixel point of each high exposure two-dimensional image after fitting, G mix (x i ,y i ) is the gray value of the i-th pixel point of each high exposure two-dimensional image after fitting, G mix (x I ,y I ) is the gray value of the I-th pixel point of each high exposure two-dimensional image after fitting, M is the number of high exposure two-dimensional images, m is the order number of high exposure two-dimensional image, G m (x i ,y i ) is the gray value of the i-th pixel point of the m-th high exposure two-dimensional image after Gaussian function processing, i is the order number of pixel point, I is the number of pixel points;
[0110] The Gaussian function gray value matrix of each low exposure two-dimensional image is fitted to obtain the fitted low exposure Gaussian function gray value matrix, the fitted low exposure Gaussian function gray value matrix T mix is:
[0111] T mix = [T mix(x1,y1)...T mix (x i ,y i )...T mix (x I ,y I )]
[0112]
[0113] wherein, T mix (x1,y1) is the gray value of the first pixel point of each low exposure two-dimensional image after fitting, T mix (x i ,y i ) is the gray value of the i-th pixel point of each low exposure two-dimensional image after fitting, T mix (x I ,y I ) is the gray value of the I-th pixel point of each low exposure two-dimensional image after fitting, V is the number of low exposure two-dimensional images, v is the sequential number of the low exposure two-dimensional image, T v (x i ,y i ) is the gray value of the i-th pixel point of the v-th low exposure two-dimensional image after Gaussian function processing, i is the sequential number of the pixel point, and I is the number of pixel points;
[0114] The fitted high exposure Gaussian function gray value matrix and the fitted low exposure Gaussian function gray value matrix are fitted to obtain a new Gaussian function gray value matrix, and the new Gaussian function gray value matrix P2 is:
[0115] P2=[P2(x1,y1)...P2(x i ,y i )...P2(x I ,y I )]
[0116] P2(x i ,y i )=w1·G mix (x i ,y i )+w2·T mix (x i ,y i ), i∈1,2,3...I
[0117] wherein, P2(x1,y1) is the gray value of the first pixel point after fitting of the high exposure two-dimensional image and the low exposure two-dimensional image, P2(x i ,y i ) is the gray value of the i-th pixel point after fitting of the high exposure two-dimensional image and the low exposure two-dimensional image, and P2(x Iy I ) is the gray value of the i-th pixel point after fitting of the high-exposure two-dimensional image, w1 is the weight coefficient of the high-exposure two-dimensional image, G mix (x i ,y i ) is the gray value of the i-th pixel point after fitting of each high-exposure two-dimensional image, w2 is the weight coefficient of the low-exposure two-dimensional image, T mix (x i ,y i ) is the gray value of the i-th pixel point after fitting of each high-exposure two-dimensional image, i is the serial number of the pixel point, and I is the number of pixel points.
[0118] The weight coefficient w1 of the high-exposure two-dimensional image and the weight coefficient w2 of the low-exposure two-dimensional image must satisfy w1+w2=1 and w1:w2=M:V. More specific weight relationship of w1 and w2 can be determined according to the required exposure and the relationship of the gray value. If the exposure is more important, w1>w2; if the gray value is more important, w2>w1; in the case that the absolute values are equal in the adjustment of reducing the exposure and increasing the exposure, the weight relationship can be w1=w2.
[0119] In step S320, for the color space of RGB in the original two-dimensional image, it is converted into a gray color space to fit the gray value matrix of the original two-dimensional image.
[0120] In one embodiment, the gray value matrix P ori of the original two-dimensional image is as follows:
[0121] P ori = [P ori (x1,y1)... P ori (x i ,y i )... P ori (x I ,y I )]
[0122] P ori (x i ,y i ) = 0.299r ori,i + 0.587G ori,i + 0.114P ori,i , i∈1,2,3...I
[0123] wherein P ori (x1,y1) is the gray value of the first pixel point in the original two-dimensional image, P ori (x i ,y i ) is the gray value of the i-th pixel point in the original two-dimensional image, and i is the serial number of the pixel point.) is a gray value of the i-th pixel point in the original two-dimensional image, P ori (x I ,y I ) is a gray value of the i-th pixel point in the original two-dimensional image, R ori,i is a red channel value of the i-th pixel point in the original two-dimensional image, G ori,i is a green channel value of the i-th pixel point in the original two-dimensional image, B ori,i is a blue channel value of the i-th pixel point in the original two-dimensional image, i is a sequential number of the pixel point, and I is a pixel point number.
[0124] In step S340, convolution is performed according to the gray value matrix of the original two-dimensional image and the new Gaussian function gray value matrix to obtain a transition gray value matrix.
[0125] In one embodiment, the transition gray value matrix R is:
[0126] R = [R(x1,y1)...R(x i ,y i )...R(x I ,y I )]
[0127]
[0128] wherein R(x1,y1) is a gray value of the first pixel point in the transition gray value matrix, R(x i ,y i ) is a gray value of the i-th pixel point in the transition gray value matrix, and R(x I ,y I ) is a gray value of the I-th pixel point in the transition gray value matrix; k1 represents a value of a half of a radius in a horizontal direction of a convolution kernel, k2 represents a value of a half of a radius in a vertical direction of the convolution kernel, P(p,q) represents a gray value of a pixel point with coordinates (p,q), P ori (x i +p,y i +q) represents a value obtained by performing Gaussian function operation on a pixel point with coordinates (x i +p,y i +q), i is a sequential number of the pixel point, and I is a pixel point number. represents rounding down, N1 represents a total number of rows in the new Gaussian function gray value matrix P, and N2 represents a total number of columns in the new Gaussian function gray value matrix P.
[0129] In step S360, the transition gray value matrix is analyzed to obtain a final edge point matrix.
[0130] In one embodiment, the transition gray value matrix is analyzed to obtain a final edge point matrix, including:
[0131] The transition gray value matrix is operated using a Laplace operator to obtain an operated matrix L;
[0132] The operated matrix L is subjected to zero-crossing point detection to obtain an edge point matrix J;
[0133] The edge points in the edge point matrix J are suppressed using a non-maximum suppression algorithm to determine a new edge point matrix J new ;
[0134] The new edge point matrix is subjected to bilinear interpolation processing to obtain a final edge point matrix J'.
[0135] In one embodiment, the operated matrix L is:
[0136] L = [L(x1, y1)...L(x i ,y i )...L(x I ,y I )]
[0137]
[0138] wherein L(x1, y1) is a pixel value after the action of the first pixel point Laplace operator, L(x i ,y i ) is a pixel value after the action of the i-th pixel point Laplace operator, L(x I ,y I ) is a pixel value after the action of the I-th pixel point Laplace operator, R(x i ,y i ) is a gray value of the i-th pixel point in the transition gray value matrix, i is the serial number of the pixel point, and I is the number of pixel points; the matrix L is subjected to zero-crossing point detection to obtain an edge point matrix J.
[0139] In one embodiment, the edge points in the edge point matrix J are suppressed using a non-maximum suppression algorithm to determine a new edge point matrix J new , including:
[0140] The Sobel operator is applied to the transition gray value matrix R to perform convolution operation to obtain a horizontal direction gradient amplitude matrix F x and a vertical direction gradient amplitude matrix F y , and the horizontal direction gradient amplitude matrix F x and the vertical direction gradient amplitude matrix F y are used to calculate the gradient amplitude F(x i,y i The gradient magnitude F(x) of each pixel i ,y i )for:
[0141]
[0142] Among them, F x (x i ,y i F is the gradient magnitude matrix in the horizontal direction. x The magnitude of the i-th gradient, F y (x i ,y i F is the gradient magnitude matrix in the vertical direction. y The magnitude of the i-th gradient;
[0143] Based on the gradient magnitude matrix F in the horizontal direction x and the gradient magnitude matrix F in the vertical direction y Calculate the gradient direction θ(x) of each pixel. i ,y i ), the gradient direction θ(x) of each pixel i ,y i )for:
[0144]
[0145] Based on the gradient magnitude F(x) of each pixel i ,y i ) and the gradient direction θ(x) of each pixel i ,y i Non-maximum suppression is performed to obtain a new edge point matrix J. new .
[0146] In one embodiment, based on the gradient magnitude F(x) of each pixel i ,y i ) and the gradient direction θ(x) of each pixel i ,y i Non-maximum suppression is performed to obtain a new edge point matrix J. new ,include:
[0147] For each pixel (x) i ,y i If F(x) i ,y i ) is along the direction θ(x) i ,y i If the local maximum value of ) is found, then J(x) is retained. i ,y i ) as an edge point, otherwise, suppress J(x)i y i ) set it as a non-edge point.
[0148] Step S380, three-dimensional reconstruction is performed according to the edge points in the final edge point matrix, and a three-dimensional model of the target object is obtained.
[0149] The three-dimensional reconstruction method based on multi-exposure image edge detection described above, by using a camera to shoot a raw two-dimensional image of a target object, based on the raw two-dimensional image, at least one low-exposure two-dimensional image with lower exposure than the raw two-dimensional image and at least one high-exposure two-dimensional image with higher exposure than the raw two-dimensional image are obtained, each high-exposure two-dimensional image is analyzed to obtain a Gaussian function gray value matrix of each high-exposure two-dimensional image, each low-exposure two-dimensional image is analyzed to obtain a Gaussian function gray value matrix of each low-exposure two-dimensional image, the number of low-exposure two-dimensional images and high-exposure two-dimensional images is determined to determine the corresponding fitting method to fit each Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix, for the color space of RGB in the raw two-dimensional image, it is converted into a gray color space to fit the gray value matrix of the raw two-dimensional image, the raw two-dimensional image gray value matrix and the new Gaussian function gray value matrix are convolved to obtain a transition gray value matrix, the transition gray value matrix is analyzed to obtain a final edge point matrix, three-dimensional reconstruction is performed according to the edge points in the final edge point matrix, and a three-dimensional model of the target object is obtained. Thus, the Gaussian function gray value matrix of the gray value of the multi-exposure image is fitted again with the gray value matrix of the raw two-dimensional image, the characteristics of high tolerance and wide range of multi-exposure image gray value are used to effectively combine the advantages of multi-exposure image gray value fitting and edge detection structural feature point extraction method, the high dependence of edge detection structural feature point extraction on gray value matrix is used to ensure that the number and accuracy of structural feature points are improved on the basis of the original feature point extraction, thereby improving the accuracy of three-dimensional reconstruction.
[0150] Further, the three-dimensional reconstruction method based on multi-exposure image edge detection described above uses non-maximum suppression algorithm and bidirectional interpolation for the feature points extracted by the edge detection structure, which further effectively improves the inherent problems of low accuracy and high noise of the edge detection structural feature points.
[0151] It should be understood that, although Figure 1 the steps in the flowchart of the above method are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figure 1At least one of the steps in the above embodiments can include a plurality of sub-steps or a plurality of stages, which are not necessarily executed at the same time, but can be executed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or at least a part of the sub-steps or stages of other steps.
[0152] The technical features of the above embodiments can be combined in any manner. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described, but it is understood that any combination of the technical features is within the scope of the present disclosure as long as there is no contradiction.
[0153] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these are within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A three-dimensional reconstruction method based on edge detection of multi-exposure images, characterized in that, The method includes: The target object is photographed using a camera to obtain the original two-dimensional image; Based on the original two-dimensional image, at least one low-exposure two-dimensional image with a lower exposure than the original two-dimensional image and at least one high-exposure two-dimensional image with a higher exposure than the original two-dimensional image are obtained. Based on the analysis of each high-exposure two-dimensional image, the Gaussian function gray value matrix of each high-exposure two-dimensional image is obtained; The Gaussian function grayscale matrix of each low-exposure two-dimensional image is obtained by analyzing each low-exposure two-dimensional image. Based on the number of low-exposure 2D images and high-exposure 2D images, determine the corresponding fitting method and fit each Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix. For the original two-dimensional image The color space is converted to gray color space to fit the gray value matrix of the original two-dimensional image; The gray value matrix of the original two-dimensional image and the gray value matrix of the new Gaussian function are convolved to obtain the transition gray value matrix after convolution; the transition gray value matrix is analyzed to obtain the final edge point matrix; and three-dimensional reconstruction is performed based on the final edge point matrix to obtain the three-dimensional model of the target object. The transition grayscale value matrix for: , , , , ; in, The first gray value in the transition gray value matrix The grayscale value of each pixel; This represents the value of half the radius of the convolution kernel in the horizontal direction. This represents the value of half the radius of the convolution kernel in the vertical direction. Indicates coordinates as The grayscale value of the pixel, Indicates coordinates as The value obtained by performing a Gaussian function operation on the pixels. The pixels are numbered sequentially. The number of pixels; Indicates rounding down. Represents the new Gaussian function grayscale matrix The total number of Bank of China, Represents the new Gaussian function grayscale matrix The total number of columns in the middle.
2. The method according to claim 1, characterized in that, The Gaussian function gray value matrix of each high-exposure 2D image and the Gaussian function gray value matrix of each low-exposure 2D image are obtained by calculating the gray values of the 2D images using the Gaussian function. The Gaussian function gray value matrix of the high-exposure 2D image is further described below. The calculation process is shown in the following formula: , , , , , , in, For the first In the high-exposure two-dimensional image, the first The grayscale value of each pixel after processing with a Gaussian function For the first Pixels in Coordinates in direction, For the first Pixels in Coordinates in direction, The sequential numbering of the high-exposure two-dimensional images. The number of high-exposure 2D images. For the first In the high-exposure two-dimensional image, the first The grayscale value of each pixel For the first The pixels of a high-exposure two-dimensional image are in Standard deviation of coordinate values in the direction, For the first The pixels of a high-exposure two-dimensional image are in Standard deviation of coordinate values in the direction, For the first The pixels of a high-exposure two-dimensional image are in The average coordinate value in the direction, For the first The pixels of a high-exposure two-dimensional image are in The average coordinate value in the direction, The pixels are numbered sequentially. The number of pixels. For the first In the high-exposure two-dimensional image, the first The red channel value of each pixel For the first In the high-exposure two-dimensional image, the first The green channel value of each pixel For the first In the high-exposure two-dimensional image, the first The blue channel value of each pixel; Similarly, the Gaussian function grayscale matrix of a low-exposure two-dimensional image The calculation process is shown in the following formula: , , , , , , in, For the first In a low-exposure two-dimensional image, the first The grayscale value of each pixel after processing with a Gaussian function For the first Pixels in Coordinates in direction, For the first Pixels in Coordinates in direction, The sequential numbering of the low-exposure 2D images. The number of low-exposure 2D images. For the first In a low-exposure two-dimensional image, the first The grayscale value of each pixel For the first The pixels of a low-exposure 2D image Standard deviation of coordinate values in the direction, For the first The pixels of a low-exposure 2D image Standard deviation of coordinate values in the direction, For the first The pixels of a low-exposure 2D image The average coordinate value in the direction, For the first The pixels of a low-exposure 2D image The average coordinate value in the direction, The pixels are numbered sequentially. The number of pixels. For the first In a low-exposure two-dimensional image, the first The red channel value of each pixel For the first In a low-exposure two-dimensional image, the first The green channel value of each pixel For the first In a low-exposure two-dimensional image, the first The blue channel value of each pixel.
3. The method according to claim 1, characterized in that, The step of determining the corresponding fitting method based on the number of low-exposure 2D images and high-exposure 2D images, and fitting each Gaussian function gray value matrix accordingly to obtain a new Gaussian function gray value matrix includes: When the total number of low-exposure two-dimensional images and high-exposure two-dimensional images is two, a Gaussian function fitting method is used to fit each Gaussian function gray value matrix to obtain a new Gaussian function gray value matrix. When the total number of low-exposure 2D images and high-exposure 2D images is three or more, a Gaussian function fitting method is used to fit the gray value matrix of each Gaussian function to obtain a new Gaussian function gray value matrix. The Gaussian function fitting method for the two images is as follows: A new Gaussian function gray value matrix is obtained by fitting the Gaussian function gray value matrix of the high-exposure 2D image and the low-exposure 2D image. for: , , , in, The first two-dimensional image is the result of fitting the high-exposure two-dimensional image and the low-exposure two-dimensional image. The grayscale value of each pixel The weighting coefficients for high-exposure 2D images. For the first high-exposure two-dimensional image, the first... The grayscale value of each pixel after processing with a Gaussian function These are the weighting coefficients for low-exposure 2D images. For the first low-exposure two-dimensional image, the first... The grayscale value of each pixel after processing with a Gaussian function The pixels are numbered sequentially. The number of pixels. The Gaussian function fitting method for multiple images is as follows: The Gaussian function grayscale value matrix of each high-exposure two-dimensional image is fitted to obtain the fitted high-exposure Gaussian function grayscale value matrix. for: , , , in, For each fitted high-exposure 2D image The grayscale value of each pixel The number of high-exposure 2D images. The sequential numbering of the high-exposure two-dimensional images. For the first In the high-exposure two-dimensional image, the first The grayscale value of each pixel after processing with a Gaussian function The pixels are numbered sequentially. The number of pixels; The Gaussian function gray value matrix of each low-exposure 2D image is fitted to obtain the fitted low-exposure Gaussian function gray value matrix. for: , , , in, The fitted second image of each low-exposure 2D image The grayscale value of each pixel The number of low-exposure 2D images. The sequential numbering of the low-exposure 2D images. For the first In a low-exposure two-dimensional image, the first The grayscale value of each pixel after processing with a Gaussian function The pixels are numbered sequentially. The number of pixels; The fitted high-exposure Gaussian function grayscale matrix is fitted to the fitted low-exposure Gaussian function grayscale matrix to obtain a new Gaussian function grayscale matrix. for: , , , in, The first two-dimensional image is the result of fitting the high-exposure two-dimensional image and the low-exposure two-dimensional image. The grayscale value of each pixel The weighting coefficients for high-exposure 2D images. The fitted second high-exposure 2D image The grayscale value of each pixel These are the weighting coefficients for low-exposure 2D images. The fitted second high-exposure 2D image The grayscale value of each pixel The pixels are numbered sequentially. The number of pixels.
4. The method according to claim 1, characterized in that, The grayscale matrix of the original two-dimensional image for: , , , in, The first in the original two-dimensional image The grayscale value of each pixel The first in the original two-dimensional image The red channel value of each pixel The first in the original two-dimensional image The green channel value of each pixel The first in the original two-dimensional image The blue channel value of each pixel The pixels are numbered sequentially. The number of pixels.
5. The method according to claim 1, characterized in that, The step of analyzing the transition grayscale value matrix to obtain the final edge point matrix includes: The Laplacian operator is used to operate on the transition grayscale value matrix to obtain the processed matrix. : , , , in, For the first The pixel value after applying the Laplacian operator to each pixel. The first gray value in the transition gray value matrix The grayscale value of each pixel The pixels are numbered sequentially. The number of pixels; for the matrix Perform zero-crossing detection to obtain the edge point matrix. ; For the transition grayscale matrix application The operator performs a convolution operation to obtain the gradient magnitude matrix in the horizontal direction. and the gradient magnitude matrix in the vertical direction And using the gradient magnitude matrix in the horizontal direction. and the gradient magnitude matrix in the vertical direction Calculate the gradient magnitude of each pixel. The gradient magnitude of each pixel for: , in, The gradient magnitude matrix in the horizontal direction The Middle Each gradient magnitude, The gradient magnitude matrix in the vertical direction The Middle Each gradient magnitude; Based on the gradient magnitude matrix in the horizontal direction and the gradient magnitude matrix in the vertical direction Calculate the gradient direction of each pixel. gradient direction of each pixel for: , Based on the gradient magnitude of each pixel and the gradient direction of each pixel Non-maximum suppression is performed to obtain a new edge point matrix. ; Perform bilinear interpolation on the new edge point matrix to obtain the final edge point matrix. .
Citation Information
Patent Citations
Operating a device to capture high dynamic range images
CN103069453A
Batch fuzzy identifier reconstruction method based on deformable convolution
CN116796773A