Light field data acquisition and processing method based on artificial intelligence
Through the light field data acquisition and processing method based on artificial intelligence, the spherical light source array and nonlinear fitting algorithm are used to solve the problems of standardization and noise sensitivity in surface normal vector calculation, and efficient and accurate surface normal vector calculation is achieved.
Patent Information
- Application Number
- CN202510199437.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-24
AI Technical Summary
The prior art lacks unified data processing standards in surface normal vector calculation, and the calculation process is complex and noise-sensitive, resulting in low computing efficiency and poor accuracy.
Using the light field data acquisition and processing method based on artificial intelligence, the spherical light source array system is used to illuminate the object to be measured in the three-dimensional coordinate space, and the camera is used to capture images under different lighting conditions, perform numerical preprocessing and vector conversion, and fit the surface normal vectors in combination with a nonlinear fitting algorithm.
It realizes accurate and efficient calculation of surface normal vectors, provides standardized data processing methods, reduces noise interference, and improves calculation efficiency.
Smart Images

Figure CN119693580B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of big data analysis, and in particular to a method for collecting and processing light field data based on artificial intelligence. Background Art
[0002] In the field of computer modeling, obtaining the surface normal vector of the modeled object in the actual space is of great significance for the rendering of the model. The existing technology calculates the surface normal vector by analyzing the image data of the object under different lighting conditions. However, the existing method has the following problems: first, the existing method does not standardize the data acquisition conditions, resulting in a lack of unified data processing standards for solving the surface normal vector; second, the data processing process of the existing method is complex and the calculation efficiency is low; third, the existing method is extremely sensitive to the noise of the input data, resulting in inaccurate calculation of the surface normal vector.
[0003] In recent years, with the rapid development of big data technology, it has become possible to obtain and process massive amounts of real-scene data. This provides a new idea for surface normal vector calculation, that is, using the statistical laws and prior knowledge of big data to improve the accuracy and efficiency of normal vector calculation. Big data analysis ideas that can be used include data-driven learning methods based on artificial intelligence, that is, by learning data and surface normal vector samples under different lighting conditions, extracting the correlation between data features and surface normal vectors, and inputting the actual measured data into the correlation to obtain the calculated value of the surface normal vector. This method can effectively reduce the interference of data noise, improve computational efficiency, and provide a standardized data processing method for the calculation of surface normal vectors.
[0004] Therefore, it is urgent to introduce big data analysis technology to transform the surface normal vector calculation method from the traditional model-based method to a data-driven method, so as to better adapt to the needs of efficient and accurate calculations and provide more accurate surface geometry information for modeling. Summary of the invention
[0005] (1) Technical issues to be resolved
[0006] The purpose of the present invention is to provide a light field data acquisition and processing method based on artificial intelligence to achieve accurate and efficient calculation of the surface normal vector of an object.
[0007] (2) Technical solution
[0008] To achieve the above object, the present invention provides a light field data acquisition and processing method based on artificial intelligence, the method comprising the following steps:
[0009] S1, placing a pre-constructed spherical light source array system in a pre-set three-dimensional coordinate space; the three-dimensional coordinate space includes mutually perpendicular X-axis, Y-axis and Z-axis; the X-axis, Y-axis and Z-axis intersect at the origin; the geometric center of the spherical light source array system coincides with the origin of the three-dimensional coordinate space; the spherical light source array system includes a spherical bracket and a light source group installed on the spherical bracket, the light source group includes a first light source, a second light source, a third light source, and a fourth light source; the fourth light source is installed at the vertex of the spherical bracket, and the first light source, the second light source, and the third light source are installed at orthogonal positions of the spherical bracket.
[0010] S2, placing the object to be tested at the origin, and making the ambient light illumination 0 lux, respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination, to obtain first to fourth illumination conditions; using a camera rigidly fixed to the surface of the object to be tested, respectively capture two-dimensional images of the object to be tested under the first to fourth illumination conditions, to obtain first to fourth illumination images.
[0011] S3, performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain the first illumination numerical array to the fourth illumination numerical array; and obtaining the first vector by calculating the first illumination numerical array to the fourth illumination numerical array through a vector conversion formula.
[0012] S4, performing space mapping on the first vector to obtain a surface normal vector.
[0013] Further, the method of installing the fourth light source at the vertex of the spherical bracket, and installing the first light source, the second light source, and the third light source at orthogonal positions of the spherical bracket includes:
[0014] The fourth light source is installed at the vertex of the spherical bracket; the first light source is installed at the intersection of the spherical bracket and the X-axis; the second light source is installed at the intersection of the spherical bracket and the Y-axis; and the third light source is installed at the intersection of the spherical bracket and the Z-axis.
[0015] The luminous intensity of the first light source in the X-axis direction is a preset first luminous intensity; the luminous intensity of the first light source in the Y-axis direction is a preset second luminous intensity; the luminous intensity of the first light source in the Z-axis direction is a preset second luminous intensity; the luminous intensity of the second light source in the X-axis direction is the preset second luminous intensity; the luminous intensity of the second light source in the Y-axis direction is the preset first luminous intensity; the luminous intensity of the second light source in the Z-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the X-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the Y-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the Z-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the X-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the Y-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the Z-axis direction is the preset first luminous intensity.
[0016] The first luminous intensity and the second luminous intensity satisfy a light convergence condition; the light convergence condition is:
[0017] ;
[0018] in, Indicates the first luminous intensity, in candela; Indicates the second luminous intensity in candela; is the preset proportionality factor, The value of is greater than 1.
[0019] Furthermore, the method of placing the object to be measured at the origin, making the ambient light illumination 0 lux, and respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination to obtain the first to fourth illumination conditions includes:
[0020] The spherical bracket is placed in an environment where the ambient light illumination is 0 lux; the object to be measured is placed inside the spherical bracket so that the center of the object to be measured coincides with the origin.
[0021] Start the first light source, and turn off the second, third and fourth light sources to obtain the first lighting condition; start the second light source, and turn off the first, third and fourth light sources to obtain the second lighting condition; start the third light source, and turn off the first, second and fourth light sources to obtain the third lighting condition; start the fourth light source, and turn off the first, second and third light sources to obtain the fourth lighting condition.
[0022] Furthermore, the method of performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain the first illumination value array to the fourth illumination value array includes:
[0023] The first illumination image to the fourth illumination image are respectively divided into a predetermined number of horizontal divisions. and the number of vertical splits Divide into image grids to obtain first to fourth image grid groups; calculate the color values of pixels in the first to fourth image grid groups, and aggregate them to obtain first to fourth color value arrays.
[0024] A grayscale conversion algorithm is used to convert the first color value array to the fourth color value array into a first illumination value array to a fourth illumination value array.
[0025] Furthermore, the method of calculating the color values of pixels in the first image grid group to the fourth image grid group and aggregating them to obtain the first color value array to the fourth color value array includes:
[0026] Get the pixel height from the first illumination image to the fourth illumination image and pixel width ; respectively for the first illumination image to the fourth illumination image The pixels are numbered; the first illumination image to the fourth illumination image are pixel-decomposed to obtain pixels; The calculation formula is:
[0027] ;
[0028] Calculate using image processing algorithms The RGB color value of each pixel is obtained The R value, G value and B value of each pixel point in the first image grid group to the fourth image grid group are averaged to obtain the first color value array to the fourth color value array; The color value array is represented as:
[0029] ;
[0030] in, Indicates color value array; Indicates Image grid group Line The average R value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the G value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the B value of the pixels in the image grid of the column; is an integer variable with a value from 1 to 4; The value range is 1 to integer variable of ; The value range is 1 to An integer variable.
[0031] Furthermore, the method of converting the first color value array to the fourth color value array into the first illumination value array to the fourth illumination value array using the grayscale conversion algorithm includes:
[0032] According to the first color value array to the fourth color value array, the first illumination value array to the fourth illumination value array are calculated using the weighted average brightness formula; wherein the first The array of lighting values is represented as:
[0033] ;
[0034] in, Indicates An array of lighting values, Indicates The first Line Elements of a column.
[0035] The weighted average brightness formula is:
[0036] .
[0037] Furthermore, the method of calculating the first vector by a vector conversion formula according to the first illumination value array to the fourth illumination value array includes:
[0038] According to the first illumination value array to the fourth illumination value array, a first vector is calculated by a vector conversion formula; the vector conversion formula is:
[0039] ;
[0040] in, represents the first vector, represents the unit vector in the direction of the X axis, Represents the unit vector in the Y-axis direction, A unit vector representing the direction of the Z axis.
[0041] Furthermore, the method of performing spatial mapping on the first vector to obtain a surface normal vector includes:
[0042] According to the first vector, a second vector is calculated using a normalization formula; the normalization formula is:
[0043] ;
[0044] in, Represents the second vector.
[0045] The projection of the second vector on the X-axis is recorded as , the projection of the second vector on the Y axis is recorded as , the projection of the second vector on the Z axis is recorded as .
[0046] According to the preset sample library, a nonlinear fitting algorithm is used to fit the mapping relationship between the surface normal vector and the second vector, which is recorded as the first function; the surface normal vector is calculated according to the first function and the second vector; the calculation formula of the surface normal vector is:
[0047] ;
[0048] in, represents the surface normal vector, represents the first function.
[0049] Furthermore, the method of fitting the mapping relationship between the surface normal vector and the second vector using a nonlinear fitting algorithm according to a preset sample library, which is recorded as a first function, includes:
[0050] Obtain a preset sample library; the sample library is recorded as:
[0051] ;
[0052] in, Represents a sample library; Indicates sample; For the The first element of the sample; For the The second element of the sample indicates that the value of the second vector is The surface normal vector value of the object to be measured is taken at this time; The value range is 1 to integer variable of ; Indicates the sample size.
[0053] Respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to ; respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to .
[0054] according to to , to , to , to , to , to Establish fitting sample points; the fitting sample points are expressed as:
[0055] ;
[0056] According to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the X-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Y-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Z-axis mapping function.
[0057] The first function is calculated by using a function synthesis formula according to the X-axis mapping function, the Y-axis mapping function, and the Z-axis mapping function; the function synthesis formula is:
[0058] ;
[0059] in, represents the X-axis mapping function, represents the Y-axis mapping function, Represents the Z-axis mapping function.
[0060] (3) Beneficial effects
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] By processing and transforming the first illumination image to the fourth illumination image, accurate and efficient calculation of the surface normal vector is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a flowchart of a light field data acquisition and processing method based on artificial intelligence according to Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0065] Before giving examples, it is necessary to explain the application scenarios of the present invention. The present invention is used to calculate the surface normal vector of the object to be measured, thereby providing a data basis for rendering the 3D model of the object to be measured.
[0066] Example 1: Figure 1 As shown, this embodiment provides a light field data acquisition and processing method based on artificial intelligence, and the method includes the following steps:
[0067] S1, placing a pre-constructed spherical light source array system in a pre-set three-dimensional coordinate space; the three-dimensional coordinate space includes mutually perpendicular X-axis, Y-axis and Z-axis; the X-axis, Y-axis and Z-axis intersect at the origin; the geometric center of the spherical light source array system coincides with the origin of the three-dimensional coordinate space; the spherical light source array system includes a spherical bracket and a light source group installed on the spherical bracket, the light source group includes a first light source, a second light source, a third light source, and a fourth light source; the fourth light source is installed at the vertex of the spherical bracket, and the first light source, the second light source, and the third light source are installed at orthogonal positions of the spherical bracket.
[0068] Exemplarily, the radius of the spherical bracket is 3 meters.
[0069] S2, placing the object to be tested at the origin, and making the ambient light illumination 0 lux, respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination, to obtain first to fourth illumination conditions; using a camera rigidly fixed to the surface of the object to be tested, respectively capture two-dimensional images of the object to be tested under the first to fourth illumination conditions, to obtain first to fourth illumination images.
[0070] Exemplarily, the object to be tested is a face model. The surface color of the object to be tested is white, that is, the RGB color value is R=255, G=255, B=255. The face model has completed the construction of a face simulation 3D model in the three-dimensional modeling software Autodesk Maya. The purpose of this embodiment is to calculate the surface normal vector of the face model in the real scene, and render the face simulation 3D model based on the surface normal vector to obtain a face simulation 3D rendering model that conforms to the law of optical physics. The face model is placed at the origin so that the center of the face model coincides with the origin, and the orientation of the face model is pre-set according to the rendering requirements. The three-dimensional coordinate space is placed in an environment with an ambient light illumination of 0 lux, and the first light source, the second light source, the third light source, and the fourth light source are respectively started for irradiation to obtain the first lighting condition to the fourth lighting condition. The two-dimensional images of the face model under the first lighting condition to the fourth lighting condition are captured by a camera rigidly fixed to the surface of the face model, respectively, to obtain the first lighting image to the fourth lighting image. The camera is connected to the face model via a vertical bracket mounted on the face model surface. One end of the vertical bracket is fixed to the center of the face model, and the other end of the vertical bracket is rigidly connected to the camera. The length of the vertical bracket is equal to one tenth of the radius of the spherical bracket. The lens of the camera is aimed at the face model surface, and the face model surface that can be photographed by the camera is recorded as the face model positive surface, and the face model surface that cannot be photographed by the camera is recorded as the face model negative surface.
[0071] S3, performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain the first illumination numerical array to the fourth illumination numerical array; and obtaining the first vector by calculating the first illumination numerical array to the fourth illumination numerical array through a vector conversion formula.
[0072] S4, performing space mapping on the first vector to obtain a surface normal vector.
[0073] Exemplarily, the surface normal vector is a normal vector pointing from the negative surface of the face model to the positive surface of the face model. The surface normal vector is input into the 3D modeling software Autodesk Maya to render the pre-built face simulation 3D model, and obtain a face simulation 3D rendering model that conforms to the laws of optical physics.
[0074] Further, the method of installing the fourth light source at the vertex of the spherical bracket, and installing the first light source, the second light source, and the third light source at orthogonal positions of the spherical bracket includes:
[0075] The fourth light source is installed at the vertex of the spherical bracket; the first light source is installed at the intersection of the spherical bracket and the X-axis; the second light source is installed at the intersection of the spherical bracket and the Y-axis; and the third light source is installed at the intersection of the spherical bracket and the Z-axis.
[0076] The luminous intensity of the first light source in the X-axis direction is a preset first luminous intensity; the luminous intensity of the first light source in the Y-axis direction is a preset second luminous intensity; the luminous intensity of the first light source in the Z-axis direction is a preset second luminous intensity; the luminous intensity of the second light source in the X-axis direction is the preset second luminous intensity; the luminous intensity of the second light source in the Y-axis direction is the preset first luminous intensity; the luminous intensity of the second light source in the Z-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the X-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the Y-axis direction is the preset second luminous intensity; the luminous intensity of the third light source in the Z-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the X-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the Y-axis direction is the preset first luminous intensity; the luminous intensity of the fourth light source in the Z-axis direction is the preset first luminous intensity.
[0077] The first luminous intensity and the second luminous intensity satisfy a light convergence condition; the light convergence condition is:
[0078] ;
[0079] in, Indicates the first luminous intensity, in candela; Indicates the second luminous intensity in candela; is the preset proportionality factor, The value of is greater than 1.
[0080] Exemplarily, the first light source, the second light source, and the third light source are narrow beam angle LED lamps, and the fourth light source is composed of three wide beam angle LED lamps. The preset first luminous intensity is 700 candela, the preset proportionality factor is 9, and the preset second luminous intensity is 70 candela.
[0081] Furthermore, the method of placing the object to be measured at the origin, making the ambient light illumination 0 lux, and respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination to obtain the first to fourth illumination conditions includes:
[0082] The spherical bracket is placed in an environment where the ambient light illumination is 0 lux; the object to be measured is placed inside the spherical bracket so that the center of the object to be measured coincides with the origin.
[0083] Start the first light source, and turn off the second, third and fourth light sources to obtain the first lighting condition; start the second light source, and turn off the first, third and fourth light sources to obtain the second lighting condition; start the third light source, and turn off the first, second and fourth light sources to obtain the third lighting condition; start the fourth light source, and turn off the first, second and third light sources to obtain the fourth lighting condition.
[0084] Furthermore, the method of performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain the first illumination value array to the fourth illumination value array includes:
[0085] The first illumination image to the fourth illumination image are respectively divided into a predetermined number of horizontal divisions. and the number of vertical splits Divide into image grids to obtain first to fourth image grid groups; calculate the color values of pixels in the first to fourth image grid groups, and aggregate them to obtain first to fourth color value arrays.
[0086] A grayscale conversion algorithm is used to convert the first color value array to the fourth color value array into a first illumination value array to a fourth illumination value array.
[0087] For example, the preset number of horizontal divisions is , the number of vertical divisions . Divide the first illumination image into image grids to obtain the first image grid group. Divide the second illumination image into image grids to obtain the second image grid group. Divide the third illumination image into image grids to obtain the third image grid group. Divide the fourth illumination image into image grids to obtain a fourth image grid group.
[0088] Furthermore, the method of calculating the color values of pixels in the first image grid group to the fourth image grid group and aggregating them to obtain the first color value array to the fourth color value array includes:
[0089] Get the pixel height from the first illumination image to the fourth illumination image and pixel width ; respectively for the first illumination image to the fourth illumination image The pixels are numbered; the first illumination image to the fourth illumination image are pixel-decomposed to obtain pixels; The calculation formula is:
[0090] ;
[0091] Exemplarily, the pixel heights of the first illumination image to the fourth illumination image are obtained. , pixel width . For the first to fourth illumination images respectively The pixels are numbered. The first to fourth illumination images are decomposed into pixels to obtain Pixels.
[0092] Calculate using image processing algorithms The RGB color value of each pixel is obtained The R value, G value and B value of each pixel point in the first image grid group to the fourth image grid group are averaged to obtain the first color value array to the fourth color value array; The color value array is represented as:
[0093] ;
[0094] in, Indicates color value array; Indicates Image grid group Line The average R value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the G value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the B value of the pixels in the image grid of the column; is an integer variable with a value from 1 to 4; The value range is 1 to integer variable of ; The value range is 1 to An integer variable.
[0095] Exemplarily, the first to fourth illumination images are input into the Python Pillow image processing library, and the calculation The RGB color value of each pixel is obtained The R value, G value and B value of each pixel point. The R value, G value and B value of each pixel point falling into the first image grid group to the fourth image grid group are averaged to obtain the first color value array to the fourth color value array. Taking the first color value array as an example, the first color value array is:
[0096]
[0097] Furthermore, the method of converting the first color value array to the fourth color value array into the first illumination value array to the fourth illumination value array using the grayscale conversion algorithm includes:
[0098] According to the first color value array to the fourth color value array, the first illumination value array to the fourth illumination value array are calculated using the weighted average brightness formula; wherein the first The array of lighting values is represented as:
[0099] ;
[0100] in, Indicates An array of lighting values, Indicates The first Line Elements of a column.
[0101] The weighted average brightness formula is:
[0102] .
[0103] Exemplarily, the first illumination value array is calculated as:
[0104] .
[0105] Furthermore, the method of calculating the first vector by a vector conversion formula according to the first illumination value array to the fourth illumination value array includes:
[0106] According to the first illumination value array to the fourth illumination value array, a first vector is calculated by a vector conversion formula; the vector conversion formula is:
[0107] ;
[0108] in, represents the first vector, represents the unit vector in the direction of the X axis, Represents the unit vector in the Y-axis direction, A unit vector representing the direction of the Z axis.
[0109] Exemplarily, the first vector is calculated as:
[0110] .
[0111] Furthermore, the method of performing spatial mapping on the first vector to obtain a surface normal vector includes:
[0112] According to the first vector, a second vector is calculated using a normalization formula; the normalization formula is:
[0113] ;
[0114] in, Represents the second vector.
[0115] The projection of the second vector on the X-axis is recorded as , the projection of the second vector on the Y axis is recorded as , the projection of the second vector on the Z axis is recorded as .
[0116] Exemplarily, the second vector is calculated as:
[0117]
[0118] Get the projection of the second vector on the X axis , the projection of the second vector on the Y axis , the projection of the second vector on the Z axis .
[0119] According to the preset sample library, a nonlinear fitting algorithm is used to fit the mapping relationship between the surface normal vector and the second vector, which is recorded as the first function; the surface normal vector is calculated according to the first function and the second vector; the calculation formula of the surface normal vector is:
[0120] ;
[0121] in, represents the surface normal vector, represents the first function.
[0122] Exemplarily, the surface normal vector is calculated as:
[0123] .
[0124] Furthermore, the method of fitting the mapping relationship between the surface normal vector and the second vector using a nonlinear fitting algorithm according to a preset sample library, which is recorded as a first function, includes:
[0125] Obtain a preset sample library; the sample library is recorded as:
[0126] ;
[0127] in, Represents a sample library; Indicates sample; For the The first element of the sample; For the The second element of the sample indicates that the value of the second vector is The surface normal vector value of the object to be measured is taken at this time; The value range is 1 to integer variable of ; Indicates the sample size.
[0128] Respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to ; respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to .
[0129] according to to , to , to , to , to , to Establish fitting sample points; the fitting sample points are expressed as:
[0130] ;
[0131] According to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the X-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Y-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Z-axis mapping function.
[0132] The first function is calculated by using a function synthesis formula according to the X-axis mapping function, the Y-axis mapping function, and the Z-axis mapping function; the function synthesis formula is:
[0133] ;
[0134] in, represents the X-axis mapping function, represents the Y-axis mapping function, Represents the Z-axis mapping function.
[0135] Finally, it should be noted that: Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A light field data acquisition and processing method based on artificial intelligence, characterized in that: The method comprises the following steps: S1, placing a pre-constructed spherical light source array system in a pre-set three-dimensional coordinate space; the three-dimensional coordinate space includes an X-axis, a Y-axis and a Z-axis that are perpendicular to each other; the X-axis, the Y-axis and the Z-axis intersect at the origin; the geometric center of the spherical light source array system coincides with the origin of the three-dimensional coordinate space; the spherical light source array system includes a spherical bracket and a light source group installed on the spherical bracket, the light source group includes a first light source, a second light source, a third light source and a fourth light source; the fourth light source is installed at the vertex of the spherical bracket, and the first light source, the second light source and the third light source are installed at orthogonal positions of the spherical bracket; S2, placing the object to be tested at the origin, and making the ambient light illumination 0 lux, respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination, to obtain first to fourth illumination conditions; using a camera rigidly fixed to the surface of the object to be tested to respectively capture two-dimensional images of the object to be tested under the first to fourth illumination conditions, to obtain first to fourth illumination images; S3, performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain a first illumination value array to a fourth illumination value array; and obtaining a first vector by calculating the first illumination value array to the fourth illumination value array using a vector conversion formula; S4, performing spatial mapping on the first vector to obtain a surface normal vector; The method of calculating the first vector by a vector conversion formula according to the first illumination value array to the fourth illumination value array includes: According to the first illumination value array to the fourth illumination value array, a first vector is calculated by a vector conversion formula; the vector conversion formula is: ; in, represents the first vector, represents the unit vector in the direction of the X axis, Represents the unit vector in the Y-axis direction, Represents the unit vector in the Z-axis direction, is the preset number of horizontal divisions, is the preset number of vertical divisions, The value range is 1 to integer variable, The value range is 1 to integer variable, Indicates the first illumination value array. Line The elements of the column, Indicates the first Line The elements of the column, Indicates the third illumination value array. Line The elements of the column, Indicates the fourth lighting value array Line Elements of a column; The method of performing spatial mapping on the first vector to obtain the surface normal vector comprises: According to the first vector, a second vector is calculated using a normalization formula; the normalization formula is: ; in, represents the second vector; The projection of the second vector on the X-axis is recorded as , the projection of the second vector on the Y axis is recorded as , the projection of the second vector on the Z axis is recorded as ; According to the preset sample library, a nonlinear fitting algorithm is used to fit the mapping relationship between the surface normal vector and the second vector, which is recorded as the first function; the surface normal vector is calculated according to the first function and the second vector; the calculation formula of the surface normal vector is: ; in, represents the surface normal vector, represents the first function.
2. The method for collecting and processing light field data based on artificial intelligence according to claim 1, characterized in that: The method of installing the fourth light source at the vertex of the spherical bracket, and installing the first light source, the second light source, and the third light source at orthogonal positions of the spherical bracket includes: The fourth light source is installed at the vertex of the spherical bracket; the first light source is installed at the intersection of the spherical bracket and the X axis; the second light source is installed at the intersection of the spherical bracket and the Y axis; the third light source is installed at the intersection of the spherical bracket and the Z axis; The luminous intensity of the first light source in the X-axis direction is a preset first luminous intensity; the luminous intensity of the first light source in the Y-axis direction is a preset second luminous intensity; the luminous intensity of the first light source in the Z-axis direction is a preset second luminous intensity; the luminous intensity of the second light source in the X-axis direction is a preset second luminous intensity; the luminous intensity of the second light source in the Y-axis direction is a preset first luminous intensity; the luminous intensity of the second light source in the Z-axis direction is a preset second luminous intensity; the luminous intensity of the third light source in the X-axis direction is a preset second luminous intensity; the luminous intensity of the third light source in the Y-axis direction is a preset second luminous intensity; the luminous intensity of the third light source in the Z-axis direction is a preset first luminous intensity; the luminous intensity of the fourth light source in the X-axis direction is a preset first luminous intensity; the luminous intensity of the fourth light source in the Y-axis direction is a preset first luminous intensity; the luminous intensity of the fourth light source in the Z-axis direction is a preset first luminous intensity; The first luminous intensity and the second luminous intensity satisfy a light convergence condition; the light convergence condition is: ; in, Indicates the first luminous intensity, in candela; Indicates the second luminous intensity in candela; is the preset proportionality factor, The value of is greater than 1.
3. The method for collecting and processing light field data based on artificial intelligence according to claim 2, characterized in that: The method of placing the object to be measured at the origin, making the ambient light illumination 0 lux, and respectively starting the first light source, the second light source, the third light source, and the fourth light source for illumination to obtain the first to fourth illumination conditions includes: Place the spherical bracket in an environment with an ambient light intensity of 0 lux; place the object to be tested inside the spherical bracket so that the center of the object to be tested coincides with the origin; Start the first light source, and turn off the second, third and fourth light sources to obtain the first lighting condition; start the second light source, and turn off the first, third and fourth light sources to obtain the second lighting condition; start the third light source, and turn off the first, second and fourth light sources to obtain the third lighting condition; start the fourth light source, and turn off the first, second and third light sources to obtain the fourth lighting condition.
4. The method for collecting and processing light field data based on artificial intelligence according to claim 3, characterized in that: The method of performing numerical preprocessing on the first illumination image to the fourth illumination image to obtain the first illumination value array to the fourth illumination value array comprises: The first illumination image to the fourth illumination image are respectively divided into a predetermined number of horizontal divisions. and the number of vertical splits Divide into image grids to obtain first to fourth image grid groups; calculating the color values of pixels in the first to fourth image grid groups, and performing aggregation to obtain first to fourth color value arrays; A grayscale conversion algorithm is used to convert the first color value array to the fourth color value array into a first illumination value array to a fourth illumination value array.
5. The method for collecting and processing light field data based on artificial intelligence according to claim 4, characterized in that: The method of calculating the color values of pixels in the first image grid group to the fourth image grid group and aggregating them to obtain the first color value array to the fourth color value array includes: Get the pixel height from the first illumination image to the fourth illumination image and pixel width ; respectively for the first illumination image to the fourth illumination image The pixels are numbered; the first illumination image to the fourth illumination image are pixel-decomposed to obtain pixels; The calculation formula is: ; Calculate using image processing algorithms The RGB color value of each pixel is obtained The R value, G value and B value of each pixel point in the first image grid group to the fourth image grid group are averaged to obtain the first color value array to the fourth color value array; The color value array is represented as: ; in, Indicates color value array; Indicates Image grid group Line The average R value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the G value of the pixels in the image grid of the column; Indicates Image grid group Ranking The average value of the B value of the pixels in the image grid of the column; is an integer variable with values from 1 to 4.
6. The method for collecting and processing light field data based on artificial intelligence according to claim 5, characterized in that: The method of converting the first color value array to the fourth color value array into the first illumination value array to the fourth illumination value array using a grayscale conversion algorithm comprises: According to the first color value array to the fourth color value array, the first illumination value array to the fourth illumination value array are calculated using the weighted average brightness formula; wherein the first The array of lighting values is represented as: ; in, Indicates An array of lighting values, Indicates The first Line Elements of a column; The weighted average brightness formula is: 。 7. The method for collecting and processing light field data based on artificial intelligence according to claim 6, characterized in that: The method of fitting the mapping relationship between the surface normal vector and the second vector using a nonlinear fitting algorithm according to a preset sample library, which is recorded as a first function, includes: Obtain a preset sample library; the sample library is recorded as: ; in, Represents a sample library; Indicates sample; For the The first element of the sample; For the The second element of the sample indicates that the value of the second vector is The surface normal vector value of the object to be measured is taken at this time; The value range is 1 to integer variable of ; represents the sample size; Respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to ; respectively to The projection on the X-axis is denoted by to ; respectively to The projection on the Y axis is denoted by to ; respectively to The projection on the Z axis is denoted by to ; according to to , to , to , to , to , to Establish fitting sample points; the fitting sample points are expressed as: ; According to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the X-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Y-axis mapping function; according to the fitting sample points, the nonlinear fitting algorithm is used to fit and The functional relationship is recorded as the Z-axis mapping function; The first function is calculated by using a function synthesis formula according to the X-axis mapping function, the Y-axis mapping function, and the Z-axis mapping function; the function synthesis formula is: ; in, represents the X-axis mapping function, represents the Y-axis mapping function, Represents the Z-axis mapping function.
Citation Information
Patent Citations
Light irradiation analogy method of real time three-dimensional image based on pattern processor
CN101354794A
Three-dimensional reconstruction method for highlight repair of object surface
CN117197351A